<?xml version="1.0" encoding="US-ASCII"?>
<!-- edited with XMLSPY v5 rel. 3 U (http://www.xmlspy.com)
     by Daniel M Kohn (private) -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC3775 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3775.xml">
<!ENTITY RFC4225 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4225.xml">
<!ENTITY RFC4866 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4866.xml">
<!ENTITY RFC5213 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5213.xml">
<!-- added by sjjeong: -->
<!ENTITY I-D.ietf-netlmm-pmip6-ipv4-support PUBLIC "" "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netlmm-pmip6-ipv4-support.xml">
<!ENTITY I-D.ietf-netlmm-grekey-option PUBLIC "" "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netlmm-grekey-option.xml">
]>
<rfc category="std" docName="draft-wd-teas-transport-slice-yang-02"
     ipr="trust200902">
  <?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

  <?rfc toc="yes" ?>

  <?rfc symrefs="yes" ?>

  <?rfc sortrefs="yes"?>

  <?rfc iprnotified="no" ?>

  <?rfc strict="yes" ?>

  <front>
    <title abbrev="Transport Slice YANG model">A Yang Data Model for Transport
    Slice NBI</title>

    <author fullname="Bo Wu" initials="B." surname="Wu">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street>101 Software Avenue, Yuhua District</street>

          <city>Nanjing</city>

          <region>Jiangsu</region>

          <code>210012</code>

          <country>China</country>
        </postal>

        <email>lana.wubo@huawei.com</email>
      </address>
    </author>

    <author fullname="Dhruv Dhody" initials="D." surname="Dhody">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street>Divyashree Techno Park</street>

          <city>Bangalore</city>

          <region>Karnataka</region>

          <code>560066</code>

          <country>India</country>
        </postal>

        <email>dhruv.ietf@gmail.com</email>
      </address>
    </author>

    <author fullname="Liuyan Han" initials="L." surname="Han">
      <organization>China Mobile</organization>

      <address>
        <email>hanliuyan@chinamobile.com</email>
      </address>
    </author>

    <author fullname="Reza Rokui" initials="R." surname="Rokui">
      <organization>Nokia Canada</organization>

      <address>
        <email>reza.rokui@nokia.com</email>
      </address>
    </author>

    <date year="2020"/>

    <area>Routing Area</area>

    <workgroup/>

    <abstract>
      <t>This document provides a YANG data model for the Transport Slice NBI.
      The model can be used by a higher level system which is the Transport
      slice consumer of a Transport Slice Controller (TSC) to request,
      configure, and manage the components of a transport slices.</t>

      <t>The YANG modules in this document conforms to the Network Management
      Datastore Architecture (NMDA) defined in RFC 8342.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>This document provides a YANG <xref target="RFC7950"/> data model for
      the transport Slice NBI.</t>

      <t>The YANG model discussed in this document is defined based on the
      description of the transport slice in <xref
      target="I-D.nsdt-teas-transport-slice-definition"/> and <xref
      target="I-D.nsdt-teas-ns-framework"/>, which is used to operate
      customer-driven Transport Slice during the Transport Slice
      instantiation, and the operations includes modification, deletion, and
      monitoring.</t>

      <t>The YANG model discussed in this document describes the requirements
      of a Transport Slice that interconnects a set of Transport Slice
      Endpoints from the point of view of the consumer, which is classified as
      Customer Service Model in <xref target="RFC8309"/>.</t>

      <t>It will be up to the management system or TSC (Transport Slice
      controller) to take this model as an input and use other management
      system or specific configuration models to configure the different
      network elements to deliver a Transport Slice. The YANG models can be
      used with network management protocols such as NETCONF <xref
      target="RFC6241"/> or RESTCONF <xref target="RFC8040"/>. How the
      configuration of network elements is done is out of scope for this
      document.</t>

      <t>The Transport Slice operational state is included in the same tree as
      the configuration consistent with Network Management Datastore
      Architecture <xref target="RFC8342"/>.</t>
    </section>

    <section title="Conventions used in this document">
      <t>The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
      "OPTIONAL" in this document are to be interpreted as described in BCP14,
      <xref target="RFC2119"/>, <xref target="RFC8174"/> when, and only when,
      they appear in all capitals, as shown here.</t>

      <t>The following terms are defined in <xref target="RFC6241"/> and are
      used in this specification: <list style="symbols">
          <t>client</t>

          <t>configuration data</t>

          <t>state data</t>
        </list></t>

      <t>This document also makes use of the following terminology introduced
      in the YANG 1.1 Data Modeling Language <xref target="RFC7950"/>: <list
          style="symbols">
          <t>augment</t>

          <t>data model</t>

          <t>data node</t>
        </list></t>

      <t>This document also makes use of the following terminology introduced
      in the Transport Slice definition draft <xref
      target="I-D.nsdt-teas-transport-slice-definition"/>:</t>

      <t><list style="symbols">
          <t>Transport Slice: A transport slice is a logical network topology
          connecting a number of endpoints and a set of shared or dedicated
          network resources, which are used to satisfy specific Service Level
          Objectives (SLO). The definition is from Section 3 of<xref
          target="I-D.nsdt-teas-transport-slice-definition"> </xref>.</t>

          <t>Transport Slice Endpoint (TSE): A Transport Slice Endpoint is a
          logical identifier at an external interface of Transport Network to
          identify the logical access to which, a particular subset of traffic
          traversing the external interface, is mapped to a specific TS and it
          follows the definition of TSE (Transport Slice Endpoint) in Section
          4.2 of <xref
          target="I-D.nsdt-teas-transport-slice-definition"/>.</t>

          <t>SLO: An SLO is a service level objective</t>

          <t>DAN: Device,Application,Network Function</t>

          <t>TSC: Transport Slice Controller</t>

          <t>NBI: NorthBound Interface</t>
        </list></t>

      <t>In addition, this document defines the following terminology: <list
          style="symbols">
          <t>Transport Slice Member (TS-Member): A TS member is an abstract
          entity which represents the transport resources mapped to a
          particular connection between a pair of TSEs belonging to a
          Transport slice. Note that different SLO requirement per-TS-Member
          could be applied.</t>

          <t>TS-SLO-Group: Indicates a group of TS-members with same SLOs in
          one transport slice.</t>
        </list></t>

      <section anchor="tree-diagrams" title="Tree Diagrams">
        <t>Tree diagrams used in this document follow the notation defined in
        <xref target="RFC8340"/>.</t>
      </section>
    </section>

    <section title="Transport Slice NBI Model Usage">
      <t>The intention of the transport slice NBI model is to allow the
      consumer, e.g. A higher level management system, to request and monitor
      transport slices. In particular, the model allows consumers to operate
      in an abstract, technology-agnostic manner, with implementation details
      hidden.</t>

      <t>In the use case of 5G transport application, the E2E network slice
      orchestrator acts as the higher layer system to request the transport
      slices. The interface is used to support dynamic transport slice
      creation and its lifecycle management to facilitate end-to-end network
      slice services.</t>

      <figure title="Figure 1 Transport Slice NBI Model Context ">
        <artwork><![CDATA[          +----------------------------------------+
          |   Transport Slice Consumer             |
          |                                        |
          +----------------+-----------------------+
                           |
                           | Transport Slice NBI YANG
                           |
                           |
     +---------------------+--------------------------+
     |        Transport Slice Controller              |
     +------------------------------------------------+]]></artwork>
      </figure>

      <t/>
    </section>

    <section title="Transport Slice NBI Model Overview">
      <t>From a consumer perspective, an example of a transport slice is shown
      in figure 2.</t>

      <figure>
        <artwork><![CDATA[                       Transport Network
  DAN1         +---------------------------------+       DAN3
+--------+     |                                 |    +--------+
|        /--\  |                                 |  /--\       |
|       |TSE1+-+                                 +-+TSE3|      |
+--------\--/  |                                 |  \--/       |
               |                                 |    |        |
+--------+     |                                      |        |
|        /--\  |                                 |  /--\       |
|       |TSE2+-+                                 +-+TSE4|      |
|        \--/  |                                 |  \--/       |
+--------+     |                                 |    +--------+
  DAN2         +---------------------------------+
         |                                            |
         |                                            |
         |<------------Transport Slice 1------------->|

Legend:DAN (Device,Application,Network Function)

        TS-SLO-Group Red                  TS-SLO-Group Blue
      TS-Member 2     TSE1-TSE3          TS-Member 1     TSE1-TSE2
      TS-Member 3     TSE1-TSE4
      TS-Member 4     TSE2-TSE3
      TS-Member 5     TSE2-TSE4

 Figure 2: An example of TSEs and TS-Members of a transport slice ]]></artwork>
      </figure>

      <t>As shown in figure 2, a Transport Slice (TS) links together TSEs at
      external Interfaces to the DANs, which are customer endpoints that
      request a transport slice. At each customer DAN, one or multiple TSEs
      could be connected to the Transport Slice.</t>

      <t>A TS is a connectivity service with specific SLO characteristics,
      including bandwidth, QoS metric, etc. The connectivity service is a
      combination of logical connections, represented by TS-members. When some
      parts of a slice have different SLO requirements, a group of TS-Members
      with the same SLO is described by TS-SLO-Group.</t>

      <t>Based on this design, the Transport Slice YANG module consists of the
      main containers: "transport-slice", "ts-endpoint", "ts-member",and
      "ts-slo-group".</t>

      <t>The figure below describes the overall structure of the YANG
      module:</t>

      <figure>
        <artwork><![CDATA[module: ietf-transport-slice
  +--rw transport-slices
     +--rw slice-templates
     |  +--rw slice-template* [id]
     |     +--rw id                      string
     |     +--rw template-description?   string
     +--rw transport-slice* [ts-id]
        +--rw ts-id           uint32
        +--rw ts-name?        string
        +--rw ts-topology*    identityref
        +--rw ts-slo-group* [slo-group-name]
        |  +--rw slo-group-name          string
        |  +--rw default-slo-group?      boolean
        |  +--rw slo-tag?                string
        |  +--rw (slo-template)?
        |  |  +--:(standard)
        |  |  |  +--rw template?         leafref
        |  |  +--:(custom)
        |  |     +--rw ts-slo-policy
        |  |        +--rw latency
        |  |        |  +--rw one-way-latency?   uint32
        |  |        |  +--rw two-way-latency?   uint32
        |  |        +--rw jitter
        |  |        |  +--rw one-way-jitter?   uint32
        |  |        |  +--rw two-way-jitter?   uint32
        |  |        +--rw loss
        |  |        |  +--rw one-way-loss?   decimal64
        |  |        |  +--rw two-way-loss?   decimal64
        |  |        +--rw availability-type?   identityref
        |  |        +--rw isolation-type?      identityref
        |  +--rw ts-member-group* [ts-member-id]
        |  |  +--rw ts-member-id    leafref
        |  +--ro slo-group-monitoring
        |     +--ro latency?   uint32
        |     +--ro jitter?    uint32
        |     +--ro loss?      decimal64
        +--rw status
        |  +--rw admin-enabled?   boolean
        |  +--ro oper-status?     operational-type
        +--rw ts-endpoint* [ep-id]
        |  +--rw ep-id                 uint32
        |  +--rw ep-name?              string
        |  +--rw ep-role*              identityref
        |  +--rw geolocation
        |  |  +--rw altitude?    int64
        |  |  +--rw latitude?    decimal64
        |  |  +--rw longitude?   decimal64
        |  +--rw node-id?              string
        |  +--rw port-id?                string
        |  +--rw ts-filter-criteria
        |  |  +--rw ts-filter-criteria* [match-type]
        |  |     +--rw match-type    identityref
        |  |     +--rw value?        string
        |  +--rw bandwidth
        |  |  +--rw incoming-bandwidth
        |  |  |  +--rw guaranteed-bandwidth?   te-types:te-bandwidth
        |  |  +--rw outgoing-bandwidth
        |  |     +--rw guaranteed-bandwidth?   te-types:te-bandwidth
        |  +--rw mtu                   uint16
        |  +--rw protocol
        |  |  +--rw bgp
        |  |  |  +--rw bgp-peer-ipv4*   inet:ipv4-prefix
        |  |  |  +--rw bgp-peer-ipv6*   inet:ipv6-prefix
        |  |  +--rw static
        |  |     +--rw static-route-ipv4*   inet:ipv4-prefix
        |  |     +--rw static-route-ipv6*   inet:ipv6-prefix
        |  +--rw status
        |  |  +--rw admin-enabled?   boolean
        |  |  +--ro oper-status?     operational-type
        |  +--ro ep-monitoring
        |     +--ro incoming-utilized-bandwidth?
        |     |       te-types:te-bandwidth
        |     +--ro incoming-bw-utilization        decimal64
        |     +--ro outgoing-utilized-bandwidth?
        |     |       te-types:te-bandwidth
        |     +--ro outgoing-bw-utilization        decimal64
        +--rw ts-member* [ts-member-id]
           +--rw ts-member-id            uint32
           +--rw src
           |  +--rw src-ts-ep-id?   leafref
           +--rw dest
           |  +--rw dest-ts-ep-id?   leafref
           +--rw monitoring-type?        ts-monitoring-type
           +--ro ts-member-monitoring
              +--ro latency?   uint32
              +--ro jitter?    uint32
              +--ro loss?      decimal64

]]></artwork>
      </figure>
    </section>

    <section title="Transport Slice NBI Model Description">
      <t>A Transport Slice consists of a group of interconnected TSEs, and the
      connections between TSEs may have different SLO requirements, including
      symmetrical or asymmetrical traffic throughput, different traffic delay,
      etc.</t>

      <t/>

      <section title="Transport Slice Connection Pattern">
        <t>A Transport Slice can be point-to-point (P2P), point-to-multipoint
        (P2MP), multipoint-to-point (MP2P), or multipoint-to-multipoint
        (MP2MP) based on the consumer's traffic pattern requirements.</t>

        <t>Therefore, the "ts-topology" under the node "transport-slice" is
        required for configuration. The model supports any-to-any, Hub and
        Spoke (where Hubs can exchange traffic), and the different
        combinations. New topologies could be added via augmentation. By
        default, the any-to-any topology is used.</t>

        <t>In addition, "ep-role" under the node "ts-endpoint" also needs to
        be defined, which specifies the role of the TSE in a particular TS
        topology. In the any-to-any topology, all TSEs MUST have the same
        role, which will be "any-to-any-role". In the Hub-and-Spoke topology,
        TSEs MUST have a Hub role or a Spoke role.</t>
      </section>

      <section title="Transport Slice EndPoint (TSE)">
        <t>A TSE belong to a single Transport Slice. A TS involves two or more
        TSEs.</t>

        <t>A TSE is used to define the limit on the user traffic that can be
        injected to a TS. For example, in some scenarios, the access traffic
        of a DAN is allowed only when it matches the logical Layer 2
        connection identifier. In some scenarios, the access traffic of a DAN
        is allowed only when the traffic matches a source IP address.
        Sometimes, the traffic from a distinct physical connection of a DAN is
        allowed.</t>

        <t>Therefore, to ensure that the TSE is uniquely identified, the model
        use the following parameters including &ldquo;node-id&rdquo;,
        &ldquo;port-id&rdquo; and &ldquo;ts-filter-criteria". The "node-id"
        identifies a DAN node, the "tp-id" identifies a port, and the
        "ts-filter-criteria" identifies a possible logical L2 ID or IP address
        or other possible traffic identifier in the user traffic.</t>

        <t>Additionally, a number of slice interconnection parameters need to
        be agreed with a customer DAN and the transport network, such as IP
        address (v4 or v6) etc.</t>
      </section>

      <section title="Transport Slice SLO">
        <t>As defined in <xref
        target="I-D.nsdt-teas-transport-slice-definition"/></t>

        <t>This model defines the minimum Transport Slice SLO attributes, and
        other SLO nodes can be augmented as needed. TS SLO assurance is
        implemented through the following mechanisms:</t>

        <t><list style="symbols">
            <t>TS SLO list: Which defines the performance objectives of the
            TS. Performance objectives can be specified for various
            performance metrics,and different objectives are as follows:<list
                style="hanging">
                <t>Latency: Indicates the maximum latency between two TSE. The
                unit is micro seconds. The latency could be round trip times
                or one-way metrics.</t>

                <t>Jitter: Indicates the jitter constraint of the slice
                maximum permissible delay variation, and is measured by the
                difference in the one- way delay between sequential packets in
                a flow.</t>

                <t>Loss: Indicates maximum permissible packet loss rate, which
                is defined by the ratio of packets dropped to packets
                transmitted between two endpoints.</t>

                <t>Availability: Is defined as the ratio of up-time to
                total_time(up-time+down-time), where up-time is the time the
                transport slice is available in accordance with the SLOs
                associated with it.</t>

                <t>Isolation: Whether the isolation needs to be explicitly
                requested is still in discussion.</t>
              </list></t>

            <t>Bandwidth: Indicates the guaranteed minimum bandwidth between
            any two TSE. The unit is data rate per second. And the bandwidth
            is unidirectional. The bandwidth is specified at each TSE and can
            be applied to incoming TS traffic or outgoing TS traffic. When
            applied in the incoming direction, the Bandwidth is applicable to
            the traffic from the TSE to the Transport Network that passes
            through the external interface. When Bandwidth is applied to the
            outgoing direction, it is applied to the traffic from the TN to
            the TSE of that particular TS.</t>
          </list></t>

        <t>Note: About the definition of SLO parameters, the author is
        discussing to reuse the TE-Types grouping definition as much as
        possible, to avoid duplication of definitions.</t>

        <t>Consumers' Tranport Slices can be very different, e.g. some slices
        has the same SLO requirements of connections, some slices has the
        different SLO requirements for different parts of the slice. In some
        slices, the bandwidth of one endpoint is different from that of other
        endpoints, for example, one is central endpoint, the other endpoints
        are access endpoints.</t>

        <t>The list "ts-slo-group" defines a group of different SLOs, which
        are used to describe that different parts of the slice have different
        SLOs. The specific SLO of the slice SLO group may use a standard SLO
        template, or may use different customized parameters. A group of
        "ts-member" is used to describe which connections of the slice use the
        SLO.</t>

        <t>For some simplest Transport Slices, only one category SLO of
        "ts-slo-group" needs to be defined. For some complicated slices, in
        addition to the configurations above, multiple "ts-slo-group" needs to
        be defined, and "ts-member-group" under the "ts-slo-group" or
        "slo-group" under the "ts-member" describe details of the
        per-connection SLO.</t>

        <t>In addition to SLO performance objectives, there are also some
        other TS objectives, such as MTU and security which can be augmented
        when needed. MTU specifies the maximum packet length that the slice
        guarantee to be able to carry across.</t>

        <t>Note: In some use cases, the number of connections represented by
        "ts-member-group" may be huge, which may lead to configuration issues,
        for example, the scalability or error-prone.</t>
      </section>
    </section>

    <section title="Transport Slice Monitoring ">
      <t>This model also describes performance status of a transport slice.
      The statistics are described in the following granularity:<list
          style="symbols">
          <t>Per TS SLO group: specified in 'ts-member-group-monitoring' under
          the "ts-slo-groupr"</t>

          <t>Per TS connection: specified in 'ts-member-monitoring' under the
          "ts-member"</t>

          <t>Per TS Endpoint: specified in 'ep-monitoring' under the
          "ts-endpoint"</t>
        </list></t>

      <t/>

      <t>This model does not define monitoring enabling methods. The mechanism
      defined in <xref target="RFC8640"/> and <xref target="RFC8641"/> can be
      used for either periodic or on-demand subscription.</t>

      <t>By specifying subtree filters or xpath filters to 'ts-member' or
      'endpoint' ,so that only interested contents will be sent. These
      mechanisms can be used for monitoring the transport slice performance
      status so that the client management system could initiate modification
      based on the transport slice running status.</t>

      <t/>
    </section>

    <section title="Transport Slice NBI Model Usage Example">
      <t>TBD</t>
    </section>

    <section title="Transport Slice NBI Module">
      <t>&lt;CODE BEGINS&gt; file "ietf-transport-slice@2020-07-12.yang"</t>

      <figure>
        <artwork><![CDATA[module ietf-transport-slice {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-transport-slice";
  prefix ts;

  import ietf-inet-types {
    prefix inet;
  }
  import ietf-te-types {
    prefix te-types;
  }

  organization
    "IETF Traffic Engineering Architecture and Signaling (TEAS)
     Working Group";
  contact
    "WG Web:  <https://tools.ietf.org/wg/teas/>
     WG List:  <mailto:teas@ietf.org>
     Editor: Bo Wu <lana.wubo@huawei.com>
           : Dhruv Dhody <dhruv.ietf@gmail.com>";
  description
    "This module contains a YANG module for the Transport Slice NBI.

     Copyright (c) 2020 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
     (http://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
      "initial version.";
    reference
      "RFC XXXX: A Yang Data Model for Transport Slice NBI Operation";
  }

  /* Features */
  /* Identities */

  identity ts-topology {
    description
      "Base identity for Transport Slice topology.";
  }

  identity any-to-any {
    base ts-topology;
    description
      "Identity for any-to-any Transport Slice topology.";
  }

  identity hub-spoke {
    base ts-topology;
    description
      "Identity for Hub-and-Spoke Transport Slice topology.";
  }

  identity ep-role {
    description
      "TSE Role in a Transport Slice topology ";
  }

  identity any-to-any-role {
    base ep-role;
    description
      "TSE as the any-to-any role in an any-to-any Transport Slice.";
  }

  identity hub {
    base ep-role;
    description
      "TSE as the hub role in a Hub-and-Spoke Transport Slice.";
  }

  identity spoke {
    base ep-role;
    description
      "TSE as the spoke role in a Hub-and-Spoke transport slice.";
  }

  identity isolation-type {
    description
      "Base identity from which specific isolation types are derived.";
  }

  identity physical-isolation {
    base isolation-type;
    description
      "physical isolation.";
  }

  identity logical-isolation {
    base isolation-type;
    description
      "logical-isolation.";
  }

  identity ts-slo-metric-type {
    description
      "Base identity for TS SLO metric type";
  }

  identity ts-match-type {
    description
      "Base identity for TS metric type";
  }

  identity ts-vlan-match {
    base ts-match-type;
    description
      "logical-isolation.";
  }

  /*
   * Identity for availability-type
   */

  identity availability-type {
    description
      "Base identity from which specific map types are derived.";
  }

  identity level-1 {
    base availability-type;
    description
      "level 1: 99.9999%";
  }

  identity level-2 {
    base availability-type;
    description
      "level 2: 99.999%";
  }

  identity level-3 {
    base availability-type;
    description
      "level 3: 99.99%";
  }

  identity level-4 {
    base availability-type;
    description
      "level 4: 99.9%";
  }

  identity level-5 {
    base availability-type;
    description
      "level 5: 99%";
  }

  /* typedef */

  typedef operational-type {
    type enumeration {
      enum up {
        value 0;
        description
          "Operational status UP.";
      }
      enum down {
        value 1;
        description
          "Operational status DOWN";
      }
      enum unknown {
        value 2;
        description
          "Operational status UNKNOWN";
      }
    }
    description
      "This is a read-only attribute used to determine the
       status of a particular element";
  }

  typedef ts-monitoring-type {
    type enumeration {
      enum one-way {
        description
          "represents one-way monitoring type";
      }
      enum two-way {
        description
          "represents two-way monitoring type";
      }
    }
    description
      "enumerated type of monitoring on a ts-member ";
  }

  /* Groupings */

  grouping status-params {
    description
      "Grouping used to join operational and administrative status";
    container status {
      description
        "Container for status of administration and operational";
      leaf admin-enabled {
        type boolean;
        description
          "Administrative Status UP/DOWN";
      }
      leaf oper-status {
        type operational-type;
        config false;
        description
          "Operations status";
      }
    }
  }

  grouping ts-filter-criteria {
    description
      "Grouping for TS filter definition.";
    container ts-filter-criteria {
      description
        "Describes TS filter criteria.";
      list ts-filter-criteria {
        key "match-type";
        description
          "List of TS traffic criteria";
        leaf match-type {
          type identityref {
            base ts-match-type;
          }
          description
            "Identifies an entry in the list of match-type for the TS.";
        }
        leaf value {
          type string;
          description
            "Describes TS filter criteria,e.g. IP address, VLAN, etc.";
        }
      }
    }
  }

  grouping routing-protocols {
    description
      "Grouping for endpoint protocols definition.";
    container protocol {
      description
        "Describes protocol between TSE and transport network edge device.";
      container bgp {
        description
          "BGP-specific configuration.";
        leaf-list bgp-peer-ipv4 {
          type inet:ipv4-prefix;
          description
            "BGP peer ipv4 address.";
        }
        leaf-list bgp-peer-ipv6 {
          type inet:ipv6-prefix;
          description
            "BGP peer ipv6 address.";
        }
      }
      container static {
        description
          "Only applies when protocol is static.";
        leaf-list static-route-ipv4 {
          type inet:ipv4-prefix;
          description
            "ipv4 static route";
        }
        leaf-list static-route-ipv6 {
          type inet:ipv6-prefix;
          description
            "ipv6 static route";
        }
      }
    }
  }

  grouping ep-monitoring-parameters {
    description
      "Grouping for ep-monitoring-parameters.";
    container ep-monitoring {
      config false;
      description
        "Container for ep-monitoring-parameters.";
      leaf incoming-utilized-bandwidth {
        type te-types:te-bandwidth;
        description
          "Bandwidth utilization that represents the actual
           utilization of the incoming endpoint.";
      }
      leaf incoming-bw-utilization {
        type decimal64 {
          fraction-digits 5;
          range "0..100";
        }
        units "percent";
        mandatory true;
        description
          "To be used to define the bandwidth utilization
           as a percentage of the available bandwidth.";
      }
      leaf outgoing-utilized-bandwidth {
        type te-types:te-bandwidth;
        description
          "Bandwidth utilization that represents the actual
           utilization of the incoming endpoint.";
      }
      leaf outgoing-bw-utilization {
        type decimal64 {
          fraction-digits 5;
          range "0..100";
        }
        units "percent";
        mandatory true;
        description
          "To be used to define the bandwidth utilization
           as a percentage of the available bandwidth.";
      }
    }
  }

  grouping common-monitoring-parameters {
    description
      "Grouping for link-monitoring-parameters.";
    leaf latency {
      type uint32;
      units "usec";
      description
        "The latency statistics per TS member.";
    }
    leaf jitter {
      type uint32 {
        range "0..16777215";
      }
      description
        "The jitter statistics per TS member.";
    }
    leaf loss {
      type decimal64 {
        fraction-digits 6;
        range "0 .. 50.331642";
      }
      description
        "Packet loss as a percentage of the total traffic
         sent over a configurable interval. The finest precision is
         0.000003%. where the maximum 50.331642%.";
      reference
        "RFC 7810, section-4.4";
    }
  }

  grouping geolocation-container {
    description
      "A grouping containing a GPS location.";
    container geolocation {
      description
        "A container containing a GPS location.";
      leaf altitude {
        type int64;
        units "millimeter";
        description
          "Distance above the sea level.";
      }
      leaf latitude {
        type decimal64 {
          fraction-digits 8;
          range "-90..90";
        }
        description
          "Relative position north or south on the Earth's surface.";
      }
      leaf longitude {
        type decimal64 {
          fraction-digits 8;
          range "-180..180";
        }
        description
          "Angular distance east or west on the Earth's surface.";
      }
    }
    // gps-location
  }

  // geolocation-container

  grouping endpoint {
    description
      "Transport Slice endpoint related information";
    leaf ep-id {
      type uint32;
      description
        "unique identifier for the referred Transport Slice endpoint";
    }
    leaf ep-name {
      type string;
      description
        "ep name";
    }
    leaf-list ep-role {
      type identityref {
        base ep-role;
      }
      default "any-to-any-role";
      description
        "Role of the endpoint in the Transport Slice.";
    }
    uses geolocation-container;
    leaf node-id {
      type string;
      description
        "Uniquely identifies an edge customer node.";
    }
    leaf port-id {
      type string;
      description
        "Reference to the Port-id of the customer node.";
    }
    uses ts-filter-criteria;
    container bandwidth {
      container incoming-bandwidth {
        leaf guaranteed-bandwidth {
          type te-types:te-bandwidth;
          description
            "If guaranteed-bandwidth is 0, it means best effort, no
             minimum throughput is guaranteed.";
        }
        description
          "Container for the incoming bandwidth policy";
      }
      container outgoing-bandwidth {
        leaf guaranteed-bandwidth {
          type te-types:te-bandwidth;
          description
            "If guaranteed-bandwidth is 0, it means best effort, no
             minimum throughput is guaranteed.";
        }
        description
          "Container for the bandwidth policy";
      }
      description
        "Container for the bandwidth policy";
    }
    leaf mtu {
      type uint16;
      units "bytes";
      mandatory true;
      description
        "MTU of TS traffic. If the traffic type is IP,
         it refers to the IP MTU. If the traffic type is Ethertype,
         will refer to the Ethernet MTU. ";
    }
    uses routing-protocols;
    uses status-params;
    uses ep-monitoring-parameters;
  }

  //ts-ep

  grouping ts-member {
    description
      "ts-member is described by this container";
    leaf ts-member-id {
      type uint32;
      description
        "ts-member identifier";
    }
    container src {
      description
        "the source of TS link";
      leaf src-ts-ep-id {
        type leafref {
          path "/transport-slices/transport-slice/ts-endpoint/ep-id";
        }
        description
          "reference to source TS endpoint";
      }
    }
    container dest {
      description
        "the destination of TS link ";
      leaf dest-ts-ep-id {
        type leafref {
          path "/transport-slices/transport-slice/ts-endpoint/ep-id";
        }
        description
          "reference to dest TS endpoint";
      }
    }
    leaf monitoring-type {
      type ts-monitoring-type;
      description
        "One way or two way monitoring type.";
    }
    container ts-member-monitoring {
      config false;
      description
        "SLO status Per ts endpoint to endpoint ";
      uses common-monitoring-parameters;
    }
  }

  //ts-member

  grouping transport-slice-slo-group {
    description
      "Grouping for SLO definition of TS";
    list ts-slo-group {
      key "slo-group-name";
      description
        "List of TS SLO groups, the SLO group is used to
         support different SLO objectives between different ts-members
         in the same slice.";
      leaf slo-group-name {
        type string;
        description
          "Identifies an entry in the list of SLO group for the TS.";
      }
      leaf default-slo-group {
        type boolean;
        default "false";
        description
          "Is the SLO group is selected as the default-slo-group";
      }
      leaf slo-tag {
        type string;
        description
          "slo tag for operational management";
      }
      choice slo-template {
        description
          "Choice for SLO template.
           Can be standard template or customized template.";
        case standard {
          description
            "Standard SLO template.";
          leaf template {
            type leafref {
              path "/transport-slices/slice-templates/slice-template/id";
            }
            description
              "QoS template to be used.";
          }
        }
        case custom {
          description
            "Customized SLO template.";
          container ts-slo-policy {
            container latency {
              leaf one-way-latency {
                type uint32 {
                  range "0..16777215";
                }
                units "usec";
                description
                  "Lowest latency in micro seconds.";
              }
              leaf two-way-latency {
                type uint32 {
                  range "0..16777215";
                }
                description
                  "Lowest-way delay or latency in micro seconds.";
              }
              description
                "Latency constraint on the traffic class.";
            }
            container jitter {
              leaf one-way-jitter {
                type uint32 {
                  range "0..16777215";
                }
                description
                  "lowest latency in micro seconds.";
              }
              leaf two-way-jitter {
                type uint32 {
                  range "0..16777215";
                }
                description
                  "lowest-way delay or latency in micro seconds.";
              }
              description
                "Jitter constraint on the traffic class.";
            }
            container loss {
              leaf one-way-loss {
                type decimal64 {
                  fraction-digits 6;
                  range "0 .. 50.331642";
                }
                description
                  "Packet loss as a percentage of the total traffic sent
                   over a configurable interval. The finest precision is
                   0.000003%. where the maximum 50.331642%.";
                reference
                  "RFC 7810, section-4.4";
              }
              leaf two-way-loss {
                type decimal64 {
                  fraction-digits 6;
                  range "0 .. 50.331642";
                }
                description
                  "Packet loss as a percentage of the total traffic sent
                   over a configurable interval. The finest precision is
                   0.000003%. where the maximum 50.331642%.";
                reference
                  "RFC 7810, section-4.4";
              }
              description
                "Loss constraint on the traffic class.";
            }
            leaf availability-type {
              type identityref {
                base availability-type;
              }
              description
                "Availability Requirement for the TS";
            }
            leaf isolation-type {
              type identityref {
                base isolation-type;
              }
              default "logical-isolation";
              description
                "TS isolation-level.";
            }
            description
              "container for customized policy constraint on the slice
               traffic.";
          }
        }
      }
      list ts-member-group {
        key "ts-member-id";
        description
          "List of included TS Member groups for the SLO.";
        leaf ts-member-id {
          type leafref {
            path "/transport-slices/transport-slice/ts-member/ts-member-id";
          }
          description
            "Identifies the included list of TS member.";
        }
      }
      container slo-group-monitoring {
        config false;
        description
          "SLO status Per slo group ";
        uses common-monitoring-parameters;
      }
    }
  }

  grouping slice-template {
    description
      "Grouping for slice-templates.";
    container slice-templates {
      description
        "Container for slice-templates.";
      list slice-template {
        key "id";
        leaf id {
          type string;
          description
            "Identification of the SLO Template to be used.
             Local administration meaning.";
        }
        leaf template-description {
          type string;
          description
            "Description of the SLO template.";
        }
        description
          "List for SLO template identifiers.";
      }
    }
  }

  /* Configuration data nodes */

  container transport-slices {
    description
      "transport-slice configurations";
    uses slice-template;
    list transport-slice {
      key "ts-id";
      description
        "a transport-slice is identified by a ts-id";
      leaf ts-id {
        type uint32;
        description
          "a unique transport-slice identifier";
      }
      leaf ts-name {
        type string;
        description
          "ts name";
      }
      leaf-list ts-topology {
        type identityref {
          base ts-topology;
        }
        default "any-to-any";
        description
          "TS topology.";
      }
      uses transport-slice-slo-group;
      uses status-params;
      list ts-endpoint {
        key "ep-id";
        uses endpoint;
        description
          "list of endpoints in this slice";
      }
      list ts-member {
        key "ts-member-id";
        description
          "List of ts-member in a slice";
        uses ts-member;
      }
    }
    //ts-list
  }
}

]]></artwork>
      </figure>

      <t>&lt;CODE ENDS&gt;</t>
    </section>

    <section title="Security Considerations">
      <t>The YANG module defined in this document is designed to be accessed
      via network management protocols such as NETCONF <xref
      target="RFC6241"/> or RESTCONF <xref target="RFC8040"/>. The lowest
      NETCONF layer is the secure transport layer, and the
      mandatory-to-implement secure transport is Secure Shell (SSH) <xref
      target="RFC6242"/>. The lowest RESTCONF layer is HTTPS, and the
      mandatory-to-implement secure transport is TLS <xref
      target="RFC8446"/>.</t>

      <t>The NETCONF access control model <xref target="RFC8341"/> provides
      the means to restrict access for particular NETCONF or RESTCONF users to
      a preconfigured subset of all available NETCONF or RESTCONF protocol
      operations and content.</t>

      <t>There are a number of data nodes defined in this YANG module that are
      writable/creatable/deletable (i.e., config true, which is the default).
      These data nodes may be considered sensitive or vulnerable in some
      network environments. Write operations (e.g., edit-config) to these data
      nodes without proper protection can have a negative effect on network
      operations.</t>

      <t>o /ietf-transport-slice/transport-slices/transport-slice</t>

      <t>The entries in the list above include the whole transport network
      configurations corresponding with the slice which the higher management
      system requests, and indirectly create or modify the PE or P device
      configurations. Unexpected changes to these entries could lead to
      service disruption and/or network misbehavior.</t>
    </section>

    <section title="IANA Considerations">
      <t>This document registers a URI in the IETF XML registry <xref
      target="RFC3688"/>. Following the format in <xref target="RFC3688"/>,
      the following registration is requested to be made:</t>

      <figure>
        <artwork><![CDATA[
   URI: urn:ietf:params:xml:ns:yang:ietf-transport-slice
   Registrant Contact: The IESG.
   XML: N/A, the requested URI is an XML namespace.


]]></artwork>
      </figure>

      <t>This document requests to register a YANG module in the YANG Module
      Names registry <xref target="RFC7950"/>.</t>

      <figure>
        <artwork><![CDATA[
           Name: ietf-transport-slice
           Namespace: urn:ietf:params:xml:ns:yang:ietf-transport-slice
           Prefix: ts
           Reference: RFC XXXX 
]]></artwork>
      </figure>
    </section>

    <section title="Acknowledgments">
      <t>The authors wish to thank Sergio Belotti, Qin Wu, Susan Hares, Eric
      Grey, and many other NS DT members for their helpful comments and
      suggestions.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include='reference.I-D.nsdt-teas-transport-slice-definition'?>

      <?rfc include='reference.I-D.nsdt-teas-ns-framework'?>

      <?rfc include='reference.RFC.2119'?>

      <?rfc include='reference.RFC.3688'?>

      <?rfc include='reference.RFC.6241'?>

      <?rfc include='reference.RFC.6242'?>

      <?rfc include='reference.RFC.8340'?>

      <?rfc include='reference.RFC.7950'?>

      <?rfc include='reference.RFC.8040'?>

      <?rfc include='reference.RFC.6991'?>

      <?rfc include='reference.RFC.8174'?>

      <?rfc include='reference.RFC.8341'?>

      <?rfc include='reference.RFC.8342'?>

      <?rfc include='reference.RFC.8446'?>

      <?rfc include='reference.RFC.8640'?>

      <?rfc include='reference.RFC.8641'?>
    </references>

    <references title="Informative References">
      <?rfc include='reference.I-D.liu-teas-transport-network-slice-yang'?>

      <?rfc include='reference.I-D.ietf-teas-actn-vn-yang'?>

      <?rfc include='reference.RFC.8309'?>

      <?rfc include='reference.I-D.geng-teas-network-slice-mapping'?>
    </references>

    <section title="Comparison with Other Possible Design choices for Transport Slice NBI (Northbound Interface)">
      <t>According to the TS framework draft 3.3.1. Northbound Inteface (NBI),
      the TS NBI is a technology-agnostic interface, which is used for a
      consumer to express requirements for a particular TS. Consumers operate
      on abstract transport slices, with details related to their realization
      hidden. As classified by <xref target="RFC8309"/>, the TS NBI is
      classified as Customer Service Model.</t>

      <t>This draft analyzes the following existing IETF models to identify
      the gap between TS NBI requirements.</t>

      <section title="ACTN VN Model Augmentation">
        <t>The difference between the ACTN VN model and the TS NBI
        requirements is that the TS NBI is an technology-agnostic interface,
        whereas the VN model is bound to the IETF TE Topologies YANG model.
        The realization of the Transport Slice does not necessarily require
        the Transport network to support the TE technology.</t>

        <t>The ACTN VN (Virtual Network) model introduced in<xref
        target="I-D.ietf-teas-actn-vn-yang"> </xref> is the abstract consumer
        view of the TE network. Its YANG structure includes four components:
        <list style="symbols">
            <t>VN: The VN can be seen as a set of edge-to-edge abstract links
            (a Type 1 VN).</t>

            <t>AP"links" list and "termination points" list describe how nodes
            in a network are connected to each other</t>

            <t>VN-AP:vertical layering relationships between transport slice
            networks and underlay networks</t>

            <t>VN-member: Each abstract link is referred to as a VN member and
            is formed as an E2E tunnel across the underlying networks</t>
          </list>The &ldquo;VN&rdquo;,"VN-AP", and "VN-member" can describe
        basic consumer connection requirements. However, the TS SLO and
        TS-Endpoint are not clearly defined and there's no direct equivalent.
        For example, the SLO requirement of the VN is defined through the IETF
        TE Topologies YANG model, but the TE Topologies model is related to a
        specific implementation technology. Also, VN-AP does not define
        "ts-filter-criteria&ldquo; to specify a specific TSE belonging to a
        TS.</t>
      </section>

      <section title="RFC8345 Augmentation Model">
        <t>The difference between the TS NBI requirements and the IETF basic
        network model is that the TS NBI requests abstract consumer transport
        slices, with details related to the Transport Network hidden. But the
        IETF network model is used to describe the interconnection details of
        a Transport Network. The customer service model does not need to
        provide details on the Transport Network.</t>

        <t>For example, IETF Network Topologies YANG data model extension
        introduced in <xref
        target="I-D.liu-teas-transport-network-slice-yang">Transport Network
        Slice YANG Data Model </xref> includes three major parts:<list
            style="symbols">
            <t>Transport network: a transport network list and an list of
            nodes contained in the transport network</t>

            <t>Link: "links" list and "termination points" list describe how
            nodes in a network are connected to each other</t>

            <t>Support network: vertical layering relationships between
            transport slice networks and underlay networks</t>
          </list>Based on this structure, the transport slice-specific SLO
        attributes nodes are augmented on the Network Topologies model,, e.g.
        isolation etc. However, this modeling design requires the transport
        network to expose a lot of details of the network, such as the actual
        topology including nodes interconnection and different network layers
        interconnection.</t>
      </section>
    </section>

    <section title="Appendix B Transport Slice Filter Criteria">
      <t>5G is a use case of the Transport Slice and 5G End-to-end Network
      Slice Mapping from the view of Transport Network<xref
      target="I-D.geng-teas-network-slice-mapping"> </xref></t>

      <t>defines two types of TS slice interconnection and differentiation
      methods: by physical interface or by TNSII (Transport Network Slice
      Interworking Identifier). TNSII is a field in the packet header when
      different 5G wireless network slices are transported through a single
      physical interfaces of the Transport Network. In the 5G scenario,
      &ldquo;ts-filter-criteria&rdquo; refers to TNSII.</t>

      <figure>
        <artwork><![CDATA[    +-------------------------------------------------------+
    |            Higher Layer  System                       |
    +-------------------------------------------------------+
      |                       |                         |
      |             Transport Slice Model               |
 +----------+                 |                    +-----------+
 |           |                 |                   |           |
 |RAN Slice  |         +----------------+          |Core Slice |
 |controller |         | TS  controller |          | controller|
 +----+-----+          +-------+--------+          +-----+-----+
      |                       |                         |
      |                       |                         |
  +---+--+       +------------+----------------+       ++-----+
  |      |       |                             |       |      |
  |      |       |                             |       |      |
  |+----+|       |                             |       |      |
  ||    ||TS1-EP1|         TS1                 |       |+----+|
  ||gNB1|+-------+-----+-----------------------+-------+|UPF1||
  ||    |+**********  /                        |       |+----+|
  |+----+|TS2-EP1|  */                         |TS1-EP3|      |
  |              |  /*                         |       |      |
  |+----+|TS1-EP2| /  *                        |       |      |
  ||    |+--------     *    TS2                |       |+----+|
  ||gNB2|+*********************************************+|UPF2||
  ||    ||TS2-EP2|                             |       |+----+|
  |+----+|       |                             |TS2-EP3|      |
  |      |       |                             |       |      |
  |      |       |                             |       |      |
  +------+       +-----------------------------+       +------+
]]></artwork>
      </figure>

      <t>As shown in the figure, gNodeB 1 and gNodeB 2 use IP gNB1 and IP gNB2
      to communicate with the transport network, respectively. In addition,
      the traffic of TS1 and TS2 on gNodeB 1 and gNodeB 2 is transmitted
      through the same access links to the transport network. The transport
      network need to to distinguish different Transport Slice traffic of same
      gNB. Therefore, in addition to using "node-id" and "port-id" to identify
      a TS-EP, other information is needed along with these parameters to
      uniquely distinguish a TS-EPs. For example, VLAN IDs in the user traffic
      can be used to distinguish the TS-EP1 or TS2-EP1 or other TS-EPs of gNBs
      and UPFs.</t>

      <t/>
    </section>
  </back>
</rfc>
