type uint16;
}
+ typedef path-key {
+ type uint16;
+ }
+
typedef pce-id {
type union {
type binary {
description "NO-PATH-VECTOR TLV";
reference "https://tools.ietf.org/html/rfc5440#section-7.5";
+ uses tlv;
leaf flags {
type bits {
bit p2mp-unreachable {
description "OVERLOAD-DURATION TLV";
reference "https://tools.ietf.org/html/rfc5440#section-7.14";
+ uses tlv;
leaf duration {
type uint32;
units seconds;
description "REQ-MISSING TLV";
reference "https://tools.ietf.org/html/rfc5440#section-7.5";
+ uses tlv;
leaf request-id {
type request-id;
}
}
-
- grouping p2mp-capable-tlv {
+
+ grouping p2mp-capable-tlv {
description "P2MP CAPABLE TLV";
reference "https://tools.ietf.org/html/rfc6006#section-3.1.2";
mandatory true;
}
}
+
grouping stateful-capability-tlv {
description "Stateful PCE Capability TLV";
reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-7.1.1";
+ uses tlv;
leaf flags {
type bits {
bit lsp-update-capability {
description "LSP State Database Version TLV";
reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-7.1.2";
+ uses tlv;
leaf version {
type uint64;
mandatory true;
description "PCE Redundancy Group Identifier TLV";
reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-7.1.3";
+ uses tlv;
leaf identifier {
type binary;
mandatory true;
description "LSP Identifiers TLV";
reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-7.3.1";
+ uses tlv;
leaf lsp-id {
type rsvp:lsp-id;
mandatory true;
description "Symbolic Path Name TLV";
reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-7.3.2";
+ uses tlv;
leaf path-name {
type binary;
mandatory true;
description "LSP Error Code TLV";
reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-7.3.3";
+ uses tlv;
leaf error-code {
type uint32;
mandatory true;
description "RSVP Error Spec TLV";
reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-7.3.4";
+ uses tlv;
choice error-type {
case rsvp {
container rsvp-error {
description "OF-List TLV";
reference "https://tools.ietf.org/html/rfc5541#section-2.1";
+ uses tlv;
leaf-list codes {
type of-id;
}
description "Order TLV";
reference "https://tools.ietf.org/html/rfc5557#section-5.4";
+ uses tlv;
leaf delete {
type uint32;
mandatory true;
grouping object {
description "Core object structure with optional TLVs";
uses object-header;
-
- container tlvs {
-
- }
}
grouping open-object {
description "OPEN Object";
reference "https://tools.ietf.org/html/rfc5440#section-7.3";
- uses object {
- augment "tlvs" {
- container of-list {
- uses of-list-tlv;
- }
+ uses object;
+ container "tlvs" {
+ container of-list {
+ uses of-list-tlv;
+ }
- container p2mp {
- uses p2mp-capable-tlv;
- }
+ container p2mp {
+ uses p2mp-capable-tlv;
+ }
- container stateful {
- uses stateful-capability-tlv;
- }
+ container stateful {
+ uses stateful-capability-tlv;
+ }
- container predundancy-group-id {
- uses predundancy-group-id-tlv;
- }
+ container predundancy-group-id {
+ uses predundancy-group-id-tlv;
+ }
- container lsp-db-version {
- uses lsp-db-version-tlv;
- }
+ container lsp-db-version {
+ uses lsp-db-version-tlv;
}
}
description "RP Object";
reference "https://tools.ietf.org/html/rfc5440#section-7.4";
- uses object {
- augment "tlvs" {
- container order {
- uses order-tlv;
- }
+ uses object;
+ container "tlvs" {
+ container order {
+ uses order-tlv;
}
}
grouping bandwidth-object {
description "BANDWIDTH Object";
reference "https://tools.ietf.org/html/rfc5440#section-7.7";
+
+ uses object;
// No possibility to carry TLVs
- uses object-header;
-
leaf bandwidth {
type ieee754:float32;
}
}
}
+ grouping exclude-route-object {
+ description "Exclude Route Object";
+ reference "https://tools.ietf.org/html/rfc5521#section-2.1.1";
+
+ uses object;
+
+ leaf flags {
+ type bits {
+ bit fail {
+ position 31;
+ }
+ }
+ mandatory true;
+ }
+
+ list subobjects {
+ uses rsvp:exclude-route-subobjects;
+ }
+ }
+
grouping explicit-route-object {
description "Explicit Route Object";
reference "https://tools.ietf.org/html/rfc5440#section-7.9";
// No possibility of TLVs
- uses object-header;
+ uses object;
list subobjects {
leaf loose {
mandatory true;
}
- uses rsvp:route-subobjects;
+ uses rsvp:explicit-route-subobjects {
+// FIXME: yangtools bug
+// augment "subobject-type" {
+// case path-key {
+// container path-key {
+// uses path-key-subobject;
+// }
+// }
+// }
+ }
}
}
reference "https://tools.ietf.org/html/rfc5440#section-7.12";
// No possibility of TLVs
- uses object-header;
+ uses object;
list subobjects {
- uses rsvp:route-subobjects;
+ uses rsvp:explicit-route-subobjects;
}
}
reference "https://tools.ietf.org/html/rfc5440#section-7.10";
// No possibility of TLVs
- uses object-header;
+ uses object;
list subobjects {
uses rsvp:record-route-subobjects;
reference "https://tools.ietf.org/html/rfc5440#section-7.13";
// No possibility of TLVs
- uses object-header;
+ uses object;
leaf link-diverse {
type boolean;
reference "https://tools.ietf.org/html/rfc5440#section-7.14";
// No possibility of TLVs
- uses object {
- augment "tlvs" {
- container overload-duration {
- when "../type = 2 and ../value = 1";
+ uses object;
+ container "tlvs" {
+ container overload-duration {
+ when "../type = 2 and ../value = 1";
- uses overload-duration-tlv;
- }
+ uses overload-duration-tlv;
}
}
reference "https://tools.ietf.org/html/rfc5440#section-7.15";
// No possibility of TLVs
- uses object {
- augment "tlvs" {
- container req-missing {
- when "../type = 7";
- uses req-missing-tlv;
- }
+ uses object;
+ container "tlvs" {
+ container req-missing {
+ when "../type = 7";
+ uses req-missing-tlv;
}
}
reference "https://tools.ietf.org/html/rfc5440#section-7.16";
// No possibility of TLVs
- uses object-header;
+ uses object;
leaf max-lsp {
type uint8;
description "CLOSE Object";
reference "https://tools.ietf.org/html/rfc5440#section-7.17";
- // No possibility of TLVs
uses object;
leaf reason {
type uint8;
mandatory true;
}
+
+ container tlvs {
+
+ }
+ }
+
+ grouping path-key-subobject {
+ reference "https://tools.ietf.org/html/rfc5520#section-3.1";
+ uses rsvp:c-subobject;
+
+ leaf pce-id {
+ type pce-id;
+ mandatory true;
+ }
+
+ leaf path-key {
+ type path-key;
+ mandatory true;
+ }
}
grouping path-key-object {
description "PATH-KEY Object";
reference "https://tools.ietf.org/html/rfc5520#section-3.2.2";
- uses object-header;
+ uses object;
list path-keys {
min-elements 1;
default false;
}
- leaf pce-id {
- type pce-id;
- mandatory true;
- }
+ uses path-key-subobject;
}
}
description "SRP Object";
reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-7.3";
- uses object {
- augment "tlvs" {
- container lsp-error-code {
- uses lsp-error-code-tlv;
- }
+ uses object;
+ container "tlvs" {
+ container lsp-error-code {
+ uses lsp-error-code-tlv;
+ }
- container lsp-identifiers {
- uses lsp-identifiers-tlv;
- }
+ container lsp-identifiers {
+ uses lsp-identifiers-tlv;
+ }
- container rsvp-error-spec {
- uses rsvp-error-spec-tlv;
- }
+ container rsvp-error-spec {
+ uses rsvp-error-spec-tlv;
+ }
- container symblic-path-name {
- uses symbolic-path-name-tlv;
- }
+ container symblic-path-name {
+ uses symbolic-path-name-tlv;
}
}
description "CLASSTYPE Object";
reference "https://tools.ietf.org/html/rfc5455#section-3";
- uses object-header;
+ uses object;
leaf class-type {
type class-type;
uses metric-object;
}
+ container exclude-route {
+ uses exclude-route-object;
+ }
+
container include-route {
uses include-route-object;
}
uses lsp-object;
}
}
-
- container p2mp {
- when "../rp/p2mp = true";
-
- list trees {
- container endpoints {
- uses endpoints-object;
- }
-
- // FIXME: finish this
- }
- }
}
}
container of {
uses of-object;
}
-
container gc {
uses gc-object;
}
-
+ container xro {
+ uses exclude-route-object;
+ }
list metric {
uses metric-object;
}
}
case failure {
container no-path {
- uses no-path-object {
- augment "tlvs" {
- container no-path-vector {
- uses no-path-vector-tlv;
- }
+ uses no-path-object;
+ container "tlvs" {
+ container no-path-vector {
+ uses no-path-vector-tlv;
}
}
}
grouping close-message {
uses message;
- container close-message {
+ container c-close-message {
description "Close Message";
reference "https://tools.ietf.org/html/rfc5440#section-6.8";
uses message-header;
- container close {
+ container c-close {
uses close-object;
}
}