Merge "Add model of graceful-restart capability"
[bgpcep.git] / pcep / tunnel-api / src / main / yang / topology-tunnel-pcep.yang
1 module topology-tunnel-pcep {
2         // vi: set et smarttab sw=4 tabstop=4:
3         yang-version 1;
4         namespace "urn:opendaylight:params:xml:ns:yang:topology:tunnel:pcep";
5         prefix "pceptun";
6
7         import network-topology { prefix nt; revision-date 2013-10-21; }
8     import nps-concepts { prefix nps-c; }
9         import pcep-types { prefix pcep; revision-date 2013-10-05; }
10         import rsvp { prefix rsvp; revision-date 2013-08-20; }
11         import topology-tunnel { prefix tt; revision-date 2013-08-19; }
12         import topology-tunnel-p2p { prefix p2p; revision-date 2013-08-19; }
13
14         organization "Cisco Systems, Inc.";
15         contact "Robert Varga <rovarga@cisco.com>";
16
17         description
18                 "This module contains the PCEP extensions to base tunnel
19                 topology model.
20
21                 Copyright (c)2013 Cisco Systems, Inc. All rights reserved.";
22
23         revision "2013-08-20" {
24                 description
25                         "Initial revision.";
26                 reference "";
27         }
28
29         typedef administrative-status {
30                 type enumeration {
31                         enum active;
32                         enum inactive;
33                 }
34                 reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-7.3";
35         }
36
37         grouping topology-tunnel-pcep-type {
38                 container topology-tunnel-pcep {
39                         presence "indicates a PCEP tunnel-aware topology";
40                 }
41         }
42
43         augment "/nt:network-topology/nt:topology/nt:topology-types" {
44                 uses topology-tunnel-pcep-type;
45         }
46
47     grouping tunnel-pcep-supporting-node-attributes {
48         container path-computation-client {
49             leaf controlling {
50                 type boolean;
51                 default false;
52             }
53         }
54     }
55
56         augment "/nt:network-topology/nt:topology/nt:node/nt:supporting-node" {
57         when "../../../nt:topology-types/topology-tunnel-pcep";
58
59         uses tunnel-pcep-supporting-node-attributes;
60     }
61
62         grouping tunnel-pcep-type {
63                 container pcep-tunnel {
64                         presence "indicates a link is a PCEP tunnel";
65                 }
66         }
67
68         augment "/nt:network-topology/nt:topology/nt:link/tt:tunnel-types" {
69                 uses tunnel-pcep-type;
70         }
71
72         grouping tunnel-pcep-link-cfg-attributes {
73                 leaf administrative-status {
74                         type administrative-status;
75                 }
76
77                 leaf class-type {
78                         type pcep:class-type;
79                 }
80
81                 leaf bandwidth {
82                         type nps-c:bandwidth;
83                 }
84
85         leaf symbolic-path-name {
86             type pcep:symbolic-path-name;
87         }
88
89         uses rsvp:tunnel-attributes;
90         }
91
92         grouping tunnel-pcep-link-oper-attributes {
93                 leaf operational-status {
94                         type pcep:operational-status;
95                         config false;
96                 }
97         }
98
99         grouping tunnel-pcep-path-attributes {
100                 leaf administrative-status {
101                         type administrative-status;
102                 }
103
104                 leaf operational-status {
105                         type pcep:operational-status;
106                         config false;
107                 }
108         }
109
110         augment "/nt:network-topology/nt:topology/nt:link" {
111                 when "../../tunnel-types/pcep-tunnel";
112                 uses tunnel-pcep-link-cfg-attributes;
113                 uses tunnel-pcep-link-oper-attributes;
114         }
115
116         augment "/nt:network-topology/nt:topology/tt:paths" {
117                 when "../../tunnel-types/pcep-tunnel";
118                 uses tunnel-pcep-path-attributes;
119         }
120
121         augment "/nt:network-topology/nt:topology/tt:paths/p2p:explicit-hops" {
122                 when "../../tunnel-types/pcep-tunnel";
123                 uses rsvp:explicit-route-subobjects;
124         }
125
126         augment "/nt:network-topology/nt:topology/tt:paths/p2p:reported-hops" {
127                 when "../../tunnel-types/pcep-tunnel";
128                 uses rsvp:record-route-subobjects;
129         }
130 }
131