Thomas Vachuska | 8ca75a2 | 2017-08-24 16:12:59 -0700 | [diff] [blame] | 1 | submodule openconfig-ospfv2-lsdb { |
| 2 | |
| 3 | belongs-to openconfig-ospfv2 { |
| 4 | prefix "oc-ospfv2"; |
| 5 | } |
| 6 | |
| 7 | // import some basic types |
| 8 | import ietf-yang-types { prefix "yang"; } |
| 9 | import ietf-inet-types { prefix "inet"; } |
| 10 | import openconfig-types { prefix "oc-types"; } |
| 11 | import openconfig-extensions { prefix "oc-ext"; } |
| 12 | import openconfig-ospf-types { prefix "oc-ospf-types"; } |
| 13 | |
| 14 | // meta |
| 15 | organization "OpenConfig working group"; |
| 16 | |
| 17 | contact |
| 18 | "OpenConfig working group |
| 19 | www.openconfig.net"; |
| 20 | |
| 21 | description |
| 22 | "An OpenConfig model for the Open Shortest Path First (OSPF) |
| 23 | version 2 link-state database (LSDB)"; |
| 24 | |
| 25 | oc-ext:openconfig-version "0.1.0"; |
| 26 | |
| 27 | revision "2017-02-28"{ |
| 28 | description |
| 29 | "Initial public release of OSPFv2"; |
| 30 | reference "0.1.0"; |
| 31 | } |
| 32 | |
| 33 | revision "2016-06-24" { |
| 34 | description |
| 35 | "Initial revision"; |
| 36 | reference "0.0.1"; |
| 37 | } |
| 38 | |
| 39 | grouping ospfv2-lsdb-common-prefix-properties { |
| 40 | description |
| 41 | "Common properties used in the LSDB that relate to IPv4 prefixes"; |
| 42 | |
| 43 | leaf prefix-length { |
| 44 | type uint8 { |
| 45 | range "0..32"; |
| 46 | } |
| 47 | description |
| 48 | "The length of the IPv4 prefix contained in the Extended Prefix LSA"; |
| 49 | } |
| 50 | |
| 51 | leaf address-family { |
| 52 | // TODO: should this be an identity? |
| 53 | type enumeration { |
| 54 | enum IPV4_UNICAST { |
| 55 | value 0; |
| 56 | description |
| 57 | "The prefix contained within the Extended Prefix LSA is an IPv4 |
| 58 | unicast prefix"; |
| 59 | } |
| 60 | } |
| 61 | description |
| 62 | "The address family of the prefix contained in the Extended Prefix |
| 63 | LSA"; |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | grouping ospfv2-lsdb-common-link-specification { |
| 68 | description |
| 69 | "Generic attributes used to identify links within OSPFv2"; |
| 70 | |
| 71 | leaf link-id { |
| 72 | type yang:dotted-quad; |
| 73 | description |
| 74 | "The identifier for the link specified. The value of the link |
| 75 | identifier is dependent upon the type of the LSA. The value is |
| 76 | specified to be, per sub-type: |
| 77 | 1) Neighbouring router's router ID. |
| 78 | 2) IP address of DR. |
| 79 | 3) IP network address. |
| 80 | 4) Neighbouring router router's ID."; |
| 81 | } |
| 82 | |
| 83 | leaf link-data { |
| 84 | type union { |
| 85 | type yang:dotted-quad; |
| 86 | type uint32; |
| 87 | } |
| 88 | description |
| 89 | "The data associated with the link type. The value is |
| 90 | dependent upon the subtype of the LSA. When the connection is |
| 91 | to a stub network it represents the mask; for p2p connections |
| 92 | that are unnumbered it represents the ifIndex value of the |
| 93 | router's interface; for all other connections it represents |
| 94 | the local system's IP address"; |
| 95 | } |
| 96 | |
| 97 | } |
| 98 | |
| 99 | grouping ospfv2-lsdb-common-unknown-tlv { |
| 100 | description |
| 101 | "A generic specification of a TLV to be used when the |
| 102 | value cannot be decoded by the local system"; |
| 103 | |
| 104 | leaf type { |
| 105 | type uint16; |
| 106 | description |
| 107 | "The type value of the unknown TLV"; |
| 108 | } |
| 109 | |
| 110 | leaf length { |
| 111 | type uint16; |
| 112 | description |
| 113 | "The length value of the unknown TLV"; |
| 114 | } |
| 115 | |
| 116 | leaf value { |
| 117 | type binary; |
| 118 | description |
| 119 | "The value portion of the unknwon TLV"; |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | grouping ospfv2-lsdb-common-unknown-tlv-structure { |
| 124 | description |
| 125 | "A generic specification of an unknown TLV"; |
| 126 | |
| 127 | container unknown-tlv { |
| 128 | description |
| 129 | "An unknown TLV within the context. Unknown TLVs are |
| 130 | defined to be the set of TLVs that are not modelled |
| 131 | within the OpenConfig model, or are unknown to the |
| 132 | local system such that it cannot decode their value."; |
| 133 | |
| 134 | container state { |
| 135 | description |
| 136 | "Contents of an unknown TLV within the LSA"; |
| 137 | uses ospfv2-lsdb-common-unknown-tlv; |
| 138 | } |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | grouping ospfv2-lsdb-common-unknown-subtlv-structure { |
| 143 | description |
| 144 | "A generic specification of an unknown TLV"; |
| 145 | |
| 146 | container unknown-subtlv { |
| 147 | description |
| 148 | "An unknown SubTLV within the context. Unknown Sub-TLV |
| 149 | are defined to be the set of SubTLVs that are not modelled |
| 150 | by the OpenConfig schema, or are unknown to the local system |
| 151 | such that it cannot decode their value."; |
| 152 | |
| 153 | container state { |
| 154 | description |
| 155 | "Contents of an unknown TLV within the LSA"; |
| 156 | uses ospfv2-lsdb-common-unknown-tlv; |
| 157 | } |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | grouping ospfv2-lsdb-common-tos-metric { |
| 162 | description |
| 163 | "Common LSDB LSA parameters for type of service and metric"; |
| 164 | |
| 165 | leaf tos { |
| 166 | type uint8; |
| 167 | description |
| 168 | "OSPF encoding of the type of service referred to by this |
| 169 | LSA. Encoding for OSPF TOS are described in RFC2328."; |
| 170 | } |
| 171 | |
| 172 | leaf metric { |
| 173 | type oc-ospf-types:ospf-metric; |
| 174 | description |
| 175 | "The metric value to be used for the TOS specified. This value |
| 176 | represents the cost of use of the link for the specific type |
| 177 | of service."; |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | grouping ospfv2-lsdb-common-sr-sid-spec { |
| 182 | description |
| 183 | "Re-usable specification of a segment routing SID"; |
| 184 | |
| 185 | leaf sid-type { |
| 186 | type oc-ospf-types:sr-sid-type; |
| 187 | description |
| 188 | "The type of the value contained within the sub-TLV"; |
| 189 | } |
| 190 | |
| 191 | leaf sid-value { |
| 192 | type uint32; |
| 193 | description |
| 194 | "The value of the binding included within the sub-TLV. The type of |
| 195 | this binding is indicated by the type leaf."; |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | grouping ospfv2-lsdb-area-state { |
| 200 | description |
| 201 | "Per-area operational state parameters for an OSPFv2 area"; |
| 202 | |
| 203 | leaf identifier { |
| 204 | type oc-ospf-types:ospf-area-identifier; |
| 205 | description |
| 206 | "An identifier for the area, expressed as a dotted quad or |
| 207 | an unsigned 32-bit integer"; |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | grouping ospfv2-lsdb-area-lsa-type-state { |
| 212 | description |
| 213 | "Per-LSA type operational state parameters for an OSPFv2 area"; |
| 214 | |
| 215 | leaf type { |
| 216 | type identityref { |
| 217 | base "oc-ospf-types:OSPF_LSA_TYPE"; |
| 218 | } |
| 219 | description |
| 220 | "The type of LSA being described. The type of the LSA is |
| 221 | expressed as a canonical name."; |
| 222 | } |
| 223 | } |
| 224 | |
| 225 | grouping ospfv2-lsdb-area-lsa-state { |
| 226 | description |
| 227 | "Generic parameters of an OSPFv2 LSA"; |
| 228 | |
| 229 | leaf link-state-id { |
| 230 | type yang:dotted-quad; |
| 231 | description |
| 232 | "The Link State ID for the specified LSA type. The exact |
| 233 | defined value of the Link State ID is dependent on the LSA |
| 234 | type."; |
| 235 | } |
| 236 | |
| 237 | leaf advertising-router { |
| 238 | type yang:dotted-quad; |
| 239 | description |
| 240 | "The router ID of the router that originated the LSA"; |
| 241 | } |
| 242 | |
| 243 | leaf sequence-number { |
| 244 | type int32; |
| 245 | description |
| 246 | "A signed 32-bit integer used to detect old and duplicate |
| 247 | LSAs. The greater the sequence number the more recent the |
| 248 | LSA."; |
| 249 | } |
| 250 | |
| 251 | leaf checksum { |
| 252 | type uint16; |
| 253 | description |
| 254 | "The checksum of the complete contents of the LSA excluding |
| 255 | the age field."; |
| 256 | } |
| 257 | |
| 258 | leaf age { |
| 259 | type uint16; |
| 260 | units seconds; |
| 261 | description |
| 262 | "The time since the LSA's generation in seconds"; |
| 263 | } |
| 264 | } |
| 265 | |
| 266 | grouping ospfv2-lsdb-router-lsa-structure { |
| 267 | description |
| 268 | "Structural grouping for Router LSA contents within the LSDB"; |
| 269 | |
| 270 | container router-lsa { |
| 271 | description |
| 272 | "Contents of the router LSA"; |
| 273 | |
| 274 | container state { |
| 275 | description |
| 276 | "State parameters of the router LSA"; |
| 277 | uses ospfv2-lsdb-router-lsa-state; |
| 278 | } |
| 279 | |
| 280 | uses ospfv2-lsdb-generic-lsa-tos-metric-structure; |
| 281 | } |
| 282 | } |
| 283 | |
| 284 | grouping ospfv2-lsdb-generic-lsa-tos-metric-structure { |
| 285 | description |
| 286 | "Grouping including a generic TOS/metric structure for an |
| 287 | LSA"; |
| 288 | |
| 289 | container types-of-service { |
| 290 | description |
| 291 | "Breakdown of LSA contents specifying multiple |
| 292 | TOS values"; |
| 293 | |
| 294 | list type-of-service { |
| 295 | key "tos"; |
| 296 | description |
| 297 | "Per-type of service parameters for the LSA"; |
| 298 | |
| 299 | leaf tos { |
| 300 | type leafref { |
| 301 | path "../state/tos"; |
| 302 | } |
| 303 | description |
| 304 | "Reference to the type of service identifier which is |
| 305 | specified in the LSA"; |
| 306 | } |
| 307 | |
| 308 | container state { |
| 309 | description |
| 310 | "Per-TOS parameters for the LSA"; |
| 311 | |
| 312 | uses ospfv2-lsdb-generic-lsa-tos-metric-state; |
| 313 | } |
| 314 | } |
| 315 | } |
| 316 | } |
| 317 | |
| 318 | grouping ospfv2-lsdb-network-lsa-structure { |
| 319 | description |
| 320 | "Structural grouping for Network LSA contents within the LSDB"; |
| 321 | |
| 322 | container network-lsa { |
| 323 | description |
| 324 | "Contents of the network LSA"; |
| 325 | |
| 326 | container state { |
| 327 | description |
| 328 | "State parameters of the network LSA"; |
| 329 | uses ospfv2-lsdb-network-lsa-state; |
| 330 | } |
| 331 | } |
| 332 | } |
| 333 | |
| 334 | grouping ospfv2-lsdb-summary-lsa-structure { |
| 335 | description |
| 336 | "Structural grouping for the Summary LSA contents within the |
| 337 | LSDB"; |
| 338 | |
| 339 | container summary-lsa { |
| 340 | description |
| 341 | "Contents of the summary LSA"; |
| 342 | |
| 343 | container state { |
| 344 | description |
| 345 | "State parameters of the summary LSA"; |
| 346 | uses ospfv2-lsdb-summary-lsa-state; |
| 347 | } |
| 348 | |
| 349 | uses ospfv2-lsdb-generic-lsa-tos-metric-structure; |
| 350 | } |
| 351 | } |
| 352 | |
| 353 | grouping ospfv2-lsdb-asexternal-lsa-structure { |
| 354 | description |
| 355 | "Structural grouping for the AS External LSA contents within |
| 356 | the LSDB"; |
| 357 | |
| 358 | container as-external-lsa { |
| 359 | description |
| 360 | "Contents of the AS External LSA"; |
| 361 | |
| 362 | container state { |
| 363 | description |
| 364 | "State parameters for the AS external LSA"; |
| 365 | uses ospfv2-lsdb-asexternal-lsa-state; |
| 366 | } |
| 367 | |
| 368 | container types-of-service { |
| 369 | description |
| 370 | "Breakdown of External LSA contents specifying multiple |
| 371 | TOS values"; |
| 372 | |
| 373 | list type-of-service { |
| 374 | key "tos"; |
| 375 | description |
| 376 | "Per-type of service parameters for the AS External LSA"; |
| 377 | |
| 378 | leaf tos { |
| 379 | type leafref { |
| 380 | path "../state/tos"; |
| 381 | } |
| 382 | description |
| 383 | "Reference to the type of service identifier which is |
| 384 | specified in the AS External LSA"; |
| 385 | } |
| 386 | |
| 387 | container state { |
| 388 | description |
| 389 | "Per-TOS parameters for the LSA"; |
| 390 | |
| 391 | uses ospfv2-lsdb-asexternal-tos-state; |
| 392 | } |
| 393 | } |
| 394 | } |
| 395 | |
| 396 | } |
| 397 | } |
| 398 | |
| 399 | grouping ospfv2-lsdb-nssa-external-lsa-structure { |
| 400 | description |
| 401 | "Structural grouping for the NSSA External LSA contents within |
| 402 | the LSDB"; |
| 403 | |
| 404 | container nssa-external-lsa { |
| 405 | description |
| 406 | "Contents of the NSSA External LSA"; |
| 407 | |
| 408 | container state { |
| 409 | description |
| 410 | "State parameters for the AS external LSA"; |
| 411 | // Type 7 LSAs are are a super-set of Type 5 LSAs so we simply |
| 412 | // include the Type 5 |
| 413 | uses ospfv2-lsdb-asexternal-lsa-state; |
| 414 | uses ospfv2-lsdb-nssa-external-lsa-state; |
| 415 | } |
| 416 | |
| 417 | container types-of-service { |
| 418 | description |
| 419 | "Breakdown of the NSSA External LSA contents specifying multiple |
| 420 | TOS values"; |
| 421 | |
| 422 | list type-of-service { |
| 423 | key "tos"; |
| 424 | description |
| 425 | "Per-type of service parameters for the NSSA external LSA"; |
| 426 | |
| 427 | leaf tos { |
| 428 | type leafref { |
| 429 | path "../state/tos"; |
| 430 | } |
| 431 | description |
| 432 | "Reference to the type of services identifier which is specified |
| 433 | in the NSSA External LSA"; |
| 434 | } |
| 435 | |
| 436 | container state { |
| 437 | description |
| 438 | "Per-TOS parameters for the LSA"; |
| 439 | uses ospfv2-lsdb-asexternal-tos-state; |
| 440 | } |
| 441 | } |
| 442 | } |
| 443 | } |
| 444 | } |
| 445 | |
| 446 | grouping ospfv2-lsdb-opaque-lsa-structure { |
| 447 | description |
| 448 | "Structural grouping for Opaque LSA contents within the LSDB"; |
| 449 | |
| 450 | container opaque-lsa { |
| 451 | description |
| 452 | "Contents of the opaque LSA"; |
| 453 | |
| 454 | container state { |
| 455 | description |
| 456 | "State parameters for the opaque LSA"; |
| 457 | uses ospfv2-lsdb-opaque-lsa-state; |
| 458 | } |
| 459 | |
| 460 | container traffic-engineering { |
| 461 | when "../state/type = 'TRAFFIC_ENGINEERING'" { |
| 462 | description |
| 463 | "Include the traffic-engineering information when |
| 464 | the Opaque LSA being described is a Traffic Engineering |
| 465 | LSA"; |
| 466 | } |
| 467 | description |
| 468 | "Contents of the Traffic Engineering Opaque LSA"; |
| 469 | |
| 470 | container tlvs { |
| 471 | description |
| 472 | "The TLVs contained in the TE Opaque LSA"; |
| 473 | list tlv { |
| 474 | // this is an unkeyed list |
| 475 | description |
| 476 | "The Type-Length-Value tuples included in the TE LSA"; |
| 477 | |
| 478 | container state { |
| 479 | description |
| 480 | "The contents of the TLV tuple within the TE LSA"; |
| 481 | uses ospfv2-lsdb-opaque-lsa-te-tlv-state; |
| 482 | } |
| 483 | |
| 484 | uses ospfv2-lsdb-common-unknown-tlv-structure; |
| 485 | |
| 486 | container router-address { |
| 487 | when "../state/type = 'TE_ROUTER_ADDRESS'" { |
| 488 | description |
| 489 | "Include the router address container only when the type |
| 490 | of the TLV is Router Address"; |
| 491 | } |
| 492 | |
| 493 | description |
| 494 | "Parameters included in the Router Address TLV"; |
| 495 | |
| 496 | container state { |
| 497 | description |
| 498 | "State parameters of the router address TLV"; |
| 499 | uses ospfv2-lsdb-opaque-te-router-address-state; |
| 500 | } |
| 501 | } |
| 502 | |
| 503 | container link { |
| 504 | when "../state/type = 'TE_ROUTER_LINK'" { |
| 505 | description |
| 506 | "Include the link container only when the type of the |
| 507 | TLV describes a traffic engineering link"; |
| 508 | } |
| 509 | |
| 510 | description |
| 511 | "Parameters included in the Link TLV"; |
| 512 | container sub-tlvs { |
| 513 | description |
| 514 | "Sub-TLVs included in the Link TLV"; |
| 515 | |
| 516 | list sub-tlv { |
| 517 | // unkeyed list |
| 518 | description |
| 519 | "The Sub-TLVs included within the Traffic Engineering |
| 520 | LSA's sub-TLV"; |
| 521 | |
| 522 | container state { |
| 523 | description |
| 524 | "State parameters of the Link Sub-TLV"; |
| 525 | |
| 526 | uses ospfv2-lsdb-opaque-te-link-state; |
| 527 | } |
| 528 | |
| 529 | uses ospfv2-lsdb-common-unknown-subtlv-structure; |
| 530 | |
| 531 | container unreserved-bandwidths { |
| 532 | description |
| 533 | "The unreserved link bandwidths for the Traffic |
| 534 | Engineering LSA - utilised when the sub-TLV type |
| 535 | indicates that the sub-TLV describes unreserved |
| 536 | bandwidth"; |
| 537 | |
| 538 | list unreserved-bandwidth { |
| 539 | key "priority"; |
| 540 | |
| 541 | description |
| 542 | "The unreserved bandwidth at each priority level"; |
| 543 | |
| 544 | leaf priority { |
| 545 | type leafref { |
| 546 | path "../state/priority"; |
| 547 | } |
| 548 | description |
| 549 | "A reference to the priority level being described"; |
| 550 | } |
| 551 | |
| 552 | container state { |
| 553 | description |
| 554 | "State parameters relating to the unreserved |
| 555 | bandwidth of the link being described"; |
| 556 | uses ospfv2-lsdb-opaque-te-link-unreserved-bw-state; |
| 557 | } |
| 558 | } |
| 559 | } |
| 560 | |
| 561 | container administrative-groups { |
| 562 | description |
| 563 | "The administrative groups that are set for the |
| 564 | Traffic Engineering LSA - utilised when the sub-TLV type |
| 565 | indicates that the sub-TLV describes administrative |
| 566 | groups"; |
| 567 | |
| 568 | list admin-group { |
| 569 | key "bit-index"; |
| 570 | |
| 571 | description |
| 572 | "The administrative group described within the |
| 573 | sub-TLV"; |
| 574 | |
| 575 | leaf bit-index { |
| 576 | type leafref { |
| 577 | path "../state/bit-index"; |
| 578 | } |
| 579 | description |
| 580 | "A reference to the bit index being described"; |
| 581 | } |
| 582 | |
| 583 | container state { |
| 584 | description |
| 585 | "State parameters relating to the administrative |
| 586 | groups being described for the link"; |
| 587 | uses ospfv2-lsdb-opaque-te-link-admin-group-state; |
| 588 | } |
| 589 | } |
| 590 | } |
| 591 | } |
| 592 | } |
| 593 | } |
| 594 | |
| 595 | container node-attribute { |
| 596 | when "../state/type = 'TE_NODE_ATTRIBUTE'" { |
| 597 | description |
| 598 | "Include the node-attribute container only when the type of |
| 599 | the TLV describes a node attribute"; |
| 600 | } |
| 601 | |
| 602 | description |
| 603 | "Parameters included in the Node Attribute TLV"; |
| 604 | |
| 605 | container sub-tlvs { |
| 606 | description |
| 607 | "Sub-TLVs of the Node Attribute TLV of the Traffic |
| 608 | Engineering LSA"; |
| 609 | |
| 610 | list sub-tlv { |
| 611 | // unkeyed list |
| 612 | description |
| 613 | "List of the Sub-TLVs contained within the Node Attribute |
| 614 | TLV"; |
| 615 | |
| 616 | container state { |
| 617 | description |
| 618 | "State parameters of the Node Attribute TLV sub-TLV"; |
| 619 | uses ospfv2-lsdb-opaque-te-node-attribute-state; |
| 620 | } |
| 621 | |
| 622 | uses ospfv2-lsdb-common-unknown-subtlv-structure; |
| 623 | } |
| 624 | } |
| 625 | } |
| 626 | |
| 627 | // A set of TLVs are omitted here - based on operational |
| 628 | // requirements, these are: |
| 629 | // * link-local |
| 630 | // * ipv6-address (OSPFv3 only) |
| 631 | // * optical-node-property |
| 632 | } |
| 633 | } |
| 634 | } // traffic-engineering |
| 635 | |
| 636 | container grace-lsa { |
| 637 | when "../state/type = 'GRACE_LSA'" { |
| 638 | description |
| 639 | "Include the grace-lsa container when the opaque LSA is specified |
| 640 | to be of that type."; |
| 641 | } |
| 642 | |
| 643 | description |
| 644 | "The Grace LSA is utilised when a remote system is undergoing |
| 645 | graceful restart"; |
| 646 | |
| 647 | container tlvs { |
| 648 | description |
| 649 | "TLVs of the Grace LSA"; |
| 650 | |
| 651 | list tlv { |
| 652 | description |
| 653 | "TLV entry in the Grace LSA, advertised by a system undergoing |
| 654 | graceful restart"; |
| 655 | |
| 656 | // unkeyed list |
| 657 | container state { |
| 658 | description |
| 659 | "Per-TLV state parameters of the Grace LSA"; |
| 660 | uses ospfv2-lsdb-opaque-grace-state; |
| 661 | } |
| 662 | uses ospfv2-lsdb-common-unknown-tlv-structure; |
| 663 | } |
| 664 | } |
| 665 | } // grace LSA |
| 666 | |
| 667 | container router-information { |
| 668 | when "../state/type = 'ROUTER_INFORMATION_LSA'" { |
| 669 | description |
| 670 | "Include the router-information container when the opaque LSA |
| 671 | type is specified to be an RI LSA"; |
| 672 | } |
| 673 | |
| 674 | description |
| 675 | "The router information LSA is utilised to advertise capabilities |
| 676 | of a system to other systems who receive the LSA"; |
| 677 | |
| 678 | container tlvs { |
| 679 | description |
| 680 | "The TLVs included within the Router Information LSA."; |
| 681 | |
| 682 | list tlv { |
| 683 | description |
| 684 | "TLV entry in the Router Information LSA"; |
| 685 | |
| 686 | // unkeyed list |
| 687 | container state { |
| 688 | description |
| 689 | "Per-TLV state parameters of the RI LSA"; |
| 690 | uses ospfv2-lsdb-opaque-ri-state; |
| 691 | } |
| 692 | |
| 693 | uses ospfv2-lsdb-common-unknown-tlv-structure; |
| 694 | |
| 695 | container informational-capabilities { |
| 696 | when "../state/type = 'RI_INFORMATIONAL_CAPABILITIES'" { |
| 697 | description |
| 698 | "Include the informational capabilities specification when |
| 699 | the TLV of the RI LSA is specified to be of this type"; |
| 700 | } |
| 701 | |
| 702 | description |
| 703 | "Information related to the capabilities of the advertising |
| 704 | router within the scope that the opaque RI LSA is being |
| 705 | advertised"; |
| 706 | |
| 707 | container state { |
| 708 | description |
| 709 | "State parameters of the informational capabilitis of the |
| 710 | RI LSA"; |
| 711 | uses ospfv2-lsdb-opaque-ri-informational-state; |
| 712 | } |
| 713 | } |
| 714 | |
| 715 | container node-administrative-tags { |
| 716 | when "../state/type = 'RI_NODE_ADMIN_TAG'" { |
| 717 | description |
| 718 | "Include the node administrative tags specification when |
| 719 | the TLV of the RI LSA is specified to be of this type"; |
| 720 | } |
| 721 | |
| 722 | description |
| 723 | "Per-node administrative tags associated with the local system |
| 724 | specified by the operator"; |
| 725 | |
| 726 | container state { |
| 727 | description |
| 728 | "State parameters of the node administrative tags advertised |
| 729 | in the RI LSA"; |
| 730 | uses ospfv2-lsdb-opaque-ri-admintag-state; |
| 731 | } |
| 732 | } |
| 733 | |
| 734 | container segment-routing-algorithm { |
| 735 | when "../state/type = 'RI_SR_ALGORITHM'" { |
| 736 | description |
| 737 | "Include the segment routing algorithm specific parameters when |
| 738 | the TLV of the RI LSA is specified to be of this type"; |
| 739 | } |
| 740 | |
| 741 | description |
| 742 | "The algorithms supported for Segment Routing by the local system"; |
| 743 | |
| 744 | container state { |
| 745 | description |
| 746 | "State parameters of the Segment Routing algorithm advertised in |
| 747 | the RI LSA"; |
| 748 | uses ospfv2-lsdb-opaque-ri-sralgo-state; |
| 749 | } |
| 750 | } |
| 751 | |
| 752 | container segment-routing-sid-label-range { |
| 753 | when "../state/type = 'RI_SR_SID_LABEL_RANGE'" { |
| 754 | description |
| 755 | "Include the segment routing SID/Label range TLV specific state when |
| 756 | the TLV of the RI LSA is specified to be of this type"; |
| 757 | } |
| 758 | |
| 759 | description |
| 760 | "The Segment Identifier (SID) or label ranges that are supported by |
| 761 | the local system for Segment Routing"; |
| 762 | |
| 763 | container tlvs { |
| 764 | description |
| 765 | "Sub-TLVs of the SID/Label range TLV of the RI LSA"; |
| 766 | |
| 767 | list tlv { |
| 768 | // unkeyed list |
| 769 | description |
| 770 | "Sub-TLVs of the SID/Label range TLV"; |
| 771 | |
| 772 | uses ospfv2-lsdb-common-unknown-tlv-structure; |
| 773 | |
| 774 | container state { |
| 775 | description |
| 776 | "State parameters of the sub-TLVs of the SR/Label range TLV"; |
| 777 | uses ospfv2-lsdb-opaque-ri-srrange-tlv-state; |
| 778 | } |
| 779 | |
| 780 | container sid-label { |
| 781 | description |
| 782 | "Sub-TLV used to advertise the SID or label associated with the |
| 783 | subset of the SRGB being advertised"; |
| 784 | |
| 785 | container state { |
| 786 | description |
| 787 | "State parameters of the SID/Label sub-TLV of the SR/Label |
| 788 | range TLV of the RI LSA"; |
| 789 | uses ospfv2-lsdb-opaque-ri-srrange-sid-label-tlv-state; |
| 790 | } |
| 791 | } |
| 792 | } |
| 793 | } |
| 794 | } |
| 795 | } |
| 796 | } |
| 797 | } // router-information |
| 798 | |
| 799 | container extended-prefix { |
| 800 | when "../state/type = 'OSPFV2_EXTENDED_PREFIX'" { |
| 801 | description |
| 802 | "Include the extended-prefix container when the opaque LSA |
| 803 | type is specified to be an extended prefix LSA"; |
| 804 | } |
| 805 | |
| 806 | description |
| 807 | "An OSPFv2 Extended Prefix Opaque LSA, used to encapsulate |
| 808 | TLV attributes associated with a prefix advertised in OSPF."; |
| 809 | |
| 810 | reference "RFC7684 - OSPFv2 Prefix/Link Attribute Advertisement"; |
| 811 | |
| 812 | container state { |
| 813 | description |
| 814 | "State parameters of the Extended Prefix LSA"; |
| 815 | uses ospfv2-lsdb-extended-prefix-state; |
| 816 | } |
| 817 | |
| 818 | container tlvs { |
| 819 | description |
| 820 | "TLVs contained within the Extended Prefix LSA"; |
| 821 | |
| 822 | list tlv { |
| 823 | // unkeyed list |
| 824 | description |
| 825 | "A TLV contained within the extended prefix LSA"; |
| 826 | |
| 827 | container state { |
| 828 | description |
| 829 | "State parameters relating to the sub-TLV of the extended |
| 830 | prefix LSA"; |
| 831 | uses ospfv2-lsdb-extended-prefix-tlv-state; |
| 832 | } |
| 833 | |
| 834 | container extended-prefix-range { |
| 835 | when "../state/type = 'EXTENDED_PREFIX_RANGE'" { |
| 836 | description |
| 837 | "Include the prefix range sub-TLV when the type of the |
| 838 | sub-TLV is specified as such"; |
| 839 | } |
| 840 | |
| 841 | description |
| 842 | "State parameters relating to the extended prefix range |
| 843 | sub-TLV of the extended prefix LSA"; |
| 844 | |
| 845 | container state { |
| 846 | description |
| 847 | "State parameters relating to the Extended Prefix Range |
| 848 | sub-TLV of the Extended Prefix LSA"; |
| 849 | uses ospfv2-lsdb-extended-prefix-range-state; |
| 850 | } |
| 851 | } |
| 852 | |
| 853 | container prefix-sid { |
| 854 | when "../state/type = 'PREFIX_SID'" { |
| 855 | description |
| 856 | "Include parameters relating to the Prefix SID when the type |
| 857 | of the sub-TLV is indicated as such"; |
| 858 | } |
| 859 | |
| 860 | description |
| 861 | "State parameters relating to the Prefix SID sub-TLV of the |
| 862 | extended prefix LSA"; |
| 863 | |
| 864 | container state { |
| 865 | description |
| 866 | "State parameters relating to the Prefix SID sub-TLV of the |
| 867 | extended prefix LSA"; |
| 868 | uses ospfv2-lsdb-extended-prefix-prefix-sid-state; |
| 869 | } |
| 870 | } // prefix-sid |
| 871 | |
| 872 | container sid-label-binding { |
| 873 | when "../state/type = 'SID_LABEL_BINDING'" { |
| 874 | description |
| 875 | "Include parameters relating to the SID/Label binding sub-TLV |
| 876 | only when the type is indicated as such"; |
| 877 | } |
| 878 | |
| 879 | description |
| 880 | "State parameters relating to the SID/Label binding sub-TLV |
| 881 | of the extended prefix LSA"; |
| 882 | |
| 883 | container state { |
| 884 | description |
| 885 | "State parameters relating to the SID/Label binding sub-TLV |
| 886 | of the extended prefix LSA"; |
| 887 | uses ospfv2-lsdb-extended-prefix-sid-label-binding-state; |
| 888 | } |
| 889 | |
| 890 | container tlvs { |
| 891 | description |
| 892 | "TLVs contained within the SID/Label Binding sub-TLV of the |
| 893 | SID/Label Binding TLV"; |
| 894 | |
| 895 | list tlv { |
| 896 | description |
| 897 | "A TLV contained within the SID/Label Binding sub-TLV"; |
| 898 | |
| 899 | container state { |
| 900 | description |
| 901 | "State parameters relating to the SID/Label Binding |
| 902 | sub-TLV"; |
| 903 | uses ospfv2-lsdb-extended-prefix-sid-label-binding-tlv-state; |
| 904 | } |
| 905 | |
| 906 | container sid-label-binding { |
| 907 | when "../state/type = 'SID_LABEL_BINDING'" { |
| 908 | description |
| 909 | "Include the SID/Label Binding sub-TLV parameters only |
| 910 | when the type is indicated as such"; |
| 911 | } |
| 912 | |
| 913 | description |
| 914 | "Parameters for the SID/Label Binding sub-TLV of the |
| 915 | SID/Label binding TLV"; |
| 916 | |
| 917 | container state { |
| 918 | description |
| 919 | "State parameteres relating to the SID/Label Binding |
| 920 | sub-TLV"; |
| 921 | uses ospfv2-lsdb-extprefix-sid-label-binding-state; |
| 922 | } |
| 923 | } // sid-label-binding |
| 924 | |
| 925 | container ero-metric { |
| 926 | when "../state/type = 'ERO_METRIC'" { |
| 927 | description |
| 928 | "Include the ERO Metric sub-TLV parameters only when |
| 929 | the type is indicated as such"; |
| 930 | } |
| 931 | |
| 932 | description |
| 933 | "Parameters for the ERO Metric Sub-TLV of the SID/Label |
| 934 | binding TLV"; |
| 935 | |
| 936 | container state { |
| 937 | description |
| 938 | "State parameters relating to the ERO Metric Sub-TLV of |
| 939 | the SID/Label binding TLV"; |
| 940 | uses ospfv2-lsdb-extprefix-sid-label-ero-metric-state; |
| 941 | } |
| 942 | } // ero-metric |
| 943 | |
| 944 | container ero-path { |
| 945 | when "../state/type = 'ERO_PATH'" { |
| 946 | description |
| 947 | "Include the ERO Path sub-TLV parameters only when the |
| 948 | type is indicated as such"; |
| 949 | } |
| 950 | |
| 951 | description |
| 952 | "Parameters for the ERO Path Sub-TLV of the SID/Label |
| 953 | binding TLV"; |
| 954 | |
| 955 | container segments { |
| 956 | description |
| 957 | "Segments of the path described within the SID/Label |
| 958 | Binding sub-TLV"; |
| 959 | |
| 960 | list segment { |
| 961 | description |
| 962 | "A segment of the path described within the sub-TLV"; |
| 963 | |
| 964 | container state { |
| 965 | description |
| 966 | "State parameters relating to the path segment |
| 967 | contained within the sub-TLV"; |
| 968 | uses ospfv2-lsdb-extprefix-sid-lbl-ero-path-seg-state; |
| 969 | } |
| 970 | |
| 971 | container ipv4-segment { |
| 972 | when "../state/type = 'IPV4_SEGMENT'" { |
| 973 | description |
| 974 | "Include the IPv4 segment only when the type is |
| 975 | indicated as such"; |
| 976 | } |
| 977 | |
| 978 | description |
| 979 | "Details of the IPv4 segment interface of the ERO"; |
| 980 | |
| 981 | container state { |
| 982 | description |
| 983 | "State parameters of the IPv4 segment of the ERO"; |
| 984 | uses ospfv2-lsdb-extprefix-sid-lbl-ero-ipv4-state; |
| 985 | } |
| 986 | } // ipv4-segment |
| 987 | |
| 988 | container unnumbered-hop { |
| 989 | when "../state/type = 'UNNUMBERED_INTERFACE_SEGMENT'" { |
| 990 | description |
| 991 | "Include the unnumbered segment only when the |
| 992 | type is indicated as such"; |
| 993 | } |
| 994 | |
| 995 | description |
| 996 | "Details of the unnumbered interface segment of the |
| 997 | ERO"; |
| 998 | |
| 999 | container state { |
| 1000 | description |
| 1001 | "State parameters of the unnumbered interface |
| 1002 | segment of the ERO"; |
| 1003 | uses ospfv2-lsdb-extprefix-sid-lbl-ero-unnum-state; |
| 1004 | } |
| 1005 | } // unnumbered-hop |
| 1006 | } // tlv |
| 1007 | } // tlvs |
| 1008 | } |
| 1009 | } |
| 1010 | } |
| 1011 | } // sid-label-binding |
| 1012 | |
| 1013 | uses ospfv2-lsdb-common-unknown-tlv-structure; |
| 1014 | } |
| 1015 | } |
| 1016 | } // extended-prefix |
| 1017 | |
| 1018 | container extended-link { |
| 1019 | description |
| 1020 | "The OSPFv2 Extended Link Opaque LSA, used to encapsulate TLV |
| 1021 | attributes associated with a link advertised in OSPF."; |
| 1022 | |
| 1023 | reference "RFC7684 - OSPFv2 Prefix/Link Attribute Advertisement"; |
| 1024 | |
| 1025 | container state { |
| 1026 | description |
| 1027 | "State parameters of the Extended Link LSA"; |
| 1028 | uses ospfv2-lsdb-extended-link-state; |
| 1029 | } |
| 1030 | |
| 1031 | container tlvs { |
| 1032 | description |
| 1033 | "TLVs contained within the Extended Link LSA"; |
| 1034 | |
| 1035 | list tlv { |
| 1036 | description |
| 1037 | "List of TLVs within the Extended Link LSA"; |
| 1038 | |
| 1039 | container state { |
| 1040 | description |
| 1041 | "State parameters relating to the sub-TLV of the extended link |
| 1042 | LSA"; |
| 1043 | uses ospfv2-lsdb-extended-link-tlv-state; |
| 1044 | } |
| 1045 | |
| 1046 | uses ospfv2-lsdb-common-unknown-tlv-structure; |
| 1047 | |
| 1048 | container adjacency-sid { |
| 1049 | when "../state/type = 'ADJACENCY_SID'" { |
| 1050 | description |
| 1051 | "Include the Adjacency SID parameters only when the type of |
| 1052 | the sub-TLV is indicated as such"; |
| 1053 | } |
| 1054 | |
| 1055 | description |
| 1056 | "Parameters relating to an Adjacency SID sub-TLV of the |
| 1057 | extended link LSA"; |
| 1058 | |
| 1059 | container state { |
| 1060 | description |
| 1061 | "State parameters relating to an Adjacency SID"; |
| 1062 | |
| 1063 | uses ospfv2-lsdb-extended-link-adj-sid-state; |
| 1064 | } |
| 1065 | } |
| 1066 | } |
| 1067 | } |
| 1068 | |
| 1069 | } // extended-link |
| 1070 | |
| 1071 | uses ospfv2-lsdb-common-unknown-tlv-structure; |
| 1072 | } |
| 1073 | } |
| 1074 | |
| 1075 | grouping ospfv2-lsdb-generic-lsa-tos-metric-state { |
| 1076 | description |
| 1077 | "Per-TOS state parameters for the Router LSA"; |
| 1078 | |
| 1079 | uses ospfv2-lsdb-common-tos-metric; |
| 1080 | } |
| 1081 | |
| 1082 | grouping ospfv2-lsdb-router-lsa-state { |
| 1083 | description |
| 1084 | "Parameters of the router LSA"; |
| 1085 | |
| 1086 | leaf type { |
| 1087 | type identityref { |
| 1088 | base "oc-ospf-types:ROUTER_LSA_TYPES"; |
| 1089 | } |
| 1090 | description |
| 1091 | "The sub-type of the Router LSA."; |
| 1092 | } |
| 1093 | |
| 1094 | uses ospfv2-lsdb-common-link-specification; |
| 1095 | |
| 1096 | leaf metric { |
| 1097 | type oc-ospf-types:ospf-metric; |
| 1098 | description |
| 1099 | "The cost of utilising the link specified independent of TOS"; |
| 1100 | } |
| 1101 | |
| 1102 | leaf number-links { |
| 1103 | type uint16; |
| 1104 | description |
| 1105 | "The number of links that are described within the LSA"; |
| 1106 | } |
| 1107 | |
| 1108 | leaf number-tos-metrics { |
| 1109 | type uint16; |
| 1110 | description |
| 1111 | "The number of different TOS metrics given for this link, not |
| 1112 | including the link metric (which is referred to as TOS 0)."; |
| 1113 | } |
| 1114 | } |
| 1115 | |
| 1116 | grouping ospfv2-lsdb-network-lsa-state { |
| 1117 | description |
| 1118 | "Parameters of the Network LSA"; |
| 1119 | |
| 1120 | leaf network-mask { |
| 1121 | type uint8 { |
| 1122 | range "0..32"; |
| 1123 | } |
| 1124 | description |
| 1125 | "The mask of the network described by the Network LSA |
| 1126 | represented as a CIDR mask."; |
| 1127 | } |
| 1128 | |
| 1129 | leaf-list attached-router { |
| 1130 | type yang:dotted-quad; |
| 1131 | description |
| 1132 | "A list of the router ID of the routers that are attached to |
| 1133 | the network described by the Network LSA"; |
| 1134 | } |
| 1135 | } |
| 1136 | |
| 1137 | grouping ospfv2-lsdb-summary-lsa-state { |
| 1138 | description |
| 1139 | "Parameters of the Summary LSA"; |
| 1140 | |
| 1141 | leaf network-mask { |
| 1142 | type uint8 { |
| 1143 | range "0..32"; |
| 1144 | } |
| 1145 | description |
| 1146 | "The mask of the network described by the Summary LSA |
| 1147 | represented as a CIDR mask."; |
| 1148 | } |
| 1149 | } |
| 1150 | |
| 1151 | grouping ospfv2-lsdb-asexternal-lsa-common-parameters { |
| 1152 | description |
| 1153 | "Common parameters that are used for OSPFv2 AS External LSAs"; |
| 1154 | |
| 1155 | leaf forwarding-address { |
| 1156 | type inet:ipv4-address-no-zone; |
| 1157 | description |
| 1158 | "The destination to which traffic for the external prefix |
| 1159 | should be advertised. When this value is set to 0.0.0.0 then |
| 1160 | traffic should be forwarded to the LSA's originator"; |
| 1161 | } |
| 1162 | |
| 1163 | leaf external-route-tag { |
| 1164 | type uint32; |
| 1165 | description |
| 1166 | "An opaque tag that set by the LSA originator to carry |
| 1167 | information relating to the external route"; |
| 1168 | } |
| 1169 | } |
| 1170 | |
| 1171 | grouping ospfv2-lsdb-asexternal-lsa-state { |
| 1172 | description |
| 1173 | "Parameters for the AS External LSA"; |
| 1174 | |
| 1175 | leaf mask { |
| 1176 | type uint8 { |
| 1177 | range "0..32"; |
| 1178 | } |
| 1179 | description |
| 1180 | "The subnet mask for the advertised destination"; |
| 1181 | } |
| 1182 | |
| 1183 | leaf metric-type { |
| 1184 | type enumeration { |
| 1185 | enum "TYPE_1" { |
| 1186 | description |
| 1187 | "When the metric of a prefix is specified as Type 1 |
| 1188 | then it is considered to be expressed in the same units as |
| 1189 | the link-state metrics carried in OSPF. That is to say |
| 1190 | that the metric advertised is directly compared to the |
| 1191 | internal cost"; |
| 1192 | } |
| 1193 | enum "TYPE_2" { |
| 1194 | description |
| 1195 | "When the metric of a prefix is specified as Type 2 then |
| 1196 | it is considered to be expressed as a cost in addition to |
| 1197 | that of the link-state metric to the advertising router. |
| 1198 | That is to say that the metric is considered to be the |
| 1199 | cost to the advertising router plus the advertised metric |
| 1200 | for the external entity"; |
| 1201 | } |
| 1202 | } |
| 1203 | description |
| 1204 | "The type of metric included within the AS External LSA."; |
| 1205 | } |
| 1206 | |
| 1207 | leaf metric { |
| 1208 | type oc-ospf-types:ospf-metric; |
| 1209 | description |
| 1210 | "The cost to reach the external network specified. The exact |
| 1211 | interpretation of this cost is dependent on the type of |
| 1212 | metric specified"; |
| 1213 | } |
| 1214 | |
| 1215 | uses ospfv2-lsdb-asexternal-lsa-common-parameters; |
| 1216 | } |
| 1217 | |
| 1218 | grouping ospfv2-lsdb-asexternal-tos-state { |
| 1219 | description |
| 1220 | "Per-TOS parameters for the AS External LSA"; |
| 1221 | |
| 1222 | uses ospfv2-lsdb-asexternal-lsa-common-parameters; |
| 1223 | uses ospfv2-lsdb-common-tos-metric; |
| 1224 | } |
| 1225 | |
| 1226 | grouping ospfv2-lsdb-nssa-external-lsa-state { |
| 1227 | description |
| 1228 | "Operational state parameters specific to the NSSA External |
| 1229 | LSA"; |
| 1230 | |
| 1231 | leaf propagate { |
| 1232 | type boolean; |
| 1233 | description |
| 1234 | "When this bit is set to true, an NSSA border router will |
| 1235 | translate a Type 7 LSA (NSSA External) to a Type 5 LSA |
| 1236 | (AS External)."; |
| 1237 | reference "RFC3101, Section 2.3"; |
| 1238 | } |
| 1239 | } |
| 1240 | |
| 1241 | grouping ospfv2-lsdb-opaque-lsa-state { |
| 1242 | description |
| 1243 | "Operational state parameters specific to an Opaque LSA"; |
| 1244 | |
| 1245 | leaf scope { |
| 1246 | type enumeration { |
| 1247 | enum LINK { |
| 1248 | description |
| 1249 | "The scope of the LSA is the current link. The LSA |
| 1250 | is not flooded beyond the local network. This |
| 1251 | enumeration denotes a Type 9 LSA."; |
| 1252 | } |
| 1253 | enum AREA { |
| 1254 | description |
| 1255 | "The scope of the LSA is the local area. The LSA |
| 1256 | is not flooded beyond the area of origin. This |
| 1257 | enumeration denotes a Type 10 LSA."; |
| 1258 | } |
| 1259 | enum AS { |
| 1260 | description |
| 1261 | "The scope of the LSA is the local autonomous |
| 1262 | system (AS). The flooding domain is the same |
| 1263 | as a Type 5 LSA - it is not flooded into |
| 1264 | stub areas or NSSAs. This enumeration denotes a |
| 1265 | Type 11 LSA."; |
| 1266 | } |
| 1267 | } |
| 1268 | description |
| 1269 | "The scope of the opaque LSA. The type of the LSA |
| 1270 | indicates its scope - the value of this leaf |
| 1271 | determines both the flooding domain, and the type |
| 1272 | of the LSA."; |
| 1273 | } |
| 1274 | |
| 1275 | leaf type { |
| 1276 | type identityref { |
| 1277 | base "oc-ospf-types:OSPF_OPAQUE_LSA_TYPE"; |
| 1278 | } |
| 1279 | description |
| 1280 | "The Opaque Type of the LSA. This value is used to |
| 1281 | indicate the type of data carried by the opaque LSA"; |
| 1282 | } |
| 1283 | } |
| 1284 | |
| 1285 | grouping ospfv2-lsdb-opaque-lsa-te-tlv-state { |
| 1286 | description |
| 1287 | "The contents of the Traffic Engineering LSA"; |
| 1288 | |
| 1289 | leaf type { |
| 1290 | type identityref { |
| 1291 | base "oc-ospf-types:OSPF_TE_LSA_TLV_TYPE"; |
| 1292 | } |
| 1293 | description |
| 1294 | "The type of TLV within the Traffic Engineering LSA"; |
| 1295 | } |
| 1296 | } |
| 1297 | |
| 1298 | grouping ospfv2-lsdb-opaque-te-unknown-state { |
| 1299 | description |
| 1300 | "The contents of the unknown TLV within the Traffic Engineering LSA"; |
| 1301 | |
| 1302 | uses ospfv2-lsdb-common-unknown-tlv; |
| 1303 | } |
| 1304 | |
| 1305 | grouping ospfv2-lsdb-opaque-te-link-state { |
| 1306 | description |
| 1307 | "The contents of the sub-TLVs of a Traffic Engineering LSA Link TLV"; |
| 1308 | |
| 1309 | leaf type { |
| 1310 | type union { |
| 1311 | type identityref { |
| 1312 | base "oc-ospf-types:OSPF_TE_LINK_TLV_TYPE"; |
| 1313 | } |
| 1314 | type enumeration { |
| 1315 | enum UNKNOWN { |
| 1316 | description |
| 1317 | "The sub-TLV received in the LSA is unknown to the local |
| 1318 | system"; |
| 1319 | } |
| 1320 | } |
| 1321 | } |
| 1322 | description |
| 1323 | "The sub-TLV type specified in the Link TLV. When the value is |
| 1324 | known by the local system, a canonical name of the sub-TLV is utilised |
| 1325 | - the special UNKNOWN value indicates that the system did not |
| 1326 | support the sub-TLV type received in the LSA."; |
| 1327 | } |
| 1328 | |
| 1329 | leaf unknown-type { |
| 1330 | when "../type = 'UNKNOWN'" { |
| 1331 | description |
| 1332 | "Include the unknown type field only when the sub-TLV was not |
| 1333 | known to the local system"; |
| 1334 | } |
| 1335 | |
| 1336 | type uint16; |
| 1337 | description |
| 1338 | "The value of the type field of an unknown sub-TLV"; |
| 1339 | } |
| 1340 | |
| 1341 | leaf unknown-value { |
| 1342 | when "../type = 'UNKNOWN'" { |
| 1343 | description |
| 1344 | "Include the unknown value field only when the sub-TLV was not |
| 1345 | known to the local system"; |
| 1346 | } |
| 1347 | |
| 1348 | type binary; |
| 1349 | description |
| 1350 | "The binary contents of the unknown TLV"; |
| 1351 | } |
| 1352 | |
| 1353 | leaf link-type { |
| 1354 | when "../type = 'TE_LINK_TYPE'" { |
| 1355 | description |
| 1356 | "Include the link-type field only when the sub-TLV type was a TE |
| 1357 | link type"; |
| 1358 | } |
| 1359 | |
| 1360 | type enumeration { |
| 1361 | enum POINT_TO_POINT { |
| 1362 | description |
| 1363 | "The link being described by the TE LSA Link sub-TLV is a |
| 1364 | point-to-point link to exactly one other system"; |
| 1365 | } |
| 1366 | enum MULTI_ACCESS { |
| 1367 | description |
| 1368 | "The link being described by the TE LSA Link sub-TLV is a |
| 1369 | multi-access link that supports connectivity to multiple remote |
| 1370 | systems"; |
| 1371 | } |
| 1372 | enum UNKNOWN { |
| 1373 | description |
| 1374 | "The link type received was unknown to the local system"; |
| 1375 | } |
| 1376 | } |
| 1377 | description |
| 1378 | "The type of the link that is being described by the TE LSA Link |
| 1379 | sub-TLV"; |
| 1380 | } |
| 1381 | |
| 1382 | leaf link-id { |
| 1383 | when "../type = 'TE_LINK_ID'" { |
| 1384 | description |
| 1385 | "Include the link ID field only when the sub-TLV type was a TE |
| 1386 | Link identifier"; |
| 1387 | } |
| 1388 | |
| 1389 | type yang:dotted-quad; |
| 1390 | description |
| 1391 | "The ID of the remote system. For point-to-point links, this is the |
| 1392 | router ID of the neighbor. For multi-access links it is the address |
| 1393 | of the designated router."; |
| 1394 | } |
| 1395 | |
| 1396 | leaf-list local-ip-address { |
| 1397 | when "../type = 'TE_LINK_LOCAL_IP'" { |
| 1398 | description |
| 1399 | "Include the local IP address field only when the sub-TLV type was |
| 1400 | a local IP address"; |
| 1401 | } |
| 1402 | |
| 1403 | type inet:ipv4-address-no-zone; |
| 1404 | description |
| 1405 | "The IP address(es) of the local system that correspond to the |
| 1406 | specified TE link"; |
| 1407 | } |
| 1408 | |
| 1409 | leaf-list remote-ip-address { |
| 1410 | when "../type = 'TE_LINK_REMOTE_IP'" { |
| 1411 | description |
| 1412 | "Include the remote IP address field only when the sub-TLV type was |
| 1413 | a remote IP address"; |
| 1414 | } |
| 1415 | |
| 1416 | type inet:ipv4-address-no-zone; |
| 1417 | description |
| 1418 | "The IP address(es) of the remote systems that are attached to the |
| 1419 | specified TE link"; |
| 1420 | } |
| 1421 | |
| 1422 | leaf metric { |
| 1423 | when "../type = 'TE_LINK_METRIC'" { |
| 1424 | description |
| 1425 | "Include the traffic engineering metric only when the sub-TLV type |
| 1426 | is a TE metric"; |
| 1427 | } |
| 1428 | |
| 1429 | type uint32; |
| 1430 | description |
| 1431 | "The metric of the link that should be used for traffic engineering |
| 1432 | purposes. This link may be different than the standard OSPF link |
| 1433 | metric."; |
| 1434 | } |
| 1435 | |
| 1436 | leaf maximum-bandwidth { |
| 1437 | when "../type = 'TE_LINK_MAXIMUM_BANDWIDTH'" { |
| 1438 | description |
| 1439 | "Include the traffic engineering metric only when the sub-TLV type |
| 1440 | is the maximum bandwidth"; |
| 1441 | } |
| 1442 | |
| 1443 | type oc-types:ieeefloat32; |
| 1444 | units "bytes per second"; |
| 1445 | description |
| 1446 | "The maximum bandwidth of the link. This value reflects the actual |
| 1447 | bandwidth of the link expressed asn IEEE 32-bit floating point |
| 1448 | number"; |
| 1449 | } |
| 1450 | |
| 1451 | leaf maximum-reservable-bandwidth { |
| 1452 | when "../type = 'TE_LINK_MAXIUMUM_RESERVABLE_BANDWIDTH'" { |
| 1453 | description |
| 1454 | "Include the maximum reservable bandwidth field only when the |
| 1455 | sub-TLV type is the maximum reservable bandwidth"; |
| 1456 | } |
| 1457 | |
| 1458 | type oc-types:ieeefloat32; |
| 1459 | units "bytes per second"; |
| 1460 | description |
| 1461 | "The maximum reservable bandwidth for the link. This value represents |
| 1462 | the total bandwidth which may be used for traffic engineering |
| 1463 | purposes. The value may exceed the maximum-bandwidth value |
| 1464 | in cases where the link is oversubscribed. The value is reflected as |
| 1465 | a 32-bit IEEE floating-point number"; |
| 1466 | } |
| 1467 | } |
| 1468 | |
| 1469 | grouping ospfv2-lsdb-opaque-te-link-unreserved-bw-state { |
| 1470 | description |
| 1471 | "The per-priority unreserved bandwidth described within the unreserved |
| 1472 | bandwidth sub-TLV of the Link TLV of the Traffic Engineering LSA"; |
| 1473 | |
| 1474 | leaf priority { |
| 1475 | type uint8 { |
| 1476 | range "0..7"; |
| 1477 | } |
| 1478 | description |
| 1479 | "The priority level being described"; |
| 1480 | } |
| 1481 | |
| 1482 | leaf unreserved-bandwidth { |
| 1483 | type oc-types:ieeefloat32; |
| 1484 | description |
| 1485 | "The unreserved bandwidth for at priority level P, where P is |
| 1486 | equal to the priority of the current list entry. The reservable |
| 1487 | bandwidth at priority P is equal to the sum of the reservable |
| 1488 | bandwidth at all levels 0..P."; |
| 1489 | } |
| 1490 | } |
| 1491 | |
| 1492 | grouping ospfv2-lsdb-opaque-te-link-admin-group-state { |
| 1493 | description |
| 1494 | "Per bit administrative group status"; |
| 1495 | |
| 1496 | leaf bit-index { |
| 1497 | type uint8 { |
| 1498 | range "0..31"; |
| 1499 | } |
| 1500 | description |
| 1501 | "The index of the bit within the 32-bit administrative group field |
| 1502 | of the Administrative Group sub-TLV of the Traffic Engineering LSA"; |
| 1503 | } |
| 1504 | |
| 1505 | leaf set { |
| 1506 | type boolean; |
| 1507 | default false; |
| 1508 | description |
| 1509 | "Whether the bit is set within the administrative group field"; |
| 1510 | } |
| 1511 | } |
| 1512 | |
| 1513 | grouping ospfv2-lsdb-opaque-te-node-attribute-state { |
| 1514 | description |
| 1515 | "State parameters relating to the Traffic Engineering Node Attribute |
| 1516 | TLV of the Traffic Engineering LSA"; |
| 1517 | |
| 1518 | leaf type { |
| 1519 | type union { |
| 1520 | type identityref { |
| 1521 | base "oc-ospf-types:TE_NODE_ATTRIBUTE_TLV_TYPE"; |
| 1522 | } |
| 1523 | type enumeration { |
| 1524 | enum UNKNOWN { |
| 1525 | description |
| 1526 | "The sub-TLV type received within the TE LSA Node Attribute TLV |
| 1527 | was unknown the the local system"; |
| 1528 | } |
| 1529 | } |
| 1530 | } |
| 1531 | description |
| 1532 | "The type of the sub-TLV of the Node Attribute TLV contained within |
| 1533 | the TE LSA. If the local system can interpret the value received the |
| 1534 | canonical name of the type is utilised, otherwise the special UNKNOWN |
| 1535 | value is used"; |
| 1536 | } |
| 1537 | |
| 1538 | leaf-list local-ipv4-addresses { |
| 1539 | when "../type = 'NODE_IPV4_LOCAL_ADDRESS'" { |
| 1540 | description |
| 1541 | "Include the local IPv4 addresses when the type of the sub-TLV |
| 1542 | indicates that this is the contained data"; |
| 1543 | } |
| 1544 | |
| 1545 | type inet:ipv4-prefix; |
| 1546 | description |
| 1547 | "The local IPv4 addresses of the node expressed in CIDR notation"; |
| 1548 | } |
| 1549 | |
| 1550 | leaf-list local-ipv6-addresses { |
| 1551 | when "../type = 'NODE_LOCAL_IPV6_ADDRESS'" { |
| 1552 | description |
| 1553 | "Include the local IPv6 addresses when the type of the sub-TLV |
| 1554 | indicfates that this is the contained data"; |
| 1555 | } |
| 1556 | |
| 1557 | type inet:ipv6-prefix; |
| 1558 | description |
| 1559 | "The local IPv6 addreses of the node"; |
| 1560 | } |
| 1561 | } |
| 1562 | |
| 1563 | grouping ospfv2-lsdb-opaque-te-router-address-state { |
| 1564 | description |
| 1565 | "The contents of the value field of the Router Address TLV of the |
| 1566 | Traffic Engineering LSA."; |
| 1567 | |
| 1568 | leaf address { |
| 1569 | type inet:ipv4-address-no-zone; |
| 1570 | description |
| 1571 | "A stable IP address of the advertising router, that is always |
| 1572 | reachable when the router is connected to the network. Typically this |
| 1573 | is a loopback address."; |
| 1574 | } |
| 1575 | } |
| 1576 | |
| 1577 | grouping ospfv2-lsdb-opaque-grace-state { |
| 1578 | description |
| 1579 | "State parameters on a per-TLV basis of the Grace LSA"; |
| 1580 | |
| 1581 | leaf type { |
| 1582 | type identityref { |
| 1583 | base "oc-ospf-types:GRACE_LSA_TLV_TYPES"; |
| 1584 | } |
| 1585 | description |
| 1586 | "The type of the sub-TLV received within the Grace LSA"; |
| 1587 | } |
| 1588 | |
| 1589 | leaf period { |
| 1590 | when "../type = 'GRACE_PERIOD'" { |
| 1591 | description |
| 1592 | "Include the period specification when the sub-TLV type is indicated |
| 1593 | to be of this type"; |
| 1594 | } |
| 1595 | |
| 1596 | type uint32; |
| 1597 | units seconds; |
| 1598 | description |
| 1599 | "The number of seconds that the router's neighbors should advertise |
| 1600 | the local system as fully adjacent regardless of database |
| 1601 | synchronization state"; |
| 1602 | reference "RFC3623"; |
| 1603 | } |
| 1604 | |
| 1605 | leaf reason { |
| 1606 | when "../type = 'GRACE_RESTART_REASON'" { |
| 1607 | description |
| 1608 | "Include the restart reason when the sub-TLV type specifies this |
| 1609 | is included"; |
| 1610 | } |
| 1611 | |
| 1612 | type enumeration { |
| 1613 | enum UNKNOWN { |
| 1614 | value 0; |
| 1615 | description |
| 1616 | "The reason for the graceful restart is unknown"; |
| 1617 | } |
| 1618 | enum SOFTWARE_RESTART { |
| 1619 | value 1; |
| 1620 | description |
| 1621 | "The local system is restarting due to a software component |
| 1622 | restart"; |
| 1623 | } |
| 1624 | enum SOFTWARE_RELOAD_UPGRADE { |
| 1625 | value 2; |
| 1626 | description |
| 1627 | "The local system is restarting due to a software reload or |
| 1628 | upgrade"; |
| 1629 | } |
| 1630 | enum CONTROL_PROCESSOR_SWITCH { |
| 1631 | value 3; |
| 1632 | description |
| 1633 | "The local system is restarting due to a switch to a redundant |
| 1634 | control plane element"; |
| 1635 | } |
| 1636 | } |
| 1637 | description |
| 1638 | "The reason for the graceful restart event occurring, as advertised |
| 1639 | by the restarting system"; |
| 1640 | reference "RFC3623"; |
| 1641 | } |
| 1642 | |
| 1643 | leaf ip-interface-address { |
| 1644 | when "../type = 'GRACE_IP_INTERFACE_ADDRESS'" { |
| 1645 | description |
| 1646 | "Include the interface address when the sub-TLV type specifies that |
| 1647 | it is included"; |
| 1648 | } |
| 1649 | |
| 1650 | type inet:ipv4-address-no-zone; |
| 1651 | description |
| 1652 | "The restarting system's IP address on the interface via which the |
| 1653 | Grace LSA is being advertised."; |
| 1654 | } |
| 1655 | } |
| 1656 | |
| 1657 | grouping ospfv2-lsdb-opaque-ri-state { |
| 1658 | description |
| 1659 | "State parameters of the Router Information Opaque LSA"; |
| 1660 | |
| 1661 | leaf type { |
| 1662 | type union { |
| 1663 | type identityref { |
| 1664 | base "oc-ospf-types:RI_LSA_TLV_TYPES"; |
| 1665 | } |
| 1666 | type enumeration { |
| 1667 | enum UNKNOWN { |
| 1668 | description |
| 1669 | "The TLV received within the RI LSA is unknown"; |
| 1670 | } |
| 1671 | } |
| 1672 | } |
| 1673 | description |
| 1674 | "The type of sub-TLV of the Router Information opaque LSA"; |
| 1675 | } |
| 1676 | } |
| 1677 | |
| 1678 | grouping ospfv2-lsdb-opaque-ri-informational-state { |
| 1679 | description |
| 1680 | "State parmaeters of the Router Information Informational Capabilities |
| 1681 | sub-TLV"; |
| 1682 | |
| 1683 | leaf graceful-restart-capable { |
| 1684 | type boolean; |
| 1685 | default false; |
| 1686 | description |
| 1687 | "When this leaf is set to true, the advertising system is capable of |
| 1688 | OSPF graceful restart."; |
| 1689 | } |
| 1690 | |
| 1691 | leaf graceful-restart-helper { |
| 1692 | type boolean; |
| 1693 | default false; |
| 1694 | description |
| 1695 | "When this leaf is set to true, the advertising system is capable of |
| 1696 | being a helper for OSPF graceful restart"; |
| 1697 | } |
| 1698 | |
| 1699 | leaf stub-router { |
| 1700 | type boolean; |
| 1701 | default false; |
| 1702 | description |
| 1703 | "When this leaf is set to true, the advertising system is able to |
| 1704 | advertise its status as a stub router"; |
| 1705 | reference "RFC6987"; |
| 1706 | } |
| 1707 | |
| 1708 | leaf traffic-engineering { |
| 1709 | type boolean; |
| 1710 | default false; |
| 1711 | description |
| 1712 | "When this leaf is set to true, the advertising system supports OSPFv2 |
| 1713 | traffic engineering capabilities"; |
| 1714 | } |
| 1715 | |
| 1716 | leaf point-to-point-over-lan { |
| 1717 | type boolean; |
| 1718 | default false; |
| 1719 | description |
| 1720 | "When this leaf is set to true, the advertising system supports treating |
| 1721 | LAN adjacencies as though they were point to point"; |
| 1722 | reference "RFC5309"; |
| 1723 | } |
| 1724 | |
| 1725 | leaf experimental-te { |
| 1726 | type boolean; |
| 1727 | default false; |
| 1728 | description |
| 1729 | "When this leaf is set to ture, the advertising system supports the |
| 1730 | experimental extensions to OSPF for TE described in RFC4973"; |
| 1731 | reference "RFC4973"; |
| 1732 | } |
| 1733 | } |
| 1734 | |
| 1735 | grouping ospfv2-lsdb-opaque-ri-admintag-state { |
| 1736 | description |
| 1737 | "State parameters relating to the administrative tags specified for |
| 1738 | a node within the RI LSA"; |
| 1739 | |
| 1740 | leaf-list administrative-tags { |
| 1741 | type uint32; |
| 1742 | description |
| 1743 | "The set of administrative tags assigned to the local system by |
| 1744 | the network operator. The meaning of these tags is opaque to OSPF |
| 1745 | - and their interpretation is per-domain specific"; |
| 1746 | reference "RFC7777"; |
| 1747 | } |
| 1748 | } |
| 1749 | |
| 1750 | grouping ospfv2-lsdb-opaque-ri-unknown-state { |
| 1751 | description |
| 1752 | "State parameters relating to an unknown TLV within the RI LSA"; |
| 1753 | uses ospfv2-lsdb-common-unknown-tlv; |
| 1754 | } |
| 1755 | |
| 1756 | grouping ospfv2-lsdb-opaque-ri-sralgo-state { |
| 1757 | description |
| 1758 | "State parameters relating to the SR Algorithms TLV of the RI LSA"; |
| 1759 | |
| 1760 | leaf-list supported-algorithms { |
| 1761 | type identityref { |
| 1762 | base "oc-ospf-types:SR_ALGORITHM"; |
| 1763 | } |
| 1764 | description |
| 1765 | "A list of the algorithms that are supported for segment routing |
| 1766 | by the advertising system"; |
| 1767 | } |
| 1768 | } |
| 1769 | |
| 1770 | grouping ospfv2-lsdb-opaque-ri-srrange-tlv-state { |
| 1771 | description |
| 1772 | "State parameters relating to the SR SID/Label range TLV of the |
| 1773 | RI LSA"; |
| 1774 | |
| 1775 | leaf type { |
| 1776 | type union { |
| 1777 | type identityref { |
| 1778 | base "oc-ospf-types:OSPF_RI_SR_SID_LABEL_TLV_TYPES"; |
| 1779 | } |
| 1780 | type enumeration { |
| 1781 | enum UNKNOWN { |
| 1782 | description |
| 1783 | "The type of the sub-TLV advertised with the SID/Label range |
| 1784 | TLV of the RI LSA is unknown to the receiving system"; |
| 1785 | } |
| 1786 | } |
| 1787 | } |
| 1788 | description |
| 1789 | "The type of the sub-TLV received by the local system within the |
| 1790 | SR SID/Label Range TLV of the RI LSA"; |
| 1791 | } |
| 1792 | |
| 1793 | leaf range-size { |
| 1794 | type uint32 { |
| 1795 | range "0..16777216"; |
| 1796 | } |
| 1797 | description |
| 1798 | "The number of entries within the range being described within the |
| 1799 | SID/Label range TLV"; |
| 1800 | } |
| 1801 | } |
| 1802 | |
| 1803 | grouping ospfv2-lsdb-opaque-ri-srrange-sid-label-tlv-state { |
| 1804 | description |
| 1805 | "State parameters relating to the SR SID/Label sub-TLV of the SR SID/Label |
| 1806 | range TLV of the RI LSA"; |
| 1807 | |
| 1808 | leaf entry-type { |
| 1809 | type oc-ospf-types:sr-sid-type; |
| 1810 | description |
| 1811 | "The type of entry that is contained within the sub-TLV. The range may |
| 1812 | be represented as either a range of MPLS labels, or numeric segment |
| 1813 | identifiers"; |
| 1814 | } |
| 1815 | |
| 1816 | leaf first-value { |
| 1817 | type uint32; |
| 1818 | description |
| 1819 | "The first value within the SRGB range being specified. The type of the |
| 1820 | entry is determined based on the value of the entry type as this value |
| 1821 | may represent either a segment identifier or an MPLS label."; |
| 1822 | } |
| 1823 | } |
| 1824 | |
| 1825 | grouping ospfv2-lsdb-extended-prefix-state { |
| 1826 | description |
| 1827 | "State parameters relating to an Extended Prefix LSA"; |
| 1828 | |
| 1829 | leaf route-type { |
| 1830 | type enumeration { |
| 1831 | enum UNSPECIFIED { |
| 1832 | value 0; |
| 1833 | description |
| 1834 | "The prefix described in the extended prefix LSA is of an |
| 1835 | unspecified type"; |
| 1836 | } |
| 1837 | enum INTRA_AREA { |
| 1838 | value 1; |
| 1839 | description |
| 1840 | "The prefix described in the extended prefix LSA is an intra-area |
| 1841 | prefix for the advertising system"; |
| 1842 | } |
| 1843 | enum INTER_AREA { |
| 1844 | value 3; |
| 1845 | description |
| 1846 | "The prefix described in the extended prefix LSA is an inter-area |
| 1847 | prefix for the advertising system"; |
| 1848 | } |
| 1849 | enum AS_EXTERNAL { |
| 1850 | value 5; |
| 1851 | description |
| 1852 | "The prefix described in the extended prefix LSA is external to the |
| 1853 | autonomous system of the advertising system"; |
| 1854 | } |
| 1855 | enum NSSA_EXTERNAL { |
| 1856 | value 7; |
| 1857 | description |
| 1858 | "The prefix described in the extended prefix LSA externally |
| 1859 | advertised from an NSSA area visibile to the advertising system"; |
| 1860 | } |
| 1861 | } |
| 1862 | description |
| 1863 | "The type of prefix that is contained within the Extended Prefix LSA. |
| 1864 | The information contained in sub-TLVs of the attribute is applicable |
| 1865 | regardless of this value."; |
| 1866 | } |
| 1867 | |
| 1868 | uses ospfv2-lsdb-common-prefix-properties; |
| 1869 | |
| 1870 | leaf attached { |
| 1871 | type boolean; |
| 1872 | default false; |
| 1873 | description |
| 1874 | "If this value is set to true, the prefix being advertised was |
| 1875 | generated by an ABR for an inter-area prefix. The value corresponds |
| 1876 | to the A-flag of the flags field of the Extended Prefix LSA"; |
| 1877 | } |
| 1878 | |
| 1879 | leaf node { |
| 1880 | type boolean; |
| 1881 | default false; |
| 1882 | description |
| 1883 | "If this value is set to true, the prefix being advertised represents |
| 1884 | the advertising router. Typically, the prefix within the LSA is |
| 1885 | expected to be globally-reachable prefix associated with a loopback |
| 1886 | interface"; |
| 1887 | } |
| 1888 | |
| 1889 | leaf prefix { |
| 1890 | type inet:ipv4-address-no-zone; |
| 1891 | description |
| 1892 | "The IPv4 prefix contained within the extended prefix LSA"; |
| 1893 | } |
| 1894 | } |
| 1895 | |
| 1896 | grouping ospfv2-lsdb-extended-link-state { |
| 1897 | description |
| 1898 | "State parameters related to an extended link LSA"; |
| 1899 | |
| 1900 | leaf link-type { |
| 1901 | type identityref { |
| 1902 | base "oc-ospf-types:OSPFV2_ROUTER_LINK_TYPE"; |
| 1903 | } |
| 1904 | description |
| 1905 | "The type of link with which extended attributes are associated"; |
| 1906 | } |
| 1907 | |
| 1908 | uses ospfv2-lsdb-common-link-specification; |
| 1909 | |
| 1910 | } |
| 1911 | |
| 1912 | grouping ospfv2-lsdb-extended-link-tlv-state { |
| 1913 | description |
| 1914 | "State parameters relating to a sub-TLV of the extended link LSA"; |
| 1915 | |
| 1916 | leaf type { |
| 1917 | type identityref { |
| 1918 | base "oc-ospf-types:OSPFV2_EXTENDED_LINK_SUBTLV_TYPE"; |
| 1919 | } |
| 1920 | description |
| 1921 | "The type of the sub-TLV contained within the extended link TLV"; |
| 1922 | } |
| 1923 | } |
| 1924 | |
| 1925 | grouping ospfv2-lsdb-extended-prefix-tlv-state { |
| 1926 | description |
| 1927 | "State parameters related to a sub-TLV of an Extended Prefix LSA"; |
| 1928 | |
| 1929 | leaf type { |
| 1930 | type identityref { |
| 1931 | base "oc-ospf-types:OSPFV2_EXTENDED_PREFIX_SUBTLV_TYPE"; |
| 1932 | } |
| 1933 | description |
| 1934 | "The type of sub-TLV as indicated by the Extended Prefix LSA"; |
| 1935 | } |
| 1936 | } |
| 1937 | |
| 1938 | grouping ospfv2-lsdb-extended-prefix-range-state { |
| 1939 | description |
| 1940 | "Parameters of the Extended Prefix Range SubTLV"; |
| 1941 | |
| 1942 | uses ospfv2-lsdb-common-prefix-properties; |
| 1943 | |
| 1944 | leaf range-size { |
| 1945 | type uint16; |
| 1946 | description |
| 1947 | "The number of prefixes that are covered by the advertisement."; |
| 1948 | } |
| 1949 | |
| 1950 | leaf inter-area { |
| 1951 | type boolean; |
| 1952 | default false; |
| 1953 | description |
| 1954 | "When this leaf is set to true, then the prefix range is inter-area - |
| 1955 | the flag is set by the ABR that advertises the Extended Prefix Range |
| 1956 | TLV"; |
| 1957 | } |
| 1958 | |
| 1959 | leaf prefix { |
| 1960 | type inet:ipv4-prefix; |
| 1961 | description |
| 1962 | "The first prefix in the range of prefixes being described by the |
| 1963 | extended prefix range sub-TLV"; |
| 1964 | } |
| 1965 | } |
| 1966 | |
| 1967 | grouping ospfv2-lsdb-extended-prefix-prefix-sid-state { |
| 1968 | description |
| 1969 | "Parameters of the Prefix-SID sub-TLV"; |
| 1970 | |
| 1971 | leaf no-php { |
| 1972 | type boolean; |
| 1973 | default false; |
| 1974 | description |
| 1975 | "If this leaf is set the advertising system has indicated that the |
| 1976 | prefix SID must not be popped before delivering packets to it"; |
| 1977 | } |
| 1978 | |
| 1979 | leaf mapping-server { |
| 1980 | type boolean; |
| 1981 | default false; |
| 1982 | description |
| 1983 | "If this leaf is set the SID was advertised by a Segment Routing |
| 1984 | mapping server"; |
| 1985 | } |
| 1986 | |
| 1987 | leaf explicit-null { |
| 1988 | type boolean; |
| 1989 | default false; |
| 1990 | description |
| 1991 | "If this leaf is set, the advertising system has requested that the |
| 1992 | prefix SID value should be replaced with the explicit null label |
| 1993 | value"; |
| 1994 | } |
| 1995 | |
| 1996 | leaf sid-value-type { |
| 1997 | type enumeration { |
| 1998 | enum ABSOLUTE { |
| 1999 | description |
| 2000 | "The SID contained in the Prefix-SID sub-TLV is an absolute |
| 2001 | value"; |
| 2002 | } |
| 2003 | enum INDEX { |
| 2004 | description |
| 2005 | "The SID contained in the Prefix-SID sub-TLV is an index to the |
| 2006 | SRGB"; |
| 2007 | } |
| 2008 | } |
| 2009 | description |
| 2010 | "Specifies the type of the value specified within the Prefix SID |
| 2011 | sub-TLV - in particular, whether the value is an index or an |
| 2012 | absolute value. This value corresponds with the V-flag of the Prefix |
| 2013 | SID sub-TLV"; |
| 2014 | } |
| 2015 | |
| 2016 | leaf sid-scope { |
| 2017 | type enumeration { |
| 2018 | enum LOCAL { |
| 2019 | description |
| 2020 | "The value of the SID is |
| 2021 | significant only to the advertising system"; |
| 2022 | } |
| 2023 | enum GLOBAL { |
| 2024 | description |
| 2025 | "The value of the SID is globally significant"; |
| 2026 | } |
| 2027 | } |
| 2028 | description |
| 2029 | "Specifies the scope of the SID advertisement within the Prefix SID |
| 2030 | sub-TLV. The scope of the SID is independent of whether the SID |
| 2031 | contained is an index, or an absolute value"; |
| 2032 | } |
| 2033 | |
| 2034 | leaf multi-topology-identifier { |
| 2035 | type uint8; |
| 2036 | description |
| 2037 | "The identifier for the topology to which the Prefix SID relates. The |
| 2038 | value of this leaf is a MT-ID as defined in RFC4915"; |
| 2039 | } |
| 2040 | |
| 2041 | leaf algorithm { |
| 2042 | type uint8; |
| 2043 | description |
| 2044 | "The algorithm that computes the path associated with the Prefix SID"; |
| 2045 | } |
| 2046 | |
| 2047 | leaf sid-value { |
| 2048 | type uint32; |
| 2049 | description |
| 2050 | "The value of the Prefix SID. The meaning of this value is dependent |
| 2051 | upon the type of SID, and its scope. The value contained is either a |
| 2052 | 32-bit value indicating the index of the SID, or a 24-bit label where |
| 2053 | the 20 right-most bits are used for encoding the label value"; |
| 2054 | } |
| 2055 | } |
| 2056 | |
| 2057 | grouping ospfv2-lsdb-extended-prefix-sid-label-binding-state { |
| 2058 | description |
| 2059 | "State parameters relating to the extended prefix SID SID/Label binding |
| 2060 | sub-TLV"; |
| 2061 | |
| 2062 | leaf mirroring { |
| 2063 | type boolean; |
| 2064 | default false; |
| 2065 | description |
| 2066 | "When set to true, this indicates that the SID/Label Binding sub-TLV |
| 2067 | entries contained within this TLV are indicative of a mirroring |
| 2068 | context"; |
| 2069 | } |
| 2070 | |
| 2071 | leaf multi-topology-identifier { |
| 2072 | type uint8; |
| 2073 | description |
| 2074 | "The identifier for the topology to which the SID/Label Binding |
| 2075 | sub-TLV is associated. The value of this leaf is a MT-ID as defined |
| 2076 | in RFC4915"; |
| 2077 | } |
| 2078 | |
| 2079 | leaf weight { |
| 2080 | type uint8; |
| 2081 | description |
| 2082 | "The weight of the advertised binding when used for load-balancing |
| 2083 | purposes"; |
| 2084 | } |
| 2085 | } |
| 2086 | |
| 2087 | grouping ospfv2-lsdb-extended-prefix-sid-label-binding-tlv-state { |
| 2088 | description |
| 2089 | "State parameters directly relating to the SID/Label Binding TLV"; |
| 2090 | |
| 2091 | leaf type { |
| 2092 | type identityref { |
| 2093 | base |
| 2094 | "oc-ospf-types:OSPFV2_EXTENDED_PREFIX_SID_LABEL_BINDING_SUBTLV_TYPE"; |
| 2095 | } |
| 2096 | description |
| 2097 | "The type of sub-TLV that is being contained within the SID/Label |
| 2098 | sub-TLV"; |
| 2099 | } |
| 2100 | } |
| 2101 | |
| 2102 | grouping ospfv2-lsdb-extprefix-sid-label-binding-state { |
| 2103 | description |
| 2104 | "State parameters relating to the SID/Label binding sub-TLV of the |
| 2105 | SID/Label/Binding TLV"; |
| 2106 | |
| 2107 | uses ospfv2-lsdb-common-sr-sid-spec; |
| 2108 | } |
| 2109 | |
| 2110 | grouping ospfv2-lsdb-extprefix-sid-label-ero-metric-state { |
| 2111 | description |
| 2112 | "State parameters relating to the ERO Metric Sub-TLV of the SID/Label |
| 2113 | Binding TLV"; |
| 2114 | |
| 2115 | leaf metric { |
| 2116 | type uint32; |
| 2117 | description |
| 2118 | "The metric representing the aggregate IGP or TE path cost for the |
| 2119 | binding included within the SID/Label Binding TLV"; |
| 2120 | } |
| 2121 | } |
| 2122 | |
| 2123 | grouping ospfv2-lsdb-extprefix-sid-lbl-ero-path-seg-state { |
| 2124 | description |
| 2125 | "State parameters relating to the a segment included within the |
| 2126 | ERO Path Sub-TLV of the SID/Label Binding TLV"; |
| 2127 | |
| 2128 | leaf type { |
| 2129 | type identityref { |
| 2130 | base "oc-ospf-types:OSPFV2_EXTPREFIX_BINDING_ERO_PATH_SEGMENT_TYPE"; |
| 2131 | } |
| 2132 | description |
| 2133 | "The type of the segment being specified as part of the ERO"; |
| 2134 | } |
| 2135 | |
| 2136 | leaf loose { |
| 2137 | type boolean; |
| 2138 | default false; |
| 2139 | description |
| 2140 | "If this leaf is set the segment is identifier as a loose path |
| 2141 | segment, otherwise the path strictly follows the path specified"; |
| 2142 | } |
| 2143 | } |
| 2144 | |
| 2145 | grouping ospfv2-lsdb-extprefix-sid-lbl-ero-ipv4-state { |
| 2146 | description |
| 2147 | "State parameters relating to an IPv4 address segment included within |
| 2148 | the ERO path"; |
| 2149 | |
| 2150 | leaf address { |
| 2151 | type inet:ipv4-address-no-zone; |
| 2152 | description |
| 2153 | "The IPv4 address of the hop within the ERO"; |
| 2154 | } |
| 2155 | } |
| 2156 | |
| 2157 | grouping ospfv2-lsdb-extprefix-sid-lbl-ero-unnum-state { |
| 2158 | description |
| 2159 | "State parameters relating to an unnumbered hop within the ERO path"; |
| 2160 | |
| 2161 | leaf router-id { |
| 2162 | type inet:ipv4-address-no-zone; |
| 2163 | description |
| 2164 | "The IPv4 router identtifier of the remote system"; |
| 2165 | } |
| 2166 | |
| 2167 | leaf interface-id { |
| 2168 | type uint32; |
| 2169 | description |
| 2170 | "The identifier assigned to the link by the remote system"; |
| 2171 | } |
| 2172 | } |
| 2173 | |
| 2174 | grouping ospfv2-lsdb-extended-link-adj-sid-state { |
| 2175 | description |
| 2176 | "State parameters relating to the Adjacency SID sub-TLV of the |
| 2177 | Extended Link LSA"; |
| 2178 | |
| 2179 | leaf backup { |
| 2180 | type boolean; |
| 2181 | default false; |
| 2182 | description |
| 2183 | "When this flag is set, it indicates that the adjacency SID refers to |
| 2184 | an adjacency which is eligible for protection"; |
| 2185 | } |
| 2186 | |
| 2187 | leaf group { |
| 2188 | type boolean; |
| 2189 | default false; |
| 2190 | description |
| 2191 | "When this flag is set it indicates that the adjacency SID refers to |
| 2192 | a group of adjacencies that have a common value"; |
| 2193 | } |
| 2194 | |
| 2195 | uses ospfv2-lsdb-common-sr-sid-spec; |
| 2196 | |
| 2197 | leaf weight { |
| 2198 | type uint8; |
| 2199 | description |
| 2200 | "The weight of the Adjacency SID when used for load-balancing"; |
| 2201 | } |
| 2202 | |
| 2203 | leaf multi-topology-identifier { |
| 2204 | type uint8; |
| 2205 | description |
| 2206 | "The multi-topology identifier with which the adjacency SID is |
| 2207 | associated"; |
| 2208 | } |
| 2209 | } |
| 2210 | |
| 2211 | grouping ospfv2-lsdb-structure { |
| 2212 | description |
| 2213 | "Structural grouping for per-area LSDB contents"; |
| 2214 | |
| 2215 | container lsdb { |
| 2216 | // Top-level RO, if this were ever to become writeable then |
| 2217 | // the state containers lower down need config false added |
| 2218 | config false; |
| 2219 | description |
| 2220 | "The link-state database for the OSPFv2 area"; |
| 2221 | |
| 2222 | container state { |
| 2223 | description |
| 2224 | "Operational state parameters relating to the OSPFv2 |
| 2225 | area"; |
| 2226 | |
| 2227 | uses ospfv2-lsdb-area-state; |
| 2228 | } |
| 2229 | |
| 2230 | container lsa-types { |
| 2231 | description |
| 2232 | "Enclosing container for a list of LSA types that are |
| 2233 | in the LSDB for the specified area"; |
| 2234 | |
| 2235 | list lsa-type { |
| 2236 | key "type"; |
| 2237 | |
| 2238 | description |
| 2239 | "List of LSA types in the LSDB for the specified |
| 2240 | area"; |
| 2241 | |
| 2242 | leaf type { |
| 2243 | type leafref { |
| 2244 | path "../state/type"; |
| 2245 | } |
| 2246 | description |
| 2247 | "A reference for the LSA type being described within |
| 2248 | the LSDB"; |
| 2249 | } |
| 2250 | |
| 2251 | container state { |
| 2252 | description |
| 2253 | "Top-level operational state parameters relating to |
| 2254 | an LSA within the area"; |
| 2255 | uses ospfv2-lsdb-area-lsa-type-state; |
| 2256 | } |
| 2257 | |
| 2258 | container lsas { |
| 2259 | description |
| 2260 | "Enclosing container for a list of the LSAs of |
| 2261 | the specified type received by the system"; |
| 2262 | |
| 2263 | list lsa { |
| 2264 | key "link-state-id"; |
| 2265 | |
| 2266 | description |
| 2267 | "List of the LSAs of a specified type in the |
| 2268 | LSDB for the specified area"; |
| 2269 | |
| 2270 | leaf link-state-id { |
| 2271 | type leafref { |
| 2272 | path "../state/link-state-id"; |
| 2273 | } |
| 2274 | description |
| 2275 | "Reference to the Link State ID of the LSA"; |
| 2276 | } |
| 2277 | |
| 2278 | container state { |
| 2279 | description |
| 2280 | "Operational state parameters relating to all |
| 2281 | LSA types"; |
| 2282 | uses ospfv2-lsdb-area-lsa-state; |
| 2283 | } |
| 2284 | |
| 2285 | uses ospfv2-lsdb-router-lsa-structure { |
| 2286 | when "../../../state/type = 'ROUTER_LSA'" { |
| 2287 | description |
| 2288 | "Include the router LSA hierarchy solely when |
| 2289 | that LSA type is being described"; |
| 2290 | } |
| 2291 | } |
| 2292 | |
| 2293 | uses ospfv2-lsdb-network-lsa-structure { |
| 2294 | when "../../../state/type = 'NETWORK_LSA'" { |
| 2295 | description |
| 2296 | "Include the network LSA hierarchy solely when |
| 2297 | that LSA type is being described"; |
| 2298 | } |
| 2299 | } |
| 2300 | |
| 2301 | uses ospfv2-lsdb-summary-lsa-structure { |
| 2302 | // rjs TODO: check this syntax |
| 2303 | when "../../../state/type = " + |
| 2304 | "'SUMMARY_IP_NETWORK_LSA' or " + |
| 2305 | "../../../state/type = 'SUMMARY_ASBR_LSA'" { |
| 2306 | description |
| 2307 | "Include the summary LSA hierarchy solely when |
| 2308 | that LSA type is being described"; |
| 2309 | } |
| 2310 | } |
| 2311 | |
| 2312 | uses ospfv2-lsdb-asexternal-lsa-structure { |
| 2313 | when "../../../state/type = 'AS_EXTERNAL_LSA'" { |
| 2314 | description |
| 2315 | "Include the AS external LSA hierarchy solely when |
| 2316 | that LSA type is being described"; |
| 2317 | } |
| 2318 | } |
| 2319 | |
| 2320 | uses ospfv2-lsdb-nssa-external-lsa-structure { |
| 2321 | when "../../../state/type = 'NSSA_AS_EXTERNAL_LSA'" { |
| 2322 | description |
| 2323 | "Include the NSSA External LSA hierarchy solely |
| 2324 | when that LSA type is being described"; |
| 2325 | } |
| 2326 | } |
| 2327 | |
| 2328 | uses ospfv2-lsdb-opaque-lsa-structure { |
| 2329 | when "../../../state/type = 'OSPFV2_LINK_SCOPE_OPAQUE_LSA' |
| 2330 | or ../../../state/type = 'OSPFV2_AREA_SCOPE_OPAQUE_LSA' |
| 2331 | or ../../../state/type = 'OSPFV2_AS_SCOPE_OPAQUE_LSA'" { |
| 2332 | description |
| 2333 | "Include the Opaque LSA structure when type of entry |
| 2334 | being described in an opaque LSA"; |
| 2335 | } |
| 2336 | } |
| 2337 | } |
| 2338 | } |
| 2339 | } |
| 2340 | } |
| 2341 | } |
| 2342 | } |
| 2343 | } |