Tomáš Pecka | 2a4ea7b | 2021-03-30 17:01:37 +0200 | [diff] [blame] | 1 | module ietf-ipv6-unicast-routing { |
| 2 | yang-version "1.1"; |
| 3 | namespace |
| 4 | "urn:ietf:params:xml:ns:yang:ietf-ipv6-unicast-routing"; |
| 5 | prefix "v6ur"; |
| 6 | |
| 7 | import ietf-routing { |
| 8 | prefix "rt"; |
| 9 | description |
| 10 | "An 'ietf-routing' module version that is compatible with |
| 11 | the Network Management Datastore Architecture (NMDA) |
| 12 | is required."; |
| 13 | } |
| 14 | |
| 15 | import ietf-inet-types { |
| 16 | prefix "inet"; |
| 17 | description |
| 18 | "An 'ietf-interfaces' module version that is compatible with |
| 19 | the Network Management Datastore Architecture (NMDA) |
| 20 | is required."; |
| 21 | } |
| 22 | |
| 23 | include ietf-ipv6-router-advertisements { |
| 24 | revision-date 2018-03-13; |
| 25 | } |
| 26 | organization |
| 27 | "IETF NETMOD (Network Modeling) Working Group"; |
| 28 | contact |
| 29 | "WG Web: <https://datatracker.ietf.org/wg/netmod/> |
| 30 | WG List: <mailto:rtgwg@ietf.org> |
| 31 | |
| 32 | Editor: Ladislav Lhotka |
| 33 | <mailto:lhotka@nic.cz> |
| 34 | Acee Lindem |
| 35 | <mailto:acee@cisco.com> |
| 36 | Yingzhen Qu |
| 37 | <mailto:yingzhen.qu@huawei.com>"; |
| 38 | |
| 39 | description |
| 40 | "This YANG module augments the 'ietf-routing' module with basic |
| 41 | parameters for IPv6 unicast routing. The model fully conforms |
| 42 | to the Network Management Datastore Architecture (NMDA). |
| 43 | |
| 44 | Copyright (c) 2018 IETF Trust and the persons |
| 45 | identified as authors of the code. All rights reserved. |
| 46 | |
| 47 | Redistribution and use in source and binary forms, with or |
| 48 | without modification, is permitted pursuant to, and subject |
| 49 | to the license terms contained in, the Simplified BSD License |
| 50 | set forth in Section 4.c of the IETF Trust's Legal Provisions |
| 51 | Relating to IETF Documents |
| 52 | (https://trustee.ietf.org/license-info). |
| 53 | |
| 54 | This version of this YANG module is part of RFC 8349; see |
| 55 | the RFC itself for full legal notices."; |
| 56 | |
| 57 | revision 2018-03-13 { |
| 58 | description |
| 59 | "Network Management Datastore Architecture (NMDA) revision."; |
| 60 | reference |
| 61 | "RFC 8349: A YANG Data Model for Routing Management |
| 62 | (NMDA Version)"; |
| 63 | } |
| 64 | |
| 65 | /* Identities */ |
| 66 | |
| 67 | revision 2016-11-04 { |
| 68 | description |
| 69 | "Initial revision."; |
| 70 | reference |
| 71 | "RFC 8022: A YANG Data Model for Routing Management"; |
| 72 | } |
| 73 | |
| 74 | identity ipv6-unicast { |
| 75 | base rt:ipv6; |
| 76 | description |
| 77 | "This identity represents the IPv6 unicast address family."; |
| 78 | } |
| 79 | |
| 80 | augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" { |
| 81 | when "derived-from-or-self(../../rt:address-family, " |
| 82 | + "'v6ur:ipv6-unicast')" { |
| 83 | description |
| 84 | "This augment is valid only for IPv6 unicast."; |
| 85 | } |
| 86 | description |
| 87 | "This leaf augments an IPv6 unicast route."; |
| 88 | leaf destination-prefix { |
| 89 | type inet:ipv6-prefix; |
| 90 | description |
| 91 | "IPv6 destination prefix."; |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" |
| 96 | + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { |
| 97 | when "derived-from-or-self(../../../rt:address-family, " |
| 98 | + "'v6ur:ipv6-unicast')" { |
| 99 | description |
| 100 | "This augment is valid only for IPv6 unicast."; |
| 101 | } |
| 102 | description |
| 103 | "Augments the 'simple-next-hop' case in IPv6 unicast routes."; |
| 104 | leaf next-hop-address { |
| 105 | type inet:ipv6-address; |
| 106 | description |
| 107 | "IPv6 address of the next hop."; |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" |
| 112 | + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" |
| 113 | + "rt:next-hop-list/rt:next-hop" { |
| 114 | when "derived-from-or-self(../../../../../rt:address-family, " |
| 115 | + "'v6ur:ipv6-unicast')" { |
| 116 | description |
| 117 | "This augment is valid only for IPv6 unicast."; |
| 118 | } |
| 119 | description |
| 120 | "This leaf augments the 'next-hop-list' case of IPv6 unicast |
| 121 | routes."; |
| 122 | leaf address { |
| 123 | type inet:ipv6-address; |
| 124 | description |
| 125 | "IPv6 address of the next hop."; |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | augment |
| 130 | "/rt:routing/rt:ribs/rt:rib/rt:active-route/rt:input" { |
| 131 | when "derived-from-or-self(../rt:address-family, " |
| 132 | + "'v6ur:ipv6-unicast')" { |
| 133 | description |
| 134 | "This augment is valid only for IPv6 unicast RIBs."; |
| 135 | } |
| 136 | description |
| 137 | "This augment adds the input parameter of the 'active-route' |
| 138 | action."; |
| 139 | leaf destination-address { |
| 140 | type inet:ipv6-address; |
| 141 | description |
| 142 | "IPv6 destination address."; |
| 143 | } |
| 144 | } |
| 145 | |
| 146 | augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" |
| 147 | + "rt:output/rt:route" { |
| 148 | when "derived-from-or-self(../../rt:address-family, " |
| 149 | + "'v6ur:ipv6-unicast')" { |
| 150 | description |
| 151 | "This augment is valid only for IPv6 unicast."; |
| 152 | } |
| 153 | description |
| 154 | "This augment adds the destination prefix to the reply of the |
| 155 | 'active-route' action."; |
| 156 | leaf destination-prefix { |
| 157 | type inet:ipv6-prefix; |
| 158 | description |
| 159 | "IPv6 destination prefix."; |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" |
| 164 | + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" |
| 165 | + "rt:simple-next-hop" { |
| 166 | when "derived-from-or-self(../../../rt:address-family, " |
| 167 | + "'v6ur:ipv6-unicast')" { |
| 168 | description |
| 169 | "This augment is valid only for IPv6 unicast."; |
| 170 | } |
| 171 | description |
| 172 | "Augments the 'simple-next-hop' case in the reply to the |
| 173 | 'active-route' action."; |
| 174 | leaf next-hop-address { |
| 175 | type inet:ipv6-address; |
| 176 | description |
| 177 | "IPv6 address of the next hop."; |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" |
| 182 | + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" |
| 183 | + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { |
| 184 | when "derived-from-or-self(../../../../../rt:address-family, " |
| 185 | + "'v6ur:ipv6-unicast')" { |
| 186 | description |
| 187 | "This augment is valid only for IPv6 unicast."; |
| 188 | } |
| 189 | description |
| 190 | "Augments the 'next-hop-list' case in the reply to the |
| 191 | 'active-route' action."; |
| 192 | leaf next-hop-address { |
| 193 | type inet:ipv6-address; |
| 194 | description |
| 195 | "IPv6 address of the next hop."; |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | /* Data node augmentations */ |
| 200 | |
| 201 | augment "/rt:routing/rt:control-plane-protocols/" |
| 202 | + "rt:control-plane-protocol/rt:static-routes" { |
| 203 | description |
| 204 | "This augment defines the 'static' pseudo-protocol |
| 205 | with data specific to IPv6 unicast."; |
| 206 | container ipv6 { |
| 207 | description |
| 208 | "Support for a 'static' pseudo-protocol instance |
| 209 | consists of a list of routes."; |
| 210 | list route { |
| 211 | key "destination-prefix"; |
| 212 | description |
| 213 | "A list of static routes."; |
| 214 | leaf destination-prefix { |
| 215 | type inet:ipv6-prefix; |
| 216 | mandatory true; |
| 217 | description |
| 218 | "IPv6 destination prefix."; |
| 219 | } |
| 220 | leaf description { |
| 221 | type string; |
| 222 | description |
| 223 | "Textual description of the route."; |
| 224 | } |
| 225 | container next-hop { |
| 226 | description |
| 227 | "Next hop for the route."; |
| 228 | uses rt:next-hop-content { |
| 229 | augment "next-hop-options/simple-next-hop" { |
| 230 | description |
| 231 | "Augments the 'simple-next-hop' case in IPv6 static |
| 232 | routes."; |
| 233 | leaf next-hop-address { |
| 234 | type inet:ipv6-address; |
| 235 | description |
| 236 | "IPv6 address of the next hop."; |
| 237 | } |
| 238 | } |
| 239 | augment "next-hop-options/next-hop-list/next-hop-list/" |
| 240 | + "next-hop" { |
| 241 | description |
| 242 | "Augments the 'next-hop-list' case in IPv6 static |
| 243 | routes."; |
| 244 | leaf next-hop-address { |
| 245 | type inet:ipv6-address; |
| 246 | description |
| 247 | "IPv6 address of the next hop."; |
| 248 | } |
| 249 | } |
| 250 | } |
| 251 | } |
| 252 | } |
| 253 | } |
| 254 | } |
| 255 | |
| 256 | /* |
| 257 | * The subsequent data nodes are obviated and obsoleted |
| 258 | * by the Network Management Datastore Architecture |
| 259 | * as described in RFC 8342. |
| 260 | */ |
| 261 | augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route" { |
| 262 | when "derived-from-or-self(../../rt:address-family, |
| 263 | 'v6ur:ipv6-unicast')" { |
| 264 | description |
| 265 | "This augment is valid only for IPv6 unicast."; |
| 266 | } |
| 267 | status obsolete; |
| 268 | description |
| 269 | "This leaf augments an IPv6 unicast route."; |
| 270 | leaf destination-prefix { |
| 271 | type inet:ipv6-prefix; |
| 272 | status obsolete; |
| 273 | description |
| 274 | "IPv6 destination prefix."; |
| 275 | } |
| 276 | } |
| 277 | augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" |
| 278 | + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { |
| 279 | when "derived-from-or-self(../../../rt:address-family, |
| 280 | 'v6ur:ipv6-unicast')" { |
| 281 | description |
| 282 | "This augment is valid only for IPv6 unicast."; |
| 283 | } |
| 284 | status obsolete; |
| 285 | description |
| 286 | "Augments the 'simple-next-hop' case in IPv6 unicast routes."; |
| 287 | leaf next-hop-address { |
| 288 | type inet:ipv6-address; |
| 289 | status obsolete; |
| 290 | description |
| 291 | "IPv6 address of the next hop."; |
| 292 | } |
| 293 | } |
| 294 | augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route/" |
| 295 | + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" |
| 296 | + "rt:next-hop-list/rt:next-hop" { |
| 297 | when "derived-from-or-self(../../../../../rt:address-family, |
| 298 | 'v6ur:ipv6-unicast')" { |
| 299 | description |
| 300 | "This augment is valid only for IPv6 unicast."; |
| 301 | } |
| 302 | status obsolete; |
| 303 | description |
| 304 | "This leaf augments the 'next-hop-list' case of IPv6 unicast |
| 305 | routes."; |
| 306 | leaf address { |
| 307 | type inet:ipv6-address; |
| 308 | status obsolete; |
| 309 | description |
| 310 | "IPv6 address of the next hop."; |
| 311 | } |
| 312 | } |
| 313 | augment "/rt:routing-state/rt:ribs/rt:rib/" |
| 314 | + "rt:active-route/rt:input" { |
| 315 | when "derived-from-or-self(../rt:address-family, |
| 316 | 'v6ur:ipv6-unicast')" { |
| 317 | description |
| 318 | "This augment is valid only for IPv6 unicast RIBs."; |
| 319 | } |
| 320 | status obsolete; |
| 321 | description |
| 322 | "This augment adds the input parameter of the 'active-route' |
| 323 | action."; |
| 324 | leaf destination-address { |
| 325 | type inet:ipv6-address; |
| 326 | status obsolete; |
| 327 | description |
| 328 | "IPv6 destination address."; |
| 329 | } |
| 330 | } |
| 331 | augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" |
| 332 | + "rt:output/rt:route" { |
| 333 | when "derived-from-or-self(../../rt:address-family, |
| 334 | 'v6ur:ipv6-unicast')" { |
| 335 | description |
| 336 | "This augment is valid only for IPv6 unicast."; |
| 337 | } |
| 338 | status obsolete; |
| 339 | description |
| 340 | "This augment adds the destination prefix to the reply of the |
| 341 | 'active-route' action."; |
| 342 | leaf destination-prefix { |
| 343 | type inet:ipv6-prefix; |
| 344 | status obsolete; |
| 345 | description |
| 346 | "IPv6 destination prefix."; |
| 347 | } |
| 348 | } |
| 349 | augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" |
| 350 | + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" |
| 351 | + "rt:simple-next-hop" { |
| 352 | when "derived-from-or-self(../../../rt:address-family, |
| 353 | 'v6ur:ipv6-unicast')" { |
| 354 | description |
| 355 | "This augment is valid only for IPv6 unicast."; |
| 356 | } |
| 357 | status obsolete; |
| 358 | description |
| 359 | "Augments the 'simple-next-hop' case in the reply to the |
| 360 | 'active-route' action."; |
| 361 | leaf next-hop-address { |
| 362 | type inet:ipv6-address; |
| 363 | status obsolete; |
| 364 | description |
| 365 | "IPv6 address of the next hop."; |
| 366 | } |
| 367 | } |
| 368 | augment "/rt:routing-state/rt:ribs/rt:rib/rt:active-route/" |
| 369 | + "rt:output/rt:route/rt:next-hop/rt:next-hop-options/" |
| 370 | + "rt:next-hop-list/rt:next-hop-list/rt:next-hop" { |
| 371 | when "derived-from-or-self(../../../../../rt:address-family, |
| 372 | 'v6ur:ipv6-unicast')" { |
| 373 | description |
| 374 | "This augment is valid only for IPv6 unicast."; |
| 375 | } |
| 376 | status obsolete; |
| 377 | description |
| 378 | "Augments the 'next-hop-list' case in the reply to the |
| 379 | 'active-route' action."; |
| 380 | leaf next-hop-address { |
| 381 | type inet:ipv6-address; |
| 382 | status obsolete; |
| 383 | description |
| 384 | "IPv6 address of the next hop."; |
| 385 | } |
| 386 | } |
| 387 | } |