netconfcentral logo

ted@2014-10-27



  module ted {

    yang-version 1;

    namespace
      "urn:TBD:params:xml:ns:yang:network:ted";

    prefix ted;

    import ietf-inet-types {
      prefix inet;
    }

    organization "TBD";

    contact "TBD";

    description
      "Helper module to hold trafic engineering attributes for
     any topology on which trafic engineering is enabled.";

    revision "2014-10-27" {
      description "Initial revision";
      reference
        "RFC 4220: Traffic Engineering Link Management Information
        Base.
         RFC 6825: Traffic Engineering Database Management Information
        Base in Support of MPLS-TE/GMPLS.
         RFC 4802: Generalized Multiprotocol Label Switching (GMPLS)
        Traffic Engineering Management Information Base";

    }


    typedef switching-capabilities {
      type enumeration {
        enum "psc-1" {
          value 1;
          description
            "Packet-Switch Capable-1 (PSC-1)";
        }
        enum "evpl" {
          value 30;
          description
            "Ethernet Virtual Private Line (EVPL)";
        }
        enum "l2sc" {
          value 51;
          description
            "Layer-2 Switch Capable (L2SC)";
        }
        enum "tdm" {
          value 100;
          description
            "Time-Division-Multiplex Capable (TDM)";
        }
        enum "otn-tdm" {
          value 110;
          description "OTN-TDM Capable";
        }
        enum "lsc" {
          value 150;
          description
            "Lambda-Switch Capable (LSC)";
        }
        enum "fsc" {
          value 200;
          description
            "Fiber-Switch Capable (FSC)";
        }
      }
      description
        "Switching Capabilities of an interface.";
      reference
        "RFC 5307: IS-IS Extensions in Support of Generalized
        Multi-Protocol Label Switching (GMPLS).
         RFC 3812: Multiprotocol Label Switching (MPLS) Traffic
        Engineering (TE) Management Information Base (MIB).
         RFC 7074: Revised Definition of the GMPLS Switching Capability
        and Type Fields.
         RFC 7138: Traffic Engineering Extensions to OSPF
        for GMPLS Control of Evolving G.709 Optical Transport
        Networks.
         RFC 7139: GMPLS Signaling Extensions for Control of Evolving
        G.709 Optical Transport Networks.";

    }

    typedef encoding-type {
      type enumeration {
        enum "not-gmpls" {
          value 0;
          description "GMPLS is not in use";
        }
        enum "packet" {
          value 1;
          description "Packet";
        }
        enum "ethernet" {
          value 2;
          description "Ethernet";
        }
        enum "pdh" {
          value 3;
          description "PDH";
        }
        enum "sdh-sonet" {
          value 5;
          description "SDH or SONET";
        }
        enum "digital-wrapper" {
          value 7;
          description "Digital Wrapper";
        }
        enum "lambda" {
          value 8;
          description "Lambda";
        }
        enum "fiber" {
          value 9;
          description "Fiber";
        }
        enum "fiber-channel" {
          value 11;
          description "Fiber Channel";
        }
        enum "oduk" {
          value 12;
          description
            "G.709 OKUk (Digital Path)";
        }
        enum "optical-channel" {
          value 13;
          description
            "G.709 Optical Channel";
        }
      }
      description
        "Encoding type of an interface.";
      reference
        "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS)
        Signaling Functional Description.
         RFC 4328: Generalized Multi-Protocol Label Switching (GMPLS)
        Signaling Extensions for G.709 Optical Transport Networks
        Control.";

    }

    typedef pcc-capabilities {
      type bits {
        bit
          path-computation-with-gmpls-link-constraints {
          position 0;
          description "Link constraints";
        }
        bit bidirectional-path-computation {
          position 1;
          description "Bidirectional";
        }
        bit diverse-path-computation {
          position 2;
          description "Diverse";
        }
        bit load-balanced-path-computation {
          position 3;
          description "Load balanced";
        }
        bit synchronized-path-computation {
          position 4;
          description "Synchronized";
        }
        bit
          support-for-multiple-objective-functions {
          position 5;
          description
            "Multiple objective functions";
        }
        bit
          support-for-additive-path-constraints {
          position 6;
          description
            "Additive path constraints";
        }
        bit
          support-for-request-prioritization {
          position 7;
          description
            "Request prioritization";
        }
        bit
          support-for-multiple-requests-per-message {
          position 8;
          description
            "Multiple requests per message";
        }
      }
      description
        "Path Computation Capabilities.";
      reference
        "RFC 5088, draft-ietf-pce-disco-protoc-isis-07.txt
        OSPF/ISIS Protocol Extensions for Path Computation Element
        (PCE) Discovery.";

    }

    grouping ted-node-attributes {
      description
        "Identifier to uniquely identify a node in TED";
      reference
        "RFC 5305, RFC 6119: IPv6 Traffic Engineering in IS-IS/OSPF";

      leaf te-router-id-ipv4 {
        type inet:ipv4-address;
        description
          "Globally unique IPv4 Traffic Engineering Router ID.";
      }

      leaf te-router-id-ipv6 {
        type inet:ipv6-address;
        description
          "Globally unique IPv6 Traffic Engineering Router ID";
      }

      list ipv4-local-address {
        key "ipv4-prefix";
        description
          "List of IPv4 Local Address(OSPF). RFC 5786";
        leaf ipv4-prefix {
          type inet:ipv4-prefix;
          description
            "Local IPv4 address for the node";
        }
      }  // list ipv4-local-address

      list ipv6-local-address {
        key "ipv6-prefix";
        description
          "List of IPv6 Local Address.";
        reference
          "RFC 5786: Advertising a Router's Local Addresses
          in OSPF Traffic Engineering (TE) Extensions";

        leaf ipv6-prefix {
          type inet:ipv6-prefix;
          description
            "Local IPv6 address for the node";
        }

        leaf prefix-option {
          type uint8;
          description "IPv6 prefix option.";
        }
      }  // list ipv6-local-address

      leaf pcc-capabilities {
        type pcc-capabilities;
        description
          "OSPF/ISIS PCC capabilities";
      }
    }  // grouping ted-node-attributes

    grouping ted-link-attributes {
      description
        "TED Attributes associated with the link.";
      reference
        "RFC 3630, RFC 3784: IS-IS / OSPF Traffic Engineering (TE)";

      leaf link-index {
        type uint64;
        description
          "The link identifier.  If OSPF is used, this represents an
        ospfLsdbID.  If IS-IS is used, this represents an isisLSPID.
        If a locally configured link is used, this object represents
        an unique value, which is locally defined in a router.";
      }

      leaf information-source {
        type enumeration {
          enum "unknown" {
            value 0;
            description
              "The source is unknown";
          }
          enum "locally-configured" {
            value 1;
            description "Configured TE link";
          }
          enum "ospfv2" {
            value 2;
            description "OSPFv2";
          }
          enum "ospfv3" {
            value 3;
            description "OSPFv3";
          }
          enum "isis" {
            value 4;
            description "ISIS";
          }
          enum "other" {
            value 5;
            description "Other source";
          }
        }
        description
          "Indicates the source of the information about the link";
      }

      leaf credibility-preference {
        type uint16;
        description
          "The preference value to calculate the traffic engineering
        database credibility value used for tie-break selection
        between different information-source values.
        Higher value is more preferable.";
      }

      leaf admin-status {
        type enumeration {
          enum "up" {
            value 1;
            description "Enabled.";
          }
          enum "down" {
            value 2;
            description "Disabled.";
          }
          enum "testing" {
            value 3;
            description "In some test mode.";
          }
        }
        description
          "The desired state of the link.";
      }

      leaf oper-status {
        type enumeration {
          enum "up" {
            value 1;
            description "Operational up";
          }
          enum "down" {
            value 2;
            description "Operational down.";
          }
          enum "testing" {
            value 3;
            description "In some test mode";
          }
          enum "unknown" {
            value 4;
            description
              "Status cannot be determined for some reason.";
          }
        }
        description
          "The current operational state of the link.";
      }

      leaf area-id {
        type binary {
          length "1..13";
        }
        description
          "This object indicates the area identifier of the IGP.
        If OSPF is used to advertise LSA, this represents an
        ospfArea. If IS-IS is used, this represents an area address.
        Otherwise, this is zero.";
      }

      leaf color {
        type uint32;
        description
          "Administrative group or color of the link";
      }

      leaf max-link-bandwidth {
        type decimal64 {
          fraction-digits 2;
        }
        description
          "Maximum bandwidth that can be see on this link in this
        direction. Units in bytes per second";
      }

      leaf max-resv-link-bandwidth {
        type decimal64 {
          fraction-digits 2;
        }
        description
          "Maximum amount of bandwidth that can be reserved in this
         direction in this link. Units in bytes per second";
      }

      list unreserved-bandwidth {
        key "priority";
        max-elements 8;
        description
          "Unreserved bandwidth for 0-7 priority levels. Units in
        bytes per second";
        leaf priority {
          type uint8 {
            range "0..7";
          }
          description "Priority";
        }

        leaf bandwidth {
          type decimal64 {
            fraction-digits 2;
          }
          description
            "Unreserved bandwidth for this level";
        }
      }  // list unreserved-bandwidth

      leaf te-default-metric {
        type uint32;
        description
          "Traffic Engineering Metric";
      }

      leaf link-protection-type {
        type enumeration {
          enum "unprotected" {
            value 0;
            description "unprotected";
          }
          enum "extra-traffic" {
            value 1;
            description "Extra traffic";
          }
          enum "shared" {
            value 2;
            description "Shared";
          }
          enum "1-for-1" {
            value 3;
            description
              "One for one protection";
          }
          enum "1-plus-1" {
            value 4;
            description
              "One plus one protection";
          }
          enum "enhanced" {
            value 5;
            description
              "Enhanced protection";
          }
        }
        description
          "Link Protection Type desired for this link";
      }

      list interface-switching-capabilities {
        key "switching-capability";
        description
          "List of interface capabilities for this interface";
        leaf switching-capability {
          type switching-capabilities;
          description
            "Switching Capability for this interface";
        }

        leaf encoding {
          type encoding-type;
          description
            "Encoding supported by this interface";
        }

        list max-lsp-bandwidth {
          key "priority";
          max-elements 8;
          description
            "Maximum LSP Bandwidth at priorities 0-7";
          leaf priority {
            type uint8 {
              range "0..7";
            }
            description "Priority";
          }

          leaf bandwidth {
            type decimal64 {
              fraction-digits 2;
            }
            description
              "Max LSP Bandwidth for this level";
          }
        }  // list max-lsp-bandwidth

        container packet-switch-capable {
          when
            "../switching-capability = PSC-1  or "
              + "../switching-capability = PSC-2 or "
              + "../switching-capability = PSC-3 or "
              + "../switching-capability = PSC-4" {
            description "Valid only for PSC";
          }
          description
            "Interface has packet-switching capabilities";
          leaf minimum-lsp-bandwidth {
            type decimal64 {
              fraction-digits 2;
            }
            description
              "Minimum LSP Bandwidth. Units in bytes per second";
          }

          leaf interface-mtu {
            type uint16;
            description "Interface MTU";
          }
        }  // container packet-switch-capable

        container time-division-multiplex-capable {
          when
            "../switching-capability = TDM" {
            description "Valid only for TDM";
          }
          description
            "Interface has time-division multiplex capabilities";
          leaf minimum-lsp-bandwidth {
            type decimal64 {
              fraction-digits 2;
            }
            description
              "Minimum LSP Bandwidth. Units in bytes per second";
          }

          leaf indication {
            type enumeration {
              enum "standard" {
                value 0;
                description
                  "Indicates support of standard SONET/SDH";
              }
              enum "arbitrary" {
                value 1;
                description
                  "Indicates support of arbitrary SONET/SDH";
              }
            }
            description
              "Indication whether the interface supports Standard or
             Arbitrary SONET/SDH";
          }
        }  // container time-division-multiplex-capable
      }  // list interface-switching-capabilities

      container srlg {
        description
          "Shared Risk Link Group Attributes";
        uses srlg-attributes;
      }  // container srlg
    }  // grouping ted-link-attributes

    grouping srlg-attributes {
      description
        "Shared Risk Link Group Attributes";
      reference
        "RFC 5307, RFC 4203: ISIS / OSPF Extensions in Support of
        Generalized Multi-Protocol Label Switching (GMPLS)";

      list srlg-values {
        key "srlg-value";
        description
          "List of Shared Risk Link Group this interface belongs to.";
        leaf srlg-value {
          type uint32;
          description
            "Shared Risk Link Group value";
        }
      }  // list srlg-values
    }  // grouping srlg-attributes
  }  // module ted