netconfcentral logo

ietf-te-device@2017-10-29



  module ietf-te-device {

    yang-version 1;

    namespace
      "urn:ietf:params:xml:ns:yang:ietf-te-device";

    prefix te-dev;

    import ietf-te {
      prefix te;
    }
    import ietf-te-types {
      prefix te-types;
    }
    import ietf-interfaces {
      prefix if;
    }
    import ietf-inet-types {
      prefix inet;
    }
    import ietf-routing-types {
      prefix rt-types;
    }

    organization
      "IETF Traffic Engineering Architecture and Signaling (TEAS)
     Working Group";

    contact
      "WG Web:   <http://tools.ietf.org/wg/teas/>
     WG List:  <mailto:teas@ietf.org>

     WG Chair: Lou Berger
               <mailto:lberger@labn.net>

     WG Chair: Vishnu Pavan Beeram
               <mailto:vbeeram@juniper.net>

     Editor:   Tarek Saad
               <mailto:tsaad@cisco.com>

     Editor:   Rakesh Gandhi
               <mailto:rgandhi@cisco.com>

     Editor:   Vishnu Pavan Beeram
               <mailto:vbeeram@juniper.net>

     Editor:   Himanshu Shah
               <mailto:hshah@ciena.com>

     Editor:   Xufeng Liu
               <mailto:xufeng.liu@ericsson.com>

     Editor:   Xia Chen
               <mailto:jescia.chenxia@huawei.com>

     Editor:   Raqib Jones
               <mailto:raqib@Brocade.com>

     Editor:   Bin Wen
               <mailto:Bin_Wen@cable.comcast.com>";

    description
      "YANG data module for TE device configurations,
    state, RPC and notifications.";

    revision "2017-10-29" {
      description
        "Latest update to TE device YANG module.";
      reference
        "TBA";

    }


    grouping lsps-device_state {
      description
        "TE LSP device state grouping";
      container lsp-timers {
        when "../te:origin-type = 'ingress'" {
          description
            "Applicable to ingress LSPs only";
        }
        description "Ingress LSP timers";
        leaf life-time {
          type uint32;
          units "seconds";
          description "lsp life time";
        }

        leaf time-to-install {
          type uint32;
          units "seconds";
          description
            "lsp installation delay time";
        }

        leaf time-to-destroy {
          type uint32;
          units "seconds";
          description
            "lsp expiration delay time";
        }
      }  // container lsp-timers

      container downstream-info {
        when "../te:origin-type != 'egress'" {
          description
            "Applicable to ingress LSPs only";
        }
        description "downstream information";
        leaf nhop {
          type inet:ip-address;
          description "downstream nexthop.";
        }

        leaf outgoing-interface {
          type if:interface-ref;
          description
            "downstream interface.";
        }

        leaf neighbor {
          type inet:ip-address;
          description "downstream neighbor.";
        }

        leaf label {
          type rt-types:generalized-label;
          description "downstream label.";
        }
      }  // container downstream-info

      container upstream-info {
        when
          "../te:origin-type != 'ingress'" {
          description
            "Applicable to non-ingress LSPs only";
        }
        description "upstream information";
        leaf phop {
          type inet:ip-address;
          description
            "upstream nexthop or previous-hop.";
        }

        leaf neighbor {
          type inet:ip-address;
          description "upstream neighbor.";
        }

        leaf label {
          type rt-types:generalized-label;
          description "upstream label.";
        }
      }  // container upstream-info
    }  // grouping lsps-device_state

    grouping tunnel-device_config {
      description "Device TE tunnel configs";
      leaf path-invalidation-action {
        type identityref {
          base te-types:path-invalidation-action-type;
        }
        description
          "Tunnel path invalidtion action";
      }
    }  // grouping tunnel-device_config

    grouping lsp-device-timers_config {
      description
        "Device TE LSP timers configs";
      leaf lsp-install-interval {
        type uint32;
        units "seconds";
        description
          "lsp installation delay time";
      }

      leaf lsp-cleanup-interval {
        type uint32;
        units "seconds";
        description "lsp cleanup delay time";
      }

      leaf lsp-invalidation-interval {
        type uint32;
        units "seconds";
        description
          "lsp path invalidation before taking action delay time";
      }
    }  // grouping lsp-device-timers_config

    grouping lsp-device-timers {
      description
        "TE LSP timers configuration";
      uses lsp-device-timers_config;
    }  // grouping lsp-device-timers

    grouping interfaces-grouping {
      description
        "Interface TE configuration data grouping";
      container interfaces {
        description
          "Configuration data model for TE interfaces.";
        uses te-all-attributes;

        list interface {
          key "interface";
          description "TE interfaces.";
          leaf interface {
            type if:interface-ref;
            description "TE interface name.";
          }

          uses te-attributes;
        }  // list interface
      }  // container interfaces
    }  // grouping interfaces-grouping

    grouping te-admin-groups_config {
      description
        "TE interface affinities grouping";
      choice admin-group-type {
        description
          "TE interface administrative groups
        representation type";
        choice value-admin-group-type {
          description
            "choice of admin-groups";
          case admin-groups {
            description
              "Administrative group/Resource
              class/Color.";
            leaf admin-group {
              type te-types:admin-group;
              description
                "TE interface administrative group";
            }
          }  // case admin-groups

          case extended-admin-groups {
            if-feature te-types:extended-admin-groups;
            description
              "Extended administrative group/Resource
              class/Color.";
            leaf extended-admin-group {
              type te-types:extended-admin-group;
              description
                "TE interface extended administrativei
                group";
            }
          }  // case extended-admin-groups
        }  // choice value-admin-group-type
        list named-admin-groups {
          if-feature te-types:extended-admin-groups;
          if-feature te-types:named-extended-admin-groups;
          key "named-admin-group";
          description
            "A list of named admin-group entries";
          leaf named-admin-group {
            type leafref {
              path
                "../../../../te:globals/"
                  + "te:named-admin-groups/te:named-admin-group/"
                  + "te:name";
            }
            description
              "A named admin-group entry";
          }
        }  // list named-admin-groups
      }  // choice admin-group-type
    }  // grouping te-admin-groups_config

    grouping te-srlgs_config {
      description
        "TE interface SRLG grouping";
      choice srlg-type {
        description
          "Choice of SRLG configuration";
        list values {
          key "value";
          description
            "List of SRLG values that
            this link is part of.";
          leaf value {
            type uint32 {
              range "0..4294967295";
            }
            description "Value of the SRLG";
          }
        }  // list values
        list named-srlgs {
          if-feature te-types:named-srlg-groups;
          key "named-srlg";
          description
            "A list of named SRLG entries";
          leaf named-srlg {
            type leafref {
              path
                "../../../../te:globals/"
                  + "te:named-srlgs/te:named-srlg/te:name";
            }
            description "A named SRLG entry";
          }
        }  // list named-srlgs
      }  // choice srlg-type
    }  // grouping te-srlgs_config

    grouping te-igp-flooding-bandwidth_config {
      description
        "Configurable items for igp flooding bandwidth
      threshold configuration.";
      leaf threshold-type {
        type enumeration {
          enum "DELTA" {
            value 0;
            description
              "DELTA indicates that the local
            system should flood IGP updates when a
            change in reserved bandwidth >= the specified
            delta occurs on the interface.";
          }
          enum "THRESHOLD_CROSSED" {
            value 1;
            description
              "THRESHOLD-CROSSED indicates that
            the local system should trigger an update (and
            hence flood) the reserved bandwidth when the
            reserved bandwidth changes such that it crosses,
            or becomes equal to one of the threshold values.";
          }
        }
        description
          "The type of threshold that should be used to specify the
        values at which bandwidth is flooded. DELTA indicates that
        the local system should flood IGP updates when a change in
        reserved bandwidth >= the specified delta occurs on the
        interface. Where THRESHOLD_CROSSED is specified, the local
        system should trigger an update (and hence flood) the
        reserved bandwidth when the reserved bandwidth changes such
        that it crosses, or becomes equal to one of the threshold
        values";
      }

      leaf delta-percentage {
        when "../threshold-type = 'DELTA'" {
          description
            "The percentage delta can only be specified when the
          threshold type is specified to be a percentage delta of
          the reserved bandwidth";
        }
        type te-types:percentage;
        description
          "The percentage of the maximum-reservable-bandwidth
        considered as the delta that results in an IGP update
        being flooded";
      }

      leaf threshold-specification {
        when
          "../threshold-type = 'THRESHOLD_CROSSED'" {
          description
            "The selection of whether mirrored or separate threshold
          values are to be used requires user specified thresholds to
          be set";
        }
        type enumeration {
          enum "MIRRORED_UP_DOWN" {
            value 0;
            description
              "MIRRORED_UP_DOWN indicates that a single set of
            threshold values should be used for both increasing
            and decreasing bandwidth when determining whether
            to trigger updated bandwidth values to be flooded
            in the IGP TE extensions.";
          }
          enum "SEPARATE_UP_DOWN" {
            value 1;
            description
              "SEPARATE_UP_DOWN indicates that a separate
            threshold values should be used for the increasing
            and decreasing bandwidth when determining whether
            to trigger updated bandwidth values to be flooded
            in the IGP TE extensions.";
          }
        }
        description
          "This value specifies whether a single set of threshold
        values should be used for both increasing and decreasing
        bandwidth when determining whether to trigger updated
        bandwidth values to be flooded in the IGP TE extensions.
        MIRRORED-UP-DOWN indicates that a single value (or set of
        values) should be used for both increasing and decreasing
        values, where SEPARATE-UP-DOWN specifies that the increasing
        and decreasing values will be separately specified";
      }

      leaf-list up-thresholds {
        when
          "../threshold-type = 'THRESHOLD_CROSSED'"
            + "and ../threshold-specification = 'SEPARATE_UP_DOWN'" {
          description
            "A list of up-thresholds can only be specified when the
            bandwidth update is triggered based on crossing a
            threshold and separate up and down thresholds are
            required";
        }
        type te-types:percentage;
        description
          "The thresholds (expressed as a percentage of the maximum
        reservable bandwidth) at which bandwidth updates are to be
        triggered when the bandwidth is increasing.";
      }

      leaf-list down-thresholds {
        when
          "../threshold-type = 'THRESHOLD_CROSSED'"
            + "and ../threshold-specification = 'SEPARATE_UP_DOWN'" {
          description
            "A list of down-thresholds can only be specified when the
            bandwidth update is triggered based on crossing a
            threshold and separate up and down thresholds are
            required";
        }
        type te-types:percentage;
        description
          "The thresholds (expressed as a percentage of the maximum
        reservable bandwidth) at which bandwidth updates are to be
        triggered when the bandwidth is decreasing.";
      }

      leaf-list up-down-thresholds {
        when
          "../threshold-type = 'THRESHOLD_CROSSED'"
            + "and ../threshold-specification = 'MIRRORED_UP_DOWN'" {
          description
            "A list of thresholds corresponding to both increasing
            and decreasing bandwidths can be specified only when an
            update is triggered based on crossing a threshold, and
            the same up and down thresholds are required.";
        }
        type te-types:percentage;
        description
          "The thresholds (expressed as a percentage of the maximum
        reservable bandwidth of the interface) at which bandwidth
        updates are flooded - used both when the bandwidth is
        increasing and decreasing";
      }
    }  // grouping te-igp-flooding-bandwidth_config

    grouping te-metric_config {
      description
        "Interface TE metric grouping";
      leaf te-metric {
        type te-types:te-metric;
        description "Interface TE metric.";
      }
    }  // grouping te-metric_config

    grouping te-switching-cap_config {
      description
        "TE interface switching capabilities";
      list switching-capabilities {
        key "switching-capability";
        description
          "List of interface capabilities for this interface";
        leaf switching-capability {
          type identityref {
            base te-types:switching-capabilities;
          }
          description
            "Switching Capability for this interface";
        }

        leaf encoding {
          type identityref {
            base te-types:lsp-encoding-types;
          }
          description
            "Encoding supported by this interface";
        }
      }  // list switching-capabilities
    }  // grouping te-switching-cap_config

    grouping te-advertisements_state {
      description
        "TE interface advertisements state grouping";
      container te-advertisements_state {
        description
          "TE interface advertisements state container";
        leaf flood-interval {
          type uint32;
          description
            "The periodic flooding interval";
        }

        leaf last-flooded-time {
          type uint32;
          units "seconds";
          description
            "Time elapsed since last flooding in seconds";
        }

        leaf next-flooded-time {
          type uint32;
          units "seconds";
          description
            "Time remained for next flooding in seconds";
        }

        leaf last-flooded-trigger {
          type enumeration {
            enum "link-up" {
              value 0;
              description
                "Link-up flooding trigger";
            }
            enum "link-down" {
              value 1;
              description
                "Link-up flooding trigger";
            }
            enum "threshold-up" {
              value 2;
              description
                "Bandwidth reservation up threshold";
            }
            enum "threshold-down" {
              value 3;
              description
                "Bandwidth reservation down threshold";
            }
            enum "bandwidth-change" {
              value 4;
              description
                "Banwidth capacity change";
            }
            enum "user-initiated" {
              value 5;
              description
                "Initiated by user";
            }
            enum "srlg-change" {
              value 6;
              description
                "SRLG property change";
            }
            enum "periodic-timer" {
              value 7;
              description
                "Periodic timer expired";
            }
          }
          description
            "Trigger for the last flood";
        }

        list advertized-level-areas {
          key "level-area";
          description
            "List of areas the TE interface is advertised
          in";
          leaf level-area {
            type uint32;
            description
              "The IGP area or level where the TE
            interface state is advertised in";
          }
        }  // list advertized-level-areas
      }  // container te-advertisements_state
    }  // grouping te-advertisements_state

    grouping te-attributes {
      description
        "TE attributes configuration grouping";
      uses te-metric_config;

      uses te-admin-groups_config;

      uses te-srlgs_config;

      uses te-igp-flooding-bandwidth_config;

      uses te-switching-cap_config;

      container state {
        config false;
        description
          "State parameters for interface TE metric";
        uses te-advertisements_state;
      }  // container state
    }  // grouping te-attributes

    grouping te-all-attributes {
      description
        "TE attributes configuration grouping for all
       interfaces";
      uses te-igp-flooding-bandwidth_config;
    }  // grouping te-all-attributes

    augment /te:te {
      description "TE global container.";
      uses interfaces-grouping;
    }

    augment /te:te/te:globals {
      description
        "Global TE device specific configuration parameters";
      uses lsp-device-timers;
    }

    augment /te:te/te:tunnels/te:tunnel {
      description
        "Tunnel device dependent augmentation";
      uses lsp-device-timers_config;
    }

    augment /te:te/te:tunnels/te:tunnel/te:state {
      description
        "Tunnel device dependent augmentation";
      uses lsp-device-timers_config;
    }

    augment /te:te/te:lsps-state/te:lsp {
      description
        "LSP device dependent augmentation";
      uses lsps-device_state;
    }

    augment /te:te/te:tunnels/te:tunnel/te:p2p-secondary-paths/te:p2p-secondary-path/te:state/te:lsps/te:lsp {
      description
        "LSP device dependent augmentation";
      uses lsps-device_state;
    }

    augment /te:te/te:tunnels/te:tunnel/te:p2p-primary-paths/te:p2p-primary-path/te:state/te:lsps/te:lsp {
      description
        "LSP device dependent augmentation";
      uses lsps-device_state;
    }

    rpc interfaces-rpc {
      description
        "Execution data for TE interfaces.";
    }  // rpc interfaces-rpc

    notification interfaces-notif {
      description
        "Notification messages for TE interfaces.";
    }  // notification interfaces-notif
  }  // module ietf-te-device