Rome hackathon work integrated onto boron.
[unimgr.git] / cisco-xrmodels / src / main / yang / Cisco-IOS-XR-ip-static-cfg@2015-09-10.yang
1 module Cisco-IOS-XR-ip-static-cfg {
2
3   /*** NAMESPACE / PREFIX DEFINITION ***/
4
5   namespace "http://cisco.com/ns/yang/Cisco-IOS-XR-ip-static-cfg";
6
7
8   prefix "ip-static-cfg";
9
10   /*** LINKAGE (IMPORTS / INCLUDES) ***/
11
12   import ietf-inet-types { prefix "inet"; }
13
14   import Cisco-IOS-XR-types { prefix "xr"; }
15
16   /*** META INFORMATION ***/
17
18   organization "Cisco Systems, Inc.";
19
20   contact
21     "Cisco Systems, Inc.
22      Customer Service
23
24      Postal: 170 West Tasman Drive
25      San Jose, CA 95134
26
27      Tel: +1 800 553-NETS
28
29      E-mail: cs-yang@cisco.com";
30
31   description 
32     "This module contains a collection of YANG definitions
33      for Cisco IOS-XR ip-static package configuration.
34
35      This module contains definitions
36      for the following management objects:
37        router-static: This class represents router static
38          configuration
39
40      Copyright (c) 2013-2015 by Cisco Systems, Inc.
41      All rights reserved.";
42
43   revision "2015-09-10" {
44     description
45       "Descriptions updated.";
46   }
47
48   revision "2015-01-07" {
49     description
50       "IOS XR 5.3.1 revision.";
51   }
52
53
54   grouping VRF-ROUTE {
55     description "Common node of vrf-prefix, vrf-prefix-topology";
56
57     container vrf-route {
58       xr:xr-xml-map "ip_static_cfg:VRFRoute";
59       description "A connected or recursive  static route";
60
61       container vrf-next-hop-table {
62         xr:xr-xml-map "ip_static_cfg:VRFNextHopTable";
63         description
64           "The set of nexthop information configured for
65           this route";
66         uses VRF-NEXT-HOP;
67       }
68     }
69   }
70
71   grouping VRF-NEXT-HOP {
72     description
73       "Common node of vrf-next-hop-table,
74       segment-route-next-hop-table";
75
76     grouping VRF-NEXT-HOP-CONTENT {
77       description "VRF NEXT HOP CONTENT";
78       leaf bfd-fast-detect {
79         xr:xr-xml-map "ip_static_cfg:BFDFastDetect";
80         type boolean;
81         default "false";
82         description "If set, bfd is enabled";
83       }
84       leaf minimum-interval {
85         xr:xr-xml-map "ip_static_cfg:MinimumInterval";
86         type uint32 {
87           range "3..30000";
88         }
89         units "millisecond";
90         default "100";
91         description "BFD Hello interval in milliseconds";
92       }
93       leaf detect-multiplier {
94         xr:xr-xml-map "ip_static_cfg:DetectMultiplier";
95         type uint32 {
96           range "1..10";
97         }
98         default "3";
99         description "BFD Detect Multiplier";
100       }
101       leaf metric {
102         xr:xr-xml-map "ip_static_cfg:Metric";
103         type uint32 {
104           range "1..254";
105         }
106         default "1";
107         description "Distance metric for this path";
108       }
109       leaf tag {
110         xr:xr-xml-map "ip_static_cfg:Tag";
111         type uint32 {
112           range "1..4294967295";
113         }
114         description "Tag for this path";
115       }
116       leaf permanent {
117         xr:xr-xml-map "ip_static_cfg:Permanent";
118         type boolean;
119         default "false";
120         description "If set, path is permanent";
121       }
122       leaf vrf-lable {
123         xr:xr-xml-map "ip_static_cfg:VRFLable";
124         type uint32 {
125           range "0..4294967295";
126         }
127         default "0";
128         description "VRF LABEL";
129       }
130       leaf tunnel-id {
131         xr:xr-xml-map "ip_static_cfg:TunnelID";
132         type uint32 {
133           range "0..65535";
134         }
135         default "0";
136         description "Tunnel ID for this path";
137       }
138       leaf object-name {
139         xr:xr-xml-map "ip_static_cfg:ObjectName";
140         type xr:Cisco-ios-xr-string {
141           length "0..32";
142         }
143         description "Name of the object to track";
144       }
145       leaf description {
146         xr:xr-xml-map "ip_static_cfg:Description";
147         type string;
148         description "Short Description of Static Route";
149       }
150       leaf load-metric {
151         xr:xr-xml-map "ip_static_cfg:Load_Metric";
152         type uint32 {
153           range "1..16777214";
154         }
155         default "1";
156         description "UCMP load metric";
157       }
158     }
159
160     list vrf-next-hop-interface-name {
161       key "interface-name";
162       description
163         "A forwarding interface or Segement Routing mpls
164         path name and/or the address of a nexthop router
165         for this route (one of these must be specified)";
166       leaf interface-name {
167         xr:xr-xml-map "ip_static_cfg:InterfaceName";
168         type xr:Interface-name;
169         description "Forwarding interface";
170       }
171       uses VRF-NEXT-HOP-CONTENT;
172     }
173
174     list vrf-next-hop-interface-name-next-hop-address {
175       key "interface-name next-hop-address";
176       description
177         "A forwarding interface or Segement Routing mpls
178         path name and/or the address of a nexthop router
179         for this route (one of these must be specified)";
180       leaf interface-name {
181         xr:xr-xml-map "ip_static_cfg:InterfaceName";
182         type xr:Interface-name;
183         description "Forwarding interface";
184       }
185       leaf next-hop-address {
186         xr:xr-xml-map "ip_static_cfg:NextHopAddress";
187         type inet:ip-address-no-zone;
188         description "Next hop address";
189       }
190       uses VRF-NEXT-HOP-CONTENT;
191     }
192
193     list vrf-next-hop-next-hop-address {
194       key "next-hop-address";
195       description
196         "A forwarding interface or Segement Routing mpls
197         path name and/or the address of a nexthop router
198         for this route (one of these must be specified)";
199       leaf next-hop-address {
200         xr:xr-xml-map "ip_static_cfg:NextHopAddress";
201         type inet:ip-address-no-zone;
202         description "Next hop address";
203       }
204       uses VRF-NEXT-HOP-CONTENT;
205     }
206
207     list vrf-next-hop-next-hop-address-explicit-path-name {
208       key "next-hop-address explicit-path-name";
209       description
210         "A forwarding interface or Segement Routing mpls
211         path name and/or the address of a nexthop router
212         for this route (one of these must be specified)";
213       leaf next-hop-address {
214         xr:xr-xml-map "ip_static_cfg:NextHopAddress";
215         type inet:ip-address-no-zone;
216         description "Next hop address";
217       }
218       leaf explicit-path-name {
219         xr:xr-xml-map "ip_static_cfg:ExplicitPathName";
220         type xr:Cisco-ios-xr-string;
221         description "Segment Routing mpls path name";
222       }
223       uses VRF-NEXT-HOP-CONTENT;
224     }
225
226     list vrf-next-hop-explicit-path-name {
227       key "explicit-path-name";
228       description
229         "A forwarding interface or Segement Routing mpls
230         path name and/or the address of a nexthop router
231         for this route (one of these must be specified)";
232       leaf explicit-path-name {
233         xr:xr-xml-map "ip_static_cfg:ExplicitPathName";
234         type xr:Cisco-ios-xr-string;
235         description "Segment Routing mpls path name";
236       }
237       uses VRF-NEXT-HOP-CONTENT;
238     }
239   }
240
241   grouping VRF-SEG-ROUTE {
242     description "Common node of vrf-prefix, vrf-prefix-topology";
243
244     container vrf-seg-route {
245       xr:xr-xml-map "ip_static_cfg:VRFSegRoute";
246       description "A static segment route";
247
248       container segment-route-next-hop-table {
249         xr:xr-xml-map "ip_static_cfg:SegmentRouteNextHopTable";
250         description
251           "The set of nexthop information configured for
252           this route";
253         uses VRF-NEXT-HOP;
254       }
255     }
256   }
257
258   grouping TOPOLOGY-TABLE {
259     description "Common node of vrf-unicast, vrf-multicast";
260
261     container topologies {
262       xr:xr-xml-map "ip_static_cfg:TopologyTable";
263       description "Topology static configuration container";
264
265       list topology {
266         xr:xr-xml-map "ip_static_cfg:Topology";
267         key "topology-name";
268         description "Topology static configuration";
269         leaf topology-name {
270           xr:xr-xml-map "ip_static_cfg:TopologyName";
271           type xr:Cisco-ios-xr-string;
272           description "Topology name";
273         }
274         uses VRF-PREFIX-TOPOLOGY-TABLE;
275       }
276     }
277   }
278
279   grouping VRF-PREFIX-TABLE {
280     description "Common node of vrf-unicast, vrf-multicast";
281
282     container vrf-prefixes {
283       xr:xr-xml-map "ip_static_cfg:VRFPrefixTable";
284       description "The set of all Static Topologies for this AFI.";
285
286       list vrf-prefix {
287         xr:xr-xml-map "ip_static_cfg:VRFPrefix";
288         key "prefix prefix-length";
289         description "A static route";
290         leaf prefix {
291           xr:xr-xml-map "ip_static_cfg:Prefix";
292           type inet:ip-address-no-zone;
293           description "Destination prefix";
294         }
295         leaf prefix-length {
296           xr:xr-xml-map "ip_static_cfg:PrefixLength";
297           type uint32 {
298             range "0..128";
299           }
300           description "Destination prefix length";
301         }
302         uses VRF-ROUTE;
303         uses VRF-SEG-ROUTE;
304       }
305     }
306   }
307
308   grouping ADDRESS-FAMILY {
309     description "Common node of default-vrf, vrf";
310
311     container address-family {
312       xr:xr-xml-map "ip_static_cfg:AddressFamily";
313       description "Address family configuration";
314
315       container vrfipv4 {
316         xr:xr-xml-map "ip_static_cfg:VRFIPV4";
317         description "IPv4 static configuration";
318         uses VRF-UNICAST;
319         uses VRF-MULTICAST;
320       }
321
322       container vrfipv6 {
323         xr:xr-xml-map "ip_static_cfg:VRFIPV6";
324         description "IPv6 static configuration";
325         uses VRF-UNICAST;
326         uses VRF-MULTICAST;
327       }
328     }
329   }
330
331   grouping VRF-PREFIX-TOPOLOGY-TABLE {
332     description "Common node of default-topology, topology";
333
334     container vrf-prefix-topologies {
335       xr:xr-xml-map "ip_static_cfg:VRFPrefixTopologyTable";
336       description "The set of all Static Topologies for this AFI.";
337
338       list vrf-prefix-topology {
339         xr:xr-xml-map "ip_static_cfg:VRFPrefixTopology";
340         key "prefix prefix-length";
341         description "A static route";
342         leaf prefix {
343           xr:xr-xml-map "ip_static_cfg:Prefix";
344           type inet:ip-address-no-zone;
345           description "Destination prefix";
346         }
347         leaf prefix-length {
348           xr:xr-xml-map "ip_static_cfg:PrefixLength";
349           type uint32 {
350             range "0..128";
351           }
352           description "Destination prefix length";
353         }
354         uses VRF-ROUTE;
355         uses VRF-SEG-ROUTE;
356       }
357     }
358   }
359
360   grouping DEFAULT-TOPOLOGY {
361     description "Common node of vrf-unicast, vrf-multicast";
362
363     container default-topology {
364       xr:xr-xml-map "ip_static_cfg:DefaultTopology";
365       description "Default topology configuration";
366       uses VRF-PREFIX-TOPOLOGY-TABLE;
367     }
368   }
369
370   grouping VRF-UNICAST {
371     description "Common node of vrfipv4, vrfipv6";
372
373     container vrf-unicast {
374       xr:xr-xml-map "ip_static_cfg:VRFUnicast";
375       description "Unicast static configuration";
376       uses TOPOLOGY-TABLE;
377       uses VRF-PREFIX-TABLE;
378       uses DEFAULT-TOPOLOGY;
379     }
380   }
381
382   grouping VRF-MULTICAST {
383     description "Common node of vrfipv4, vrfipv6";
384
385     container vrf-multicast {
386       xr:xr-xml-map "ip_static_cfg:VRFMulticast";
387       description "Multicast static configuration";
388       uses TOPOLOGY-TABLE;
389       uses VRF-PREFIX-TABLE;
390       uses DEFAULT-TOPOLOGY;
391     }
392   }
393
394   container router-static {
395     xr:xr-xml-map "ip_static_cfg:RouterStatic";
396     description "This class represents router static configuration";
397
398     container vrfs {
399       xr:xr-xml-map "ip_static_cfg:VRFTable";
400       description "VRF static configuration container";
401
402       list vrf {
403         xr:xr-xml-map "ip_static_cfg:VRF";
404         key "vrf-name";
405         description "VRF static configuration";
406         leaf vrf-name {
407           xr:xr-xml-map "ip_static_cfg:VRFName";
408           type xr:Cisco-ios-xr-string;
409           description "VRF name";
410         }
411         uses ADDRESS-FAMILY;
412       }
413     }
414
415     container default-vrf {
416       xr:xr-xml-map "ip_static_cfg:DefaultVRF";
417       description "Default VRF configuration";
418       uses ADDRESS-FAMILY;
419     }
420
421     container maximum-routes {
422       xr:xr-xml-map "ip_static_cfg:MaximumRoutes";
423       description
424         "The maximum number of static routes that can be
425         configured.";
426       leaf ipv6-routes {
427         xr:xr-xml-map "ip_static_cfg:IPV6Routes";
428         type uint32 {
429           range "1..140000";
430         }
431         default "4000";
432         description
433           "The maximum number of static routes that can be
434           configured for IPv6 AFI.";
435       }
436       leaf ipv4-routes {
437         xr:xr-xml-map "ip_static_cfg:IPV4Routes";
438         type uint32 {
439           range "1..140000";
440         }
441         default "4000";
442         description
443           "The maximum number of static routes that can be
444           configured for IPv4 AFI.";
445       }
446     }
447   }
448 }