Fix junit dependencies in poms. Reuse existing from parent,
[bgpcep.git] / topology / api / src / main / yang / ted.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   }
10
11   organization "TBD";
12   contact
13     "TBD";
14
15   description
16     "Helper module to hold TED attributes for OSPF/ISIS";
17
18   revision 2013-07-12 {
19     description
20       "Initial revision";
21   }
22
23   typedef switching-capabilities {
24     description
25       "Switching Capabilities of an interface.";
26     reference
27       "RFC 5307: IS-IS Extensions in Support of Generalized
28        Multi-Protocol Label Switching (GMPLS)";
29     type enumeration {
30       enum "PSC-1" {
31         description
32           "Packet-Switch Capable-1 (PSC-1)";
33         value 1;
34       }
35       enum "PSC-2" {
36         description
37           "Packet-Switch Capable-2 (PSC-2)";
38         value 2;
39       }
40       enum "PSC-3" {
41         description
42           "Packet-Switch Capable-3 (PSC-3)";
43         value 3;
44       }
45       enum "PSC-4" {
46         description
47           "Packet-Switch Capable-4 (PSC-4)";
48         value 4;
49       }
50       enum "L2SC" {
51         description
52           "Layer-2 Switch Capable (L2SC)";
53         value 51;
54       }
55       enum "TDM" {
56         description
57           "Time-Division-Multiplex Capable (TDM)";
58         value 100;
59       }
60       enum "LSC" {
61         description
62           "Lambda-Switch Capable (LSC)";
63
64         value 150;
65       }
66       enum "FSC" {
67         description
68           "Fiber-Switch Capable (FSC)";
69         value 200;
70       }
71     }
72   }
73
74   typedef pcc-capabilities {
75     description
76       "Path Computation Capabilities.";
77     reference
78       "RFC 5088, draft-ietf-pce-disco-protoc-isis-07.txt
79        OSPF/ISIS Protocol Extensions for Path Computation Element (PCE) Discovery.";
80     type bits {
81       bit path-computation-with-gmpls-link-constraints {
82         position 0;
83       }
84       bit bidirectional-path-computation {
85         position 1;
86       }
87       bit diverse-path-computation {
88         position 2;
89       }
90       bit load-balanced-path-computation {
91         position 3;
92       }
93       bit synchronized-path-computation {
94         position 4;
95       }
96       bit support-for-multiple-objective-functions {
97         position 5;
98       }
99       bit support-for-additive-path-constraints {
100         position 6;
101       }
102       bit support-for-request-prioritization {
103         position 7;
104       }
105       bit support-for-multiple-requests-per-message {
106         position 8;
107       }
108     }
109   }
110
111   grouping ted-node-attributes {
112
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       description
118         "Globally unique IPv4 Traffic Engineering Router ID.";
119       type inet:ipv4-address;
120     }
121     leaf te-router-id-ipv6 {
122       description
123         "Globally unique IPv6 Traffic Engineering Router ID";
124       type inet:ipv6-address;
125     }
126     list ipv4-local-address {
127       description
128         "List of IPv4 Local Address(OSPF). RFC 5786";
129       key "ipv4-prefix";
130       leaf ipv4-prefix {
131         description
132           "Local IPv4 address for the node";
133         type inet:ipv4-prefix;
134       }
135     }
136     list ipv6-local-address {
137       description
138         "List of IPv6 Local Address.";
139       reference
140         "RFC 5786: Advertising a Router's Local Addresses
141          in OSPF Traffic Engineering (TE) Extensions";
142       key "ipv6-prefix";
143       leaf ipv6-prefix {
144         description
145           "Local IPv6 address for the node";
146         type inet:ipv6-prefix;
147       }
148       leaf prefix-option {
149         description
150           "IPv6 prefix option.";
151         type uint8;
152       }
153     }
154     leaf pcc-capabilities {
155       description
156         "OSPF/ISIS PCC capabilities";
157       type pcc-capabilities;
158     }
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     leaf color {
167       description
168         "Administrative group or color of the link";
169       type uint32;
170     }
171     leaf max-link-bandwidth {
172       description
173         "Maximum bandwidth that can be see on this link in this direction. Units in bytes per second";
174       type decimal64 {
175         fraction-digits 2;
176       }
177     }
178     leaf max-resv-link-bandwidth {
179       description
180         "Maximum amount of bandwidth that can be reserved in this direction in this link. Units in bytes per second";
181       type decimal64 {
182         fraction-digits 2;
183       }
184     }
185     list unreserved-bandwidth {
186       description
187         "Unreserved bandwidth for 0-7 priority levels. Units in bytes per second";
188       max-elements "8";
189       key "priority";
190       leaf priority {
191         type uint8 {
192           range "0..7";
193         }
194       }
195       leaf bandwidth {
196         description
197           "Unreserved bandwidth for this level";
198         type decimal64 {
199           fraction-digits 2;
200         }
201       }
202     }
203     leaf te-default-metric {
204       description
205         "Traffic Engineering Metric";
206       type uint32;
207     }
208     container srlg {
209       description
210
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
260           description
261             "Minimum LSP Bandwidth. Units in bytes per second";
262           type decimal64 {
263             fraction-digits 2;
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 }