Thomas Vachuska | 8ca75a2 | 2017-08-24 16:12:59 -0700 | [diff] [blame] | 1 | module openconfig-segment-routing { |
| 2 | |
| 3 | yang-version "1"; |
| 4 | |
| 5 | // namespace |
| 6 | namespace "http://openconfig.net/yang/sr"; |
| 7 | prefix "oc-sr"; |
| 8 | |
| 9 | // import some basic types |
| 10 | import openconfig-extensions { prefix "oc-ext"; } |
| 11 | import openconfig-mpls-types { prefix "oc-mpls-t"; } |
| 12 | import openconfig-interfaces { prefix "oc-if"; } |
| 13 | import ietf-inet-types { prefix "inet"; } |
| 14 | import ietf-yang-types { prefix "yang"; } |
| 15 | |
| 16 | // meta |
| 17 | organization "OpenConfig working group"; |
| 18 | |
| 19 | contact |
| 20 | "OpenConfig working group |
| 21 | netopenconfig@googlegroups.com"; |
| 22 | |
| 23 | description |
| 24 | "Configuration and operational state parameters relating to the |
| 25 | segment routing. This module defines a number of elements which are |
| 26 | instantiated in multiple places throughout the OpenConfig collection |
| 27 | of models. |
| 28 | |
| 29 | Particularly: |
| 30 | - SRGB+LB dataplane instances - directly instantied by SR. |
| 31 | - SRGB+LB dataplane reservations - instantiated within MPLS and future SR |
| 32 | dataplanes. |
| 33 | - SR SID advertisements - instantiated within the relevant IGP. |
| 34 | - SR-specific counters - instantied within the relevant dataplane."; |
| 35 | |
| 36 | oc-ext:openconfig-version "0.0.3"; |
| 37 | |
| 38 | revision "2017-01-12" { |
| 39 | description |
| 40 | "Minor compliance fixes."; |
| 41 | reference "0.0.3"; |
| 42 | } |
| 43 | |
| 44 | revision "2016-12-15" { |
| 45 | description |
| 46 | "Updated revision of SR module."; |
| 47 | reference "0.0.2"; |
| 48 | } |
| 49 | |
| 50 | revision "2016-07-28" { |
| 51 | description |
| 52 | "Initial revision of SR module."; |
| 53 | reference "0.0.1"; |
| 54 | } |
| 55 | |
| 56 | typedef sr-dataplane-type { |
| 57 | type enumeration { |
| 58 | enum MPLS { |
| 59 | description |
| 60 | "The entity uses MPLS labels as Segment Identifiers."; |
| 61 | } |
| 62 | enum IPV6 { |
| 63 | description |
| 64 | "The entity uses IPv6 prefixes as Segment Identifiers."; |
| 65 | } |
| 66 | } |
| 67 | description |
| 68 | "Types of data plane that can be used to instantiate a Segment |
| 69 | Routing block of SIDs."; |
| 70 | } |
| 71 | |
| 72 | typedef sr-sid-type { |
| 73 | type union { |
| 74 | type oc-mpls-t:mpls-label; |
| 75 | type inet:ipv6-address-no-zone; |
| 76 | } |
| 77 | description |
| 78 | "The defined value of a segment identifier."; |
| 79 | } |
| 80 | |
| 81 | grouping srgb-config { |
| 82 | description |
| 83 | "Configuration parameters relating to the SRGB."; |
| 84 | |
| 85 | leaf local-id { |
| 86 | type string; |
| 87 | description |
| 88 | "Unique identifier for the segment routing global block on |
| 89 | the local system."; |
| 90 | } |
| 91 | |
| 92 | leaf dataplane-type { |
| 93 | type sr-dataplane-type; |
| 94 | description |
| 95 | "The dataplane being used to instantiate the SRGB. When MPLS is specified |
| 96 | the set of MPLS label blocks that are defined in the mpls-label-blocks |
| 97 | list are used to make up the SRGB. When IPv6 is specified, the set of IPv6 |
| 98 | prefixes specified in the ipv6-prefixes list are used."; |
| 99 | } |
| 100 | |
| 101 | leaf-list mpls-label-blocks { |
| 102 | when "../dataplane-type = 'MPLS'" { |
| 103 | description |
| 104 | "Allow the MPLS label block to be specified only for SRGBs that are |
| 105 | using the MPLS dataplane."; |
| 106 | } |
| 107 | type leafref { |
| 108 | // We are at /network-instances/network-instance/segment-routing/ |
| 109 | // srgbs/srgb/config/mpls-label-blocks |
| 110 | path "../../../../../mpls/global/reserved-label-blocks/" + |
| 111 | "reserved-label-block/config/local-id"; |
| 112 | } |
| 113 | description |
| 114 | "A list of refences to the label blocks that are used to make |
| 115 | up the SRGB."; |
| 116 | } |
| 117 | |
| 118 | leaf-list ipv6-prefixes { |
| 119 | when "../dataplane-type = 'IPV6'" { |
| 120 | description |
| 121 | "Allow IPv6 prefixes to be specified only when the dataplane |
| 122 | realisation of the SRGB is IPv6."; |
| 123 | } |
| 124 | type inet:ipv6-prefix; |
| 125 | description |
| 126 | "A list of IPv6 prefixes which are to be used for segment routing using |
| 127 | the IPv6 dataplane."; |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | grouping srgb-state { |
| 132 | description |
| 133 | "Operational state parameters relating to the SRGB."; |
| 134 | |
| 135 | leaf size { |
| 136 | type uint32; |
| 137 | description |
| 138 | "The total number of SRGB entries that are available within the SRGB."; |
| 139 | } |
| 140 | |
| 141 | leaf used { |
| 142 | type uint32; |
| 143 | description |
| 144 | "The total number of SRGB entries that have already been alocated by |
| 145 | protocols referencing the SRGB."; |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | grouping srlb-config { |
| 150 | description |
| 151 | "Configuration parameters relating to an SRLB."; |
| 152 | |
| 153 | leaf local-id { |
| 154 | type string; |
| 155 | description |
| 156 | "A unique local identifier used for the Segment Routing Local Block. |
| 157 | The identifier is used when referencing the SRLB within other |
| 158 | contexts."; |
| 159 | } |
| 160 | |
| 161 | leaf dataplane-type { |
| 162 | type sr-dataplane-type; |
| 163 | description |
| 164 | "The dataplane that is to be used for the Segment Routing Local Block. |
| 165 | When MPLS is specified, the local block corresponds to a block of MPLS |
| 166 | labels; when IPv6 is specified it corresponds to an IPv6 prefix."; |
| 167 | } |
| 168 | |
| 169 | leaf mpls-label-block { |
| 170 | when "../dataplane-type = 'MPLS'" { |
| 171 | description |
| 172 | "Allow the MPLS label block to be specified only for SRLBs that are |
| 173 | using the MPLS dataplane."; |
| 174 | } |
| 175 | type leafref { |
| 176 | path "../../../../../mpls/global/reserved-label-blocks/" + |
| 177 | "reserved-label-block/config/local-id"; |
| 178 | } |
| 179 | description |
| 180 | "A reference to the MPLS label block that is used to contain the |
| 181 | SIDs of the SRLB."; |
| 182 | } |
| 183 | |
| 184 | leaf ipv6-prefix { |
| 185 | when "../dataplane-type = 'IPV6'" { |
| 186 | description |
| 187 | "Allow IPv6 prefixes to be specified only when the dataplane |
| 188 | realisation of the SRGB is IPv6."; |
| 189 | } |
| 190 | type inet:ipv6-prefix; |
| 191 | description |
| 192 | "The IPv6 prefix that is used for the SRLB."; |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | grouping sr-structural { |
| 197 | description |
| 198 | "Top-level structural grouping defining Segment Routing Global Blocks."; |
| 199 | |
| 200 | container srgbs { |
| 201 | description |
| 202 | "Configuration and operational state parameters relating to the |
| 203 | SRGBs defined for the system."; |
| 204 | |
| 205 | list srgb { |
| 206 | key "local-id"; |
| 207 | |
| 208 | description |
| 209 | "A single definition of an SRGB which may comprise of multiple |
| 210 | sets of dataplane addresses (IPv6 addresses, or MPLS labels)."; |
| 211 | |
| 212 | leaf local-id { |
| 213 | type leafref { |
| 214 | path "../config/local-id"; |
| 215 | } |
| 216 | description |
| 217 | "A reference to the identifier for the SRGB."; |
| 218 | } |
| 219 | |
| 220 | container config { |
| 221 | description |
| 222 | "Configuration parameters relating to the SRGB."; |
| 223 | uses srgb-config; |
| 224 | } |
| 225 | |
| 226 | container state { |
| 227 | config false; |
| 228 | description |
| 229 | "State parameters relating to the SRGB."; |
| 230 | uses srgb-config; |
| 231 | uses srgb-state; |
| 232 | } |
| 233 | } |
| 234 | } |
| 235 | |
| 236 | container srlbs { |
| 237 | description |
| 238 | "Configuration and operational state parameters relating to the |
| 239 | Segment Routing Local Blocks (SRLBs) defined for the system."; |
| 240 | |
| 241 | list srlb { |
| 242 | key "local-id"; |
| 243 | |
| 244 | description |
| 245 | "A definition of a Segment Routing Local Block, defined to be |
| 246 | a set of Segment Identifiers (specified as MPLS labels or |
| 247 | IPv6 addreses) that are defined for local allocation by the |
| 248 | system. A block may optionally be advertised into an IGP."; |
| 249 | |
| 250 | leaf local-id { |
| 251 | type leafref { |
| 252 | path "../config/local-id"; |
| 253 | } |
| 254 | description |
| 255 | "Reference to the local identifier used for the SRLB."; |
| 256 | } |
| 257 | |
| 258 | container config { |
| 259 | description |
| 260 | "Configuration parameters relating to the SRLB."; |
| 261 | uses srlb-config; |
| 262 | } |
| 263 | |
| 264 | container state { |
| 265 | config false; |
| 266 | description |
| 267 | "Operational state parmeters relating to the SRLB."; |
| 268 | uses srlb-config; |
| 269 | } |
| 270 | } |
| 271 | } |
| 272 | } |
| 273 | |
| 274 | grouping sr-mpls-top { |
| 275 | description |
| 276 | "Structural grouping defining SR definition within MPLS."; |
| 277 | |
| 278 | container segment-routing { |
| 279 | description |
| 280 | "MPLS-specific Segment Routing configuration and operational state |
| 281 | parameters"; |
| 282 | |
| 283 | container aggregate-sid-counters { |
| 284 | description |
| 285 | "Per-SID counters aggregated across all interfaces on the local system"; |
| 286 | |
| 287 | list aggregate-sid-counter { |
| 288 | key "mpls-label"; |
| 289 | config false; |
| 290 | |
| 291 | description |
| 292 | "Counters aggregated across all of the interfaces of the local |
| 293 | system corresponding to traffic received or forwarded with a |
| 294 | particular SID"; |
| 295 | |
| 296 | leaf mpls-label { |
| 297 | type leafref { |
| 298 | path "../state/mpls-label"; |
| 299 | } |
| 300 | description |
| 301 | "The MPLS label representing the segment identifier"; |
| 302 | } |
| 303 | |
| 304 | container state { |
| 305 | config false; |
| 306 | description |
| 307 | "State parameters for per-SID statistics"; |
| 308 | uses sr-mpls-sid-counters-state; |
| 309 | uses sr-mpls-common-counters; |
| 310 | } |
| 311 | } |
| 312 | } |
| 313 | |
| 314 | container interfaces { |
| 315 | description |
| 316 | "Interface related Segment Routing parameters."; |
| 317 | |
| 318 | list interface { |
| 319 | key "interface-id"; |
| 320 | |
| 321 | description |
| 322 | "Parameters and MPLS-specific configuration relating to Segment |
| 323 | Routing on an interface."; |
| 324 | |
| 325 | leaf interface-id { |
| 326 | type leafref { |
| 327 | path "../config/interface-id"; |
| 328 | } |
| 329 | description |
| 330 | "A reference to the ID for the interface for which SR is |
| 331 | configured"; |
| 332 | } |
| 333 | |
| 334 | container config { |
| 335 | description |
| 336 | "MPLS-specific Segment Routing configuration parameters |
| 337 | related to an interface."; |
| 338 | uses sr-mpls-interface-config; |
| 339 | } |
| 340 | |
| 341 | container state { |
| 342 | config false; |
| 343 | description |
| 344 | "MPLS-specific Segment Routing operational state parameters |
| 345 | related to an interface."; |
| 346 | uses sr-mpls-interface-config; |
| 347 | uses sr-mpls-interface-state; |
| 348 | } |
| 349 | |
| 350 | container sid-counters { |
| 351 | description |
| 352 | "Per-SID statistics for MPLS"; |
| 353 | |
| 354 | list sid-counter { |
| 355 | key "mpls-label"; |
| 356 | config false; |
| 357 | |
| 358 | description |
| 359 | "Per segment identifier counters for the MPLS dataplane."; |
| 360 | |
| 361 | leaf mpls-label { |
| 362 | type leafref { |
| 363 | path "../state/mpls-label"; |
| 364 | } |
| 365 | description |
| 366 | "The MPLS label representing the segment identifier"; |
| 367 | } |
| 368 | |
| 369 | container state { |
| 370 | config false; |
| 371 | description |
| 372 | "State parameters for per-SID statistics"; |
| 373 | uses sr-mpls-sid-counters-state; |
| 374 | uses sr-mpls-common-counters; |
| 375 | } |
| 376 | |
| 377 | container forwarding-classes { |
| 378 | description |
| 379 | "Per-SID per-forwarding class counters for Segment Routing."; |
| 380 | |
| 381 | list forwarding-class { |
| 382 | key "exp"; |
| 383 | config false; |
| 384 | |
| 385 | description |
| 386 | "SID entries for the forwarding class associated with the |
| 387 | referenced MPLS EXP."; |
| 388 | |
| 389 | leaf exp { |
| 390 | type leafref { |
| 391 | path "../state/exp"; |
| 392 | } |
| 393 | description |
| 394 | "Reference to the value of the EXP bits of the segment |
| 395 | identifier."; |
| 396 | } |
| 397 | |
| 398 | container state { |
| 399 | config false; |
| 400 | description |
| 401 | "Per-SID, per forwarding class counters for Segment Routing |
| 402 | with the MPLS dataplane"; |
| 403 | |
| 404 | uses sr-mpls-interface-sid-fc-state; |
| 405 | uses sr-mpls-common-counters; |
| 406 | } |
| 407 | } |
| 408 | } |
| 409 | } |
| 410 | } |
| 411 | uses oc-if:interface-ref; |
| 412 | } |
| 413 | } |
| 414 | } |
| 415 | } |
| 416 | |
| 417 | grouping sr-mpls-interface-config { |
| 418 | description |
| 419 | "MPLS-specific Segment Routing configuration for an interface"; |
| 420 | |
| 421 | leaf interface-id { |
| 422 | type string; |
| 423 | description |
| 424 | "A unique identifier for the interface."; |
| 425 | } |
| 426 | } |
| 427 | |
| 428 | grouping sr-mpls-interface-state { |
| 429 | description |
| 430 | "MPLS-specific Segment Routing operational state parameters for an |
| 431 | interface"; |
| 432 | |
| 433 | uses sr-mpls-common-counters; |
| 434 | } |
| 435 | |
| 436 | grouping sr-mpls-interface-sid-fc-state { |
| 437 | description |
| 438 | "Per-SID per forwarding class statistics for SR with the MPLS dataplane"; |
| 439 | |
| 440 | leaf exp { |
| 441 | type uint8 { |
| 442 | range "0..7"; |
| 443 | } |
| 444 | description |
| 445 | "The value of the MPLS EXP (experimental) or Traffic Class bits that the |
| 446 | SID statistics relate to. Packets received with a MPLS label value |
| 447 | equal to the SID's MPLS label and EXP bits equal to the this value |
| 448 | should be counted towards the associated ingress statistics. Packets |
| 449 | that are forwarded to the destination MPLS label corresponding to the |
| 450 | SID should be counted towards this value. In the egress direction, where |
| 451 | forwarding follows a SID value that requires PHP at the local node, |
| 452 | packets should still be counted towards the egress counters."; |
| 453 | } |
| 454 | } |
| 455 | |
| 456 | grouping sr-mpls-sid-counters-state { |
| 457 | description |
| 458 | "Per-SID statistics leaves"; |
| 459 | |
| 460 | leaf mpls-label { |
| 461 | type oc-mpls-t:mpls-label; |
| 462 | description |
| 463 | "The MPLS label used for the segment identifier"; |
| 464 | } |
| 465 | } |
| 466 | |
| 467 | grouping sr-mpls-common-counters { |
| 468 | description |
| 469 | "Per segment identifier counters used in the model"; |
| 470 | |
| 471 | leaf in-pkts { |
| 472 | type yang:counter64; |
| 473 | description |
| 474 | "A cumulative counter of the packets received within the context |
| 475 | which have matched a label corresponding to an SR Segment Identifier."; |
| 476 | } |
| 477 | |
| 478 | leaf in-octets { |
| 479 | type yang:counter64; |
| 480 | description |
| 481 | "The cumulative counter of the total bytes received within the context |
| 482 | which have matched a label corresponding to an SR Segment Identifier"; |
| 483 | } |
| 484 | |
| 485 | leaf out-pkts { |
| 486 | type yang:counter64; |
| 487 | description |
| 488 | "A cumulative counter of the total number of packets transmitted by |
| 489 | the local system within the context which have a label imposed that |
| 490 | corresponds to an Segment Identifier."; |
| 491 | } |
| 492 | |
| 493 | leaf out-octets { |
| 494 | type yang:counter64; |
| 495 | description |
| 496 | "A cumulative counter of the total bytes transmitted by the local |
| 497 | system within the context which have a label imported that |
| 498 | corresponds to an SR Segment Identifier."; |
| 499 | } |
| 500 | } |
| 501 | |
| 502 | grouping sr-igp-config { |
| 503 | description |
| 504 | "Configuration parameters relating to segment routing within an |
| 505 | IGP."; |
| 506 | |
| 507 | leaf enabled { |
| 508 | type boolean; |
| 509 | description |
| 510 | "When this leaf is set to true, the segment routing extensions are |
| 511 | utilised within the IGP."; |
| 512 | } |
| 513 | |
| 514 | leaf srgb { |
| 515 | type leafref { |
| 516 | path "../../../../../../../segment-routing/srgbs/srgb/config/local-id"; |
| 517 | } |
| 518 | description |
| 519 | "A reference to the Segment Routing Global Block (SRGB) that is |
| 520 | to be used by this IGP instance."; |
| 521 | } |
| 522 | |
| 523 | leaf srlb { |
| 524 | // Leaf is defined at |
| 525 | // /network-instances/network-instance/protocols/protocol/<igp>/global/ |
| 526 | // segment-routing/config |
| 527 | type leafref { |
| 528 | path "../../../../../../../segment-routing/srlbs/srlb/config/local-id"; |
| 529 | } |
| 530 | description |
| 531 | "A reference to the Segment Routing Local Block (SRLB) that is to |
| 532 | be advertised by the IGP instance."; |
| 533 | } |
| 534 | } |
| 535 | |
| 536 | grouping sr-igp-top { |
| 537 | description |
| 538 | "Per-instance configuration and state parameters for Segment Routing |
| 539 | in an IGP."; |
| 540 | |
| 541 | container segment-routing { |
| 542 | description |
| 543 | "Configuration and operational state relating to segment routing."; |
| 544 | |
| 545 | container config { |
| 546 | description |
| 547 | "Configuration parameters relating to the configuration of segment |
| 548 | routing for the IGP instance."; |
| 549 | uses sr-igp-config; |
| 550 | } |
| 551 | |
| 552 | container state { |
| 553 | config false; |
| 554 | description |
| 555 | "Operational state parameters relating to segment routing for the |
| 556 | IGP instance."; |
| 557 | uses sr-igp-config; |
| 558 | } |
| 559 | } |
| 560 | } |
| 561 | |
| 562 | grouping sr-igp-interface-prefix-sid-config { |
| 563 | description |
| 564 | "Configuration parameters relating to an IGP prefix SID advertisement"; |
| 565 | |
| 566 | leaf prefix { |
| 567 | type inet:ip-prefix; |
| 568 | description |
| 569 | "The IP prefix for which the IGP prefix SID should be advertised. The |
| 570 | value specified is a local prefix on the interface which is advertised |
| 571 | into the IGP."; |
| 572 | } |
| 573 | |
| 574 | leaf sid-id { |
| 575 | type sr-sid-type; |
| 576 | description |
| 577 | "The Segment Identifier to be used when advertising the IGP Prefix SID."; |
| 578 | } |
| 579 | |
| 580 | leaf label-options { |
| 581 | type enumeration { |
| 582 | enum NO_PHP { |
| 583 | description |
| 584 | "When this value is specified, the penultimate hop must not pop |
| 585 | the Prefix-SID label before forwarding it to the local system."; |
| 586 | } |
| 587 | enum EXPLICIT_NULL { |
| 588 | description |
| 589 | "When set, the penultimate hop must swap the prefix SID for the |
| 590 | relevant explicit null label before forwarding the packet."; |
| 591 | } |
| 592 | } |
| 593 | description |
| 594 | "The options associated with the IGP prefix SID for MPLS. The value |
| 595 | of this leaf specifies the option that the SID should be advertised |
| 596 | into the IGP with."; |
| 597 | } |
| 598 | } |
| 599 | |
| 600 | grouping sr-igp-interface-adjsid-config { |
| 601 | description |
| 602 | "Configuration parameters relating to an Adj-SID on an interface"; |
| 603 | |
| 604 | leaf sid-id { |
| 605 | type union { |
| 606 | type sr-sid-type; |
| 607 | type enumeration { |
| 608 | enum DYNAMIC { |
| 609 | description |
| 610 | "The SID chosen for the Adjacency SID should be dynamically |
| 611 | allocated from the system's dynamic range of Segment |
| 612 | Identifiers. For MPLS, this range should be considered to be |
| 613 | those labels that do not fall within a reserved label block."; |
| 614 | } |
| 615 | } |
| 616 | } |
| 617 | description |
| 618 | "The value of the Adj-SID to be advertised. Where a static SID |
| 619 | identifier is specified, this should be advertised directly by the |
| 620 | system. Where the DYNAMIC value is specified, this should be treated |
| 621 | as a dynamically allocated value. When the MPLS data plane is in use |
| 622 | the dynamic value should not fall within a reserved-label-block."; |
| 623 | } |
| 624 | |
| 625 | leaf protection-eligible { |
| 626 | type boolean; |
| 627 | default true; |
| 628 | description |
| 629 | "Whether the Adj-SID should be considered to be eligible for protection |
| 630 | using IP or MPLS FRR during a network failure. When this value is set to |
| 631 | true, the B-flag of the Adj-SID is set to 1, and the local system should |
| 632 | provide FRR paths for the associated label forwarding entry. When it is |
| 633 | set to false, the local system must not provide FRR for the specified |
| 634 | LFIB entry."; |
| 635 | } |
| 636 | |
| 637 | leaf group { |
| 638 | type boolean; |
| 639 | default false; |
| 640 | description |
| 641 | "When set to true, the Adj-SID is indicated to be part of a group, and |
| 642 | the G flag is set to 1 in the corresponding advertisement in the IGP."; |
| 643 | } |
| 644 | |
| 645 | leaf neighbor { |
| 646 | type inet:ip-address; |
| 647 | description |
| 648 | "The remote system on the interface with which the Adj-SID is |
| 649 | associated."; |
| 650 | } |
| 651 | } |
| 652 | |
| 653 | grouping sr-igp-interface-adjsid-state { |
| 654 | description |
| 655 | "Operational state parameters relating to the adjacency SID for an |
| 656 | interface"; |
| 657 | |
| 658 | leaf allocated-dynamic-local { |
| 659 | type sr-sid-type; |
| 660 | description |
| 661 | "Where an Adjacency SID with a dynamic value is to be allocated by |
| 662 | the system, this leaf reports to the value of the Adj-SID allocated |
| 663 | to this interface."; |
| 664 | } |
| 665 | } |
| 666 | |
| 667 | grouping sr-igp-interface-top { |
| 668 | description |
| 669 | "Per-interface configuration and operational state relating to an |
| 670 | interface within the IGP."; |
| 671 | |
| 672 | container segment-routing { |
| 673 | description |
| 674 | "Configuration and operatioanl state parameters relating to segment |
| 675 | routing for an interface within the IGP."; |
| 676 | |
| 677 | container prefix-sids { |
| 678 | description |
| 679 | "Configuration and operational state parameters relating to |
| 680 | the advertisement of a segment routing IGP-Prefix SID for this |
| 681 | interface."; |
| 682 | |
| 683 | list prefix-sid { |
| 684 | key "prefix"; |
| 685 | |
| 686 | description |
| 687 | "An IGP prefix that should have a segment routing IGP-Prefix SID |
| 688 | allocated to it. The value of the SID is specified by the SID ID, |
| 689 | as an absolute value. If the absolute value falls within the SRGB, |
| 690 | the Global flag should be advertised by the system."; |
| 691 | |
| 692 | leaf prefix { |
| 693 | type leafref { |
| 694 | path "../config/prefix"; |
| 695 | } |
| 696 | description |
| 697 | "Reference to the prefix for which the IGP-Prefix SID is to be |
| 698 | advertised"; |
| 699 | } |
| 700 | |
| 701 | container config { |
| 702 | description |
| 703 | "Configuration parameters for the IGP Prefix SID."; |
| 704 | uses sr-igp-interface-prefix-sid-config; |
| 705 | } |
| 706 | |
| 707 | container state { |
| 708 | config false; |
| 709 | description |
| 710 | "Operational state parameters for the IGP-Prefix SID."; |
| 711 | uses sr-igp-interface-prefix-sid-config; |
| 712 | } |
| 713 | } |
| 714 | } |
| 715 | |
| 716 | container adjacency-sids { |
| 717 | description |
| 718 | "Configuration and operational state parameters relating to |
| 719 | the advertisement of a segment routing adjacency SID for this |
| 720 | interface."; |
| 721 | |
| 722 | list adjacency-sid { |
| 723 | key "neighbor sid-id"; |
| 724 | |
| 725 | description |
| 726 | "An Adjacency SID to be advertised for the specified interface. |
| 727 | The Adj-SID's identifier (the SID ID) must be unique, with flags |
| 728 | specified indicating the parameters that should be set for the SID. |
| 729 | Where a SID value is specified that is allocated from the SRGB, the |
| 730 | global flag must be set by the system."; |
| 731 | |
| 732 | leaf sid-id { |
| 733 | type leafref { |
| 734 | path "../config/sid-id"; |
| 735 | } |
| 736 | description |
| 737 | "Reference to the segment identifier to be used by the local |
| 738 | system."; |
| 739 | } |
| 740 | |
| 741 | leaf neighbor { |
| 742 | type leafref { |
| 743 | path "../config/neighbor"; |
| 744 | } |
| 745 | description |
| 746 | "Reference to the neighbor with which the Adjacency SID is |
| 747 | associated."; |
| 748 | } |
| 749 | |
| 750 | container config { |
| 751 | description |
| 752 | "Configuraton parameters relating to the AdjSID."; |
| 753 | uses sr-igp-interface-adjsid-config; |
| 754 | } |
| 755 | |
| 756 | container state { |
| 757 | config false; |
| 758 | description |
| 759 | "Operational state parameters relating to the AdjSID."; |
| 760 | uses sr-igp-interface-adjsid-config; |
| 761 | uses sr-igp-interface-adjsid-state; |
| 762 | } |
| 763 | } |
| 764 | } |
| 765 | } |
| 766 | } |
| 767 | |
| 768 | grouping sr-top { |
| 769 | description |
| 770 | "Top level grouping for Segment Routing"; |
| 771 | |
| 772 | container segment-routing { |
| 773 | description |
| 774 | "Configuration and operational state parameters relating to |
| 775 | segment routing."; |
| 776 | |
| 777 | uses sr-structural; |
| 778 | } |
| 779 | } |
| 780 | } |