Bug-2230: Revision of module RSVP
[bgpcep.git] / rsvp / api / src / main / yang / rsvp.yang
index 5774d7994dcd242da0496973c35beea7f6beffd2..37ed5b3719b495ae7621ce1d07537e9d8bff6712 100644 (file)
@@ -3,403 +3,937 @@ module rsvp {
         namespace "urn:opendaylight:params:xml:ns:yang:rsvp";
         prefix "rsvp";
 
-       import iana { prefix iana; revision-date 2013-08-16; }
-       import ietf-inet-types { prefix inet; revision-date 2010-09-24; }
+    import iana { prefix iana; revision-date 2013-08-16; }
+    import ietf-inet-types { prefix inet; revision-date 2010-09-24; }
+    import ieee754 { prefix ieee754; revision-date 2013-08-19; }
+    import network-concepts { prefix netc; revision-date 2013-11-25; }
 
-        organization "Cisco Systems, Inc.";
-        contact "Robert Varga <rovarga@cisco.com>";
+    organization "Cisco Systems, Inc.";
+    contact "Robert Varga <rovarga@cisco.com>";
 
+    description
+            "This module contains the definition of types related to
+            Resource Reservation Protocol (RSVP).
+
+            Copyright (c)2013 Cisco Systems, Inc. All rights reserved.
+
+            This program and the accompanying materials are made available
+            under the terms of the Eclipse Public License v1.0 which
+            accompanies this distribution, and is available at
+            http://www.eclipse.org/legal/epl-v10.html";
+
+    revision "2015-08-20" {
+        description
+            "Updated to extend RSVP Objects.";
+        reference "http://tools.ietf.org/html/draft-ietf-idr-te-lsp-distribution-01#section-2.1";
+    }
+
+    revision "2013-08-20" {
+            description
+                    "Initial revision.";
+            reference "https://tools.ietf.org/html/rfc2205";
+    }
+
+    typedef attribute-filter {
+        type uint32;
+    }
+
+    grouping attribute-filters {
+        leaf include-any {
+            type attribute-filter;
+        }
+
+        leaf exclude-any {
+            type attribute-filter;
+        }
+
+        leaf include-all {
+            type attribute-filter;
+        }
+    }
+
+    grouping rsvp-te-object {
         description
-                "This module contains the definition of types related to
-                Resource Reservation Protocol (RSVP).
-
-                Copyright (c)2013 Cisco Systems, Inc. All rights reserved.
-
-                This program and the accompanying materials are made available
-                under the terms of the Eclipse Public License v1.0 which
-                accompanies this distribution, and is available at
-                http://www.eclipse.org/legal/epl-v10.html";
-
-        revision "2013-08-20" {
-                description
-                        "Initial revision.";
-                reference "https://tools.ietf.org/html/rfc2205";
-        }
-
-       typedef attribute-filter {
-               type uint32;
-       }
-
-       grouping attribute-filters {
-               leaf include-any {
-                       type attribute-filter;
-               }
-
-               leaf exclude-any {
-                       type attribute-filter;
-               }
-
-               leaf include-all {
-                       type attribute-filter;
-               }
-       }
-
-       grouping tunnel-attributes {
-               leaf hold-priority {
-                       type uint8;
-                       default 0;
-               }
-
-               leaf setup-priority {
-                       type uint8;
-                       default 0;
-               }
-
-               leaf local-protection-desired {
-                       type boolean;
-                       default false;
-               }
-
-               uses attribute-filters;
-       }
-
-       typedef lsp-id {
-               type uint32;
-               reference "https://tools.ietf.org/html/rfc3209#section-4.6.2.1";
-       }
-
-       typedef tunnel-id {
-               type uint16;
-               reference "https://tools.ietf.org/html/rfc3209#section-4.6.1.1";
-       }
-
-       typedef ipv4-extended-tunnel-id {
-               type inet:ipv4-address;
-               reference "https://tools.ietf.org/html/rfc3209#section-4.6.1.1";
-       }
-
-       typedef ipv6-extended-tunnel-id {
-               type inet:ipv6-address;
-               reference "https://tools.ietf.org/html/rfc3209#section-4.6.1.2";
-       }
-
-       typedef srlg-id {
-               type uint32;
-               reference "http://tools.ietf.org/html/rfc4202#section-2.3";
-       }
-
-       grouping error-spec {
-               reference "https://tools.ietf.org/html/rfc2205#page-81";
-
-               leaf node {
-                       type inet:ip-address;
-                       mandatory true;
-               }
-
-               leaf flags {
-                       type bits {
-                               bit in-place {
-                                       position 7;
-                               }
-                               bit not-guilty {
-                                       position 6;
-                               }
-                       }
-               }
-
-               leaf code {
-                       type uint8;
-                       mandatory true;
-               }
-
-               leaf value {
-                       type uint16;
-                       mandatory true;
-               }
-       }
-
-       grouping user-error-spec {
-               reference "https://tools.ietf.org/html/rfc5284#section-3";
-
-               leaf enterprise {
-                       type iana:enterprise-number;
-                       mandatory true;
-               }
-
-               leaf sub-org {
-                       type uint8;
-                       default 0;
-               }
-
-               leaf value {
-                       type uint16;
-                       mandatory true;
-               }
-
-               leaf description {
-                       type string;
-                       default "";
-               }
-
-               container subobjects {
-                       // Filled by enterprise-specific augmentations
-               }
-       }
-
-       // Marker
-       grouping c-label;
-
-       grouping type1-label {
-               reference "https://tools.ietf.org/html/rfc3209#section-4.1";
-
-               uses c-label;
-
-               leaf type1-label {
-                       type uint32;
-                       mandatory true;
-               }
-       }
-
-       grouping generalized-label {
-               reference "https://tools.ietf.org/html/rfc3473#section-2.3";
-
-               uses c-label;
-
-               leaf generalized-label {
-                       type binary;
-                       mandatory true;
-               }
-       }
-
-       grouping waveband-switching-label {
-               reference "https://tools.ietf.org/html/rfc3473#section-2.4";
-
-               uses c-label;
-
-               leaf end-label {
-                       type uint32;
-                       mandatory true;
-               }
-               leaf start-label {
-                       type uint32;
-                       mandatory true;
-               }
-               leaf waveband-id {
-                       type uint32;
-                       mandatory true;
-               }
-       }
-
-       grouping label-set {
-               reference "https://tools.ietf.org/html/rfc3473#section-2.6";
-
-               leaf action {
-                       type enumeration {
-                               enum inclusive-list {
-                                       value 0;
-                               }
-                               enum exclusive-list {
-                                       value 1;
-                               }
-                               enum inclusive-range {
-                                       value 2;
-                               }
-                               enum exclusive-range {
-                                       value 3;
-                               }
-                       }
-               }
-
-               container label-type {
-                       // Technology-specific
-               }
-
-               list subchannels {
-
-               }
-       }
-
-       //marker
-       grouping c-subobject {
-       
-       }
-
-       grouping ip-prefix-subobject {
-               uses c-subobject;
-               leaf ip-prefix {
-                       reference "http://tools.ietf.org/html/rfc3209#section-4.3.3.1";
-                       type inet:ip-prefix;
-                       mandatory true;
-               }
-       }
-
-       grouping as-number-subobject {
-               uses c-subobject;
-               leaf as-number {
-                       reference "http://tools.ietf.org/html/rfc3209#section-4.3.3.4";
-                       type inet:as-number;
-                       mandatory true;
-               }
-       }
-
-       grouping label-subobject {
-               uses c-subobject;
-
-               leaf uni-directional {
-                       type boolean;
-                       mandatory true;
-               }
-
-               choice label-type {
-                       case type1-label-case {
-                               container type1-label {
-                                       uses type1-label;
-                               }
-                       }
-                       case generalized-label-case {
-                               container generalized-label {
-                                       uses generalized-label;
-                               }
-                       }
-                       case waveband-switching-label-case {
-                               container waveband-switching-label {
-                                       uses waveband-switching-label;
-                               }
-                       }
-               }
-       }
-
-       grouping unnumbered-subobject {
-               uses c-subobject;
-               leaf router-id {
-                       type uint32;
-                       mandatory true;
-               }
-
-               leaf interface-id {
-                       type uint32;
-                       mandatory true;
-               }
-       }
-
-       grouping srlg-subobject {
-               uses c-subobject;
-               leaf srlg-id {
-                       type srlg-id;
-                       mandatory true;
-               }
-       }
-
-       grouping record-route-subobjects {
-               leaf protection-available {
-                       type boolean;
-                       default false;
-               }
-
-               leaf protection-in-use {
-                       type boolean;
-                       default false;
-               }
-
-               choice subobject-type {
-                       case ip-prefix-case {
-                               container ip-prefix {
-                                       uses ip-prefix-subobject;
-                               }
-                       }
-
-                       case label-case {
-                               container label {
-                                       uses label-subobject;
-
-                                       leaf global {
-                                               type boolean;
-                                               default false;
-                                       }
-                               }
-                       }
-
-                       case unnumbered-case {
-                               container unnumbered {
-                                       uses unnumbered-subobject;
-                               }
-                       }
-               }
-       }
-
-       grouping basic-explicit-route-subobjects {
-               description "Subobjects shared between XRO and ERO";
-               reference "https://tools.ietf.org/html/rfc4874#section-4.1";
-
-               choice subobject-type {
-                       case as-number-case {
-                               container as-number {
-                                       uses as-number-subobject;
-                               }
-                       }
-                       case ip-prefix-case {
-                               container ip-prefix {
-                                       uses ip-prefix-subobject;
-                               }
-                       }
-                       case label-case {
-                               container label {
-                                       uses label-subobject;
-                               }
-                       }
-                       case srlg-case {
-                               container srlg {
-                                       uses srlg-subobject;
-                               }
-                       }
-                       case unnumbered-case {
-                               container unnumbered {
-                                       uses unnumbered-subobject;
-                               }
-                       }
-               }
-       }
-
-       grouping exclude-route-subobjects {
-               description "Subobject of an Exclude Route Object";
-               reference "https://tools.ietf.org/html/rfc4874#section-3.1";
-
-               leaf mandatory {
-                       type boolean;
-                       default false;
-               }
-
-               leaf attribute {
-                       type enumeration {
-                               enum interface {
-                                       value 0;
-                               }
-                               enum node {
-                                       value 1;
-                               }
-                               enum srlg {
-                                       value 2;
-                               }
-                       }
-                       mandatory true;
-               }
-
-               uses basic-explicit-route-subobjects;
-       }
-
-       grouping explicit-route-subobjects {
-               description "Subobject of an Explicit Route Object";
-               reference "https://tools.ietf.org/html/rfc4874#section-4.1";
-               uses basic-explicit-route-subobjects {
-                       augment "subobject-type" {
-                               case exrs-case {
-                                       container exrs {
-                                               list exrs {
-                                                       uses exclude-route-subobjects;
-                                               }
-                                       }
-                               }
-                       }
-               }
-       }
+            "Common marker for all RSVP-TE Objects.";
+    }
+
+    grouping priority {
+        leaf hold-priority {
+            type uint8;
+            default 0;
+        }
+
+        leaf setup-priority {
+            type uint8;
+            default 0;
+        }
+    }
+
+    grouping tunnel-attributes {
+        uses priority;
+
+        leaf local-protection-desired {
+            type boolean;
+            default false;
+        }
+
+        leaf label-recording-desired {
+            type boolean;
+            default false;
+        }
+
+        leaf se-style-desired {
+            type boolean;
+            default false;
+        }
+
+        leaf session-name {
+           type string;
+        }
+
+        uses attribute-filters;
+    }
+
+    typedef lsp-id {
+        type uint32;
+        reference "https://tools.ietf.org/html/rfc3209#section-4.6.2.1";
+    }
+
+    typedef tunnel-id {
+        type uint16;
+        reference "https://tools.ietf.org/html/rfc3209#section-4.6.1.1";
+    }
+
+    typedef ipv4-extended-tunnel-id {
+        type inet:ipv4-address;
+        reference "https://tools.ietf.org/html/rfc3209#section-4.6.1.1";
+    }
+
+    typedef ipv6-extended-tunnel-id {
+        type inet:ipv6-address;
+        reference "https://tools.ietf.org/html/rfc3209#section-4.6.1.2";
+    }
+
+    typedef srlg-id {
+        type uint32;
+        reference "http://tools.ietf.org/html/rfc4202#section-2.3";
+    }
+
+    typedef lsp-flag {
+        type enumeration {
+            enum unprotected {
+                value 0;
+            }
+            enum full-rerouting {
+                value 1;
+            }
+            enum rerouting-without-extra-traffic {
+                value 2;
+            }
+            enum protection-with-extra-traffic {
+                value 4;
+            }
+            enum unidirectional-protection {
+                value 8;
+            }
+            enum bidirectional-protection {
+                value 10;
+            }
+        }
+    }
+
+    typedef link-flags {
+        type enumeration {
+            enum totally-unprotected {
+                value 0;
+            }
+            enum extra-traffic {
+                value 1;
+            }
+            enum unprotected {
+                value 2;
+            }
+            enum shared {
+                value 4;
+            }
+            enum dedicated-1to1{
+                value 8;
+            }
+            enum dedicated-1plus1 {
+                value 10;
+            }
+            enum enhanced {
+                value 20;
+            }
+        }
+    }
+
+    grouping error-spec {
+        reference "https://tools.ietf.org/html/rfc2205#page-81";
+
+        leaf node {
+            type inet:ip-address;
+            mandatory true;
+        }
+
+        leaf flags {
+            type bits {
+                bit in-place {
+                    position 7;
+                }
+                bit not-guilty {
+                    position 6;
+                }
+            }
+        }
+
+        leaf code {
+            type uint8;
+            mandatory true;
+        }
+
+        leaf value {
+            type uint16;
+            mandatory true;
+        }
+    }
+
+    grouping user-error-spec {
+        reference "https://tools.ietf.org/html/rfc5284#section-3";
+
+        leaf enterprise {
+            type iana:enterprise-number;
+            mandatory true;
+        }
+
+        leaf sub-org {
+            type uint8;
+            default 0;
+        }
+
+        leaf value {
+            type uint16;
+            mandatory true;
+        }
+
+        leaf description {
+            type string;
+            default "";
+        }
+
+        container subobjects {
+            // Filled by enterprise-specific augmentations
+        }
+    }
+
+    // Marker
+    grouping c-label;
+
+    grouping type1-label {
+        reference "https://tools.ietf.org/html/rfc3209#section-4.1";
+
+        uses c-label;
+
+        leaf type1-label {
+            type uint32;
+            mandatory true;
+        }
+    }
+
+    grouping generalized-label {
+        reference "https://tools.ietf.org/html/rfc3473#section-2.3";
+
+        uses c-label;
+
+        leaf generalized-label {
+            type binary;
+            mandatory true;
+        }
+    }
+
+    grouping waveband-switching-label {
+        reference "https://tools.ietf.org/html/rfc3473#section-2.4";
+
+        uses c-label;
+
+        leaf end-label {
+            type uint32;
+            mandatory true;
+        }
+        leaf start-label {
+            type uint32;
+            mandatory true;
+        }
+        leaf waveband-id {
+            type uint32;
+            mandatory true;
+        }
+    }
+
+    grouping label-set {
+        reference "https://tools.ietf.org/html/rfc3473#section-2.6";
+
+        leaf action {
+            type enumeration {
+                enum inclusive-list {
+                    value 0;
+                }
+                enum exclusive-list {
+                    value 1;
+                }
+                enum inclusive-range {
+                    value 2;
+                }
+                enum exclusive-range {
+                    value 3;
+                }
+            }
+        }
+
+        container label-type {
+            // Technology-specific
+        }
+
+        list subchannels {
+
+        }
+    }
+
+    //marker
+    grouping c-subobject {
+
+    }
+
+    grouping ip-prefix-subobject {
+        uses c-subobject;
+        leaf ip-prefix {
+            reference "http://tools.ietf.org/html/rfc3209#section-4.3.3.1";
+            type inet:ip-prefix;
+            mandatory true;
+        }
+    }
+
+    grouping as-number-subobject {
+        uses c-subobject;
+        leaf as-number {
+            reference "http://tools.ietf.org/html/rfc3209#section-4.3.3.4";
+            type inet:as-number;
+            mandatory true;
+        }
+    }
+
+    grouping label-subobject {
+        uses c-subobject;
+
+        leaf uni-directional {
+            type boolean;
+            mandatory true;
+        }
+
+        choice label-type {
+            case type1-label-case {
+                container type1-label {
+                    uses type1-label;
+                }
+            }
+            case generalized-label-case {
+                container generalized-label {
+                    uses generalized-label;
+                }
+            }
+            case waveband-switching-label-case {
+                container waveband-switching-label {
+                    uses waveband-switching-label;
+                }
+            }
+        }
+    }
+
+    grouping unnumbered-subobject {
+        uses c-subobject;
+        leaf router-id {
+            type uint32;
+            mandatory true;
+        }
+
+        leaf interface-id {
+            type uint32;
+            mandatory true;
+        }
+    }
+
+    grouping srlg-subobject {
+        uses c-subobject;
+        leaf srlg-id {
+            type srlg-id;
+            mandatory true;
+        }
+    }
+
+    grouping protection-subobject {
+        container protection-subobject {
+            leaf secondary {
+                type boolean;
+                default false;
+            }
+            leaf protecting {
+                type boolean;
+                default false;
+            }
+            leaf notification {
+                type boolean;
+                default false;
+            }
+            leaf operational {
+                type boolean;
+                default false;
+            }
+            leaf lsp-flag {
+                type lsp-flag;
+                mandatory true;
+            }
+            leaf link-flags {
+                type link-flags;
+                mandatory true;
+            }
+            leaf in-place {
+                type boolean;
+                default false;
+            }
+            leaf required {
+                type boolean;
+                default false;
+            }
+            leaf seg-flag {
+                type lsp-flag;
+                mandatory true;
+            }
+        }
+    }
+
+    grouping record-route-subobjects {
+        leaf protection-available {
+            type boolean;
+            default false;
+        }
+
+        leaf protection-in-use {
+            type boolean;
+            default false;
+        }
+
+        choice subobject-type {
+            case ip-prefix-case {
+                container ip-prefix {
+                    uses ip-prefix-subobject;
+                }
+            }
+
+            case label-case {
+                container label {
+                    uses label-subobject;
+
+                    leaf global {
+                        type boolean;
+                        default false;
+                    }
+                }
+            }
+
+            case unnumbered-case {
+                container unnumbered {
+                    uses unnumbered-subobject;
+                }
+            }
+
+            case basic-protection-case {
+                container basic-protection {
+                    uses protection-subobject;
+                }
+            }
+
+            case dynamic-control-protection-case {
+                container dynamic-control-protection {
+                    uses protection-subobject;
+                }
+            }
+        }
+    }
+
+    grouping basic-explicit-route-subobjects {
+        description "Subobjects shared between XRO and ERO";
+        reference "https://tools.ietf.org/html/rfc4874#section-4.1";
+
+        choice subobject-type {
+            case as-number-case {
+                container as-number {
+                    uses as-number-subobject;
+                }
+            }
+            case ip-prefix-case {
+                container ip-prefix {
+                    uses ip-prefix-subobject;
+                }
+            }
+            case label-case {
+                container label {
+                    uses label-subobject;
+                }
+            }
+            case srlg-case {
+                container srlg {
+                    uses srlg-subobject;
+                }
+            }
+            case unnumbered-case {
+                container unnumbered {
+                    uses unnumbered-subobject;
+                }
+            }
+        }
+    }
+
+    grouping exclude-route-object {
+        container exclude-route-object {
+            uses rsvp-te-object;
+            list subobject-container {
+                uses rsvp:exclude-route-subobjects;
+                ordered-by user;
+            }
+        }
+    }
+
+    grouping record-route-subobjects-list {
+        list subobject-container {
+            uses record-route-subobjects;
+            ordered-by user;
+        }
+    }
+
+    grouping explicit-route-subobjects-list {
+
+        list subobject-container {
+            leaf loose {
+                type boolean;
+                mandatory true;
+            }
+
+            uses explicit-route-subobjects;
+            ordered-by user;
+        }
+    }
+
+    grouping record-route-object {
+        container record-route-object {
+            uses rsvp-te-object;
+            uses record-route-subobjects-list;
+        }
+    }
+
+    grouping explicit-route-object {
+        container explicit-route-object {
+            description "Explicit Route Object";
+            reference "http://tools.ietf.org/html/rfc3209#section-4.3";
+
+            uses rsvp-te-object;
+            uses explicit-route-subobjects-list;
+        }
+    }
+
+    grouping secondary-explicit-route-object {
+        container secondary-explicit-route-object {
+            description "Explicit Route Object";
+            reference "http://tools.ietf.org/html/rfc4873#section-4.1";
+
+            uses rsvp-te-object;
+            uses explicit-route-subobjects-list;
+        }
+    }
+
+    grouping secondary-record-route-object {
+        container secondary-record-route-object {
+            uses rsvp-te-object;
+            uses record-route-subobjects-list;
+        }
+    }
+
+    grouping exclude-route-subobjects {
+        description "Subobject of an Exclude Route Object";
+        reference "https://tools.ietf.org/html/rfc4874#section-3.1";
+
+        leaf mandatory {
+            type boolean;
+            default false;
+        }
+
+        leaf attribute {
+            type enumeration {
+                enum interface {
+                    value 0;
+                }
+                enum node {
+                    value 1;
+                }
+                enum srlg {
+                    value 2;
+                }
+            }
+            mandatory true;
+        }
+
+        uses basic-explicit-route-subobjects;
+    }
+
+    grouping explicit-route-subobjects {
+        description "Subobject of an Explicit Route Object";
+        reference "https://tools.ietf.org/html/rfc4874#section-4.1";
+        uses basic-explicit-route-subobjects {
+            augment "subobject-type" {
+                case exrs-case {
+                    container exrs {
+                        list exrs {
+                            uses exclude-route-subobjects;
+                        }
+                    }
+                }
+
+                case basic-protection-case {
+                    container basic-protection {
+                        uses protection-subobject;
+                    }
+                }
+
+                case dynamic-control-protection-case {
+                    container dynamic-control-protection {
+                        uses protection-subobject;
+                    }
+                }
+            }
+        }
+    }
+
+    grouping tspec-object {
+        container tspec-object {
+            description "SENDER TSPEC Object";
+            reference "https://tools.ietf.org/html/rfc2210";
+
+            uses rsvp-te-object;
+            leaf token-bucket-rate {
+                type ieee754:float32;
+            }
+            leaf token-bucket-size {
+                type ieee754:float32;
+            }
+            leaf peak-data-rate {
+                type ieee754:float32;
+            }
+            leaf minimum-policed-unit {
+                type uint32;
+            }
+            leaf maximum-packet-size {
+                type uint32;
+            }
+        }
+    }
+
+    typedef service-number {
+        type enumeration {
+            enum guaranteed {
+                value 2;
+            }
+            enum controlled-load {
+                value 5;
+            }
+        }
+    }
+
+    grouping flow-spec-object {
+        container flow-spec-object {
+            description "FLOW_SPEC";
+            reference "https://tools.ietf.org/html/rfc2210";
+
+            uses rsvp-te-object;
+            leaf service-header {
+                type service-number;
+            }
+
+            uses tspec-object;
+
+            leaf rate {
+                type ieee754:float32;
+            }
+            leaf slack-term {
+                type uint32;
+            }
+        }
+    }
+
+    typedef association-type {
+        type enumeration {
+            enum reserved {
+                value 0;
+            }
+            enum recovery {
+                value 1;
+            }
+        }
+    }
+
+    grouping association-object {
+        container association-object {
+            description "Association Object";
+            reference "http://tools.ietf.org/html/rfc4872#section-16";
+
+            uses rsvp-te-object;
+            leaf association-type {
+                type association-type;
+            }
+            leaf association-id {
+                type uint16;
+            }
+            leaf ip-address {
+                type inet:ip-address;
+                mandatory true;
+            }
+        }
+    }
+
+    grouping admin-status-object {
+        container admin-status-object {
+            description "Admin Status Object";
+            reference "http://tools.ietf.org/html/rfc3473#section-7.1";
+
+            uses rsvp-te-object;
+            leaf reflect {
+                type boolean;
+                default false;
+            }
+            leaf testing {
+                type boolean;
+                default false;
+            }
+            leaf administratively-down {
+                type boolean;
+                default false;
+            }
+            leaf deletion-in-progress {
+                type boolean;
+                default false;
+            }
+        }
+    }
+
+    grouping primary-path-route-object {
+        container primary-path-route-object {
+            description "Protection Subobject";
+            reference "http://tools.ietf.org/html/rfc4872#section-15";
+
+            uses rsvp-te-object;
+            uses rsvp-te-object;
+            uses explicit-route-subobjects-list;
+        }
+    }
+
+    grouping detour-object {
+        description "DETOUR Object";
+        reference "http://tools.ietf.org/html/rfc4090#section-4.2";
+
+        choice detour-object {
+            case ipv4-detour-object {
+                uses rsvp-te-object;
+                list plr {
+                    leaf plr-id {
+                        type inet:ipv4-address;
+                        mandatory true;
+                    }
+                    leaf avoid-node {
+                        type inet:ipv4-address;
+                        mandatory true;
+                    }
+                }
+            }
+            case ipv6-detour-object {
+                uses rsvp-te-object;
+                list plr-id {
+                    leaf plr-id {
+                        type inet:ipv6-address;
+                        mandatory true;
+                    }
+                }
+                list avoid-node {
+                    leaf avoid-node {
+                        type inet:ipv6-address;
+                        mandatory true;
+                    }
+                }
+            }
+        }
+
+    }
+
+    typedef fast-reroute-flags {
+        type enumeration {
+            enum one-to-one-backup-desired {
+                value 1;
+            }
+            enum facility-backup-desired {
+                value 2;
+            }
+        }
+    }
+
+    grouping common-fast-reroute-object {
+        uses rsvp-te-object;
+        uses priority;
+        uses attribute-filters;
+        leaf hop-limit {
+            type uint8;
+            default 0;
+        }
+        leaf flags {
+            type fast-reroute-flags;
+            mandatory true;
+        }
+        leaf bandwidth {
+            type netc:bandwidth;
+        }
+    }
+
+    grouping fast-reroute-object {
+        choice fast-reroute-object {
+            description "FAST REROUTE Object";
+            reference "http://tools.ietf.org/html/rfc4090#section-4.1";
+
+            case basic-fast-reroute-object {
+                uses common-fast-reroute-object;
+            }
+            case legacy-fast-reroute-object {
+                uses common-fast-reroute-object;
+            }
+        }
+    }
+
+    grouping session-attribute-object {
+        choice session-attribute-object {
+            description "SESSION_ATTRIBUTE";
+            reference "http://tools.ietf.org/html/rfc3209#section-4.7";
+
+            case basic-session-attribute-object {
+                uses rsvp-te-object;
+                uses tunnel-attributes;
+            }
+            case session-attribute-object-with-resources-affinities {
+                uses rsvp-te-object;
+                uses tunnel-attributes;
+            }
+        }
+    }
+
+    grouping bandwidth-object {
+        choice bandwidth-object {
+            description "BANDWIDTH Object";
+            reference "https://tools.ietf.org/html/rfc5440#section-7.7";
+
+            case basic-bandwidth-object {
+                uses rsvp-te-object;
+                // No possibility to carry TLVs
+                leaf bandwidth {
+                    type netc:bandwidth;
+                }
+            }
+            case reoptimization-bandwidth-object {
+                uses rsvp-te-object;
+                // No possibility to carry TLVs
+                leaf bandwidth {
+                    type netc:bandwidth;
+                }
+            }
+        }
+    }
+
+    grouping metric-object {
+        description "METRIC Object";
+        reference "https://tools.ietf.org/html/rfc5440#section-7.8";
+        container metric-object {
+            uses rsvp-te-object;
+
+            leaf metric-type {
+                type uint8;
+                mandatory true;
+            }
+
+            leaf bound {
+                type boolean;
+                default false;
+            }
+
+            leaf computed {
+                type boolean;
+                default false;
+            }
+
+            leaf value {
+                type ieee754:float32;
+            }
+        }
+    }
+
+    grouping protection-object {
+        choice protection-object {
+            description "Protection Subobject";
+            reference "http://tools.ietf.org/html/rfc4873#section-6.1";
+            reference "http://tools.ietf.org/html/rfc4872#section-14";
+
+            case basic-protection-object {
+                uses rsvp-te-object;
+                uses protection-subobject;
+            }
+            case dynamic-control-protection-object {
+                uses rsvp-te-object;
+                uses protection-subobject;
+            }
+        }
+    }
+
+    grouping lsp-attributes-object {
+        container lsp-attributes-object {
+            description "Lsp Attributes Object";
+            reference "http://tools.ietf.org/html/rfc5420#section-4";
+
+            uses rsvp-te-object;
+            list subobject-container {
+                uses lsp-att-subobject;
+            }
+        }
+    }
+
+    grouping lsp-required-attributes-object {
+        container lsp-required-attributes-object {
+            description "Lsp Required Attributes Object";
+            reference "http://tools.ietf.org/html/rfc5420#section-5";
+
+            uses rsvp-te-object;
+            uses lsp-attributes-object;
+        }
+    }
+
+    grouping attribute-flags {
+        description "Attributes Flags";
+        reference "http://tools.ietf.org/html/rfc5420#section-3.1";
+        list flag-container {
+            leaf flags {
+                type binary {
+                   length 4;
+                }
+            }
+        }
+    }
+
+    grouping lsp-att-subobject {
+        choice lsp-subobject {
+            case flags-tlv {
+                uses attribute-flags;
+            }
+        }
+    }
 }