netconfcentral logo

ietf-eth-tran-service@2019-11-03



  module ietf-eth-tran-service {

    yang-version 1.1;

    namespace
      "urn:ietf:params:xml:ns:yang:ietf-eth-tran-service";

    prefix ethtsvc;

    import ietf-yang-types {
      prefix yang;
      reference
        "RFC 6991 - Common YANG Data Types";


    }
    import ietf-te-types {
      prefix te-types;
      reference
        "RFC YYYY - Traffic Engineering Common YANG Types";


    }
    import ietf-eth-tran-types {
      prefix etht-types;
      reference
        "RFC XXXX - A YANG Data Model for Transport
        Network Client Signals";


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


    }
    import ietf-te {
      prefix te;
      reference
        "RFC YYYY - A YANG Data Model for Traffic
        Engineering Tunnels and Interfaces";


    }

    organization
      "Internet Engineering Task Force (IETF) CCAMP WG";

    contact
      "
      WG List: <mailto:ccamp@ietf.org>

      ID-draft editor:
        Haomian Zheng (zhenghaomian@huawei.com);
        Italo Busi (italo.busi@huawei.com);
        Aihua Guo (aihuaguo.ietf@gmail.com);
        Anton Snitser (antons@sedonasys.com);0
        Francesco Lazzeri (francesco.lazzeri@ericsson.com);
        Yunbin Xu (xuyunbin@caict.ac.cn);
        Yang Zhao (zhaoyangyjy@chinamobile.com);
        Xufeng Liu (xufeng.liu.ietf@gmail.com);
        Giuseppe Fioccola (giuseppe.fioccola@huawei.com);
    ";

    description
      "This module defines a YANG data model for describing
     the Ethernet services. 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 "2019-11-03" {
      description
        "version -01 as an WG document";
      reference
        "draft-ietf-ccamp-client-signal-yang";

    }


    grouping vlan-classification {
      description
        "A grouping which represents classification
      on an 802.1Q VLAN tag.";
      leaf tag-type {
        type etht-types:eth-tag-classify;
        description
          "The tag type used for VLAN classification.";
      }

      choice individual-bundling-vlan {
        description
          "VLAN based classification can be individual
         or bundling.";
        leaf vlan-value {
          type etht-types:vlanid;
          description "VLAN ID value.";
        }
        leaf vlan-range {
          type etht-types:vid-range-type;
          description
            "List of VLAN ID values.";
        }
      }  // choice individual-bundling-vlan
    }  // grouping vlan-classification

    grouping vlan-write {
      description
        "A grouping which represents push/pop operations
       of an 802.1Q VLAN tag.";
      leaf tag-type {
        type etht-types:eth-tag-type;
        description
          "The VLAN tag type to push/swap.";
      }

      leaf vlan-value {
        type etht-types:vlanid;
        description
          "The VLAN ID value to push/swap.";
      }

      leaf default-pcp {
        type uint8 {
          range "0..7";
        }
        description
          "The default Priority Code Point (PCP) value to push/swap";
      }
    }  // grouping vlan-write

    grouping vlan-operations {
      description
        "A grouping which represents VLAN operations.";
      leaf pop-tags {
        type uint8 {
          range "1..2";
        }
        description
          "The number of VLAN tags to pop (or swap if used in
         conjunction with push-tags)";
      }

      container push-tags {
        description
          "The VLAN tags to push (or swap if used in
         conjunction with pop-tags)";
        container outer-tag {
          presence
            "Indicates existence of the outermost VLAN tag to
           push/swap";
          description
            "The outermost VLAN tag to push/swap.";
          uses vlan-write;
        }  // container outer-tag

        container second-tag {
          must
            '../outer-tag/tag-type = "etht-types:s-vlan-tag-type" and '
              + 'tag-type = "etht-types:c-vlan-tag-type"' {
            error-message
              "
              When pushing/swapping two tags, the outermost tag must
              be specified and of S-VLAN type and the second
              outermost tag must be of C-VLAN tag type.
            ";
            description
              "
              For IEEE 802.1Q interoperability, when pushing/swapping
              two tags, it is required that the outermost tag exists
              and is an S-VLAN, and the second outermost tag is a
              C-VLAN.
            ";
          }
          presence
            "Indicates existence of a second outermost VLAN tag to
           push/swap";
          description
            "The second outermost VLAN tag to push/swap.";
          uses vlan-write;
        }  // container second-tag
      }  // container push-tags
    }  // grouping vlan-operations

    grouping named-or-value-bandwidth-profile {
      description
        "A grouping to configure a bandwdith profile either by
       referencing a named bandwidth profile or by
       configuring the values of the bandwidth profile attributes.";
      choice style {
        description
          "Whether the bandwidth profile is named or defined by value";
        case named {
          description
            "Named bandwidth profile.";
          leaf bandwidth-profile-name {
            type string;
            description
              "Name of the bandwidth profile.";
          }
        }  // case named

        case value {
          description
            "Bandwidth profile configured by value.";
          uses etht-types:etht-bandwidth-profiles;
        }  // case value
      }  // choice style
    }  // grouping named-or-value-bandwidth-profile

    grouping bandwidth-profiles {
      description
        "A grouping which represent bandwidth profile configuration.";
      choice direction {
        description
          "Whether the bandwidth profiles are symmetrical or
         asymmetrical";
        case symmetrical {
          description
            "The same bandwidth profile is used to describe both
           the ingress and the egress bandwidth profile.";
          container ingress-egress-bandwidth-profile {
            description
              "The bandwdith profile used in both directions.";
            uses named-or-value-bandwidth-profile;
          }  // container ingress-egress-bandwidth-profile
        }  // case symmetrical

        case asymmetrical {
          description
            "Ingress and egress bandwidth profiles can be specified.";
          container ingress-bandwidth-profile {
            description
              "The bandwdith profile used in the ingress direction.";
            uses named-or-value-bandwidth-profile;
          }  // container ingress-bandwidth-profile

          container egress-bandwidth-profile {
            description
              "The bandwdith profile used in the egress direction.";
            uses named-or-value-bandwidth-profile;
          }  // container egress-bandwidth-profile
        }  // case asymmetrical
      }  // choice direction
    }  // grouping bandwidth-profiles

    grouping etht-svc-access-parameters {
      description
        "ETH services access parameters";
      leaf access-node-id {
        type te-types:te-node-id;
        description
          "The identifier of the access node in
         the ETH topology.";
      }

      leaf access-ltp-id {
        type te-types:te-tp-id;
        description
          "The TE link termination point identifier, used
         together with access-node-id to identify the
         access LTP.";
      }

      leaf access-role {
        type identityref {
          base etht-types:access-role;
        }
        description
          "Indicate the role of access, e.g., working or protection. ";
      }

      container pm-config {
        description
          "This grouping is used to set the threshold value for
      performance monitoring. ";
        uses pm-config-grouping;
      }  // container pm-config

      container state {
        config false;
        description
          "The state is used to monitor the status of service. ";
        leaf operational-state {
          type identityref {
            base te-types:tunnel-state-type;
          }
          description
            "Indicating the operational state of client signal. ";
        }

        leaf provisioning-state {
          type identityref {
            base te-types:lsp-state-type;
          }
          description
            "Indicating the provisional state of client signal,
        especially when there is a change, i.e., revise, create. ";
        }
      }  // container state

      leaf performance {
        type identityref {
          base etht-types:performance;
        }
        config false;
        description
          "Performance Monitoring for the service. ";
      }
    }  // grouping etht-svc-access-parameters

    grouping etht-svc-tunnel-parameters {
      description
        "ETH services tunnel parameters.";
      choice technology {
        description
          "Service multiplexing is optional and flexible.";
        list eth-tunnels {
          key "name";
          description
            "ETH Tunnel list in native Ethernet scenario.";
          uses tunnels-grouping;
        }  // list eth-tunnels
        list otn-tunnels {
          key "name";
          description
            "OTN Tunnel list in Frame-based scenario.";
          uses tunnels-grouping;
        }  // list otn-tunnels
        container pw {
          description
            "Pseudowire information for Ethernet over MPLS-TP.";
          uses pw-segment-grouping;
        }  // container pw
      }  // choice technology

      leaf src-split-horizon-group {
        type string;
        description
          "Identify a split horizon group at the Tunnel source TTP";
      }

      leaf dst-split-horizon-group {
        type string;
        description
          "Identify a split horizon group at the Tunnel destination TTP";
      }
    }  // grouping etht-svc-tunnel-parameters

    grouping etht-svc-pm-threshold-config {
      description
        "Configuraiton parameters for Ethernet service PM thresholds.";
      leaf sending-rate-high {
        type uint64;
        description
          "High threshold of packet sending rate in kbps.";
      }

      leaf sending-rate-low {
        type uint64;
        description
          "Low threshold of packet sending rate in kbps.";
      }

      leaf receiving-rate-high {
        type uint64;
        description
          "High threshold of packet receiving rate in kbps.";
      }

      leaf receiving-rate-low {
        type uint64;
        description
          "Low threshold of packet receiving rate in kbps.";
      }
    }  // grouping etht-svc-pm-threshold-config

    grouping etht-svc-pm-stats {
      description
        "Ethernet service PM statistics.";
      leaf sending-rate-too-high {
        type uint32;
        description
          "Counter that indicates the number of times the sending
        rate is above the high threshold";
      }

      leaf sending-rate-too-low {
        type uint32;
        description
          "Counter that indicates the number of times the sending
        rate is below the low threshold";
      }

      leaf receiving-rate-too-high {
        type uint32;
        description
          "Counter that indicates the number of times the receiving
        rate is above the high threshold";
      }

      leaf receiving-rate-too-low {
        type uint32;
        description
          "Counter that indicates the number of times the receiving
        rate is below the low threshold";
      }
    }  // grouping etht-svc-pm-stats

    grouping etht-svc-instance-config {
      description
        "Configuraiton parameters for Ethernet services.";
      leaf etht-svc-name {
        type string;
        description
          "Name of the ETH service.";
      }

      leaf etht-svc-title {
        type string;
        description
          "The Identifier of the ETH service.";
      }

      leaf etht-svc-descr {
        type string;
        description
          "Description of the ETH service.";
      }

      leaf etht-svc-customer {
        type string;
        description
          "Customer of the ETH service.";
      }

      leaf etht-svc-type {
        type etht-types:service-type;
        description
          "Type of ETH service (p2p, mp2mp or rmp).";
      }

      leaf etht-svc-lifecycle {
        type etht-types:lifecycle-status;
        description
          "Lifecycle state of ETH service.";
      }

      uses te-types:te-topology-identifier;

      uses resilience-grouping;

      list etht-svc-end-points {
        key "etht-svc-end-point-name";
        description
          "The logical end point for the ETH service. ";
        uses etht-svc-end-point-grouping;
      }  // list etht-svc-end-points

      container underlay {
        description
          "The unterlay tunnel information that
        carrying the ETH service. ";
        uses etht-svc-tunnel-parameters;
      }  // container underlay

      leaf admin-status {
        type identityref {
          base te-types:tunnel-admin-state-type;
        }
        default
          'tunnel-admin-state-up';
        description
          "ETH service administrative state.";
      }
    }  // grouping etht-svc-instance-config

    grouping etht-svc-instance-state {
      description
        "State parameters for Ethernet services.";
      leaf operational-state {
        type identityref {
          base te-types:tunnel-state-type;
        }
        default 'tunnel-state-up';
        description
          "ETH service operational state.";
      }

      leaf provisioning-state {
        type identityref {
          base te-types:lsp-state-type;
        }
        description
          "ETH service provisioning state.";
      }

      leaf creation-time {
        type yang:date-and-time;
        description
          "Time of ETH service creation.";
      }

      leaf last-updated-time {
        type yang:date-and-time;
        description
          "Time of ETH service last update.";
      }
    }  // grouping etht-svc-instance-state

    container etht-svc {
      description "ETH services.";
      container globals {
        description
          "Globals Ethernet configuration data container";
        list named-bandwidth-profiles {
          key "bandwidth-profile-name";
          description
            "List of named bandwidth profiles used by
           Ethernet services.";
          leaf bandwidth-profile-name {
            type string;
            description
              "Name of the bandwidth profile.";
          }

          uses etht-types:etht-bandwidth-profiles;
        }  // list named-bandwidth-profiles
      }  // container globals

      list etht-svc-instances {
        key "etht-svc-name";
        description
          "The list of p2p ETH service instances";
        uses etht-svc-instance-config;

        container state {
          config false;
          description
            "Ethernet Service states.";
          uses etht-svc-instance-state;
        }  // container state
      }  // list etht-svc-instances
    }  // container etht-svc

    grouping resilience-grouping {
      description
        "Grouping for resilience configuration. ";
      container resilience {
        description
          "To configure the data plane protection parameters,
      currently a placeholder only, future candidate attributes
      include, Revert, WTR, Hold-off Timer, ...";
        uses te:protection-restoration-properties;
      }  // container resilience
    }  // grouping resilience-grouping

    grouping etht-svc-end-point-grouping {
      description
        "Grouping for the end point configuration.";
      leaf etht-svc-end-point-name {
        type string;
        description
          "The name of the logical end point of ETH service. ";
      }

      leaf etht-svc-end-point-id {
        type string;
        description
          "The identifier of the logical end point of ETH service.";
      }

      leaf etht-svc-end-point-descr {
        type string;
        description
          "The description of the logical end point of ETH service. ";
      }

      leaf topology-role {
        type identityref {
          base etht-types:topology-role;
        }
        description
          "Indicating the underlay topology role,
      e.g., hub,spoke, any-to-any ";
      }

      container resilience {
        description
          "Placeholder for resilience configuration, for future study. ";
      }  // container resilience

      list etht-svc-access-points {
        key "access-point-id";
        min-elements 1;
        description
          "List of the ETH trasport services access point instances.";
        leaf access-point-id {
          type string;
          description
            "ID of the service access point instance";
        }

        uses etht-svc-access-parameters;
      }  // list etht-svc-access-points

      leaf service-classification-type {
        type identityref {
          base etht-types:service-classification-type;
        }
        description
          "Service classification type.";
      }

      choice service-classification {
        description
          "Access classification can be port-based or
         VLAN based.";
        case port-classification {
        }  // case port-classification

        case vlan-classification {
          container outer-tag {
            presence
              "The outermost VLAN tag exists";
            description
              "Classifies traffic using the outermost VLAN tag.";
            uses vlan-classification;
          }  // container outer-tag

          container second-tag {
            must
              '../outer-tag/tag-type = "etht-types:classify-s-vlan" and '
                + 'tag-type = "etht-types:classify-c-vlan"' {
              error-message
                "
                When matching two tags, the outermost tag must be
                specified and of S-VLAN type and the second
                outermost tag must be of C-VLAN tag type.
              ";
              description
                "
                For IEEE 802.1Q interoperability, when matching two
                tags, it is required that the outermost tag exists
                and is an S-VLAN, and the second outermost tag is a
                C-VLAN.
              ";
            }
            presence
              "The second outermost VLAN tag exists";
            description
              "Classifies traffic using the second outermost VLAN tag.";
            uses vlan-classification;
          }  // container second-tag
        }  // case vlan-classification
      }  // choice service-classification

      leaf split-horizon-group {
        type string;
        description
          "Identify a split horizon group";
      }

      uses bandwidth-profiles;

      container vlan-operations {
        description
          "Configuration of VLAN operations.";
        choice direction {
          description
            "Whether the VLAN operations are symmetrical or
           asymmetrical";
          container symmetrical-operation {
            description
              "Symmetrical operations.
               Expressed in the ingress direction, but
               the reverse operation is applied to egress traffic";
            uses vlan-operations;
          }  // container symmetrical-operation
          container asymmetrical-operation {
            description
              "Asymmetrical operations";
            container ingress {
              description
                "Ingress operations";
              uses vlan-operations;
            }  // container ingress

            container egress {
              description
                "Egress operations";
              uses vlan-operations;
            }  // container egress
          }  // container asymmetrical-operation
        }  // choice direction
      }  // container vlan-operations
    }  // grouping etht-svc-end-point-grouping

    grouping pm-config-grouping {
      description
        "Grouping used for Performance Monitoring Configuration. ";
      leaf pm-enable {
        type boolean;
        description
          "Whether to enable the performance monitoring.";
      }

      leaf sending-rate-high {
        type uint64;
        description
          "The upperbound of sending rate.";
      }

      leaf sending-rate-low {
        type uint64;
        description
          "The lowerbound of sending rate.";
      }

      leaf receiving-rate-high {
        type uint64;
        description
          "The upperbound of receiving rate.";
      }

      leaf receiving-rate-low {
        type uint64;
        description
          "The lowerbound of receiving rate.";
      }
    }  // grouping pm-config-grouping

    grouping pw-segment-grouping {
      description
        "Grouping used for PW configuration. ";
      leaf pw-id {
        type string;
        description
          "The Identifier information of pseudowire. ";
      }

      leaf pw-name {
        type string;
        description
          "The name information of pseudowire.";
      }

      leaf transmit-label {
        type rt-types:mpls-label;
        description
          "Transmit label information in PW. ";
      }

      leaf receive-label {
        type rt-types:mpls-label;
        description
          "Receive label information in PW. ";
      }

      leaf encapsulation-type {
        type identityref {
          base etht-types:encapsulation-type;
        }
        description
          "The encapsulation type, raw or tag. ";
      }

      leaf oper-status {
        type identityref {
          base te-types:tunnel-state-type;
        }
        config false;
        description
          "The operational state of the PW segment. ";
      }

      container ingress-bandwidth-profile {
        description
          "Bandwidth Profile for ingress. ";
        uses pw-segment-named-or-value-bandwidth-profile;
      }  // container ingress-bandwidth-profile

      list pw-paths {
        key "path-id";
        description "A list of pw paths. ";
        leaf path-id {
          type uint8;
          description
            "The identifier of pw paths. ";
        }

        list tp-tunnels {
          key "name";
          description
            "Names of TP Tunnel underlay";
          leaf name {
            type string;
            description
              "Names of TP Tunnel underlay";
          }
        }  // list tp-tunnels
      }  // list pw-paths
    }  // grouping pw-segment-grouping

    grouping pw-segment-named-or-value-bandwidth-profile {
      description
        "A grouping to configure a bandwdith profile either by
       referencing a named bandwidth profile or by
       configuring the values of the bandwidth profile attributes.";
      choice style {
        description
          "Whether the bandwidth profile is named or defined by value";
        case named {
          description
            "Named bandwidth profile.";
          leaf bandwidth-profile-name {
            type leafref {
              path
                "/ethtsvc:etht-svc/ethtsvc:globals/"
                  + "ethtsvc:named-bandwidth-profiles/"
                  + "ethtsvc:bandwidth-profile-name";
            }
            description
              "Name of the bandwidth profile.";
          }
        }  // case named

        case value {
          description
            "Bandwidth profile configured by value.";
          uses etht-types:pw-segement-bandwidth-profile-grouping;
        }  // case value
      }  // choice style
    }  // grouping pw-segment-named-or-value-bandwidth-profile

    grouping tunnels-grouping {
      description "A group of tunnels. ";
      leaf name {
        type leafref {
          path
            "/te:te/te:tunnels/te:tunnel/te:name";
          require-instance false;
        }
        description "Dependency tunnel name";
      }

      leaf encoding {
        type identityref {
          base te-types:lsp-encoding-types;
        }
        description "LSP encoding type";
        reference
          "RFC3945";

      }

      leaf switching-type {
        type identityref {
          base te-types:switching-capabilities;
        }
        description "LSP switching type";
        reference
          "RFC3945";

      }
    }  // grouping tunnels-grouping
  }  // module ietf-eth-tran-service