netconfcentral logo

ietf-te-device@2020-07-12



  module ietf-te-device {

    yang-version 1.1;

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

    prefix te-dev;

    import ietf-te {
      prefix te;
      reference
        "draft-ietf-teas-yang-te: A YANG Data Model for Traffic
        Engineering Tunnels and Interfaces";


    }
    import ietf-te-types {
      prefix te-types;
      reference
        "RFC8776: Common YANG Data Types for Traffic Engineering.";


    }
    import ietf-interfaces {
      prefix if;
      reference
        "RFC8343: A YANG Data Model for Interface Management";


    }
    import ietf-routing-types {
      prefix rt-types;
      reference
        "RFC8294: Common YANG Data Types for the Routing Area";


    }

    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>

Editor:   Tarek Saad
	  <mailto:tsaad@juniper.net>

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.ietf@gmail.com>

Editor:   Igor Bryskin
	  <mailto:i_bryskin@yahoo.com>";

    description
      "YANG data module for TE device configurations,
state, and RPCs. The model fully conforms to the
Network Management Datastore Architecture (NMDA).

Copyright (c) 2019 IETF Trust and the persons
identified as authors of the code.  All rights reserved.

Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see
the RFC itself for full legal notices.";

    revision "2020-07-12" {
      description
        "Latest update to TE device YANG module.";
      reference
        "RFCXXXX: A YANG Data Model for Traffic Engineering Tunnels
        and Interfaces";

    }


    grouping lsps-device-info {
      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 "TE LSP life time.";
        }

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

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

      container downstream-info {
        when "../te:origin-type != 'egress'" {
          description
            "Downstream information of the LSP.";
        }
        description
          "downstream information.";
        leaf nhop {
          type te-types:te-tp-id;
          description
            "downstream nexthop address.";
        }

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

        container neighbor {
          description
            "downstream neighbor address.";
          uses te:te-generic-node-id;
        }  // container neighbor

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

      container upstream-info {
        when
          "../te:origin-type != 'ingress'" {
          description
            "Upstream information of the LSP.";
        }
        description "upstream information.";
        leaf phop {
          type te-types:te-tp-id;
          description
            "upstream nexthop or previous-hop address.";
        }

        container neighbor {
          description
            "upstream neighbor address.";
          uses te:te-generic-node-id;
        }  // container neighbor

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

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

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

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

    grouping interfaces-grouping {
      description
        "TE interface 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 administrative 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 rt-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 rt-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 rt-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 rt-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
        "TE interface metric grouping.";
      leaf te-metric {
        type te-types:te-metric;
        description "TE interface 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-down 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
                "Bandwidth 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.";
            }
          }
          default "periodic-timer";
          description
            "Trigger for the last flood.";
        }

        list advertised-level-areas {
          key "level-area";
          description
            "List of level-areas that the TE interface is advertised
in.";
          leaf level-area {
            type uint32;
            description
              "The IGP area or level where the TE interface link state
is advertised in.";
          }
        }  // list advertised-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;

      container performance-thresholds {
        description
          "Performance parameters configurable thresholds.";
      }  // container performance-thresholds
    }

    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.";
      leaf path-invalidation-action {
        type identityref {
          base te-types:path-invalidation-action-type;
        }
        description
          "Tunnel path invalidation action.";
      }

      uses lsp-device-timers;
    }

    augment /te:te/te:lsps/te:lsp {
      description
        "TE LSP device dependent augmentation.";
      uses lsps-device-info;
    }

    rpc link-state-update {
      description
        "Triggers a link state update for the specific interface.";
      input {
        choice filter-type {
          mandatory true;
          description "Filter choice.";
          leaf all {
            type empty;
            mandatory true;
            description
              "Match all TE interfaces.";
          }
          leaf interface {
            type if:interface-ref;
            description
              "Match a specific TE interface.";
          }
        }  // choice filter-type
      }
    }  // rpc link-state-update
  }  // module ietf-te-device