1 module ietf-ipv4-unicast-routing {
3 namespace "urn:ietf:params:xml:ns:yang:ietf-ipv4-unicast-routing";
11 import ietf-inet-types {
15 //TODO modification needed because of yangtools bug(unable to proceed augmentation in separate model of augmentation in this model)
21 "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
24 "WG Web: <http://tools.ietf.org/wg/netmod/>
25 WG List: <mailto:netmod@ietf.org>
27 WG Chair: Thomas Nadeau
28 <mailto:tnadeau@lucidvision.com>
30 WG Chair: Juergen Schoenwaelder
31 <mailto:j.schoenwaelder@jacobs-university.de>
33 Editor: Ladislav Lhotka
34 <mailto:lhotka@nic.cz>";
37 "This YANG module augments the 'ietf-routing' module with basic
38 configuration and operational state data for IPv4 unicast
41 Copyright (c) 2014 IETF Trust and the persons identified as
42 authors of the code. All rights reserved.
44 Redistribution and use in source and binary forms, with or
45 without modification, is permitted pursuant to, and subject to
46 the license terms contained in, the Simplified BSD License set
47 forth in Section 4.c of the IETF Trust's Legal Provisions
48 Relating to IETF Documents
49 (http://trustee.ietf.org/license-info).
51 This version of this YANG module is part of RFC XXXX; see the
52 RFC itself for full legal notices.";
58 "RFC XXXX: A YANG Data Model for Routing Management";
63 identity ipv4-unicast {
66 "This identity represents the IPv4 unicast address family.";
69 /* Operational state data */
71 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route" {
72 when "../../rt:address-family = 'v4ur:ipv4-unicast'" {
74 "This augment is valid only for IPv4 unicast.";
77 "This leaf augments an IPv4 unicast route.";
78 leaf destination-prefix {
79 type inet:ipv4-prefix;
81 "IPv4 destination prefix.";
85 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/"
86 + "rt:next-hop-options/rt:simple-next-hop" {
87 when "../../rt:address-family = 'v4ur:ipv4-unicast'" {
89 "This augment is valid only for IPv4 unicast.";
92 "This leaf augments the 'simple-next-hop' case of IPv4 unicast
95 type inet:ipv4-address;
97 "IPv4 address of the next-hop.";
101 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/"
102 + "rt:next-hop-options/rt:next-hop-list/rt:next-hop-list/"
104 when "../../../../rt:address-family = 'v4ur:ipv4-unicast'" {
106 "This augment is valid only for IPv4 unicast.";
108 if-feature rt:multipath-routes;
110 "This leaf augments the 'next-hop-list' case of IPv4 unicast
113 type inet:ipv4-address;
115 "IPv4 address of the next-hop.";
119 //NODE Added same augmentation for operation state
120 augment "/rt:routing-state/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/rt:static-routes" {
122 "This augment defines the configuration of the 'static'
123 pseudo-protocol with data specific to IPv4 unicast.";
126 "Configuration of a 'static' pseudo-protocol instance
127 consists of a list of routes.";
132 "A user-ordered list of static routes.";
135 //WARNING - range changed from 1..max to be mappable on vpp table ids
139 "Unique numeric identifier of the route.
141 This value is unrelated to system-assigned 'id'
142 parameters of routes in RIBs.";
147 "Textual description of the route.";
149 leaf destination-prefix {
150 type inet:ipv4-prefix;
153 "IPv4 destination prefix.";
155 choice next-hop-options {
158 "Options for expressing the next-hop in static routes.";
159 case special-next-hop {
160 uses rt:special-next-hop-grouping;
162 case simple-next-hop {
164 type inet:ipv4-address;
166 "IPv4 address of the next-hop.";
169 //TODO - temporarily set to absolute path until https://bugs.opendaylight.org/show_bug.cgi?id=6881 is resolved
170 leaf outgoing-interface {
172 path "/rt:routing/rt:routing-instance/rt:interfaces/rt:interface/"
176 "Name of the outgoing interface.
178 Only interfaces configured for the ancestor routing
179 instance can be given.";
183 if-feature rt:multipath-routes;
184 container next-hop-list {
186 "Configuration of multiple next-hops.";
190 "An entry of a next-hop list.";
194 "Unique numeric identifier of the entry.
196 This value is unrelated to system-assigned 'id'
197 parameters of next-hops in RIBs.";
200 type inet:ipv4-address;
202 "IPv4 address of the next-hop.";
204 //TODO - temporarily set to absolute path until https://bugs.opendaylight.org/show_bug.cgi?id=6881 is resolved
205 leaf outgoing-interface {
207 path "/rt:routing/rt:routing-instance/rt:interfaces/"
208 + "rt:interface/rt:name";
211 "Name of the outgoing interface.
213 Only interfaces configured for the ancestor
214 routing instance can be given.";
216 uses rt:next-hop-classifiers {
229 //TODO modification needed because of yangtools bug(unable to proceed augmentation in separate model of augmentation in this model)
230 container vpp-ipv4-route-state{
231 uses vpp-r:vpp-routing-state-attributes;
238 /* Configuration data */
240 augment "/rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/rt:static-routes" {
242 "This augment defines the configuration of the 'static'
243 pseudo-protocol with data specific to IPv4 unicast.";
246 "Configuration of a 'static' pseudo-protocol instance
247 consists of a list of routes.";
252 "A user-ordered list of static routes.";
255 //WARNING - range changed from 1..max to be mappable on vpp table ids
259 "Unique numeric identifier of the route.
261 This value is unrelated to system-assigned 'id'
262 parameters of routes in RIBs.";
267 "Textual description of the route.";
269 leaf destination-prefix {
270 type inet:ipv4-prefix;
273 "IPv4 destination prefix.";
275 choice next-hop-options {
278 "Options for expressing the next-hop in static routes.";
279 case special-next-hop {
280 uses rt:special-next-hop-grouping;
282 case simple-next-hop {
284 type inet:ipv4-address;
286 "IPv4 address of the next-hop.";
289 //TODO - temporarily set to absolute path until https://bugs.opendaylight.org/show_bug.cgi?id=6881 is resolved
290 leaf outgoing-interface {
292 path "/rt:routing/rt:routing-instance/rt:interfaces/rt:interface/"
296 "Name of the outgoing interface.
298 Only interfaces configured for the ancestor routing
299 instance can be given.";
303 if-feature rt:multipath-routes;
304 container next-hop-list {
306 "Configuration of multiple next-hops.";
310 "An entry of a next-hop list.";
314 "Unique numeric identifier of the entry.
316 This value is unrelated to system-assigned 'id'
317 parameters of next-hops in RIBs.";
320 type inet:ipv4-address;
322 "IPv4 address of the next-hop.";
324 //TODO - temporarily set to absolute path until https://bugs.opendaylight.org/show_bug.cgi?id=6881 is resolved
325 leaf outgoing-interface {
327 path "/rt:routing/rt:routing-instance/rt:interfaces/"
328 + "rt:interface/rt:name";
331 "Name of the outgoing interface.
333 Only interfaces configured for the ancestor
334 routing instance can be given.";
336 uses rt:next-hop-classifiers {
349 //TODO modification needed because of yangtools bug(unable to proceed augmentation in separate model of augmentation in this model)
350 container vpp-ipv4-route{
351 uses vpp-r:vpp-routing-attributes;
359 augment "/rt:active-route/rt:input/rt:destination-address" {
360 when "rt:address-family='v4ur:ipv4-unicast'" {
362 "This augment is valid only for IPv4 unicast.";
365 "This leaf augments the 'rt:destination-address' parameter of
366 the 'rt:active-route' operation.";
368 type inet:ipv4-address;
370 "IPv4 destination address.";
374 augment "/rt:active-route/rt:output/rt:route" {
375 when "rt:address-family='v4ur:ipv4-unicast'" {
377 "This augment is valid only for IPv4 unicast.";
380 "This leaf augments the reply to the 'rt:active-route'
382 leaf destination-prefix {
383 type inet:ipv4-prefix;
385 "IPv4 destination prefix.";
389 augment "/rt:active-route/rt:output/rt:route/rt:next-hop-options/"
390 + "rt:simple-next-hop" {
391 when "rt:address-family='v4ur:ipv4-unicast'" {
393 "This augment is valid only for IPv4 unicast.";
396 "This leaf augments the 'simple-next-hop' case in the reply to
397 the 'rt:active-route' operation.";
399 type inet:ipv4-address;
401 "IPv4 address of the next-hop.";
405 augment "/rt:active-route/rt:output/rt:route/rt:next-hop-options/"
406 + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" {
407 when "../../rt:address-family='v4ur:ipv4-unicast'" {
409 "This augment is valid only for IPv4 unicast.";
411 if-feature rt:multipath-routes;
413 "This leaf augments the 'next-hop-list' case in the reply to
414 the 'rt:active-route' operation.";
416 type inet:ipv4-address;
418 "IPv4 address of the next-hop.";