Yixiao Chen | 39828a6 | 2016-09-14 14:37:06 -0400 | [diff] [blame] | 1 | module ietf-te-types { |
| 2 | |
| 3 | namespace "urn:ietf:params:xml:ns:yang:ietf-te-types"; |
| 4 | |
| 5 | /* Replace with IANA when assigned */ |
| 6 | prefix "te-types"; |
| 7 | |
| 8 | import ietf-inet-types { |
| 9 | prefix inet; |
| 10 | } |
| 11 | |
| 12 | import ietf-yang-types { |
| 13 | prefix "yang"; |
| 14 | } |
| 15 | |
| 16 | organization |
| 17 | "IETF Traffic Engineering Architecture and Signaling (TEAS) |
| 18 | Working Group"; |
| 19 | |
| 20 | contact |
| 21 | "WG Web: <http://tools.ietf.org/wg/teas/> |
| 22 | WG List: <mailto:teas@ietf.org> |
| 23 | |
| 24 | WG Chair: Lou Berger |
| 25 | <mailto:lberger@labn.net> |
| 26 | |
| 27 | WG Chair: Vishnu Pavan Beeram |
| 28 | <mailto:vbeeram@juniper.net> |
| 29 | |
| 30 | Editor: Tarek Saad |
| 31 | <mailto:tsaad@cisco.com> |
| 32 | |
| 33 | Editor: Rakesh Gandhi |
| 34 | <mailto:rgandhi@cisco.com> |
| 35 | |
| 36 | Editor: Vishnu Pavan Beeram |
| 37 | <mailto:vbeeram@juniper.net> |
| 38 | |
| 39 | Editor: Himanshu Shah |
| 40 | <mailto:hshah@ciena.com> |
| 41 | |
| 42 | Editor: Xufeng Liu |
| 43 | <mailto:xufeng.liu@ericsson.com> |
| 44 | |
| 45 | Editor: Xia Chen |
| 46 | <mailto:jescia.chenxia@huawei.com> |
| 47 | |
| 48 | Editor: Raqib Jones |
| 49 | <mailto:raqib@Brocade.com> |
| 50 | |
| 51 | Editor: Bin Wen |
| 52 | <mailto:Bin_Wen@cable.comcast.com>"; |
| 53 | |
| 54 | description |
| 55 | "This module contains a collection of generally |
| 56 | useful TE specific YANG data type defintions."; |
| 57 | |
| 58 | revision "2016-07-05" { |
| 59 | description "Latest revision of TE basic types"; |
| 60 | reference "RFC3209"; |
| 61 | } |
| 62 | |
| 63 | /* |
| 64 | * Identities |
| 65 | */ |
| 66 | identity tunnel-type { |
| 67 | description |
| 68 | "Base identity from which specific tunnel types are |
| 69 | derived."; |
| 70 | } |
| 71 | |
| 72 | identity tunnel-p2p { |
| 73 | base tunnel-type; |
| 74 | description |
| 75 | "TE point-to-point tunnel type."; |
| 76 | } |
| 77 | |
| 78 | identity tunnel-p2mp { |
| 79 | base tunnel-type; |
| 80 | description |
| 81 | "TE point-to-multipoint tunnel type."; |
| 82 | } |
| 83 | |
| 84 | identity state-type { |
| 85 | description |
| 86 | "Base identity for TE states"; |
| 87 | } |
| 88 | |
| 89 | identity state-up { |
| 90 | base state-type; |
| 91 | description |
| 92 | "State up"; |
| 93 | } |
| 94 | |
| 95 | identity state-down { |
| 96 | base state-type; |
| 97 | description |
| 98 | "State down"; |
| 99 | } |
| 100 | |
| 101 | identity path-invalidation-action-type { |
| 102 | description |
| 103 | "Base identity for TE path invalidation action types"; |
| 104 | } |
| 105 | |
| 106 | identity tunnel-invalidation-action-drop-type { |
| 107 | base path-invalidation-action-type; |
| 108 | description |
| 109 | "TE path invalidation action drop"; |
| 110 | } |
| 111 | |
| 112 | identity tunnel-invalidation-action-drop-tear { |
| 113 | base path-invalidation-action-type; |
| 114 | description |
| 115 | "TE path invalidation action tear"; |
| 116 | } |
| 117 | |
| 118 | identity lsp-prot-type { |
| 119 | description |
| 120 | "Base identity from which LSP protection types are |
| 121 | derived."; |
| 122 | } |
| 123 | |
| 124 | identity lsp-prot-unprotected { |
| 125 | base lsp-prot-type; |
| 126 | description |
| 127 | "LSP protection 'Unprotected'"; |
| 128 | reference "RFC4872"; |
| 129 | } |
| 130 | |
| 131 | identity lsp-prot-reroute-extra { |
| 132 | base lsp-prot-type; |
| 133 | description |
| 134 | "LSP protection '(Full) Rerouting'"; |
| 135 | reference "RFC4872"; |
| 136 | } |
| 137 | |
| 138 | identity lsp-prot-reroute { |
| 139 | base lsp-prot-type; |
| 140 | description |
| 141 | "LSP protection 'Rerouting without Extra-Traffic'"; |
| 142 | reference "RFC4872"; |
| 143 | } |
| 144 | |
| 145 | identity lsp-prot-1-for-n { |
| 146 | base lsp-prot-type; |
| 147 | description |
| 148 | "LSP protection '1:N Protection with Extra-Traffic'"; |
| 149 | reference "RFC4872"; |
| 150 | } |
| 151 | |
| 152 | identity lsp-prot-unidir-1-to-1 { |
| 153 | base lsp-prot-type; |
| 154 | description |
| 155 | "LSP protection '1+1 Unidirectional Protection'"; |
| 156 | reference "RFC4872"; |
| 157 | } |
| 158 | |
| 159 | identity lsp-prot-bidir-1-to-1 { |
| 160 | base lsp-prot-type; |
| 161 | description |
| 162 | "LSP protection '1+1 Bidirectional Protection'"; |
| 163 | reference "RFC4872"; |
| 164 | } |
| 165 | |
| 166 | identity switching-capabilities { |
| 167 | description |
| 168 | "Base identity for interface switching capabilities"; |
| 169 | } |
| 170 | |
| 171 | identity switching-psc1 { |
| 172 | base switching-capabilities; |
| 173 | description |
| 174 | "Packet-Switch Capable-1 (PSC-1)"; |
| 175 | } |
| 176 | |
| 177 | identity switching-evpl { |
| 178 | base switching-capabilities; |
| 179 | description |
| 180 | "Ethernet Virtual Private Line (EVPL)"; |
| 181 | } |
| 182 | |
| 183 | identity switching-l2sc { |
| 184 | base switching-capabilities; |
| 185 | description |
| 186 | "Layer-2 Switch Capable (L2SC)"; |
| 187 | } |
| 188 | |
| 189 | identity switching-tdm { |
| 190 | base switching-capabilities; |
| 191 | description |
| 192 | "Time-Division-Multiplex Capable (TDM)"; |
| 193 | } |
| 194 | |
| 195 | identity switching-otn { |
| 196 | base switching-capabilities; |
| 197 | description |
| 198 | "OTN-TDM capable"; |
| 199 | } |
| 200 | |
| 201 | identity switching-dcsc { |
| 202 | base switching-capabilities; |
| 203 | description |
| 204 | "Data Channel Switching Capable (DCSC)"; |
| 205 | } |
| 206 | |
| 207 | identity switching-lsc { |
| 208 | base switching-capabilities; |
| 209 | description |
| 210 | "Lambda-Switch Capable (LSC)"; |
| 211 | } |
| 212 | |
| 213 | identity switching-fsc { |
| 214 | base switching-capabilities; |
| 215 | description |
| 216 | "Fiber-Switch Capable (FSC)"; |
| 217 | } |
| 218 | |
| 219 | identity lsp-encoding-types { |
| 220 | description |
| 221 | "Base identity for encoding types"; |
| 222 | } |
| 223 | |
| 224 | identity lsp-encoding-packet { |
| 225 | base lsp-encoding-types; |
| 226 | description |
| 227 | "Packet LSP encoding"; |
| 228 | } |
| 229 | |
| 230 | identity lsp-encoding-ethernet { |
| 231 | base lsp-encoding-types; |
| 232 | description |
| 233 | "Ethernet LSP encoding"; |
| 234 | } |
| 235 | |
| 236 | identity lsp-encoding-pdh { |
| 237 | base lsp-encoding-types; |
| 238 | description |
| 239 | "ANSI/ETSI LSP encoding"; |
| 240 | } |
| 241 | |
| 242 | identity lsp-encoding-sdh { |
| 243 | base lsp-encoding-types; |
| 244 | description |
| 245 | "SDH ITU-T G.707 / SONET ANSI T1.105 LSP encoding"; |
| 246 | } |
| 247 | |
| 248 | identity lsp-encoding-digital-wrapper { |
| 249 | base lsp-encoding-types; |
| 250 | description |
| 251 | "Digital Wrapper LSP encoding"; |
| 252 | } |
| 253 | |
| 254 | identity lsp-encoding-lambda { |
| 255 | base lsp-encoding-types; |
| 256 | description |
| 257 | "Lambda (photonic) LSP encoding"; |
| 258 | } |
| 259 | |
| 260 | identity lsp-encoding-fiber { |
| 261 | base lsp-encoding-types; |
| 262 | description |
| 263 | "Fiber LSP encoding"; |
| 264 | } |
| 265 | |
| 266 | identity lsp-encoding-fiber-channel { |
| 267 | base lsp-encoding-types; |
| 268 | description |
| 269 | "FiberChannel LSP encoding"; |
| 270 | } |
| 271 | |
| 272 | identity lsp-encoding-oduk { |
| 273 | base lsp-encoding-types; |
| 274 | description |
| 275 | "G.709 ODUk (Digital Path)LSP encoding"; |
| 276 | } |
| 277 | |
| 278 | identity lsp-encoding-optical-channel { |
| 279 | base lsp-encoding-types; |
| 280 | description |
| 281 | "Line (e.g., 8B/10B) LSP encoding"; |
| 282 | } |
| 283 | |
| 284 | identity lsp-encoding-line { |
| 285 | base lsp-encoding-types; |
| 286 | description |
| 287 | "Line (e.g., 8B/10B) LSP encoding"; |
| 288 | } |
| 289 | |
| 290 | identity path-signaling-type { |
| 291 | description |
| 292 | "Base identity from which specific path signaling |
| 293 | types are derived."; |
| 294 | } |
| 295 | |
| 296 | identity path-signaling-rsvpte { |
| 297 | base tunnel-type; |
| 298 | description |
| 299 | "RSVP-TE path signaling type"; |
| 300 | } |
| 301 | |
| 302 | identity path-signaling-sr { |
| 303 | base tunnel-type; |
| 304 | description |
| 305 | "Segment-routing path signaling type"; |
| 306 | } |
| 307 | |
| 308 | /* TE basic features */ |
| 309 | feature p2mp-te { |
| 310 | description |
| 311 | "Indicates support for P2MP-TE"; |
| 312 | } |
| 313 | |
| 314 | feature frr-te { |
| 315 | description |
| 316 | "Indicates support for TE FastReroute (FRR)"; |
| 317 | } |
| 318 | |
| 319 | feature extended-admin-groups { |
| 320 | description |
| 321 | "Indicates support for TE link extended admin |
| 322 | groups."; |
| 323 | } |
| 324 | |
| 325 | feature named-path-affinities { |
| 326 | description |
| 327 | "Indicates support for named path affinities"; |
| 328 | } |
| 329 | |
| 330 | feature named-extended-admin-groups { |
| 331 | description |
| 332 | "Indicates support for named extended admin groups"; |
| 333 | } |
| 334 | |
| 335 | feature named-srlg-groups { |
| 336 | description |
| 337 | "Indicates support for named SRLG groups"; |
| 338 | } |
| 339 | |
| 340 | feature named-path-constraints { |
| 341 | description |
| 342 | "Indicates support for named path constraints"; |
| 343 | } |
| 344 | |
| 345 | grouping explicit-route-subobject { |
| 346 | description |
| 347 | "The explicit route subobject grouping"; |
| 348 | choice type { |
| 349 | description |
| 350 | "The explicit route subobject type"; |
| 351 | case ipv4-address { |
| 352 | description |
| 353 | "IPv4 address explicit route subobject"; |
| 354 | leaf v4-address { |
| 355 | type inet:ipv4-address; |
| 356 | description |
| 357 | "An IPv4 address. This address is |
| 358 | treated as a prefix based on the |
| 359 | prefix length value below. Bits beyond |
| 360 | the prefix are ignored on receipt and |
| 361 | SHOULD be set to zero on transmission."; |
| 362 | } |
| 363 | leaf v4-prefix-length { |
| 364 | type uint8; |
| 365 | description |
| 366 | "Length in bits of the IPv4 prefix"; |
| 367 | } |
| 368 | leaf v4-loose { |
| 369 | type boolean; |
| 370 | description |
| 371 | "Describes whether the object is loose |
| 372 | if set, or otherwise strict"; |
| 373 | } |
| 374 | } |
| 375 | case ipv6-address { |
| 376 | description |
| 377 | "IPv6 address Explicit Route Object"; |
| 378 | leaf v6-address { |
| 379 | type inet:ipv6-address; |
| 380 | description |
| 381 | "An IPv6 address. This address is |
| 382 | treated as a prefix based on the |
| 383 | prefix length value below. Bits |
| 384 | beyond the prefix are ignored on |
| 385 | receipt and SHOULD be set to zero |
| 386 | on transmission."; |
| 387 | } |
| 388 | leaf v6-prefix-length { |
| 389 | type uint8; |
| 390 | description |
| 391 | "Length in bits of the IPv4 prefix"; |
| 392 | } |
| 393 | leaf v6-loose { |
| 394 | type boolean; |
| 395 | description |
| 396 | "Describes whether the object is loose |
| 397 | if set, or otherwise strict"; |
| 398 | } |
| 399 | } |
| 400 | case as-number { |
| 401 | leaf as-number { |
| 402 | type uint16; |
| 403 | description "AS number"; |
| 404 | } |
| 405 | description |
| 406 | "Autonomous System explicit route subobject"; |
| 407 | } |
| 408 | case unnumbered-link { |
| 409 | leaf router-id { |
| 410 | type inet:ip-address; |
| 411 | description |
| 412 | "A router-id address"; |
| 413 | } |
| 414 | leaf interface-id { |
| 415 | type uint32; |
| 416 | description "The interface identifier"; |
| 417 | } |
| 418 | description |
| 419 | "Unnumbered link explicit route subobject"; |
| 420 | reference |
| 421 | "RFC3477: Signalling Unnumbered Links in |
| 422 | RSVP-TE"; |
| 423 | } |
| 424 | case label { |
| 425 | leaf value { |
| 426 | type uint32; |
| 427 | description "the label value"; |
| 428 | } |
| 429 | description |
| 430 | "The Label ERO subobject"; |
| 431 | } |
| 432 | /* AS domain sequence..? */ |
| 433 | } |
| 434 | } |
| 435 | |
| 436 | grouping record-route-subobject { |
| 437 | description |
| 438 | "The record route subobject grouping"; |
| 439 | choice type { |
| 440 | description |
| 441 | "The record route subobject type"; |
| 442 | case ipv4-address { |
| 443 | leaf v4-address { |
| 444 | type inet:ipv4-address; |
| 445 | description |
| 446 | "An IPv4 address. This address is |
| 447 | treated as a prefix based on the prefix |
| 448 | length value below. Bits beyond the |
| 449 | prefix are ignored on receipt and |
| 450 | SHOULD be set to zero on transmission."; |
| 451 | } |
| 452 | leaf v4-prefix-length { |
| 453 | type uint8; |
| 454 | description |
| 455 | "Length in bits of the IPv4 prefix"; |
| 456 | } |
| 457 | leaf v4-flags { |
| 458 | type uint8; |
| 459 | description |
| 460 | "IPv4 address sub-object flags"; |
| 461 | reference "RFC3209"; |
| 462 | } |
| 463 | } |
| 464 | case ipv6-address { |
| 465 | leaf v6-address { |
| 466 | type inet:ipv6-address; |
| 467 | description |
| 468 | "An IPv6 address. This address is |
| 469 | treated as a prefix based on the |
| 470 | prefix length value below. Bits |
| 471 | beyond the prefix are ignored on |
| 472 | receipt and SHOULD be set to zero |
| 473 | on transmission."; |
| 474 | } |
| 475 | leaf v6-prefix-length { |
| 476 | type uint8; |
| 477 | description |
| 478 | "Length in bits of the IPv4 prefix"; |
| 479 | } |
| 480 | leaf v6-flags { |
| 481 | type uint8; |
| 482 | description |
| 483 | "IPv6 address sub-object flags"; |
| 484 | reference "RFC3209"; |
| 485 | } |
| 486 | } |
| 487 | case unnumbered-link { |
| 488 | leaf router-id { |
| 489 | type inet:ip-address; |
| 490 | description |
| 491 | "A router-id address"; |
| 492 | } |
| 493 | leaf interface-id { |
| 494 | type uint32; |
| 495 | description "The interface identifier"; |
| 496 | } |
| 497 | description |
| 498 | "Unnumbered link record route subobject"; |
| 499 | reference |
| 500 | "RFC3477: Signalling Unnumbered Links in |
| 501 | RSVP-TE"; |
| 502 | } |
| 503 | case label { |
| 504 | leaf value { |
| 505 | type uint32; |
| 506 | description "the label value"; |
| 507 | } |
| 508 | leaf flags { |
| 509 | type uint8; |
| 510 | description |
| 511 | "Label sub-object flags"; |
| 512 | reference "RFC3209"; |
| 513 | } |
| 514 | description |
| 515 | "The Label ERO subobject"; |
| 516 | } |
| 517 | } |
| 518 | } |
| 519 | |
| 520 | identity route-usage-type { |
| 521 | description |
| 522 | "Base identity for route usage"; |
| 523 | } |
| 524 | |
| 525 | identity route-include-ero { |
| 526 | base route-usage-type; |
| 527 | description |
| 528 | "Include ERO from route"; |
| 529 | } |
| 530 | |
| 531 | identity route-exclude-ero { |
| 532 | base route-usage-type; |
| 533 | description |
| 534 | "Exclude ERO from route"; |
| 535 | } |
| 536 | |
| 537 | identity route-exclude-srlg { |
| 538 | base route-usage-type; |
| 539 | description |
| 540 | "Exclude SRLG from route"; |
| 541 | } |
| 542 | |
| 543 | identity path-metric-type { |
| 544 | description |
| 545 | "Base identity for path metric type"; |
| 546 | } |
| 547 | |
| 548 | identity path-metric-te { |
| 549 | base path-metric-type; |
| 550 | description |
| 551 | "TE path metric"; |
| 552 | } |
| 553 | |
| 554 | identity path-metric-igp { |
| 555 | base path-metric-type; |
| 556 | description |
| 557 | "IGP path metric"; |
| 558 | } |
| 559 | |
| 560 | identity path-tiebreaker-type { |
| 561 | description |
| 562 | "Base identity for path tie-breaker type"; |
| 563 | } |
| 564 | |
| 565 | identity path-tiebreaker-minfill { |
| 566 | base path-tiebreaker-type; |
| 567 | description |
| 568 | "Min-Fill LSP path placement"; |
| 569 | } |
| 570 | |
| 571 | identity path-tiebreaker-maxfill { |
| 572 | base path-tiebreaker-type; |
| 573 | description |
| 574 | "Max-Fill LSP path placement"; |
| 575 | } |
| 576 | |
| 577 | identity path-tiebreaker-randoom { |
| 578 | base path-tiebreaker-type; |
| 579 | description |
| 580 | "Random LSP path placement"; |
| 581 | } |
| 582 | |
| 583 | identity bidir-provisioning-mode { |
| 584 | description |
| 585 | "Base identity for bidirectional provisioning |
| 586 | mode."; |
| 587 | } |
| 588 | |
| 589 | identity bidir-provisioning-single-sided { |
| 590 | base bidir-provisioning-mode; |
| 591 | description |
| 592 | "Single-sided bidirectional provioning mode"; |
| 593 | } |
| 594 | |
| 595 | identity bidir-provisioning-double-sided { |
| 596 | base bidir-provisioning-mode; |
| 597 | description |
| 598 | "Double-sided bidirectional provioning mode"; |
| 599 | } |
| 600 | |
| 601 | identity bidir-association-type { |
| 602 | description |
| 603 | "Base identity for bidirectional association type"; |
| 604 | } |
| 605 | |
| 606 | identity bidir-assoc-corouted { |
| 607 | base bidir-association-type; |
| 608 | description |
| 609 | "Co-routed bidirectional association type"; |
| 610 | } |
| 611 | |
| 612 | identity bidir-assoc-non-corouted { |
| 613 | base bidir-association-type; |
| 614 | description |
| 615 | "Non co-routed bidirectional association type"; |
| 616 | } |
| 617 | |
| 618 | identity resource-affinities-type { |
| 619 | description |
| 620 | "Base identity for resource affinities"; |
| 621 | } |
| 622 | |
| 623 | identity resource-aff-include-all { |
| 624 | base resource-affinities-type; |
| 625 | description |
| 626 | "The set of attribute filters associated with a |
| 627 | tunnel all of which must be present for a link |
| 628 | to be acceptable"; |
| 629 | } |
| 630 | |
| 631 | identity resource-aff-include-any { |
| 632 | base resource-affinities-type; |
| 633 | description |
| 634 | "The set of attribute filters associated with a |
| 635 | tunnel any of which must be present for a link |
| 636 | to be acceptable"; |
| 637 | } |
| 638 | |
| 639 | identity resource-aff-exclude-any { |
| 640 | base resource-affinities-type; |
| 641 | description |
| 642 | "The set of attribute filters associated with a |
| 643 | tunnel any of which renders a link unacceptable"; |
| 644 | } |
| 645 | |
| 646 | identity te-optimization-criterion { |
| 647 | description |
| 648 | "Base identity for TE optimization criterion."; |
| 649 | reference |
| 650 | "RFC3272: Overview and Principles of Internet Traffic |
| 651 | Engineering."; |
| 652 | } |
| 653 | |
| 654 | identity not-optimized { |
| 655 | base te-optimization-criterion; |
| 656 | description "Optimization is not applied."; |
| 657 | } |
| 658 | |
| 659 | identity cost { |
| 660 | base te-optimization-criterion; |
| 661 | description "Optimized on cost."; |
| 662 | } |
| 663 | |
| 664 | identity delay { |
| 665 | base te-optimization-criterion; |
| 666 | description "Optimized on delay."; |
| 667 | } |
| 668 | |
| 669 | /* |
| 670 | * Typedefs |
| 671 | */ |
| 672 | typedef performance-metric-normality { |
| 673 | type enumeration { |
| 674 | enum "unknown" { |
| 675 | value 0; |
| 676 | description |
| 677 | "Unknown."; |
| 678 | } |
| 679 | enum "normal" { |
| 680 | value 1; |
| 681 | description |
| 682 | "Normal."; |
| 683 | } |
| 684 | enum "abnormal" { |
| 685 | value 2; |
| 686 | description |
| 687 | "Abnormal. The anomalous bit is set."; |
| 688 | } |
| 689 | } |
| 690 | description |
| 691 | "Indicates whether a performance metric is normal, abnormal, or |
| 692 | unknown."; |
| 693 | reference |
| 694 | "RFC7471: OSPF Traffic Engineering (TE) Metric Extensions. |
| 695 | RFC7810: IS-IS Traffic Engineering (TE) Metric Extensions. |
| 696 | RFC7823: Performance-Based Path Selection for Explicitly |
| 697 | Routed Label Switched Paths (LSPs) Using TE Metric |
| 698 | Extensions"; |
| 699 | } |
| 700 | |
| 701 | typedef te-admin-status { |
| 702 | type enumeration { |
| 703 | enum up { |
| 704 | description |
| 705 | "Enabled."; |
| 706 | } |
| 707 | enum down { |
| 708 | description |
| 709 | "Disabled."; |
| 710 | } |
| 711 | enum testing { |
| 712 | description |
| 713 | "In some test mode."; |
| 714 | } |
| 715 | enum preparing-maintenance { |
| 716 | description |
| 717 | "Resource is disabled in the control plane to prepare for |
| 718 | graceful shutdown for maintenance purposes."; |
| 719 | reference |
| 720 | "RFC5817: Graceful Shutdown in MPLS and Generalized MPLS |
| 721 | Traffic Engineering Networks"; |
| 722 | } |
| 723 | enum maintenance { |
| 724 | description |
| 725 | "Resource is disabled in the data plane for maintenance |
| 726 | purposes."; |
| 727 | } |
| 728 | } |
| 729 | description |
| 730 | "Defines a type representing the administrative status of |
| 731 | a TE resource."; |
| 732 | } |
| 733 | |
| 734 | typedef te-global-id { |
| 735 | type uint32; |
| 736 | description |
| 737 | "An identifier to uniquely identify an operator, which can be |
| 738 | either a provider or a client. |
| 739 | The definition of this type is taken from RFC6370 and RFC5003. |
| 740 | This attribute type is used solely to provide a globally |
| 741 | unique context for TE topologies."; |
| 742 | } |
| 743 | |
| 744 | typedef te-link-access-type { |
| 745 | type enumeration { |
| 746 | enum point-to-point { |
| 747 | description |
| 748 | "The link is point-to-point."; |
| 749 | } |
| 750 | enum multi-access { |
| 751 | description |
| 752 | "The link is multi-access, including broacast and NBMA."; |
| 753 | } |
| 754 | } |
| 755 | description |
| 756 | "Defines a type representing the access type of a TE link."; |
| 757 | reference |
| 758 | "RFC3630: Traffic Engineering (TE) Extensions to OSPF |
| 759 | Version 2."; |
| 760 | } |
| 761 | |
| 762 | typedef te-node-id { |
| 763 | type yang:dotted-quad; |
| 764 | description |
| 765 | "An identifier for a node in a topology. |
| 766 | The identifier is represented as 32-bit unsigned integer in |
| 767 | the dotted-quad notation. |
| 768 | This attribute is mapped to Router ID in |
| 769 | RFC3630, RFC5329, RFC5305, and RFC6119."; |
| 770 | } |
| 771 | |
| 772 | typedef te-oper-status { |
| 773 | type enumeration { |
| 774 | enum up { |
| 775 | description |
| 776 | "Operational up."; |
| 777 | } |
| 778 | enum down { |
| 779 | description |
| 780 | "Operational down."; |
| 781 | } |
| 782 | enum testing { |
| 783 | description |
| 784 | "In some test mode."; |
| 785 | } |
| 786 | enum unknown { |
| 787 | description |
| 788 | "Status cannot be determined for some reason."; |
| 789 | } |
| 790 | enum preparing-maintenance { |
| 791 | description |
| 792 | "Resource is disabled in the control plane to prepare for |
| 793 | graceful shutdown for maintenance purposes."; |
| 794 | reference |
| 795 | "RFC5817: Graceful Shutdown in MPLS and Generalized MPLS |
| 796 | Traffic Engineering Networks"; |
| 797 | } |
| 798 | enum maintenance { |
| 799 | description |
| 800 | "Resource is disabled in the data plane for maintenance |
| 801 | purposes."; |
| 802 | } |
| 803 | } |
| 804 | description |
| 805 | "Defines a type representing the operational status of |
| 806 | a TE resource."; |
| 807 | } |
| 808 | |
| 809 | typedef te-recovery-status { |
| 810 | type enumeration { |
| 811 | enum normal { |
| 812 | description |
| 813 | "Both the recovery and working spans are fully |
| 814 | allocated and active, data traffic is being |
| 815 | transported over (or selected from) the working |
| 816 | span, and no trigger events are reported."; |
| 817 | } |
| 818 | enum recovery-started { |
| 819 | description |
| 820 | "The recovery action has been started, but not completed."; |
| 821 | } |
| 822 | enum recovery-succeeded { |
| 823 | description |
| 824 | "The recovery action has succeeded. The working span has |
| 825 | reported a failure/degrade condition and the user traffic |
| 826 | is being transported (or selected) on the recovery span."; |
| 827 | } |
| 828 | enum recovery-failed { |
| 829 | description |
| 830 | "The recovery action has failed."; |
| 831 | } |
| 832 | enum reversion-started { |
| 833 | description |
| 834 | "The reversion has started."; |
| 835 | } |
| 836 | enum reversion-failed { |
| 837 | description |
| 838 | "The reversion has failed."; |
| 839 | } |
| 840 | enum recovery-unavailable { |
| 841 | description |
| 842 | "The recovery is unavailable -- either as a result of an |
| 843 | operator Lockout command or a failure condition detected |
| 844 | on the recovery span."; |
| 845 | } |
| 846 | enum recovery-admin { |
| 847 | description |
| 848 | "The operator has issued a command switching the user |
| 849 | traffic to the recovery span."; |
| 850 | } |
| 851 | enum wait-to-restore { |
| 852 | description |
| 853 | "The recovery domain is recovering from a failuer/degrade |
| 854 | condition on the working span that is being controlled by |
| 855 | the Wait-to-Restore (WTR) timer."; |
| 856 | } |
| 857 | } |
| 858 | description |
| 859 | "Defines the status of a recovery action."; |
| 860 | reference |
| 861 | "RFC4427: Recovery (Protection and Restoration) Terminology |
| 862 | for Generalized Multi-Protocol Label Switching (GMPLS). |
| 863 | RFC6378: MPLS Transport Profile (MPLS-TP) Linear Protection"; |
| 864 | } |
| 865 | |
| 866 | typedef te-template-name { |
| 867 | type string { |
| 868 | pattern '/?([a-zA-Z0-9\-_.]+)(/[a-zA-Z0-9\-_.]+)*'; |
| 869 | } |
| 870 | description |
| 871 | "A type for the name of a TE node template or TE link |
| 872 | template."; |
| 873 | } |
| 874 | |
| 875 | typedef te-topology-event-type { |
| 876 | type enumeration { |
| 877 | enum "add" { |
| 878 | value 0; |
| 879 | description |
| 880 | "A TE node or te-link has been added."; |
| 881 | } |
| 882 | enum "remove" { |
| 883 | value 1; |
| 884 | description |
| 885 | "A TE node or te-link has been removed."; |
| 886 | } |
| 887 | enum "update" { |
| 888 | value 2; |
| 889 | description |
| 890 | "A TE node or te-link has been updated."; |
| 891 | } |
| 892 | } |
| 893 | description "TE Event type for notifications"; |
| 894 | } // te-topology-event-type |
Hesam Rahimi | 01f6ae0 | 2017-02-01 13:57:00 -0500 | [diff] [blame] | 895 | |
| 896 | |
| 897 | typedef te-tunnel-event-type { |
| 898 | type enumeration { |
| 899 | enum "add" { |
| 900 | value 0; |
| 901 | description |
| 902 | "A TE tunnel has been added."; |
| 903 | } |
| 904 | enum "remove" { |
| 905 | value 1; |
| 906 | description |
| 907 | "A TE tunnel has been removed."; |
| 908 | } |
| 909 | enum "update" { |
| 910 | value 2; |
| 911 | description |
| 912 | "A TE tunnel has been updated."; |
| 913 | } |
| 914 | } |
| 915 | description "TE Event type for notifications"; |
| 916 | } // te-tunnel-event-type |
Yixiao Chen | 39828a6 | 2016-09-14 14:37:06 -0400 | [diff] [blame] | 917 | |
| 918 | typedef te-topology-id { |
| 919 | type string { |
| 920 | pattern '/?([a-zA-Z0-9\-_.]+)(/[a-zA-Z0-9\-_.]+)*'; |
| 921 | } |
| 922 | description |
| 923 | "An identifier for a topology."; |
| 924 | } |
| 925 | |
| 926 | typedef te-tp-id { |
| 927 | type union { |
| 928 | type uint32; // Unnumbered |
| 929 | type inet:ip-address; // IPv4 or IPv6 address |
| 930 | } |
| 931 | description |
| 932 | "An identifier for a TE link endpoint on a node. |
| 933 | This attribute is mapped to local or remote link identifier in |
| 934 | RFC3630 and RFC5305."; |
| 935 | } |
| 936 | |
| 937 | typedef generalized-label { |
| 938 | type binary; |
| 939 | description |
| 940 | "Generalized label. Nodes sending and receiving the |
| 941 | Generalized Label know what kinds of link they are |
| 942 | using, the Generalized Label does not identify its |
| 943 | type. Instead, nodes are expected to know from the |
| 944 | context what type of label to expect."; |
| 945 | reference "rfc3471: section 3.2"; |
| 946 | } |
| 947 | |
| 948 | typedef admin-group { |
| 949 | type binary { |
| 950 | length 32; |
| 951 | } |
| 952 | description |
| 953 | "Administrative group/Resource class/Color."; |
| 954 | } |
| 955 | |
| 956 | typedef extended-admin-group { |
| 957 | type binary; |
| 958 | description |
| 959 | "Extended administrative group/Resource class/Color."; |
| 960 | } |
| 961 | |
| 962 | typedef admin-groups { |
| 963 | type union { |
| 964 | type admin-group; |
| 965 | type extended-admin-group; |
| 966 | } |
| 967 | description "TE administrative group derived type"; |
| 968 | } |
| 969 | |
| 970 | typedef srlg { |
| 971 | type uint32; |
| 972 | description "SRLG type"; |
| 973 | } |
| 974 | |
| 975 | identity path-computation-srlg-type { |
| 976 | description |
| 977 | "Base identity for SRLG path computation"; |
| 978 | } |
| 979 | |
| 980 | identity srlg-ignore { |
| 981 | base path-computation-srlg-type; |
| 982 | description |
| 983 | "Ignores SRLGs in path computation"; |
| 984 | } |
| 985 | |
| 986 | identity srlg-strict { |
| 987 | base path-computation-srlg-type; |
| 988 | description |
| 989 | "Include strict SRLG check in path computation"; |
| 990 | } |
| 991 | |
| 992 | identity srlg-preferred { |
| 993 | base path-computation-srlg-type; |
| 994 | description |
| 995 | "Include preferred SRLG check in path computation"; |
| 996 | } |
| 997 | |
| 998 | identity srlg-weighted { |
| 999 | base path-computation-srlg-type; |
| 1000 | description |
| 1001 | "Include weighted SRLG check in path computation"; |
| 1002 | } |
| 1003 | |
| 1004 | typedef te-metric { |
| 1005 | type uint32; |
| 1006 | description |
| 1007 | "TE link metric"; |
| 1008 | } |
| 1009 | |
| 1010 | /** |
| 1011 | * TE tunnel generic groupings |
| 1012 | **/ |
| 1013 | |
| 1014 | /* Tunnel path selection parameters */ |
| 1015 | grouping tunnel-path-selection { |
| 1016 | description |
| 1017 | "Tunnel path selection properties grouping"; |
| 1018 | container path-selection { |
| 1019 | description |
| 1020 | "Tunnel path selection properties container"; |
| 1021 | leaf topology-id { |
| 1022 | type te-types:te-topology-id; |
| 1023 | description |
| 1024 | "The tunnel path is computed using the specific |
| 1025 | topology identified by this identifier"; |
| 1026 | } |
| 1027 | leaf cost-limit { |
| 1028 | type uint32 { |
| 1029 | range "1..4294967295"; |
| 1030 | } |
| 1031 | description |
| 1032 | "The tunnel path cost limit."; |
| 1033 | } |
| 1034 | leaf hop-limit { |
| 1035 | type uint8 { |
| 1036 | range "1..255"; |
| 1037 | } |
| 1038 | description |
| 1039 | "The tunnel path hop limit."; |
| 1040 | } |
| 1041 | leaf metric-type { |
| 1042 | type identityref { |
| 1043 | base path-metric-type; |
| 1044 | } |
| 1045 | default path-metric-te; |
| 1046 | description |
| 1047 | "The tunnel path metric type."; |
| 1048 | } |
| 1049 | leaf tiebreaker-type { |
| 1050 | type identityref { |
| 1051 | base path-tiebreaker-type; |
| 1052 | } |
| 1053 | default path-tiebreaker-maxfill; |
| 1054 | description |
| 1055 | "The tunnel path computation tie breakers."; |
| 1056 | } |
| 1057 | leaf ignore-overload { |
| 1058 | type boolean; |
| 1059 | description |
| 1060 | "The tunnel path can traverse overloaded node."; |
| 1061 | } |
| 1062 | uses tunnel-path-affinities; |
| 1063 | uses tunnel-path-srlgs; |
| 1064 | } |
| 1065 | } |
| 1066 | |
| 1067 | grouping tunnel-path-affinities { |
| 1068 | description |
| 1069 | "Path affinities grouping"; |
| 1070 | container tunnel-path-affinities { |
| 1071 | if-feature named-path-affinities; |
| 1072 | description |
| 1073 | "Path affinities container"; |
| 1074 | choice style { |
| 1075 | description |
| 1076 | "Path affinities representation style"; |
| 1077 | case values { |
| 1078 | leaf value { |
| 1079 | type uint32 { |
| 1080 | range "0..4294967295"; |
| 1081 | } |
| 1082 | description |
| 1083 | "Affinity value"; |
| 1084 | } |
| 1085 | leaf mask { |
| 1086 | type uint32 { |
| 1087 | range "0..4294967295"; |
| 1088 | } |
| 1089 | description |
| 1090 | "Affinity mask"; |
| 1091 | } |
| 1092 | } |
| 1093 | case named { |
| 1094 | list constraints { |
| 1095 | key "usage"; |
| 1096 | leaf usage { |
| 1097 | type identityref { |
| 1098 | base resource-affinities-type; |
| 1099 | } |
| 1100 | description "Affinities usage"; |
| 1101 | } |
| 1102 | container constraint { |
| 1103 | description |
| 1104 | "Container for named affinities"; |
| 1105 | list affinity-names { |
| 1106 | key "name"; |
| 1107 | leaf name { |
| 1108 | type string; |
| 1109 | description |
| 1110 | "Affinity name"; |
| 1111 | } |
| 1112 | description |
| 1113 | "List of named affinities"; |
| 1114 | } |
| 1115 | } |
| 1116 | description |
| 1117 | "List of named affinity constraints"; |
| 1118 | } |
| 1119 | } |
| 1120 | } |
| 1121 | } |
| 1122 | } |
| 1123 | |
| 1124 | grouping tunnel-path-srlgs { |
| 1125 | description |
| 1126 | "Path SRLG properties grouping"; |
| 1127 | container tunnel-path-srlgs { |
| 1128 | description |
| 1129 | "Path SRLG properties container"; |
| 1130 | choice style { |
| 1131 | description |
| 1132 | "Type of SRLG representation"; |
| 1133 | case values { |
| 1134 | leaf usage { |
| 1135 | type identityref { |
| 1136 | base route-exclude-srlg; |
| 1137 | } |
| 1138 | description "SRLG usage"; |
| 1139 | } |
| 1140 | leaf-list values { |
| 1141 | type te-types:srlg; |
| 1142 | description "SRLG value"; |
| 1143 | } |
| 1144 | } |
| 1145 | case named { |
| 1146 | list constraints { |
| 1147 | key "usage"; |
| 1148 | leaf usage { |
| 1149 | type identityref { |
| 1150 | base route-exclude-srlg; |
| 1151 | } |
| 1152 | description "SRLG usage"; |
| 1153 | } |
| 1154 | container constraint { |
| 1155 | description |
| 1156 | "Container for named SRLG list"; |
| 1157 | list srlg-names { |
| 1158 | key "name"; |
| 1159 | leaf name { |
| 1160 | type string; |
| 1161 | description |
| 1162 | "The SRLG name"; |
| 1163 | } |
| 1164 | description |
| 1165 | "List named SRLGs"; |
| 1166 | } |
| 1167 | } |
| 1168 | description |
| 1169 | "List of named SRLG constraints"; |
| 1170 | } |
| 1171 | } |
| 1172 | } |
| 1173 | } |
| 1174 | } |
| 1175 | |
| 1176 | grouping tunnel-bidir-assoc-properties { |
| 1177 | description |
| 1178 | "TE tunnel associated bidirectional properties |
| 1179 | grouping"; |
| 1180 | container bidirectional { |
| 1181 | description |
| 1182 | "TE tunnel associated bidirectional attributes."; |
| 1183 | container association { |
| 1184 | description |
| 1185 | "Tunnel bidirectional association properties"; |
| 1186 | leaf id { |
| 1187 | type uint16; |
| 1188 | description |
| 1189 | "The TE tunnel association identifier."; |
| 1190 | } |
| 1191 | leaf source { |
| 1192 | type inet:ip-address; |
| 1193 | description |
| 1194 | "The TE tunnel association source."; |
| 1195 | } |
| 1196 | leaf global-source { |
| 1197 | type inet:ip-address; |
| 1198 | description |
| 1199 | "The TE tunnel association global |
| 1200 | source."; |
| 1201 | } |
| 1202 | leaf type { |
| 1203 | type identityref { |
| 1204 | base bidir-association-type; |
| 1205 | } |
| 1206 | default bidir-assoc-non-corouted; |
| 1207 | description |
| 1208 | "The TE tunnel association type."; |
| 1209 | } |
| 1210 | leaf provisioing { |
| 1211 | type identityref { |
| 1212 | base bidir-provisioning-mode; |
| 1213 | } |
| 1214 | description |
| 1215 | "Describes the provisioning model of the |
| 1216 | associated bidirectional LSP"; |
| 1217 | reference |
| 1218 | "draft-ietf-teas-mpls-tp-rsvpte-ext- |
| 1219 | associated-lsp, section-3.2"; |
| 1220 | } |
| 1221 | } |
| 1222 | } |
| 1223 | } |
| 1224 | /*** End of TE tunnel groupings ***/ |
| 1225 | |
| 1226 | /** |
| 1227 | * TE interface generic groupings |
| 1228 | **/ |
| 1229 | } |