e1d29fe5d40c6cca2a8504e4eb6ae0f3e96d9696
[bgpcep.git] / topology / segment-routing / src / main / yang / topology-tunnel-sr.yang
1 module topology-tunnel-sr {
2     yang-version 1;
3     namespace "urn:opendaylight:params:xml:ns:yang:topology:tunnel:sr";
4     prefix "tun-sr";
5
6     import network-topology-sr { prefix sr; revision-date 2013-08-19; }
7     import network-topology { prefix nt; revision-date 2013-10-21; }
8     import topology-tunnel { prefix tt; revision-date 2013-08-19; }
9     import topology-tunnel-p2p { prefix p2p; revision-date 2013-08-19; }
10
11     organization "Cisco Systems, Inc.";
12     contact "Robert Varga <rovarga@cisco.com>";
13
14     description
15         "This module contains the Segment Routing extensions to
16         base tunnel topology model.
17
18         Copyright (c)2013 Cisco Systems, Inc. All rights reserved.
19
20         This program and the accompanying materials are made available
21         under the terms of the Eclipse Public License v1.0 which
22         accompanies this distribution, and is available at
23         http://www.eclipse.org/legal/epl-v10.html";
24
25     revision "2013-08-19" {
26         description
27             "Initial revision.";
28         reference "";
29     }
30
31     grouping tunnel-sr-type {
32         container sr-tunnel {
33             presence "indicates a link is a Segment Routed tunnel";
34         }
35     }
36
37     grouping tunnel-sr-path-p2p-hop-attributes {
38         leaf segment-id {
39             type sr:segment-id;
40         }
41     }
42
43     augment "/nt:network-topology/nt:topology/tt:paths/tt:path-types" {
44         uses tunnel-sr-type;
45     }
46
47     augment "/nt:network-topology/nt:topology/tt:paths/p2p:explicit-hops" {
48         when "../../tunnel-types/sr-tunnel";
49         uses tunnel-sr-path-p2p-hop-attributes;
50     }
51
52     augment "/nt:network-topology/nt:topology/tt:paths/p2p:reported-hops" {
53         when "../../path-types/sr-tunnel";
54         uses tunnel-sr-path-p2p-hop-attributes;
55     }
56 }
57