YANGTOOLS-706: Split out yang-parser-rfc7950
[yangtools.git] / yang / yang-parser-rfc7950 / src / test / resources / semantic-statement-parser / two-revisions / ted@2013-10-21.yang
1 module ted {
2   yang-version 1;
3   namespace "urn:TBD:params:xml:ns:yang:network:ted";
4   // replace with IANA namespace when assigned
5   prefix ted;
6
7   import ietf-inet-types {
8     prefix inet;
9     revision-date 2010-09-24;
10   }
11
12   organization "TBD";
13   contact
14     "TBD";
15   description
16     "Helper module to hold TED attributes for OSPF/ISIS";
17
18   revision 2013-10-21 {
19
20     description
21       "Initial revision";
22   }
23
24   typedef switching-capabilities {
25     description
26       "Switching Capabilities of an interface.";
27     reference
28       "RFC 5307: IS-IS Extensions in Support of Generalized
29        Multi-Protocol Label Switching (GMPLS)";
30     type enumeration {
31       enum "PSC-1" {
32         description
33           "Packet-Switch Capable-1 (PSC-1)";
34         value 1;
35       }
36       enum "PSC-2" {
37         description
38           "Packet-Switch Capable-2 (PSC-2)";
39         value 2;
40       }
41       enum "PSC-3" {
42         description
43           "Packet-Switch Capable-3 (PSC-3)";
44         value 3;
45       }
46       enum "PSC-4" {
47         description
48           "Packet-Switch Capable-4 (PSC-4)";
49         value 4;
50       }
51       enum "L2SC" {
52         description
53           "Layer-2 Switch Capable (L2SC)";
54         value 51;
55       }
56       enum "TDM" {
57         description
58           "Time-Division-Multiplex Capable (TDM)";
59         value 100;
60       }
61       enum "LSC" {
62         description
63           "Lambda-Switch Capable (LSC)";
64         value 150;
65       }
66       enum "FSC" {
67         description
68
69           "Fiber-Switch Capable (FSC)";
70         value 200;
71       }
72     }
73   }
74
75   typedef pcc-capabilities {
76     description
77       "Path Computation Capabilities.";
78     reference
79       "RFC 5088, draft-ietf-pce-disco-protoc-isis-07.txt
80        OSPF/ISIS Protocol Extensions for Path Computation Element (PCE) Discovery.";
81     type bits {
82       bit path-computation-with-gmpls-link-constraints {
83         position 0;
84       }
85       bit bidirectional-path-computation {
86         position 1;
87       }
88       bit diverse-path-computation {
89         position 2;
90       }
91       bit load-balanced-path-computation {
92         position 3;
93       }
94       bit synchronized-path-computation {
95         position 4;
96       }
97       bit support-for-multiple-objective-functions {
98         position 5;
99       }
100       bit support-for-additive-path-constraints {
101         position 6;
102       }
103       bit support-for-request-prioritization {
104         position 7;
105       }
106       bit support-for-multiple-requests-per-message {
107         position 8;
108       }
109     }
110   }
111
112   grouping ted-node-attributes {
113     description
114       "Identifier to uniquely identify a node in TED";
115     reference "RFC 5305, RFC 6119: IPv6 Traffic Engineering in IS-IS/OSPF";
116     leaf te-router-id-ipv4 {
117
118       description
119         "Globally unique IPv4 Traffic Engineering Router ID.";
120       type inet:ipv4-address;
121     }
122     leaf te-router-id-ipv6 {
123       description
124         "Globally unique IPv6 Traffic Engineering Router ID";
125       type inet:ipv6-address;
126     }
127     list ipv4-local-address {
128       description
129         "List of IPv4 Local Address(OSPF). RFC 5786";
130       key "ipv4-prefix";
131       leaf ipv4-prefix {
132         description
133           "Local IPv4 address for the node";
134         type inet:ipv4-prefix;
135       }
136     }
137     list ipv6-local-address {
138       description
139         "List of IPv6 Local Address.";
140       reference
141         "RFC 5786: Advertising a Router's Local Addresses
142          in OSPF Traffic Engineering (TE) Extensions";
143       key "ipv6-prefix";
144       leaf ipv6-prefix {
145         description
146           "Local IPv6 address for the node";
147         type inet:ipv6-prefix;
148       }
149       leaf prefix-option {
150         description
151           "IPv6 prefix option.";
152         type uint8;
153       }
154     }
155     leaf pcc-capabilities {
156       description
157         "OSPF/ISIS PCC capabilities";
158       type pcc-capabilities;
159     }
160   }
161
162   grouping ted-link-attributes {
163     description
164       "TED Attributes associated with the link.";
165     reference "RFC 3630, RFC 3784: IS-IS / OSPF Traffic Engineering (TE)";
166
167     leaf color {
168       description
169         "Administrative group or color of the link";
170       type uint32;
171     }
172     leaf max-link-bandwidth {
173       description
174         "Maximum bandwidth that can be see on this link in this direction. Units in bytes per second";
175       type decimal64 {
176         fraction-digits 2;
177       }
178     }
179     leaf max-resv-link-bandwidth {
180       description
181         "Maximum amount of bandwidth that can be reserved in this direction in this link. Units in bytes per second";
182       type decimal64 {
183         fraction-digits 2;
184       }
185     }
186     list unreserved-bandwidth {
187       description
188         "Unreserved bandwidth for 0-7 priority levels. Units in bytes per second";
189       max-elements "8";
190       key "priority";
191       leaf priority {
192         type uint8 {
193           range "0..7";
194         }
195       }
196       leaf bandwidth {
197         description
198           "Unreserved bandwidth for this level";
199         type decimal64 {
200           fraction-digits 2;
201         }
202       }
203     }
204     leaf te-default-metric {
205       description
206         "Traffic Engineering Metric";
207       type uint32;
208     }
209     container srlg {
210       description
211         "Shared Risk Link Group Attributes";
212       uses srlg-attributes;
213     }
214   }
215
216   grouping srlg-attributes {
217     description
218       "Shared Risk Link Group Attributes";
219     reference
220       "RFC 5307, RFC 4203: ISIS / OSPF Extensions in Support of
221        Generalized Multi-Protocol Label Switching (GMPLS)";
222     list interface-switching-capabilities {
223       description
224         "List of interface capabilities for this interface";
225       key "switching-capability";
226       leaf switching-capability {
227         description
228           "Switching Capability for this interface";
229         type ted:switching-capabilities;
230       }
231       leaf encoding {
232         description
233           "Encoding supported by this interface";
234         type uint8;
235       }
236       list max-lsp-bandwidth {
237         description
238           "Maximum LSP Bandwidth at priorities 0-7";
239         max-elements "8";
240         key "priority";
241         leaf priority {
242           type uint8 {
243             range "0..7";
244           }
245         }
246         leaf bandwidth {
247           description
248             "Max LSP Bandwidth for this level";
249           type decimal64 {
250             fraction-digits 2;
251           }
252         }
253       }
254       container packet-switch-capable {
255         when "../switching-capability = PSC-1 or ../switching-capability = PSC-2 or ../switching-capability = PSC-3 or ../switching-capability = PSC-4";
256         description
257           "Interface has packet-switching capabilities";
258         leaf minimum-lsp-bandwidth {
259           description
260             "Minimum LSP Bandwidth. Units in bytes per second";
261           type decimal64 {
262             fraction-digits 2;
263           }
264
265         }
266         leaf interface-mtu {
267           description
268             "Interface MTU";
269           type uint16;
270         }
271       }
272       container time-division-multiplex-capable {
273         when "../switching-capability = TDM";
274         description
275           "Interface has time-division multiplex capabilities";
276         leaf minimum-lsp-bandwidth {
277           description
278             "Minimum LSP Bandwidth. Units in bytes per second";
279           type decimal64 {
280             fraction-digits 2;
281           }
282         }
283         leaf indication {
284           description
285             "Indication whether the interface supports Standard or Arbitrary SONET/SDH";
286           type uint16;
287         }
288       }
289     }
290     list srlg-values {
291       description
292         "List of Shared Risk Link Group this interface belongs to.";
293       key "srlg-value";
294       leaf srlg-value {
295         description
296           "Shared Risk Link Group value";
297         type uint32;
298       }
299     }
300     leaf link-protection-type {
301       description
302         "Link Protection Type desired for this link";
303       type uint16;
304     }
305   }
306 }