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";

    }


    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.";
          }

          leaf bandwidth-profile-type {
            type etht-types:bandwidth-profile-type;
            description
              "The type of bandwidth profile.";
          }

          leaf CIR {
            type uint64;
            description
              "Committed Information Rate in Kbps";
          }

          leaf CBS {
            type uint64;
            description
              "Committed Burst Size in in KBytes";
          }

          leaf EIR {
            type uint64;
            description
              "Excess Information Rate in Kbps
In case of RFC 2698, PIR = CIR + EIR";
          }

          leaf EBS {
            type uint64;
            description
              "Excess Burst Size in KBytes.
 In case of RFC 2698, PBS = CBS + EBS";
          }

          leaf color-aware {
            type boolean;
            description
              "Indicates weather the color-mode is
color-aware or color-blind.";
          }

          leaf coupling-flag {
            type boolean;
            description "Coupling Flag.";
          }
        }  // list named-bandwidth-profiles
      }  // container globals

      list etht-svc-instances {
        key "etht-svc-name";
        description
          "The list of p2p ETH service instances";
        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.";
        }

        container te-topology-identifier {
          description
            "TE topology identifier container.";
          leaf provider-id {
            type te-global-id;
            default "0";
            description
              "An identifier to uniquely identify a provider.
If omitted, it assumes that the topology provider ID
value = 0 (the default).";
          }

          leaf client-id {
            type te-global-id;
            default "0";
            description
              "An identifier to uniquely identify a client.
If omitted, it assumes that the topology client ID
value = 0 (the default).";
          }

          leaf topology-id {
            type te-topology-id;
            default "";
            description
              "When the datastore contains several topologies,
'topology-id' distinguishes between them.  If omitted,
the default (empty) string for this leaf is assumed.";
          }
        }  // container te-topology-identifier

        container resilience {
          description
            "To configure the data plane protection parameters,
currently a placeholder only, future candidate attributes
include, Revert, WTR, Hold-off Timer, ...";
          container protection {
            description
              "Protection parameters.";
            leaf enable {
              type boolean;
              default "false";
              description
                "A flag to specify if LSP protection is enabled.";
              reference
                "RFC4427";

            }

            leaf protection-type {
              type identityref {
                base te-types:lsp-protection-type;
              }
              default
                "te-types:lsp-protection-unprotected";
              description
                "LSP protection type.";
            }

            leaf protection-reversion-disable {
              type boolean;
              default "false";
              description
                "Disable protection reversion to working path.";
            }

            leaf hold-off-time {
              type uint32;
              units "milli-seconds";
              default "0";
              description
                "The time between the declaration of an SF or SD condition
and the initialization of the protection switching
algorithm.";
              reference
                "RFC4427";

            }

            leaf wait-to-revert {
              type uint16;
              units "seconds";
              description
                "Time to wait before attempting LSP reversion.";
              reference
                "RFC4427";

            }

            leaf aps-signal-id {
              type uint8 {
                range "1..255";
              }
              default "1";
              description
                "The APS signal number used to reference the traffic of this
tunnel. The default value for normal traffic is 1.
The default value for extra-traffic is 255. If not specified,
non-default values can be assigned by the server,
if and only if, the server controls both endpoints.";
              reference
                "RFC4427";

            }
          }  // container protection

          container restoration {
            description
              "Restoration parameters.";
            leaf enable {
              type boolean;
              default "false";
              description
                "A flag to specify if LSP restoration is enabled.";
              reference
                "RFC4427";

            }

            leaf restoration-type {
              type identityref {
                base te-types:lsp-restoration-type;
              }
              default
                "te-types:lsp-restoration-restore-any";
              description
                "LSP restoration type.";
            }

            leaf restoration-scheme {
              type identityref {
                base te-types:restoration-scheme-type;
              }
              default
                "te-types:restoration-scheme-preconfigured";
              description
                "LSP restoration scheme.";
            }

            leaf restoration-reversion-disable {
              type boolean;
              default "false";
              description
                "Disable restoration reversion to working path.";
            }

            leaf hold-off-time {
              type uint32;
              units "milli-seconds";
              description
                "The time between the declaration of an SF or SD condition
and the initialization of the protection switching
algorithm.";
              reference
                "RFC4427";

            }

            leaf wait-to-restore {
              type uint16;
              units "seconds";
              description
                "Time to wait before attempting LSP restoration.";
              reference
                "RFC4427";

            }

            leaf wait-to-revert {
              type uint16;
              units "seconds";
              description
                "Time to wait before attempting LSP reversion.";
              reference
                "RFC4427";

            }
          }  // container restoration
        }  // container resilience

        list etht-svc-end-points {
          key "etht-svc-end-point-name";
          description
            "The logical end point for the ETH service. ";
          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";
            }

            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. ";
              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.";
              }
            }  // 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. ";
            }
          }  // 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.";
                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
              }  // 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.";
                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
              }  // container second-tag
            }  // case vlan-classification
          }  // choice service-classification

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

          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.";
                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.";
                    leaf bandwidth-profile-type {
                      type etht-types:bandwidth-profile-type;
                      description
                        "The type of bandwidth profile.";
                    }

                    leaf CIR {
                      type uint64;
                      description
                        "Committed Information Rate in Kbps";
                    }

                    leaf CBS {
                      type uint64;
                      description
                        "Committed Burst Size in in KBytes";
                    }

                    leaf EIR {
                      type uint64;
                      description
                        "Excess Information Rate in Kbps
In case of RFC 2698, PIR = CIR + EIR";
                    }

                    leaf EBS {
                      type uint64;
                      description
                        "Excess Burst Size in KBytes.
 In case of RFC 2698, PBS = CBS + EBS";
                    }

                    leaf color-aware {
                      type boolean;
                      description
                        "Indicates weather the color-mode is
color-aware or color-blind.";
                    }

                    leaf coupling-flag {
                      type boolean;
                      description
                        "Coupling Flag.";
                    }
                  }  // case value
                }  // choice style
              }  // 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.";
                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.";
                    leaf bandwidth-profile-type {
                      type etht-types:bandwidth-profile-type;
                      description
                        "The type of bandwidth profile.";
                    }

                    leaf CIR {
                      type uint64;
                      description
                        "Committed Information Rate in Kbps";
                    }

                    leaf CBS {
                      type uint64;
                      description
                        "Committed Burst Size in in KBytes";
                    }

                    leaf EIR {
                      type uint64;
                      description
                        "Excess Information Rate in Kbps
In case of RFC 2698, PIR = CIR + EIR";
                    }

                    leaf EBS {
                      type uint64;
                      description
                        "Excess Burst Size in KBytes.
 In case of RFC 2698, PBS = CBS + EBS";
                    }

                    leaf color-aware {
                      type boolean;
                      description
                        "Indicates weather the color-mode is
color-aware or color-blind.";
                    }

                    leaf coupling-flag {
                      type boolean;
                      description
                        "Coupling Flag.";
                    }
                  }  // case value
                }  // choice style
              }  // container ingress-bandwidth-profile

              container egress-bandwidth-profile {
                description
                  "The bandwdith profile used in the egress direction.";
                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.";
                    leaf bandwidth-profile-type {
                      type etht-types:bandwidth-profile-type;
                      description
                        "The type of bandwidth profile.";
                    }

                    leaf CIR {
                      type uint64;
                      description
                        "Committed Information Rate in Kbps";
                    }

                    leaf CBS {
                      type uint64;
                      description
                        "Committed Burst Size in in KBytes";
                    }

                    leaf EIR {
                      type uint64;
                      description
                        "Excess Information Rate in Kbps
In case of RFC 2698, PIR = CIR + EIR";
                    }

                    leaf EBS {
                      type uint64;
                      description
                        "Excess Burst Size in KBytes.
 In case of RFC 2698, PBS = CBS + EBS";
                    }

                    leaf color-aware {
                      type boolean;
                      description
                        "Indicates weather the color-mode is
color-aware or color-blind.";
                    }

                    leaf coupling-flag {
                      type boolean;
                      description
                        "Coupling Flag.";
                    }
                  }  // case value
                }  // choice style
              }  // container egress-bandwidth-profile
            }  // case asymmetrical
          }  // choice direction

          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";
                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.";
                    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";
                    }
                  }  // 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.";
                    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";
                    }
                  }  // container second-tag
                }  // container push-tags
              }  // container symmetrical-operation
              container asymmetrical-operation {
                description
                  "Asymmetrical operations";
                container ingress {
                  description
                    "Ingress 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.";
                      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";
                      }
                    }  // 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.";
                      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";
                      }
                    }  // container second-tag
                  }  // container push-tags
                }  // container ingress

                container egress {
                  description
                    "Egress 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.";
                      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";
                      }
                    }  // 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.";
                      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";
                      }
                    }  // container second-tag
                  }  // container push-tags
                }  // container egress
              }  // container asymmetrical-operation
            }  // choice direction
          }  // container vlan-operations
        }  // list etht-svc-end-points

        container underlay {
          description
            "The unterlay tunnel information that
carrying the ETH service. ";
          choice technology {
            description
              "Service multiplexing is optional and flexible.";
            list eth-tunnels {
              key "name";
              description
                "ETH Tunnel list in native Ethernet scenario.";
              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";

              }
            }  // list eth-tunnels
            list otn-tunnels {
              key "name";
              description
                "OTN Tunnel list in Frame-based scenario.";
              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";

              }
            }  // list otn-tunnels
            container pw {
              description
                "Pseudowire information for Ethernet over MPLS-TP.";
              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. ";
                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.";
                    leaf bandwidth-profile-type {
                      type etht-types:bandwidth-profile-type;
                      description
                        "The type of bandwidth profile.";
                    }

                    leaf CIR {
                      type uint64;
                      description
                        "Committed Information Rate in Kbps";
                    }

                    leaf CBS {
                      type uint64;
                      description
                        "Committed Burst Size in in KBytes";
                    }

                    leaf EIR {
                      type uint64;
                      description
                        "Excess Information Rate in Kbps
In case of RFC 2698, PIR = CIR + EIR";
                    }

                    leaf EBS {
                      type uint64;
                      description
                        "Excess Burst Size in KBytes.
 In case of RFC 2698, PBS = CBS + EBS";
                    }
                  }  // case value
                }  // choice style
              }  // 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
            }  // 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";
          }
        }  // container underlay

        leaf admin-status {
          type identityref {
            base te-types:tunnel-admin-state-type;
          }
          default
            "te-types:tunnel-admin-state-up";
          description
            "ETH service administrative state.";
        }

        container state {
          config false;
          description
            "Ethernet Service states.";
          leaf operational-state {
            type identityref {
              base te-types:tunnel-state-type;
            }
            default
              "te-types: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.";
          }
        }  // container state
      }  // list etht-svc-instances
    }  // container etht-svc
  }  // module ietf-eth-tran-service