<?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-ietf-lime-yang-connectionless-oam-12"
     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="Connection-Less OAM YANG model">Generic YANG Data Model for
    Operations, Administration, and Maintenance(OAM) protocols for
    Connectionless networks</title>

    <author fullname="Deepak Kumar" initials="D." surname="Kumar">
      <organization abbrev="Cisco">CISCO Systems</organization>

      <address>
        <postal>
          <street>510 McCarthy Blvd</street>

          <street/>

          <city>Milpitas</city>

          <region>CA</region>

          <code>95035</code>

          <country>USA</country>
        </postal>

        <email>dekumar@cisco.com</email>
      </address>
    </author>

    <author fullname="Michael Wang" initials="M." surname="Wang">
      <organization abbrev="Huawei">Huawei Technologies,Co.,Ltd</organization>

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

          <street/>

          <city>Nanjing</city>

          <region/>

          <code>210012</code>

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

        <email>wangzitao@huawei.com</email>
      </address>
    </author>

    <author fullname="Qin Wu" initials="Q." surname="Wu">
      <organization>Huawei</organization>

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

          <city>Nanjing</city>

          <region>Jiangsu</region>

          <code>210012</code>

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

        <email>bill.wu@huawei.com</email>
      </address>
    </author>

    <author fullname="Reshad Rahman" initials="R." surname="Rahman">
      <organization abbrev="Cisco">Cisco Systems</organization>

      <address>
        <postal>
          <street>2000 Innovation Drive</street>

          <street/>

          <city>Kanata</city>

          <region>Ontario</region>

          <code>K2K 3E8</code>

          <country>Canada</country>
        </postal>

        <email>rrahman@cisco.com</email>
      </address>
    </author>

    <author fullname="Srihari Raghavan" initials="S." surname="Raghavan">
      <organization abbrev="Cisco">Cisco Systems</organization>

      <address>
        <postal>
          <street>Tril Infopark Sez, Ramanujan IT City</street>

          <street>Neville Block, 2nd floor, Old Mahabalipuram Road</street>

          <city>Chennai</city>

          <region>Tamil Nadu</region>

          <code>600113</code>

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

        <email>srihari@cisco.com</email>
      </address>
    </author>

    <date year="2017"/>

    <area>OPS Area</area>

    <workgroup/>

    <abstract>
      <t>This document presents a base YANG Data model for connectionless
      Operations Administration, and Maintenance(OAM) protocols. It provides a
      technology-independent abstraction of key OAM constructs for
      connectionless protocols. The base model presented here can be extended
      to include technology specific details. This is leading to uniformity
      between OAM protocols and support both nested OAM workflows (i.e.,
      performing OAM functions at different or same levels through a unified
      interface) and interacting OAM workflows ( i.e., performing OAM
      functions at same levels through a unified interface).</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>Operations, Administration, and Maintenance (OAM) are important
      networking functions that allow operators to: <list style="numbers">
          <t>Monitor networks connections (Reachability Verification,
          Continuity Check).</t>

          <t>Troubleshoot failures (Fault verification and localization).</t>

          <t>Monitor Performance</t>
        </list></t>

      <t>An overview of OAM tools is presented at <xref
      target="RFC7276"/>.</t>

      <t>Ping and Traceroute <xref target="RFC792"/>, <xref target="RFC4443"/>
      are well-known fault verification and isolation tools, respectively, for
      IP networks. Over the years, different technologies have developed
      similar tools for similar purposes.</t>

      <t>The different OAM tools may support connection-oriented technologies
      or connectionless technologies. In connection-oriented technologies, a
      connection is established prior to the transmission of data. After
      connection is established, no additional control information such as
      signaling or operations and maintenance information is required to
      transmit the data. In connectionless technologies, data is typically
      sent between end points without prior arrangement, but control
      information is required to identify destination.<xref
      target="G.800"/><xref target="RFC7276"/>. Note that the
      Connection-Oriented OAM YANG DATA model is defined in <xref
      target="I-D.ietf-lime-yang-connection-oriented-oam-model"/>.</t>

      <t>In this document, we presents a base YANG Data model for
      connectionless OAM protocols. The generic YANG model for connectionless
      OAM only includes configuration data and state data. It can be used in
      conjunction with data retrieval method model <xref
      target="I-D.ietf-lime-yang-connectionless-oam-methods"/>, which focuses
      on data retrieval procedures like RPC. However it also can be used
      independently of data retrieval method model.</t>
    </section>

    <section title="Conventions used in this document">
      <t>The following terms are defined in <xref target="RFC6241"/> and are
      not redefined here: <list style="symbols">
          <t>client</t>

          <t>configuration data</t>

          <t>server</t>

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

      <t>The following terms are defined in <xref target="RFC6020"/> and are
      not redefined here: <list style="symbols">
          <t>augment</t>

          <t>data model</t>

          <t>data node</t>
        </list>The terminology for describing YANG data models is found in
      <xref target="RFC6020"/>.</t>

      <section title="Terminology">
        <t>TP - Test Point</t>

        <t>MAC - Media Access Control</t>

        <t>BFD - Bidirectional Forwarding Detection</t>

        <t>RPC - A Remote Procedure Call</t>

        <t>RPC operation - A specific Remote Procedure Call.</t>

        <t>CC - Continuity Check <xref target="RFC7276"/> , Continuity Checks
        are used to verify that a destination is reachable and therefore also
        referred to as reachability verification</t>
      </section>
    </section>

    <section title="Overview of the Connectionless OAM Model">
      <t>The model is augmented to "/nd:networks/nd:network/nd:node" <xref
      target="I-D.ietf-i2rs-yang-network-topo"/> using 'test-point-locations'
      defined in <xref target="tp-loc"/>. The tool attribute 'tp-tools'
      grouping defined in this model is corresponding to
      technology-independent retrieval procedures (RPC operations) defined in
      <xref target="I-D.ietf-lime-yang-connectionless-oam-methods"/> and
      supports one of two basic types of activation: proactive and on-demand
      (determined by 'session-type' grouping defined in this model, see
      section 3.2).</t>

      <t>At the top of the model, there is an 'cc-oper-data' container for
      session statistics. Grouping is also defined for common session
      statistics and these are only applicable for proactive OAM sessions.</t>

      <t>Multiple 'test-point-locations' keyed using technology specific keys
      (eg., IPv4 address for IPv4 locations) are augmented into network nodes
      which are defined in <xref target="I-D.ietf-i2rs-yang-network-topo"/> to
      describe the network hierarchies and the inventory of nodes contained in
      a network. Each test point location under 'test-point-locations
      'grouping is chosen based on 'tp-location-type' leaf which when chosen,
      leads to a container that includes a list of 'test-point-locations'
      keyed by technology specific keys (e.g., 'ipv4-location' leaf ). Each
      test point location under 'test-point-locations 'grouping includes a
      'test-point-location-info' grouping. The 'test-point-location-info'
      grouping includes 'tp-technology' grouping, 'tp-tools' grouping, and
      'connectionless-oam-tps' grouping. The groupings of 'tp-address' and
      'tp-address-ni' are kept out of 'test-point-location-info' grouping to
      make it addressing agnostic and allow varied composition. Depending upon
      the choice of the 'tp-location-type' (determined by the
      'tp-address-ni'), the containers differ in its composition of 'test-
      point-locations' while the 'test-point-location-info', is a common
      aspect of every 'test-point-locations'. The 'tp-address-ni' grouping is
      used to describe the corresponding network instance. The
      'tp-technology'grouping indicate OAM technology details. The 'tp-tools'
      grouping describe the OAM tools supported. The 'connectionless-oam-tps'
      grouping is used to describe the relationship of one test point with
      other test points. The 'position' in 'oam-neighboring-tps' indicate
      relative position of neighboring test point corresponding to the current
      test point.</t>

      <section title="TP Address">
        <t>In connectionless OAM, the TP address is defined with the following
        type: <list style="symbols">
            <t>MAC address <xref target="RFC6136"/></t>

            <t>IPv4 or IPv6 address</t>

            <t>TP-attribute</t>

            <t>System-id to represent the device or node.<xref
            target="I-D.ietf-spring-sr-yang"/></t>
          </list></t>

        <t>To define a forwarding treatment of a test packet, the
        'tp-address'grouping needs to be associated with additional
        parameters, e.g. DSCP for IP or EXP (renamed to Traffic Classic in
        RFC5462) for MPLS. In generic connectionless OAM YANG model, these
        parameters are not explicit configured. The model user can add
        corresponding parameters according to their requirements.</t>
      </section>

      <section anchor="tp-tools" title="Tools ">
        <t>The different OAM tools may be used in one of two basic types of
        activation: proactive and on-demand. The proactive OAM refers to OAM
        actions which are carried out continuously to permit proactive
        reporting of fault. The proactive OAM method requires persistent
        configuration. The on-demand OAM refers to OAM actions which are
        initiated via manual intervention for a limited time to carry out
        diagnostics. The on-demand OAM method requires only transient
        configuration.<xref target="RFC7276"/> <xref target="G.8013"/>. In
        connectionless OAM, 'session-type' grouping is defined to indicate
        which kind of activation will be used by the current session.</t>

        <t>In connectionless OAM, the tools attribute is used to describe a
        toolset for fault detection and isolation. And it can serve as a
        constraint condition when the base model be extended to specific OAM
        technology. For example, to fulfill the ICMP PING configuration, the
        "../coam:continuity-check" leaf should be set to "true", and then the
        lime base model should be augmented with ICMP PING specific
        details.</t>
      </section>

      <section title="OAM neighboring test points">
        <t>As typical networks have a multi-layer architecture, the set of OAM
        protocols similarly take a multi-layer structure; each layer may have
        its own OAM protocol [RFC7276] corresponding to a specific
        administrative domain and has associated test points. OAM neighboring
        test points are referred to a list of neighboring test points in the
        same layer that are related to the current test point. This allows
        users to easily navigate between related neighboring layers to
        efficiently troubleshoot a defect. In this model, the 'position' leaf
        defines the relative position of the neighboring test point
        corresponding to the current test point in the same layer, and is
        provided to allow correlation of faults at different locations. If
        there is one neighboring test point placed before the current test
        point, the 'position' leaf is set to -1. If there is one neighboring
        test point placed after the current test point, the 'position' leaf is
        set to 1. If there is no neighboring test point placed before or after
        the current test point, the 'position' leaf is set to 0.</t>

        <figure>
          <artwork>        
                list oam-neighboring-tps {
                  key "index";
                  leaf index {
                     type uint16 {
                        range "0..65536";
                     }
                    description
                     "Index of a list of neighboring test points
                      in the same layer ";
                  }
                  leaf position {
                      type int8 {
                           range "-1..1";
                      }
                      description
                        "The relative position 
                        of neighboring test point 
                        corresponding to the current 
                        test point";
                  }
 
                  description
                     "List of related neighboring test points in the same layer.";

              }
             </artwork>
        </figure>
      </section>

      <section title="Test Point Locations Information">
        <t>This is a generic grouping for Test Point Locations Information
        (i.e., test-point-location-info grouping). It Provide details of Test
        Point Location using 'tp-technology','tp-tools' grouping,
        'oam-neighboring-tps' grouping defined above.</t>
      </section>

      <section anchor="tp-loc" title="Test Point Locations">
        <t>This is a generic grouping for Test Point Locations.
        'tp-location-type 'leaf is used to define locations types, for example
        'ipv4- location-type', 'ipv6-location-type', etc. Container is defined
        under each location type containing list keyed to test point address,
        Test Point Location Information defined in section above, and network
        instance name(e.g.,VRF instance name) if required.</t>
      </section>

      <section title="Path Discovery Data">
        <t>This is a generic grouping for path discovery data model that can
        be retrieved by any data retrieval methods including RPC operations.
        Path discovery data output from methods, includes 'src-test-point'
        container, 'dst-test-point' container, 'sequence-number'leaf,
        'hop-cnt'leaf, session statistics of various kinds, path verification
        and path trace related information. Path discovery includes data to be
        retrieved on a 'per- hop' basis via a list of
        'path-trace-info-list'list which includes information like
        'timestamp'grouping, ' ingress-intf-name ', ' egress-intf-name ' and
        'app-meta-data'. The path discovery data model is made generic enough
        to allow different methods of data retrieval. None of the fields are
        made mandatory for that reason. Noted that the retrieval methods are
        defined in <xref
        target="I-D.ietf-lime-yang-connectionless-oam-methods"/>.</t>
      </section>

      <section title="Continuity Check Data">
        <t>This is a generic grouping for continuity check data model that can
        be retrieved by any data retrieval methods including RPC operations.
        Continuity check data output from methods, includes
        'src-test-point'container, 'dst-test-point'container,
        'sequence-number' leaf, 'hop-cnt'leaf and session statistics of
        various kinds. The continuity check data model is made generic enough
        to allow different methods of data retrieval. None of the fields are
        made mandatory for that reason. Noted that the retrieval methods are
        defined in <xref
        target="I-D.ietf-lime-yang-connectionless-oam-methods"/>.</t>
      </section>

      <section title="OAM data hierarchy">
        <t>The complete data hierarchy related to the OAM YANG model is
        presented below.</t>

        <figure>
          <artwork>module: ietf-connectionless-oam
   +--ro cc-session-statistics-data {continuity-check}?
      +--ro cc-ipv4-sessions-statistics
      |  +--ro cc-session-statistics
      |     +--ro session-count?              uint32
      |     +--ro session-up-count?           uint32
      |     +--ro session-down-count?         uint32
      |     +--ro session-admin-down-count?   uint32
      +--ro cc-ipv6-sessions-statistics
         +--ro cc-session-statistics
            +--ro session-count?              uint32
            +--ro session-up-count?           uint32
            +--ro session-down-count?         uint32
            +--ro session-admin-down-count?   uint32
augment /nd:networks/nd:network/nd:node:
   +--rw tp-location-type?                identityref
   +--rw ipv4-location-type
   |  +--rw test-point-ipv4-location-list
   |     +--rw test-point-locations* [ipv4-location ni]
   |        +--rw ipv4-location          inet:ipv4-address
   |        +--rw ni                     routing-instance-ref
   |        +--rw (technology)?
   |        |  +--:(technology-null)
   |        |     +--rw tech-null?             empty
   |        +--rw tp-tools
   |        |  +--rw continuity-check    boolean
   |        |  +--rw path-discovery      boolean
   |        +--rw root?
   |        +--rw oam-neighboring-tps* [index]
   |           +--rw index                    uint16
   |           +--rw position?                int8
   |           +--rw (tp-location)?
   |              +--:(mac-address)
   |              |  +--rw mac-address-location?    yang:mac-address
   |              +--:(ipv4-address)
   |              |  +--rw ipv4-address-location?   inet:ipv4-address
   |              +--:(ipv6-address)
   |              |  +--rw ipv6-address-location?   inet:ipv6-address
   |              +--:(as-number)
   |              |  +--rw as-number-location?      inet:as-number
   |              +--:(system-id)
   |                 +--rw system-id-location?      router-id
   +--rw ipv6-location-type
   |  +--rw test-point-ipv6-location-list
   |     +--rw test-point-locations* [ipv6-location ni]
   |        +--rw ipv6-location          inet:ipv6-address
   |        +--rw ni                     routing-instance-ref
   |        +--rw (technology)?
   |        |  +--:(technology-null)
   |        |     +--rw tech-null?             empty
   |        +--rw tp-tools
   |        |  +--rw continuity-check    boolean
   |        |  +--rw path-discovery      boolean
   |        +--rw root?
   |        +--rw oam-neighboring-tps* [index]
   |           +--rw index                    uint16
   |           +--rw position?                int8
   |           +--rw (tp-location)?
   |              +--:(mac-address)
   |              |  +--rw mac-address-location?    yang:mac-address
   |              +--:(ipv4-address)
   |              |  +--rw ipv4-address-location?   inet:ipv4-address
   |              +--:(ipv6-address)
   |              |  +--rw ipv6-address-location?   inet:ipv6-address
   |              +--:(as-number)
   |              |  +--rw as-number-location?      inet:as-number
   |              +--:(system-id)
   |                 +--rw system-id-location?      router-id
   +--rw mac-location-type
   |  +--rw test-point-mac-address-location-list
   |     +--rw test-point-locations* [mac-address-location]
   |        +--rw mac-address-location    yang:mac-address
   |        +--rw (technology)?
   |        |  +--:(technology-null)
   |        |     +--rw tech-null?              empty
   |        +--rw tp-tools
   |        |  +--rw continuity-check    boolean
   |        |  +--rw path-discovery      boolean
   |        +--rw root?
   |        +--rw oam-neighboring-tps* [index]
   |           +--rw index                    uint16
   |           +--rw position?                int8
   |           +--rw (tp-location)?
   |              +--:(mac-address)
   |              |  +--rw mac-address-location?    yang:mac-address
   |              +--:(ipv4-address)
   |              |  +--rw ipv4-address-location?   inet:ipv4-address
   |              +--:(ipv6-address)
   |              |  +--rw ipv6-address-location?   inet:ipv6-address
   |              +--:(as-number)
   |              |  +--rw as-number-location?      inet:as-number
   |              +--:(system-id)
   |                 +--rw system-id-location?      router-id
   +--rw group-as-number-location-type
   |  +--rw test-point-as-number-location-list
   |     +--rw test-point-locations* [as-number-location]
   |        +--rw as-number-location     inet:as-number
   |        +--rw ni?                    routing-instance-ref
   |        +--rw (technology)?
   |        |  +--:(technology-null)
   |        |     +--rw tech-null?             empty
   |        +--rw tp-tools
   |        |  +--rw continuity-check    boolean
   |        |  +--rw path-discovery      boolean
   |        +--rw root?
   |        +--rw oam-neighboring-tps* [index]
   |           +--rw index                    uint16
   |           +--rw position?                int8
   |           +--rw (tp-location)?
   |              +--:(mac-address)
   |              |  +--rw mac-address-location?    yang:mac-address
   |              +--:(ipv4-address)
   |              |  +--rw ipv4-address-location?   inet:ipv4-address
   |              +--:(ipv6-address)
   |              |  +--rw ipv6-address-location?   inet:ipv6-address
   |              +--:(as-number)
   |              |  +--rw as-number-location?      inet:as-number
   |              +--:(system-id)
   |                 +--rw system-id-location?      router-id
   +--rw group-system-id-location-type
      +--rw test-point-system-info-location-list
         +--rw test-point-locations* [system-id-location]
            +--rw system-id-location     inet:uri
            +--rw ni?                    routing-instance-ref
            +--rw (technology)?
            |  +--:(technology-null)
            |     +--rw tech-null?             empty
            +--rw tp-tools
            |  +--rw continuity-check    boolean
            |  +--rw path-discovery      boolean
            +--rw root?
            +--rw oam-neighboring-tps* [index]
               +--rw index                    uint16
               +--rw position?                int8
               +--rw (tp-location)?
                  +--:(mac-address)
                  |  +--rw mac-address-location?    yang:mac-address
                  +--:(ipv4-address)
                  |  +--rw ipv4-address-location?   inet:ipv4-address
                  +--:(ipv6-address)
                  |  +--rw ipv6-address-location?   inet:ipv6-address
                  +--:(as-number)
                  |  +--rw as-number-location?      inet:as-number
                  +--:(system-id)
                     +--rw system-id-location?      router-id </artwork>
        </figure>
      </section>
    </section>

    <section title="OAM YANG Module">
      <t>&lt;CODE BEGINS&gt; file
      "ietf-connectionless-oam@2017-09-06.yang"</t>

      <figure>
        <artwork>module ietf-connectionless-oam {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-connectionless-oam";
  prefix cl-oam;
  import ietf-yang-schema-mount {
   prefix yangmnt;
  }
  import ietf-network {
    prefix nd;
  }
  import ietf-yang-types {
    prefix yang;
  }
  import ietf-interfaces {

    prefix if;
  }
  import ietf-inet-types {
    prefix inet;
  }
  import ietf-network-instance {
    prefix ni;
  }
  import ietf-routing-types {
   prefix rt;
  }
  organization
    "IETF LIME Working Group";
  contact
    "Deepak Kumar dekumar@cisco.com
     Qin Wu bill.wu@huawei.com
     S Raghavan srihari@cisco.com
     Zitao Wang wangzitao@huawei.com
     R Rahman rrahman@cisco.com";
  description
    "This YANG module defines the generic configuration,
     data model, statistics for connectionless OAM to be
     used within IETF in a protocol independent manner.
     It is assumed that each protocol maps corresponding
     abstracts to its native format. Each protocol may
     extend the YANG model defined here to include protocol
     specific extensions";
  revision 2017-09-06 {
    description
      " Base model for Connectionless
       Operations, Administration,
       and Maintenance(OAM) ";
    reference
      " RFC XXXX: Connectionless
       Operations, Administration, and
       Maintenance(OAM)YANG Data Model";
  }
  feature connection-less {
    description
      "This feature indicates that OAM solution is connection less.";
  }
  feature continuity-check {
    description
      "This feature indicates that the server supports
       executing continuity check OAM command and
       returning a response. Servers that do not advertise
       this feature will not support executing
       continuity check command or rpc operation model for
       continuity check command.";
  }
  feature path-discovery {
    description
      "This feature indicates that the server supports
       executing path discovery OAM command and
       returning a response. Servers that do not advertise
       this feature will not support executing
       path discovery command or rpc operation model for
       path discovery command.";
  }
  feature ptp-long-format {
    description
      "This feature indicates that timestamp is ptp long format.";
  }
  feature ntp-short-format {
    description
      "This feature indicates that timestamp is ntp short format.";
  }
  feature icmp-timestamp {
    description
      "This feature indicates that timestamp is icmp timestamp.";
  }
  typedef router-id {
    type yang:dotted-quad;
    description
      "A 32-bit number in the dotted quad format assigned to each
       router. This number uniquely identifies the router within an
       Autonomous System.";
  }
  typedef routing-instance-ref {
    type leafref {
      path "/ni:network-instances/ni:network-instance/ni:name";
    }
    description
      "This type is used for leafs that reference a routing instance
       configuration.";
  }
  identity address-attribute-types {
    description
      "This is base identity of address
       attribute types which are ip-prefix,
       bgp, tunnel, pwe3, vpls, etc.";
  }
  typedef address-attribute-type {
    type identityref {
      base address-attribute-types;
    }
    description
      "Target address attribute type.";
  }
  identity time-interval-type {
    description
      "Time interval type";
  }
  identity hours {
    base time-interval-type;
    description
      "Time unit in Hours";
  }

  identity minutes {
    base time-interval-type;
    description
      "Time unit in Minutes";
  }
  identity seconds {
    base time-interval-type;
    description
      "Time unit in Seconds";
  }
  identity milliseconds {
    base time-interval-type;
    description
      "Time unit in Milliseconds";
  }
  identity microseconds {
    base time-interval-type;
    description
      "Time unit in Microseconds";
  }
  identity nanoseconds {
    base time-interval-type;
    description
      "Time unit in Nanoseconds";
  }

 identity timestamp-type {
  description
   "Base identity for Timestamp Type.";
 }
 identity truncated-ptp {
  base timestamp-type;
  description
   "Identity for 64bit short format PTP timestamp.";
 }
 identity truncated-ntp {
  base timestamp-type;
  description
   "Identity for 32bit short format NTP timestamp.";
 }
 identity ntp64 {
  base timestamp-type;
  description
   "Identity for 64bit NTP timestamp.";
 }
 identity icmp {
  base timestamp-type;
  description

   "Identity for 32bit ICMP timestamp.";
 }
  grouping cc-session-statistics {
    description
      "Grouping for session statistics.";
    container cc-session-statistics {
      description
        "cc session counters";
      leaf session-count {
        type uint32;
        default "0";
        description
          "Number of Continuity Check sessions.
          A value of zero indicates that no session
          count is sent.";
      }
      leaf session-up-count {
        type uint32;
        default "0";
        description
          "Number of sessions which are up.
          A value of zero indicates that no up
          session count is sent.";
      }
      leaf session-down-count {
        type uint32;
        default "0";
        description
          "Number of sessions which are down.
         A value of zero indicates that no down
         session count is sent.";
      }
      leaf session-admin-down-count {
        type uint32;
       default "0";
        description
          "Number of sessions which are admin-down.
          A value of zero indicates that no admin
          down session count is sent.";
      }
    }
  }
  grouping session-packet-statistics {
    description
      "Grouping for per session packet statistics";
    container session-packet-statistics {
      description
        "Per session packet statistics.";

      leaf rx-packet-count {
        type uint32{
            range "0..4294967295";
        }
        default "0";
        description
          "Total number of received OAM packet count.
           If the value is 4294967295,
          it indicates the packet count is overrun.";
      }
      leaf tx-packet-count {
        type uint32{
        range "0..4294967295";
        }
       default "0";
        description
          "Total number of transmitted OAM packet count.
           If the value is 4294967295,
           it indicates the packet count is overrun.";
      }
      leaf rx-bad-packet {
        type uint32 {
        range "0..4294967295";
        }
        default "0";
        description
          "Total number of received bad OAM packet.
           If the value is 4294967295,
           it indicates the bad packet count is overrun.";
      }
      leaf tx-packet-failed {
        type uint32 {
        range "0..4294967295";
        }
        default "0";
        description
          "Total number of failed sending OAM packet.
          If the value is 4294967295, it indicates
          failed packet count is overrun.";
      }
    }
  }
  grouping cc-per-session-statistics {
    description
      "Grouping for per session statistics";
    container cc-per-session-statistics {
      description
        "per session statistics.";

      leaf create-time {
        type yang:date-and-time;
        description
          "Time and date when session is created.";
      }
      leaf last-down-time {
        type yang:date-and-time;
        description
          "Time and date last time session is down.";
      }
      leaf last-up-time {
        type yang:date-and-time;
        description
          "Time and date last time session is up.";
      }
      leaf down-count {
        type uint32 {
        range "0..4294967295";
        }
        default "0";
        description
          "Total Continuity Check sessions down count.
          If the value is 4294967295, it indicates down
          count is overrun.";
      }
      leaf admin-down-count {
        type uint32 {
        range "0..4294967295";
        }
        default "0";
        description
          "Total Continuity Check sessions admin down count.
          If the value is 4294967295, it indicates admin
          down count is overrun.";
      }
      uses session-packet-statistics;
    }
  }
  grouping session-error-statistics {
    description
      "Grouping for per session error statistics";
    container session-error-statistics {
      description
        "Per session error statistics.";
      leaf packet-loss-count {
        type uint32 {
        range "0..4294967295";
        }
       default "0";
        description
          "Total received packet drops count.
          If the value is 4294967295, it indicates
          packet drops count is overrun.";
      }

          leaf loss-ratio{
                        type uint8{
                                range 0..100;
                        }
                description
                 "Loss ratio of the packets. Express as percentage
                 of packets lost with respect to packets sent.";
                }
      leaf packet-reorder-count {
        type uint32 {
        range "0..4294967295";
        }
        default "0";
        description
          "Total received packet reordered count.
          If the value is 4294967295, it indicates
          packet reorder count is overrun.";
      }
      leaf packets-out-of-seq-count {
        type uint32 {
        range "0..4294967295";
        }
        description
          "Total received out of sequence count.
           If the value is 4294967295, it indicates
          out of sequence count is overrun.";
      }
      leaf packets-dup-count {
        type uint32 {
        range "0..4294967295";
        }
        description
          "Total received packet duplicates count.
          If the value is 4294967295, it indicates
          packet duplicates count is overrun.";
      }
    }
  }
  grouping session-delay-statistics {
    description
      "Grouping for per session delay statistics";
    container session-delay-statistics {
      description

        "Session delay summarised information.By default,
         one way measurement protocol (e.g., OWAMP)is used
         to measure delay. When two way measurement protocol
         (e.g., TWAMP) is used instead, it can be indicated
         using and protocol-id defined in RPC operation of
         draft-ietf-lime-yang-connectionless-oam-methods,i.e.,
         set protocol-id as OWAMP. Note that only one measurement
         protocol for delay is specified for interoperability reason.";
      leaf time-interval-value {
        type identityref {
          base time-interval-type;
        }
        default "milliseconds";
        description
          "Time units among choice of s,ms,ns etc.";
      }
      leaf min-delay-value {
        type uint32;
        description
          "Minimum delay value observed.";
      }
      leaf max-delay-value {
        type uint32;
        description
          "Maximum delay value observed.";
      }
      leaf average-delay-value {
        type uint32;
        description
          "Average delay value observed.";
      }
    }
  }
  grouping session-jitter-statistics {
    description
      "Grouping for per session jitter statistics";
    container session-jitter-statistics {
      description
        "Session jitter summarised information. By default,
         jitter is measured using IP Packet Delay Variation
         (IPDV) as defined in RFC3393. When the other measurement
         method is used instead(e.g.,Packet Delay Variation used in
         Y.1540, it can be indicated using protocol-id-meta-data
         defined in RPC operation of
         draft-ietf-lime-yang-connectionless-oam-methods. Note that
         only one measurement method for jitter is specified
         for interoperability reason.";
      leaf interval-value {

        type identityref {
          base time-interval-type;
        }
       default "milliseconds";
        description
          "Time units among choice of s,ms,ns etc.";
      }
      leaf min-jitter-value {
        type uint32;
        description
          "Minimum jitter value observed.";
      }
      leaf max-jitter-value {
        type uint32;
        description
          "Maximum jitter value observed.";
      }
      leaf average-jitter-value {
        type uint32;
        description
          "Average jitter value observed.";
      }
    }
  }
  grouping session-path-verification-statistics {
    description
      "Grouping for per session path verification statistics";
    container session-path-verification-statistics {
      description
        "OAM per session path verification statistics.";
      leaf verified-count {
        type uint32 {
        range "0..4294967295";
        }
        description
          "Total number of OAM packets that
           went through a path as intended.
          A value of 4294967295 indicates that
          verified count is overrun.";
      }
      leaf failed-count {
        type uint32 {
        range "0..4294967295";
        }
        description
          "Total number of OAM packets that
           went through an unintended path.
          A value of 4294967295 indicates that

         failed count is overrun.";
      }
    }
  }
  grouping session-type {
    description
      "This object indicates which kind
      of activation will be used by the current
      session.";
    leaf session-type {
      type enumeration {
        enum "proactive" {
          description
            "The current session is proactive session.";
        }
        enum "on-demand" {
          description
            "The current session is on-demand session.";
        }
      }
      default "on-demand";
      description
        "Indicate which kind of activation will be used
         by the current session";
    }
  }
  identity tp-address-technology-type {
    description
      "Test point address type";
  }
  identity mac-address-type {
    base tp-address-technology-type;
    description
      "MAC address type";
  }
  identity ipv4-address-type {
    base tp-address-technology-type;
    description
      "IPv4 address type";
  }
  identity ipv6-address-type {
    base tp-address-technology-type;
    description
      "IPv6 address type";
  }
  identity tp-attribute-type {
    base tp-address-technology-type;
    description

      "Test point attribute type";
  }
  identity system-id-address-type {
    base tp-address-technology-type;
    description
      "System id address type";
  }
  identity as-number-address-type {
    base tp-address-technology-type;
    description
      "AS number address type";
  }
  identity route-distinguisher-address-type {
    base tp-address-technology-type;
    description
      "Route Distinguisher address type";
  }
  grouping tp-address {
    leaf tp-location-type {
      type identityref {
        base tp-address-technology-type;
      }
      mandatory true;
      description
        "Test point address type.";
    }
      container mac-address {
        when "derived-from-or-self(../tp-location-type, 'cl-oam:mac-address-type')" {
          description
            "MAC address type";
        }
        leaf mac-address {
          type yang:mac-address;
          mandatory true;
          description
            "MAC Address";
        }
        description
          "MAC Address based MP Addressing.";
      }
      container ipv4-address {
        when "derived-from-or-self(../tp-location-type, 'cl-oam:ipv4-address-type')" {
          description
            "IPv4 address type";
        }
        leaf ipv4-address {
          type inet:ipv4-address;
          mandatory true;

          description
            "IPv4 Address";
        }
        description
          "IP Address based MP Addressing.";
      }
      container ipv6-address {
        when "derived-from-or-self(../tp-location-type, 'cl-oam:ipv6-address-type')" {
          description
            "IPv6 address type";
        }
        leaf ipv6-address {
          type inet:ipv6-address;
          mandatory true;
          description
            "IPv6 Address";
        }
        description
          "ipv6 Address based MP Addressing.";
      }
      container tp-attribute {
        when "derived-from-or-self(../tp-location-type, 'cl-oam:tp-attribute-type')" {
          description
            "Test point attribute type";
        }
        leaf tp-attribute-type {
          type address-attribute-type;
          description
            "Test point type.";
        }
        choice tp-attribute-value {
          description
            "Test point value.";
          case ip-prefix {
            leaf ip-prefix {
              type inet:ip-prefix;
              description
                "IP prefix.";
            }
          }
          case bgp {
            leaf bgp {
              type inet:ip-prefix;
              description
                "BGP Labeled Prefix ";
            }
          }
          case tunnel {

            leaf tunnel-interface {
              type uint32;
              description
                "VPN Prefix ";
            }
          }
          case pw {
            leaf remote-pe-address {
              type inet:ip-address;
              description
                "Remote pe address.";
            }
            leaf pw-id {
              type uint32;
              description
                "Pseudowire ID is a non-zero 32-bit ID.";
              reference
                "RFC 4379 :Detecting Multi-Protocol Label
                Switched (MPLS) Data Plane Failures";
            }
          }
          case vpls {
            leaf route-distinguisher {
              type rt:route-distinguisher;
              description
                "Route Distinguisher is an 8 octets identifier
                used to distinguish information about various
                L2VPN advertised by a node.";
              reference
                "RFC 4379 :Detecting Multi-Protocol Label
                Switched (MPLS) Data Plane Failures";
            }
            leaf sender-ve-id {
              type uint16;
              description
                "Sender's VE ID. The VE ID (VPLS Edge Identifier)
                 is a 2-octet identifier.";
              reference
                "RFC 4379 :Detecting Multi-Protocol Label
                Switched (MPLS) Data Plane Failures";
            }
            leaf receiver-ve-id {
              type uint16;
              description
                "Receiver's VE ID.The VE ID (VPLS Edge Identifier)
                 is a 2-octet identifier.";
              reference
                "RFC 4379 :Detecting Multi-Protocol Label

                Switched (MPLS) Data Plane Failures";
            }
          }
          case mpls-mldp {
            choice root-address {
              description
                "Root address choice.";
              case ip-address {
                leaf source-address {
                  type inet:ip-address;
                  description
                    "IP address.";
                }
                leaf group-ip-address {
                  type inet:ip-address;
                  description
                    "Group ip address.";
                }
              }
              case vpn {
                leaf as-number {
                  type inet:as-number;
                  description
                  "The AS number represents autonomous system
                  numbers which identify an Autonomous System.";
                }
              }
              case global-id {
                leaf lsp-id {
                  type string;
                  description
                    "LSP ID is an identifier of a LSP
                     within a MPLS network.";
                  reference
                  "RFC 4379 :Detecting Multi-Protocol Label
                   Switched (MPLS) Data Plane Failures";
                }
              }
            }
          }
        }
        description
           "Test Point Attribute Container";
      }
      container system-info {
        when "derived-from-or-self(../tp-location-type, 'cl-oam:system-id-address-type')" {
          description
            "System id address type";

        }
        leaf system-id {
          type rt:router-id;
          description
            "System ID assigned to this node.";
        }
        description
           "system ID container.";
      }
    description
      "TP Address";
  }
  grouping tp-address-ni {
    description
      "Test point address with VRF.";
    leaf ni {
      type routing-instance-ref;
      description
        "The ni is used to describe virtual resource partitioning
        that may be present on a network device.Example of common
        industry terms for virtual resource partitioning is VRF
        instance.";
    }
    uses tp-address;
  }
  grouping connectionless-oam-tps {
    list oam-neighboring-tps {
      key "index";
      leaf index {
        type uint16{
        range "0..65535";
       }
        description
          "Index of a list of neighboring test points
           in the same layer";
      }
      leaf position {
        type int8 {
          range "-1..1";
        }
        default "0";
        description
          "The relative position
           of neighboring test point
           corresponding to the current
           test point.Level 0 indicates no neighboring
           test points placed before or after the current
           test point in the same layer.-1 means there is

           a neighboring test point placed before the current
           test point in the same layer and +1 means there is
           a neighboring test point placed after the current
           test point in same layer.";
      }
      choice tp-location {
        case mac-address {
          leaf mac-address-location {
            type yang:mac-address;
            description
              "MAC Address";
          }
          description
            "MAC Address based MP Addressing.";
        }
        case ipv4-address {
          leaf ipv4-address-location {
            type inet:ipv4-address;
            description
              "Ipv4 Address";
          }
          description
            "IP Address based MP Addressing.";
        }
        case ipv6-address {
          leaf ipv6-address-location {
            type inet:ipv6-address;
            description
              "IPv6 Address";
          }
          description
            "IPv6 Address based MP Addressing.";
        }
        case as-number {
          leaf as-number-location {
            type inet:as-number;
            description
              "AS number location";
          }
          description
            "AS number for point to multipoint OAM";
        }
        case system-id {
          leaf system-id-location {
            type router-id;
            description
              "System id location";
          }

          description
            "System ID";
        }
        description
          "TP location.";
      }
      description
        "List of neighboring test points in the same layer that are related to current test
         point. If the neighboring test-point is placed after the current test point, the
         position is specified as +1. If neighboring test-point
         is placed before the current test point, the position is specified
         as -1, if no neighboring test points placed before or after the current
         test point in the same layer, the position is specified as 0.";
    }
    description
      "Connectionless OAM related neighboring test points list.";
  }
  grouping tp-technology {
    choice technology {
      default "technology-null";
      case technology-null {
        description
          "This is a placeholder when no technology is needed.";
        leaf tech-null {
          type empty;
          description
            "There is no technology to be defined.";
        }
      }
      description
        "Technology choice.";
    }
    description
      "OAM Technology";
  }
  grouping tp-tools {
    description
      "Test Point OAM Toolset.";
    container tp-tools {
      leaf continuity-check {
        type boolean;
        mandatory true;
        description
          "A flag indicating whether or not the
           continuity check function is supported.";
        reference

          "RFC 792: INTERNET CONTROL MESSAGE PROTOCOL.
           RFC 4443: Internet Control Message Protocol (ICMPv6)
           for the Internet Protocol Version 6 (IPv6) Specification.
           RFC 5880: Bidirectional Forwarding Detection.
           RFC 5881: BFD for IPv4 and IPv6.
           RFC 5883: BFD for Multihop Paths.
           RFC 5884: BFD for MPLS Label Switched Paths.
           RFC 5885: BFD for PW VCCV.
           RFC 6450: Multicast Ping Protocol.
           RFC 8029: Detecting Multiprotocol Label Switched
          (MPLS) Data-Plane Failures.";
      }
      leaf path-discovery {
        type boolean;
        mandatory true;
        description
          "A flag indicating whether or not the
           path discovery function is supported.";
        reference
          "RFC 792: INTERNET CONTROL MESSAGE PROTOCOL.
           RFC 4443: Internet Control Message Protocol (ICMPv6)
           for the Internet Protocol Version 6 (IPv6) Specification.
           RFC 4884: Extended ICMP to Support Multi-part Message.
           RFC 5837:Extending ICMP for Interface.
           and Next-Hop Identification.
           RFC 8029: Detecting Multiprotocol Label Switched (MPLS)
           Data-Plane Failures.";
      }
      description
        "Container for test point OAM tools set.";
    }
  }
  grouping test-point-location-info {
    uses tp-technology;
    uses tp-tools;
    anydata root {
      yangmnt:mount-point "root";
      description
        "Root for models supported per
         test point";
    }
    uses connectionless-oam-tps;
    description
      "Test point Location";
  }
  grouping test-point-locations {
    description
      "Group of test point locations.";

        leaf tp-location-type {
      type identityref {
        base tp-address-technology-type;
      }
      description
        "Test point location type.";
    }
      container ipv4-location-type {
        when "derived-from-or-self(../tp-location-type, 'cl-oam:ipv4-address-type')" {
          description
            "When test point location type is equal to ipv4 address.";
        }
        container test-point-ipv4-location-list {
          list test-point-locations {
            key "ipv4-location ni";
            leaf ipv4-location {
              type inet:ipv4-address;
              description
                "IPv4 Address.";
            }
            leaf ni {
              type routing-instance-ref;
              description
                "The ni is used to describe the
                 corresponding network instance";
            }
            uses test-point-location-info;
            description
              "List of test point locations.";
          }
          description
            "Serves as top-level container
             for test point location list.";
        }
        description
           "ipv4 location type container.";
      }
      container ipv6-location-type {
        when "derived-from-or-self(../tp-location-type, 'cl-oam:ipv6-address-type')" {
          description
            "when test point location is equal to ipv6 address";
        }
        container test-point-ipv6-location-list {
          list test-point-locations {
            key "ipv6-location ni";
            leaf ipv6-location {
              type inet:ipv6-address;
              description

                "IPv6 Address.";
            }
            leaf ni {
              type routing-instance-ref;
              description
                "The ni is used to describe the
                 corresponding network instance";
            }
            uses test-point-location-info;
            description
              "List of test point locations.";
          }
          description
            "Serves as top-level container
             for test point location list.";
        }
        description
           "ipv6 location type container.";
      }
      container mac-location-type {
        when "derived-from-or-self(../tp-location-type, 'cl-oam:mac-address-type')" {
          description
            "when test point location type is equal to mac address.";
        }
        container test-point-mac-address-location-list {
          list test-point-locations {
            key "mac-address-location";
            leaf mac-address-location {
              type yang:mac-address;
              description
                "MAC Address";
            }
            uses test-point-location-info;
            description
              "List of test point locations.";
          }
          description
            "Serves as top-level container
             for test point location list.";
        }
        description
           "mac address location type container.";
      }
container group-as-number-location-type {
when "derived-from-or-self(../tp-location-type, 'cl-oam:as-number-address-type')" {
     description
      "when test point location type is equal to as-number.";
}

        container test-point-as-number-location-list {
          list test-point-locations {
            key "as-number-location";
            leaf as-number-location {
              type inet:as-number;
              description
                "AS number for point to multi point OAM.";
            }
            leaf ni {
              type routing-instance-ref;
              description
                "The ni is used to describe the
                 corresponding network instance";
            }
            uses test-point-location-info;
            description
              "List of test point locations.";
          }
          description
            "Serves as top-level container
             for test point location list.";
        }
        description
           "as number location type container.";
      }
container group-system-id-location-type {
when "derived-from-or-self(../tp-location-type, 'cl-oam:system-id-address-type')" {
  description
  "when test point location type is equal to system-info.";
}
        container test-point-system-info-location-list {
          list test-point-locations {
            key "system-id-location";
            leaf system-id-location {
              type inet:uri;
              description
                "System Id.";
            }
            leaf ni {
              type routing-instance-ref;
              description
                "The ni is used to describe the
                 corresponding network instance";
            }
            uses test-point-location-info;
            description
              "List of test point locations.";
          }

          description
            "Serves as top-level container for
             test point location list.";
        }
        description
           "system ID location type container.";
      }
  }
  augment "/nd:networks/nd:network/nd:node" {
    description
      "Augment test points of connectionless oam.";
        uses test-point-locations;
  }
  grouping timestamp {
    description
      "Grouping for timestamp.";
    leaf timestamp-type {
      type identityref {
      base timestamp-type;
      }
      description
        "Type of Timestamp, such as Truncated PTP, NTP.";
    }
    container timestamp-64bit {
        when "derived-from-or-self(../timestamp-type, 'cl-oam:truncated-ptp')"+
       "or derived-from-or-self(../type,'cl-oam:ntp64')" {
         description
          "Only applies when Truncated NTP or 64bit NTP Timestamp.";
        }
      leaf timestamp-sec {
      type uint32;
      description
        "Absolute timestamp in seconds as per IEEE1588v2
         or seconds part in 64-bit NTP timestamp.";
       }
      leaf timestamp-nanosec {
      type uint32;
      description
        "Fractional part in nanoseconds as per IEEE1588v2
         or Fractional part in 64-bit NTP timestamp.";
      }
      description
      "Container for 64bit timestamp.";
    }
    container timestamp-80bit {
        when "derived-from-or-self(../timestamp-type, 'cl-oam:ptp80')"{
         description
          "Only applies when 80bit PTP Timestamp.";

        }
  if-feature ptp-long-format;
      leaf timestamp-sec {
      type uint64 {
      range "0..281474976710656";
      }
      description
        "48bit Timestamp in seconds as per IEEE1588v2.";
       }
      leaf timestamp-nanosec {
      type uint32;
      description
        "Fractional part in nanoseconds as per IEEE1588v2
         or Fractional part in 64-bit NTP timestamp.";
      }
      description
      "Container for 64bit timestamp.";
    }
       container ntp-timestamp-32bit {
        when "derived-from-or-self(../timestamp-type, 'cl-oam:truncated-ntp')"{
         description
          "Only applies when 32 bit NTP Short format Timestamp.";
        }
  if-feature ntp-short-format;
      leaf timestamp-sec {
      type uint16;
      description
        "Timestamp in seconds as per short format NTP.";
       }
      leaf timestamp-nanosec {
      type uint16;
      description
        "Truncated Fractional part in 16-bit NTP timestamp.";
      }
      description
      "Container for 64bit timestamp.";
    }
     container icmp-timestamp-32bit {
        when "derived-from-or-self(../timestamp-type, 'cl-oam:icmp-ntp')"{
         description
          "Only applies when Truncated NTP or 64bit NTP Timestamp.";
        }
  if-feature icmp-timestamp;
      leaf timestamp-millisec {
      type uint32;
      description
        "timestamp in milliseconds for ICMP timestamp.";
       }
      description
      "Container for 32bit timestamp.";
    }

  }
  grouping path-discovery-data {
    description
      "Path discovery related data output from nodes.";
    container src-test-point {
      description
        "Source test point.";
      uses tp-address-ni;
    }
    container dest-test-point {
      description
        "Destination test point.";
      uses tp-address-ni;
    }
    leaf sequence-number {
      type uint64;
      default "0";
      description
        "Sequence number in data packets.A value of
        zero indicates that no sequence number is sent.";
    }
    leaf hop-cnt {
      type uint8;
      default "0";
      description
        "Hop count.A value of zero indicates
        that no hop count is sent";
    }
    uses session-packet-statistics;
    uses session-error-statistics;
    uses session-delay-statistics;
    uses session-jitter-statistics;
    container path-verification {
      description
        "Optional path verification related information.";
      leaf flow-info {
        type string;
        description
          "Informations that refers to the flow.";
      }
      uses session-path-verification-statistics;
    }
    container path-trace-info {
      description
        "Optional path trace per-hop test point information.
         The path trace information list has typically a single
         element for per-hop cases like path-discovery RPC operation
         but allows a list of hop related information for other types of

         data retrieval methods.";
      list path-trace-info-list {
        key "index";
        description
          "Path trace information list.";
        leaf index {
          type uint32;
          description
            "Trace information index.";
        }
        uses tp-address-ni;
        uses timestamp;
        leaf ingress-intf-name {
          type if:interface-ref;
          description
            "Ingress interface name";
        }
        leaf egress-intf-name {
          type if:interface-ref;
          description
            "Egress interface name";
        }
        leaf queue-depth {
          type uint32;
          description
            "Length of the queue of the interface from where
             the packet is forwarded out.  The queue depth could
             be the current number of memory buffers used by the
             queue and a packet can consume one or more memory buffers
             thus constituting device-level information.";
        }
        leaf transit-delay {
          type uint32;
          description
            "Time in nano seconds
             packet spent transiting a node.";
        }
        leaf app-meta-data {
          type uint64;
          description
            "Application specific
             data added by node.";
        }
      }
    }
  }
  grouping continuity-check-data {
    description

      "Continuity check data output from nodes.";
    container src-test-point {
      description
        "Source test point.";
      uses tp-address-ni;
      leaf egress-intf-name {
        type if:interface-ref;
        description
          "Egress interface name.";
      }
    }
    container dest-test-point {
      description
      "Destination test point.";
      uses tp-address-ni;
      leaf ingress-intf-name {
        type if:interface-ref;
        description
          "Ingress interface name.";
      }
    }
    leaf sequence-number {
      type uint64;
      default "0";
      description
       "Sequence number in data packets.A value of
       zero indicates that no sequence number is sent.";
    }
    leaf hop-cnt {
      type uint8;
      default "0";
      description
        "Hop count.A value of zero indicates
         that no hop count is sent";
    }
    uses session-packet-statistics;
    uses session-error-statistics;
    uses session-delay-statistics;
    uses session-jitter-statistics;
  }
  container cc-session-statistics-data {
    if-feature "continuity-check";
    config false;
    description
      "CC operational information.";
    container cc-ipv4-sessions-statistics {
      description
        "CC ipv4 sessions";

      uses cc-session-statistics;
    }
    container cc-ipv6-sessions-statistics {
      description
        "CC ipv6 sessions";
      uses cc-session-statistics;
    }
  }
}</artwork>
      </figure>

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

    <section title="Connectionless model applicability">
      <t>"ietf-connectionless-oam" model defined in this document provides
      technology-independent abstraction of key OAM constructs for
      connectionless protocols. This model can be further extended to include
      technology specific details, e.g., adding new data nodes with technology
      specific functions and parameters into proper anchor points of the base
      model, so as to develop a technology-specific connectionless OAM
      model.</t>

      <t>This section demonstrates the usability of the connectionless YANG
      OAM data model to various connectionless OAM technologies, e.g., BFD,
      LSP ping. Note that, in this section, we only present several snippets
      of technology-specific model extensions for illustrative purposes. The
      complete model extensions should be worked on in respective protocol
      working groups.</t>

      <section title="BFD Extension">
        <section title="Augment Method">
          <t>The following sections shows how the "ietf-connectionless-oam"
          model can be extended to cover BFD technology. For this purpose, a
          set of extension are introduced such as technology-type extension
          and test-point attributes extension.</t>

          <t>Note that in BFD WG, there is a BFD YANG data model <xref
          target="I-D.ietf-bfd-yang"/> to be produced. Users can choose to use
          "ietf-connectioless-oam" as basis and augment the
          "ietf-connectionless-oam" model with bfd specific details. The bfd
          specific details can be the grouping defined in the BFD model.</t>

          <section title="Technology type extension">
            <t>No BFD technology type has been defined in the
            "ietf-connectionless-oam" model. Therefore a technology type
            extension is required in the model Extension.</t>

            <t>The snippet below depicts an example of augmenting "bfd" type
            into the ietf-connectionless-oam":</t>

            <figure>
              <artwork>
augment "/nd:networks/nd:network/nd:node/"
+"coam:location-type/coam:ipv4-location-type"
+"/coam:test-point-ipv4-location-list/"
+"coam:test-point-locations/coam:technology"
{
    leaf bfd{
   type string;
  }
}</artwork>
            </figure>
          </section>

          <section title="Test point attributes extension">
            <t>To support bfd technology, the "ietf-connectionless-oam" model
            can be extended and add bfd specific parameters under
            "test-point-locations" list and/or add new location type such as
            "bfd over MPLS-TE" under "location-type".</t>

            <section title="Define and insert new nodes into corresponding test-point-location">
              <t>In the "ietf-connectionless-oam" model, multiple
              "test-point-location" lists are defined under the
              "location-type" choice node. Therefore, to derive a model for
              some bfd technologies ( such as ip single-hop, ip multi-hops,
              etc), data nodes for bfd specific details need to be added into
              corresponding "test-point-locations" list. In this section, we
              reuse some groupings which are defined in <xref
              target="I-D.ietf-bfd-yang"/> as following:</t>

              <t>The snippet below shows how the "ietf-connectionless-oam"
              model can be extended to support "BFD IP single-hop":</t>

              <figure>
                <artwork>augment "/nd:networks/nd:network/nd:node/"
+"coam:location-type/coam:ipv4-location-type"
+"/coam:test-point-ipv4-location-list/"
        +"coam:test-point-locations"
{
        container session-cfg {
          description "BFD IP single-hop session configuration";
          list sessions {
            key "interface dest-addr";
            description "List of IP single-hop sessions";
            leaf interface {
              type if:interface-ref;
              description
                "Interface on which the BFD session is running.";
            }
            leaf dest-addr {
              type inet:ip-address;
              description "IP address of the peer";
            }
            uses bfd:bfd-grouping-common-cfg-parms;
            uses bfd:bfd-grouping-echo-cfg-parms;
          }
        }
}</artwork>
              </figure>

              <t>Similar augmentations can be defined to support other BFD
              technologies such as BFD IP multi-hop, BFD over MPLS, etc.</t>
            </section>

            <section title="Add new location-type cases">
              <t>In the "ietf-connectionless-oam" model, If there is no
              appropriate "location type" case that can be extended, a new
              "location-type" case can be defined and inserted into the
              "location-type" choice node.</t>

              <t>Therefore, the model user can flexibly add "location-type" to
              support other type of test point which are not defined in the
              "ietf-connectionless-oam" model. In this section, we add a new
              "location-type" case and reuse some groupings which are defined
              in <xref target="I-D.ietf-bfd-yang"/> as follows:</t>

              <t>The snippet below shows how the "ietf-connectionless-oam"
              model can be extended to support "BFD over MPLS-TE":</t>

              <figure>
                <artwork>augment "/nd:networks/nd:network/nd:node/coam:location-type"{
 case te-location{
  list test-point-location-list{
   key "tunnel-name";
   leaf tunnel-name{
    type leafref{
 path "/te:te/te:tunnels/te:tunnel/te:name";
}
description
"point to a te instance.";
   }
    uses bfd:bfd-grouping-common-cfg-parms;
        uses bfd-mpls:bfd-encap-cfg;
  }
 }
}</artwork>
              </figure>

              <t>Similar augmentations can be defined to support other BFD
              technologies such as BFD over LAG, etc.</t>
            </section>
          </section>
        </section>

        <section title="Schema Mount">
          <t>And another alternative method is using schema mount mechanism
          <xref target="I-D.ietf-netmod-schema-mount"/> in the
          "ietf-connectionless-oam". Within the "test-point-locations" list, a
          "root" attribute is defined to provide a mounted point for models
          mounted per "test-point-locations". Therefore, the
          "ietf-connectionless-oam" model can provide a place in the node
          hierarchy where other OAM YANG data models can be attached, without
          any special extension in the "ietf-connectionless-oam" YANG data
          models <xref target="I-D.ietf-netmod-schema-mount"/>. Note that the
          limitation of the Schema Mount method is it is not allowed to
          specify certain modules that are required to be mounted under a
          mount point.</t>

          <t>The snippet below depicts the definition of "root" attribute.</t>

          <figure>
            <artwork>      anydata root {
       yangmnt:mount-point root;
       description 
      "Root for models supported per
        test point";
      } </artwork>
          </figure>

          <t>The following section shows how the "ietf-connectionless-oam"
          model can use schema mount to support BFD technology.</t>

          <section title="BFD Modules be populated in schema-mount">
            <t>To support BFD technology, "ietf-bfd-ip-sh" and
            "ietf-bfd-ip-mh" YANG modules might be populated in the
            "schema-mounts" container:</t>

            <figure>
              <artwork>   &lt;schema-mounts
       xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-schema-mount"&gt;
     &lt;mount-point&gt;
       &lt;module&gt; ietf-connectionless-oam &lt;/module&gt;
       &lt;name&gt;root&lt;/name&gt;
       &lt;use-schema&gt;
         &lt;name&gt;root&lt;/name&gt;
       &lt;/use-schema&gt;
     &lt;/mount-point&gt;
     &lt;schema&gt;
       &lt;name&gt;root&lt;/name&gt;
       &lt;module&gt;
         &lt;name&gt;ietf-bfd-ip-sh &lt;/name&gt;
         &lt;revision&gt;2016-07-04&lt;/revision&gt;
         &lt;namespace&gt;
           urn:ietf:params:xml:ns:yang:ietf-bfd-ip-sh
         &lt;/namespace&gt;
         &lt;conformance-type&gt;implement&lt;/conformance-type&gt;
       &lt;/module&gt;
       &lt;module&gt;
         &lt;name&gt;ietf-bfd-ip-mh &lt;/name&gt;
         &lt;revision&gt; 2016-07-04&lt;/revision&gt;
         &lt;namespace&gt;
           urn:ietf:params:xml:ns:yang:ietf-bfd-ip-mh
         &lt;/namespace&gt;
         &lt;conformance-type&gt;implement&lt;/conformance-type&gt;
       &lt;/module&gt;
     &lt;/schema&gt;
   &lt;/schema-mounts&gt;</artwork>
            </figure>

            <t>and the " ietf-connectionless-oam " module might have:</t>

            <figure>
              <artwork>&lt;ietf-connectionless-oam 
uri="urn:ietf:params:xml:ns:yang:ietf-connectionless-oam"&gt;
   ......
 &lt;test-point-locations&gt;
  &lt;ipv4-location&gt;192.0.2.1&lt;/ipv4-location&gt;
   ......
  &lt;root&gt;
   &lt;ietf-bfd-ip-sh uri="urn:ietf:params:xml:ns:yang:ietf-bfd-ip-sh"&gt;
    &lt;ip-sh&gt;
     foo
     ......
    &lt;/ip-sh&gt;
   &lt;/ietf-bfd-ip-sh&gt;
   &lt;ietf-bfd-ip-mh uri="urn:ietf:params:xml:ns:yang:ietf-bfd-ip-mh"&gt;
    &lt;ip-mh&gt;
     foo
     ......
    &lt;/ip-mh&gt;
   &lt;/ietf-bfd-ip-mh&gt;
  &lt;/root&gt;
 &lt;/test-point-locations&gt; 
&lt;/ietf-connectionless-oam&gt; </artwork>
            </figure>
          </section>
        </section>
      </section>

      <section title="LSP ping extension">
        <section title="Augment Method">
          <t>The following sections shows how the "ietf-connectionless-oam"
          model can be extended to support LSP ping technology. For this
          purpose, a set of extension are introduced such as technology-type
          extension and test-point attributes extension.</t>

          <t>Note that in MPLS WG, there is a LSP Ping YANG data model <xref
          target="I-D.zheng-mpls-lsp-ping-yang-cfg"/> to be produced. Users
          can choose to use "ietf-connectioless-oam" as basis and augment the
          "ietf-connectionless-oam" model with LSP Ping specific details in
          the model extension. The LSP Ping specific details can be the
          grouping defined in the LSP ping model.</t>

          <section title="Technology type extension">
            <t>No lsp-ping technology type has been defined in the
            "ietf-connectionless-oam" model. Therefore a technology type
            extension is required in the model extension.</t>

            <t>The snippet below depicts an example of augmenting the
            "ietf-connectionless-oam" with "lsp-ping" type:</t>

            <figure>
              <artwork>augment "/nd:networks/nd:network/nd:node/"
+"coam:location-type/coam:ipv4-location-type"
+"/coam:test-point-ipv4-location-list/"
        +"coam:test-point-locations/coam:technology"
{
   leaf lsp-ping{
   type string;
  }
}</artwork>
            </figure>
          </section>

          <section title="Test point attributes extension">
            <t>To support lsp-ping, the "ietf-connectionless-oam" model can be
            extended and add lsp-ping specific parameters can be defined and
            under "test-point-locations" list.</t>

            <t>User can reuse the attributes or groupings which are defined in
            <xref target="I-D.zheng-mpls-lsp-ping-yang-cfg"/> as follows:</t>

            <t>The snippet below depicts an example of augmenting the
            "test-point-locations" list with lsp ping attributes:</t>

            <figure>
              <artwork>augment "/nd:networks/nd:network/nd:node/"
+"coam:location-type/coam:ipv4-location-type"
+"/coam:test-point-ipv4-location-list/"
        +"coam:test-point-locations"
{ 
list lsp-ping {
         key "lsp-ping-name";
         leaf lsp-ping-name {
          type string {
            length "1..31";
         }
        mandatory "true";
        description "LSP Ping test name.";
        ......
      }</artwork>
            </figure>
          </section>
        </section>

        <section title="Schema Mount">
          <t>And another alternative method is using schema mount mechanism
          <xref target="I-D.ietf-netmod-schema-mount"/> in the
          "ietf-connectionless-oam". Within the "test-point-locations" list, a
          "root" attribute is defined to provide a mounted point for models
          mounted per "test-point-locations". Therefore, the
          "ietf-connectionless-oam" model can provide a place in the node
          hierarchy where other OAM YANG data models can be attached, without
          any special extension in the "ietf-connectionless-oam" YANG data
          models <xref target="I-D.ietf-netmod-schema-mount"/>. Note that the
          limitation of the Schema Mount method is it is not allowed to
          specify certain modules that are required to be mounted under a
          mount point.</t>

          <t>The snippet below depicts the definition of "root" attribute.</t>

          <figure>
            <artwork>      anydata root {
       yangmnt:mount-point root;
       description 
      "Root for models supported per
        test point";
      } </artwork>
          </figure>

          <t>The following section shows how the "ietf-connectionless-oam"
          model can use schema mount to support LSP-PING technology.</t>

          <section title="LSP-PING Modules be populated in schema-mount">
            <t>To support LSP-PING technology, "ietf-lspping" YANG module
            <xref target="I-D.zheng-mpls-lsp-ping-yang-cfg"/> might be
            populated in the "schema-mounts" container:</t>

            <figure>
              <artwork>   &lt;schema-mounts
       xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-schema-mount"&gt;
     &lt;mount-point&gt;
       &lt;module&gt; ietf-connectionless-oam &lt;/module&gt;
       &lt;name&gt;root&lt;/name&gt;
       &lt;use-schema&gt;
         &lt;name&gt;root&lt;/name&gt;
       &lt;/use-schema&gt;
     &lt;/mount-point&gt;
     &lt;schema&gt;
       &lt;name&gt;root&lt;/name&gt;
       &lt;module&gt;
         &lt;name&gt;ietf-lspping &lt;/name&gt;
         &lt;revision&gt;2016-03-18&lt;/revision&gt;
         &lt;namespace&gt;
           urn:ietf:params:xml:ns:yang: ietf-lspping
         &lt;/namespace&gt;
         &lt;conformance-type&gt;implement&lt;/conformance-type&gt;
       &lt;/module&gt;
     &lt;/schema&gt;
   &lt;/schema-mounts&gt;</artwork>
            </figure>

            <t>and the " ietf-connectionless-oam " module might have:</t>

            <figure>
              <artwork>&lt;ietf-connectionless-oam 
uri="urn:ietf:params:xml:ns:yang:ietf-connectionless-oam"&gt;
   ......
 &lt;test-point-locations&gt;
  &lt;ipv4-location&gt; 192.0.2.1&lt;/ipv4-location&gt;
   ......
  &lt;root&gt;
   &lt;ietf-lspping uri="urn:ietf:params:xml:ns:yang:ietf-lspping"&gt;
    &lt;lsp-pings&gt;
     foo
     ......
    &lt;/lsp-pings&gt;
   &lt;/ietf-lspping&gt;
  &lt;/root&gt;
 &lt;/test-point-locations&gt; 
&lt;/ietf-connectionless-oam&gt; </artwork>
            </figure>
          </section>
        </section>
      </section>
    </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 [RFC6241] or RESTCONF
      [RFC8040]. The lowest NETCONF layer is the secure transport layer, and
      the mandatory-to-implement secure transport is Secure Shell (SSH)
      [RFC6242]. The lowest RESTCONF layer is HTTPS, and the
      mandatory-to-implement secure transport is TLS [RFC5246].</t>

      <t>The NETCONF access control model [RFC6536] 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>The vulnerable "config true" subtrees and data nodes are the
      following:<list>
          <t>/nd:networks/nd:network/nd:node/cl-oam:location-type/cl-oam:ipv4-location-type/cl-oam:test-point-ipv4-location-list/cl-oam:test-point-locations/</t>

          <t>/nd:networks/nd:network/nd:node/cl-oam:location-type/cl-oam:ipv6-location-type/cl-oam:test-point-ipv6-location-list/cl-oam:test-point-locations/</t>

          <t>/nd:networks/nd:network/nd:node/cl-oam:location-type/cl-oam:mac-location-type/cl-oam:test-point-mac-address-location-list/cl-oam:test-point-locations/</t>

          <t>/nd:networks/nd:network/nd:node/cl-oam:location-type/cl-oam:group-as-number-location-type/cl-oam:test-point-as-number-location-list/cl-oam:test-point-locations/</t>

          <t>/nd:networks/nd:network/nd:node/cl-oam:location-type/cl-oam:group-system-id-location-type/cl-oam:test-point-system-info-location-list/cl-oam:test-point-locations/</t>
        </list></t>

      <t>Unauthorized access to any of these lists can adversely affect OAM
      management system handling of end-to-end OAM and coordination of OAM
      within underlying network layers. This may lead to inconsistent
      configuration, reporting, and presentation for the OAM mechanisms used
      to manage the network.</t>

      <t>Some of the readable data nodes in this YANG module may be considered
      sensitive or vulnerable in some network environments. It is thus
      important to control read access (e.g., via get, get-config, or
      notification) to these data nodes. These are the subtrees and data nodes
      and their sensitivity/vulnerability:<list>
          <t>/coam:cc-session-statistics-data/cl-oam:cc-ipv4-sessions-statistics/cl-oam:cc-session-statistics/cl-oam:session-count/</t>

          <t>/coam:cc-session-statistics-data/cl-oam:cc-ipv4-sessions-statistics/cl-oam:cc-session-statistics/cl-oam:session-up-count/</t>

          <t>/coam:cc-session-statistics-data/cl-oam:cc-ipv4-sessions-statistics/cl-oam:cc-session-statistics/cl-oam:
          session-down-count/</t>

          <t>/coam:cc-session-statistics-data/cl-oam:cc-ipv4-sessions-statistics/cl-oam:cc-session-statistics/cl-oam:session-admin-down-count/</t>

          <t>/coam:cc-session-statistics-data/cl-oam:cc-ipv6-sessions-statistics/cl-oam:cc-session-statistics/cl-oam:session-count/</t>

          <t>/coam:cc-session-statistics-data/cl-oam:cc-ipv6-sessions-statistics/cl-oam:cc-session-statistics/cl-oam:session-up-count//</t>

          <t>/coam:cc-session-statistics-data/cl-oam:cc-ipv6-sessions-statistics/cl-oam:cc-session-statistics/cl-oam:session-down-count/</t>

          <t>/coam:cc-session-statistics-data/cl-oam:cc-ipv6-sessions-statistics/cl-oam:cc-session-statistics/cl-oam:session-admin-down-count/</t>
        </list></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>URI: urn:ietf:params:xml:ns:yang:ietf-connectionless-oam

Registrant Contact: The IESG.

XML: N/A, the requested URI is an XML namespace.</artwork>
      </figure>

      <t>This document registers a YANG module in the YANG Module Names
      registry <xref target="RFC6020"/>.</t>

      <t>name: ietf-connectionless-oam</t>

      <t>namespace: urn:ietf:params:xml:ns:yang:ietf-connectionless-oam</t>

      <t>prefix: cl-oam</t>

      <t>reference: RFC XXXX</t>
    </section>

    <section title="Acknowlegements">
      <t>The authors of this document would like to thank Greg Mirsky and
      others for their sustainable review and comments, proposals to improve
      and stabilize document.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <reference anchor="RFC792">
        <front>
          <title>Internet Control Message Protocol</title>

          <author fullname="J.Postel" initials="J." surname="Postel">
            <organization/>
          </author>

          <date month="September" year="1981"/>
        </front>

        <seriesInfo name="RFC" value="792"/>
      </reference>

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

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

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

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

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

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

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

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

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

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

    <references title="Informative References">
      <?rfc include='reference.RFC.6136'?>

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

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

      <?rfc include="reference.I-D.ietf-spring-sr-yang"?>

      <?rfc include="reference.I-D.zheng-mpls-lsp-ping-yang-cfg"?>

      <?rfc include="reference.I-D.ietf-lime-yang-connection-oriented-oam-model"?>

      <?rfc include="reference.I-D.ietf-bfd-yang"?>

      <?rfc include="reference.I-D.ietf-lime-yang-connectionless-oam-methods"?>

      <?rfc include="reference.I-D.ietf-netmod-schema-mount"?>

      <?rfc include="reference.I-D.ietf-i2rs-yang-network-topo"?>

      <reference anchor="G.8013">
        <front>
          <title>OAM functions and mechanisms for Ethernet based
          networks</title>

          <author>
            <organization/>
          </author>

          <date year="2013"/>
        </front>

        <seriesInfo name="ITU-T" value="Recommendation G.8013/Y.1731"/>
      </reference>

      <reference anchor="G.800">
        <front>
          <title>Unified functional architecture of transport networks</title>

          <author>
            <organization/>
          </author>

          <date year="2016"/>
        </front>

        <seriesInfo name="ITU-T" value="Recommendation G.800"/>
      </reference>
    </references>
  </back>
</rfc>
