Add latest MEF NRP yang modules. 75/52775/1
authorDonald Hunter <donaldh@cisco.com>
Fri, 3 Mar 2017 17:40:07 +0000 (17:40 +0000)
committerDonald Hunter <donaldh@cisco.com>
Fri, 3 Mar 2017 17:40:07 +0000 (17:40 +0000)
Change-Id: I6fef54b4494837070f9897f2ddb079a0b4318274
Signed-off-by: Donald Hunter <donaldh@cisco.com>
nrp-api/pom.xml [new file with mode: 0644]
nrp-api/src/main/yang/nrm-connectivity.yang [new file with mode: 0644]
nrp-api/src/main/yang/nrp-interface.yang [new file with mode: 0644]
nrp-api/src/main/yang/tapi-common.yang [new file with mode: 0644]
nrp-api/src/main/yang/tapi-connectivity.yang [new file with mode: 0644]
nrp-api/src/main/yang/tapi-topology.yang [new file with mode: 0644]
pom.xml

diff --git a/nrp-api/pom.xml b/nrp-api/pom.xml
new file mode 100644 (file)
index 0000000..b57331a
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
+
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <groupId>org.opendaylight.mdsal</groupId>
+    <artifactId>binding-parent</artifactId>
+    <version>0.10.0-SNAPSHOT</version>
+    <relativePath/>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.opendaylight.unimgr</groupId>
+  <artifactId>unimgr-nrp-tapi-api</artifactId>
+  <version>0.2.0-SNAPSHOT</version>
+  <packaging>bundle</packaging>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.opendaylight.mdsal.model</groupId>
+      <artifactId>ietf-network-2015-06-08</artifactId>
+    </dependency>
+  </dependencies>
+
+</project>
diff --git a/nrp-api/src/main/yang/nrm-connectivity.yang b/nrp-api/src/main/yang/nrm-connectivity.yang
new file mode 100644 (file)
index 0000000..06acc9d
--- /dev/null
@@ -0,0 +1,899 @@
+module nrm-connectivity {
+    namespace "urn:mef:yang:nrm-connectivity";
+    prefix nrm-connectivity;
+    import tapi-connectivity {
+        prefix tapi-connectivity;
+    }
+    import tapi-common {
+        prefix tapi-common;
+    }
+    organization "Metro Ethernet Forum (MEF)";
+    contact "MEF";
+    description "none";
+    revision 2017-02-27 {
+        description "MEF NRP 1.0.alpha";
+        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020 and RFC 6087";
+    }
+    /***********************
+    * package main
+    **********************/
+        /***********************
+        * package object-classes
+        **********************/
+            grouping cg-eth-enni-spec {
+                leaf max-frame-size {
+                    type natural-number;
+                    description "MEF 7.3: This value limits the length of frames carried by an OVC that associates an OVC End Point at this ENNI in bytes. It is one of the ENNI Operator Multi-lateral attributes, which requires the CENs at the ENNI-N to agree on the values but may allow these values to be different.";
+                }
+                container l2cp-peering-list {
+                    uses l2cp-peering;
+                    description "MEF 7.3: This attribute represents the L2CP Peering Service defined in MEF 45 section 8.2 when applied to the ENNI. It is one of the ENNI Operator Multi-lateral attributes, which requires the CENs at the ENNI-N to agree on the values but may allow these values to be different.";
+                }
+                leaf tagged-l2cp-processing {
+                    type tagged-l2cp-processing;
+                    description "MEF 7.3: This attribute represents the Tagged L2CP Processing defined in MEF 45 section 8.3 (802.1 compliant or 802.1 non-compliant. Desired to be 802.1 compliant). It is one of the ENNI Operator Multi-lateral attributes, which requires the CENs at the ENNI-N to agree on the values but may allow these values to be different.";
+                }
+                list cg-eth-spor-sospecific-srv-attributes {
+                    key 'uuid';
+                    uses cg-eth-spor-sospecific-srv-attributes;
+                    description "none";
+                }
+                uses cg-eth-frame-aggr-trm-spec;
+                description "none";
+            }
+            container cg-eth-inni-spec {
+                leaf max-frame-size {
+                    type natural-number;
+                    description "none";
+                }
+                uses cg-eth-frame-aggr-trm-spec;
+                description "none";
+            }
+            grouping cg-eth-uni-spec {
+                leaf elmi-enabled {
+                    type boolean;
+                    description "MEF 7.3: This attribute denotes whether the ELMI is enabled or not. When the value is TRUE, the CEN MUST meet the mandatory requirements in MEF 16 that apply to the UNI-N.
+                        Note: Ethernel Local Management Interface protocol contents are defined which clearly identify MEF Service/Resource constructs like UNI and EVC, hence the attribute cannot be placed in an ethernet generic class.";
+                }
+                leaf max-frame-size {
+                    type natural-number;
+                    description "10.3: The value for the UNI Maximum Service Frame Size is a positive integer in bytes.
+                        [R71] The value of the UNI Maximum Service Frame Size MUST be at least 1522 bytes.";
+                }
+                container default-ce-vlan-id {
+                    uses vlan-id;
+                    description "Mapped from original 7.3 'untaggedAndPriorityTaggedCeVlanId'
+                        10.3: At the given UNI, the Customer Edge VLAN ID (CE-VLAN ID) can be used to identify an EVC that associates this UNI. There are 4095 CE-VLAN IDs numbered 1 through 4095. The CE-VLAN ID for a VLAN
+                        Tagged Service Frame is the value of the VLAN ID in the tag.
+                        [R73] Untagged and Priority Tagged Service Frames MUST have the same CE VLAN ID.
+                        [R74] The CE-VLAN ID for Untagged and Priority Tagged Service Frames MUST be in the range 1, 2 , …, 4094.";
+                }
+                leaf max-num-of-ce-vlan-id-per-conn-serv-end-point {
+                    type positive-integer;
+                    description "none";
+                }
+                leaf service-multiplexing-enabled {
+                    type boolean;
+                    description "7.3: When this attribute value is enabled,  there can be multiple EVCs at the UNI. This attribute can be enabled only when All-to-one bundling is disabled.
+                        10.3: Service Multiplexing can be either Enabled or Disabled.
+                        [R72] A UNI with Service Multiplexing Enabled MUST be able to support multiple EVCs.
+                        [O2] When a UNI has Service Multiplexing Enabled, Point-to-Point EVCs and Multipoint EVCs MAY be multiplexed in any combination at a UNI.";
+                }
+                leaf all-to-one-bundling-enabled {
+                    type boolean;
+                    description "7.3: When a UNI has All to One Bundling Enabled, all CE-VLAN IDs MUST map to a single EVC at the UNI. This attribute can be enabled only when Service Multiplexing and Bundling are disabled.";
+                }
+                leaf token-share-enabled {
+                    type boolean;
+                    description "MEF 6.2: This is used to indicate whether a given UNI is capable of sharing tokens across Bandwidth Profile Flows in an Envelope. The allowed values, at each UNI, are Enabled or Disabled.
+                        [R2] A UNI, with Token Share Enabled, MUST be able to support two or more Bandwidth Profile Flows in at least one Envelope for Bandwidth Profile as specified in Section 11 of MEF 10.3 [6]
+                        [D1] A UNI, with Token Share Enabled, SHOULD be able to support two or more Bandwidth Profile Flows in every Envelope at that UNI.
+                        [R3] A UNI with Token Share Disabled, MUST have exactly one Bandwidth Profile Flow per Envelope";
+                }
+                leaf l2cp-address-set {
+                    type l2cp-address-set;
+                    description "MEF 45: The L2CP Address Set Service Attribute specifies the subset of the Bridge Reserved Addresses that are filtered (i.e. L2CP Frames with this destination address are Peered or Discarded but not Passed) at a L2CP Decision Point.
+                        The basic construct of the L2CP behavioral model is a Decision Point that determines how an L2CP Frame is processed at an External Interface. L2CP Frames that enter
+                        the Decision Point from the External Interface will either be Passed to the EVC (or OVC), or Peered by redirecting the frame to a Protocol Entity, or Discarded. L2CP Frames that enter the Decision Point
+                        from the EVC (or OVC) will either be Passed to the External Interface, or Peered by redirecting the frame to a Protocol Entity, or Discarded.";
+                }
+                container l2cp-peering-list {
+                    uses l2cp-peering;
+                    description "MEF 45: The L2CP Peering Service Attribute is a list of Layer 2 Control Protocols that will be Peered by a protocol entity at a UNI, VUNI, or ENNI. Each entry in the list specifies the Protocol Identifier and the Destination Address in use by the protocol entity.";
+                }
+                container ingress-cg-eth-bwpflow {
+                    uses cg-eth-bwp-flow;
+                    description "none";
+                }
+                container egress-cg-eth-bwpflow {
+                    uses cg-eth-bwp-flow;
+                    description "none";
+                }
+                list cg-eth-envelope-list {
+                    key 'uuid';
+                    uses cg-eth-envelope;
+                    description "none";
+                }
+                uses cg-eth-frame-aggr-trm-spec;
+                description "none";
+            }
+            container cg-ety-trm-spec {
+                leaf-list physical-layer-list {
+                    type physical-layer;
+                    description "MEF 7.3: This attribute is a list of physical layers, one for each physical link implementing the UNI or ENNI. Different physical links can use different physical layers. The Physical Layer for each physical link implementing the UNI or ENNI MUST is one of the PHYs listed in IEEE Std 802.3 – 2012 but excluding 1000BASE-PX-D and 1000BASE-PX-U.
+                        G.8052: This attribute identifies the PHY type of the ETY trail termination. See clause 30.3.2.1.2 of [IEEE 802.3].
+                        IEEE 802.3: A read-only value that identifies the PHY type. The enumeration of the type is such that the value matches the clause number of this International Standard that specifies the particular PHY. The value of this attribute maps to the value of aMAUType. The enumeration “none” can only occur in a standard implementation where an MII exists and there is nothing connected. However, the attribute aMIIDetect should be used to determine whether an MII exists or not.";
+                }
+                list sync-mode-list {
+                    key 'link-id';
+                    min-elements 1;
+                    uses sync-mode-per-link;
+                    description "MEF 7.3: This attribute is a list with one item for each of the physical links. When the value of an item is 'Enabled,' the bits transmitted from the CEN to the CE on the physical link corresponding to the item can be used by the CE as a bit clock reference.
+                        G.8052: no equivalent definition
+                        IEEE 802.3: oTimeSync class (?), 1:1 with oMAU.";
+                }
+                leaf number-of-links {
+                    type positive-integer;
+                    description "none";
+                }
+                container port-convs-id-to-agg-link-map-list {
+                    uses conversation-id-to-aggregation-link-map;
+                    description "MEF 7.3: This attribute is applicable only when the UNI or ENNI resiliency attribute has the value of All Active. Its value is a Port Conversation ID to Aggregation Link Map as defined in IEEE Std 802.1AX – 2014.
+                        G.8052: no equivalent definition - likely because refers to IEEE Std 802.1AX – 2008, where Conversation-sensitive LACP was not yet defined.";
+                }
+                leaf link-oam-enabled {
+                    type boolean;
+                    description "MEF 7.3: This attribute denotes the Link OAM is enabled or not at the UNI or the ENNI. When the value of the Link OAM attribute is TRUE, Link OAM must be run on all physical links in the UNI/ENNI.";
+                }
+                leaf lag-link-meg-enabled {
+                    type boolean;
+                    description "MEF 7.3: This attribute denotes the Link Aggregation Link MEG enabled or not at the UNI or at the ENNI. When the value  is TRUE, the Service Provider or the Operator must operate the LAG Link MEG on each link in the EI.
+                        To be updated accordingly to the development of OAM model. E.g. can be replaced by explicit provisioning of MEP on LAG links.";
+                }
+                leaf link-aggregation {
+                    type interface-resiliency;
+                    description "MEF 7.3: This attribute represents the Link Aggregation for a UNI or an ENNI. Its value is one of None, 2-Link Active/Standby, All Active, or Other. In MEF 10.3 it is called UNI Resiliency. the value of All Active is added in MEF 10.3.2.
+                        G.8052: no equivalent definition found.";
+                }
+                description "none";
+            }
+            grouping cg-eth-frame-aggr-trm-spec {
+                description "none";
+            }
+            grouping cg-eth-frame-flow-cpa-aspec {
+                leaf cos-mapping-type {
+                    type cos-or-eec-mapping-type;
+                    description "MEF 7.3 (UML): The Class of Service (CoS) is used to specify ingress Bandwidth Profiles. The values of CoS is a triple of the form mapping type, SEP (Service End Point) based, PCP based or DSCP based.";
+                }
+                container source-mac-address-limit {
+                    uses source-mac-address-limit;
+                    description "MEF 10.3: Source MAC Address Limit can be either Enabled or Disabled.
+                        This attribute limits the number of source MAC Addresses that can be used in ingress Service Frames of all types over a time interval. Two independent parameters control the behavior of this attribute: N : A positive integer and t : A time interval.
+                        This attribute operates by maintaining a list of maximum length N of source MAC addresses which are aged-out of the list if not seen in a time interval t. If an ingress Service Frame arrives with a new source MAC address when the list is full, the Service Frame is discarded.
+                        MEF 7.3: This attribute limits the number of source MAC Addresses that can be used in ingress EI Frames mapped to the EVC End Point or the OVC End Point of all types over a time interval. When not present, the number of source MAC addresses is unlimited.";
+                }
+                leaf eec-mapping-type {
+                    type cos-or-eec-mapping-type;
+                    description "MEF 7.3 (UML): The Egress Equivalence Class (EEC) is used to specify Egress Bandwidth Profiles. The values of EEC is a triple of the form mapping type, SEP (Service End Point) based, PCP based or DSCP based. When _eecIdentifier is null this attrubute shall be null. Otherwise both shall be set.";
+                }
+                container agg-link-depth {
+                    uses agg-link-depth;
+                    description "MEF 7.3: 
+                        EvcEndPoint: This attribute only applies to an EVC End Point when the UNI resiliency has the value All Active. The EVC End Point Aggregation Link Depth Service Attribute value is a list of pairs of the form < VLAN ID, ,n> where the CE-VLAN ID value that is contained in the value of the EVC End Point Map and n is an integer in the range 1 to the value of the EI Number of Links n specifies the number of links in the value of the EI Port Conversation ID to Aggregation Link Map for the VLAN ID value.
+                        OvcEndPoint: This attribute only applies to an OVC End Point at ENNI when the EI Link Aggregation has the value All Active. This attribute value is a list of pairs of the form < S-VLAN ID, ,n> where the S-VLAN ID value that is contained in the value of the OVC End Point Map and n is an integer in the range 1 to the value of the EI Number of Links n specifies the number of links in the value of the EI Port Conversation ID to Aggregation Link Map for the VLAN ID value.";
+                }
+                container cg-eth-color-identifier {
+                    uses cg-eth-color-identifier;
+                    description "none";
+                }
+                leaf end-point-role {
+                    type ovc-end-point-role;
+                    description "End Point Role can be Root, Leaf for EVC End Points, Root, Leaf and Trunk for OVC End Poins.";
+                }
+                list s-vlan-id-list {
+                    key 'type';
+                    uses vlan-id-listing;
+                    description "none";
+                }
+                container ce-vlan-id-list {
+                    uses vlan-id-listing;
+                    description "ceVlanIdList maps 7.3 evcEndPointMap.
+                        MEF 7.3: This attribute provides the list of CE-VLAN IDs those map to the EVC. MEF 10.3 lists this attribute (CE-VLAN ID/EVC map) as UNI service attribute while MEF 26.2 decided to move this on as endpoint service attribute. Decided to move this one to endpoint to be consistent. MEF 45 allows this attribute to be elastic.";
+                }
+                container root-svlan-id-list {
+                    uses vlan-id-listing;
+                    description "none";
+                }
+                container leaf-svlan-id-list {
+                    uses vlan-id-listing;
+                    description "none";
+                }
+                container cg-eth-spor-sospecific-srv-attributes {
+                    uses cg-eth-spor-sospecific-srv-attributes;
+                    description "none";
+                }
+                container cg-eth-bwp-flow {
+                    uses cg-eth-bwp-flow;
+                    description "none";
+                }
+                container ingress-cg-ethbwpflow {
+                    uses cg-eth-bwp-flow;
+                    description "none";
+                }
+                list eth-cg-eth-cos-identifier {
+                    key 'uuid';
+                    uses eth-cg-eth-cos-identifier;
+                    description "none";
+                }
+                list cg-eth-eec-identifier {
+                    key 'uuid';
+                    uses cg-eth-eec-identifier;
+                    description "none";
+                }
+                list cg-eth-egress-map {
+                    key 'uuid';
+                    uses cg-eth-egress-map;
+                    description "none";
+                }
+                description "none";
+            }
+            grouping cg-eth-conn-serv-spec {
+                leaf connection-type {
+                    type connection-type;
+                    description "7.3 'connectionType' replaced by G.8052 'connectionType' attribute.";
+                }
+                leaf unicast-frame-delivery {
+                    type frame-delivery;
+                    description "none";
+                }
+                leaf multicast-frame-delivery {
+                    type frame-delivery;
+                    description "none";
+                }
+                leaf broadcast-frame-delivery {
+                    type frame-delivery;
+                    description "none";
+                }
+                leaf ce-vlan-pcp-preservation {
+                    type boolean;
+                    description "MEF 7.3 (UML): The CE-VLAN PCP preservation represents the PCP value relationship between the ingress Service Frame and its corresponding egress Service Frame(s). In MEF 10.3, it is called CE VLAN ID COS Preservation. ";
+                }
+                leaf ce-vlan-dei-preservation {
+                    type boolean;
+                    description "MEF 7.3 (UML): The CE-VLAN DEI Preservation Service Attribute for EVC/OVC can be used to preserve the value of the DEI field in VLAN Tagged Service Frames across a service. This is not inlcuded in MEF 10.3 but added in MEV 26.2. Future consideration will be included in MEF 10.x.";
+                }
+                leaf max-frame-size {
+                    type positive-integer;
+                    description "none";
+                }
+                leaf cos-name-list {
+                    type string;
+                    description "none";
+                }
+                leaf ce-vlan-id-preservation {
+                    type vlan-id-preservation;
+                    description "MEF 7.3 EVC/OVC ceVlanIdPreservation added to CgEthConnServSpec class, with the OVC type (PRESERVE/STRIP/RETAIN) as it depends on EVC/OVC decomposition performed by SOFs.
+                        MEF 7.3 defines this attribute separately in EVC and OVC. When defined in OVC, the type is more complex:
+                        This attribute describes a relationship between the format of the VLAN ID and related fields values of the frame at one External Interface and the format and VLAN ID  and related fields values of the corresponding frame at another External Interface. The value of OVC CE-VLAN ID Preservation Service Attribute can be one of PRESERVE, STRIP, or RETAIN.";
+                }
+                leaf s-vlan-pcp-preservation {
+                    type boolean;
+                    description "MEF 7.3 (UML): This attribute describes a relationship between the S-VLAN PCP value of a frame at one ENNI and the S-VLAN PCP of the corresponding frame at another ENNI supported by the Operator CEN where each ENNI has an OVC End Point that is associated by the OVC.";
+                }
+                leaf s-vlan-dei-preservation {
+                    type boolean;
+                    description "MEF 7.3 (UML): This attribute describes a relationship between the S-VLAN DEI value of a frame at one ENNI and the S-VLAN DEI of the corresponding frame at another ENNI supported by the Operator CEN where each ENNI has an OVC End Point that is associated by the OVC.";
+                }
+                leaf available-meg-level {
+                    type available-meg-level;
+                    description "none";
+                }
+                leaf l2cp-address-set {
+                    type l2cp-address-set;
+                    description "l2cpAddressSet maps 7.3 ovcL2cpAddressSet.
+                        MEF 7.3 (UML): This attribute is the L2CP Address Set Service Attribute that is defined in MEF 45 when it is applied to the OVC.";
+                }
+                container cg-eth-carrier-ethernet-sls {
+                    uses cg-eth-carrier-ethernet-sls;
+                    description "none";
+                }
+                description "none";
+            }
+            grouping cg-eth-spor-sospecific-srv-attributes {
+                leaf sp-or-so-id {
+                    type identifier45;
+                    description "none";
+                }
+                leaf token-share-enabled {
+                    type boolean;
+                    description "none";
+                }
+                leaf-list operator-conn-serv-port-list {
+                    type leafref {
+                        path '/tapi-common:context/tapi-connectivity:connectivity-service/tapi-connectivity:service-end-point/tapi-connectivity:local-id';
+                    }
+                    description "none";
+                }
+                leaf uuid {
+                    type tapi-common:universal-id;
+                    description "none";
+                }
+                list cg-eth-envelope-list {
+                    key 'uuid';
+                    uses cg-eth-envelope;
+                    description "none";
+                }
+                description "none";
+            }
+            grouping eth-cg-eth-cos-identifier {
+                leaf uuid {
+                    type tapi-common:universal-id;
+                    description "none";
+                }
+                description "none";
+            }
+            grouping cg-eth-egress-map {
+                leaf uuid {
+                    type tapi-common:universal-id;
+                    description "none";
+                }
+                description "none";
+            }
+            grouping cg-eth-color-identifier {
+                leaf uuid {
+                    type tapi-common:universal-id;
+                    description "none";
+                }
+                description "none";
+            }
+            grouping cg-eth-eec-identifier {
+                leaf uuid {
+                    type tapi-common:universal-id;
+                    description "none";
+                }
+                description "none";
+            }
+            grouping cg-eth-bwp-flow {
+                leaf uuid {
+                    type tapi-common:universal-id;
+                    description "none";
+                }
+                description "none";
+            }
+            grouping cg-eth-envelope {
+                leaf uuid {
+                    type tapi-common:universal-id;
+                    description "none";
+                }
+                list cg-eth-bwp-flow-list {
+                    key 'uuid';
+                    min-elements 1;
+                    uses cg-eth-bwp-flow;
+                    description "none";
+                }
+                description "none";
+            }
+            grouping cg-eth-carrier-ethernet-sls {
+                leaf uuid {
+                    type tapi-common:universal-id;
+                    description "none";
+                }
+                list cg-eth-sls-cos-name-entry {
+                    key 'uuid';
+                    uses cg-eth-sls-cos-name-entry;
+                    description "none";
+                }
+                description "none";
+            }
+            grouping cg-eth-sls-cos-name-entry {
+                leaf uuid {
+                    type tapi-common:universal-id;
+                    description "none";
+                }
+                list cg-eth-sls-objective-and-parameters {
+                    key 'uuid';
+                    uses cg-eth-sls-objective-and-parameters;
+                    description "none";
+                }
+                description "none";
+            }
+            grouping cg-eth-sls-objective-and-parameters {
+                leaf uuid {
+                    type tapi-common:universal-id;
+                    description "none";
+                }
+                description "none";
+            }
+
+        /***********************
+        * package diagrams
+        **********************/
+
+        /***********************
+        * package type-definitions
+        **********************/
+            typedef natural-number {
+                type uint64;
+                description "An integer >=0";
+            }
+            grouping l2cp-peering {
+                container protocol-id {
+                    uses l2cp-protocol;
+                    description "This is a L2CP Protocol Identifier.";
+                }
+                leaf destination-address {
+                    type natural-number;
+                    description "This is a Mac Address.";
+                }
+                leaf-list link-id-list {
+                    type positive-integer;
+                    description "It is possible that a protocol (e.g. ESMC) could operate on some, but not all, of the physical
+                        links. When linkId is not listed, the protocol peering applies to all members of the aggregation link.";
+                }
+                description "This is a list specifies the L2CP Protocol Identifier and the Destination Address in use by the protocol entity.";
+            }
+            typedef tagged-l2cp-processing {
+                type enumeration {
+                    enum 802-1-compliant {
+                        description "none";
+                    }
+                    enum 802-1-non-compliant {
+                        description "none";
+                    }
+                }
+                description "Either 802.1 compliant or not. Refer to MEF 45.";
+            }
+            grouping vlan-id {
+                leaf vlan-id {
+                    type positive-integer;
+                    description "This is the Vlan ID value.";
+                }
+                description "This is for VLAN ID from 1 to 4094";
+            }
+            typedef positive-integer {
+                type uint64;
+                description "An integer >0";
+            }
+            typedef l2cp-address-set {
+                type enumeration {
+                    enum cta {
+                        description "CE-Vlan Tag Aware";
+                    }
+                    enum ctb {
+                        description "CE-Vlan Tag Blind";
+                    }
+                    enum ctb2 {
+                        description "CE-Vlan Tag Blind option 2";
+                    }
+                }
+                description "This lists the L2CP Address Set. Refer to MEF 45.";
+            }
+            typedef physical-layer {
+                type enumeration {
+                    enum 10base2 {
+                        description "none";
+                    }
+                    enum 10base5 {
+                        description "none";
+                    }
+                    enum 10base-f {
+                        description "none";
+                    }
+                    enum 10base-fb {
+                        description "none";
+                    }
+                    enum 10base-fl {
+                        description "none";
+                    }
+                    enum 10base-fp {
+                        description "none";
+                    }
+                    enum 10base-t {
+                        description "none";
+                    }
+                    enum 10base-te {
+                        description "none";
+                    }
+                    enum 10broad36 {
+                        description "none";
+                    }
+                    enum 10pass-ts {
+                        description "none";
+                    }
+                    enum 100base-bx10 {
+                        description "none";
+                    }
+                    enum 100base-fx {
+                        description "none";
+                    }
+                    enum 100base-lx10 {
+                        description "none";
+                    }
+                    enum 100base-t {
+                        description "none";
+                    }
+                    enum 100base-t2 {
+                        description "none";
+                    }
+                    enum 100base-t4 {
+                        description "none";
+                    }
+                    enum 100base-tx {
+                        description "none";
+                    }
+                    enum 100base-x {
+                        description "none";
+                    }
+                    enum 1000base-bx10 {
+                        description "none";
+                    }
+                    enum 1000base-cx {
+                        description "none";
+                    }
+                    enum 1000base-kx {
+                        description "none";
+                    }
+                    enum 1000base-lx {
+                        description "none";
+                    }
+                    enum 1000base-lx10 {
+                        description "none";
+                    }
+                    enum 1000base-px10 {
+                        description "none";
+                    }
+                    enum 1000base-px20 {
+                        description "none";
+                    }
+                    enum 1000base-sx {
+                        description "none";
+                    }
+                    enum 1000base-t {
+                        description "none";
+                    }
+                    enum 1000base-x {
+                        description "none";
+                    }
+                    enum 10gbase-cx4 {
+                        description "none";
+                    }
+                    enum 10gbase-e {
+                        description "none";
+                    }
+                    enum 10gbase-er {
+                        description "none";
+                    }
+                    enum 10gbase-ew {
+                        description "none";
+                    }
+                    enum 10gbase-kr {
+                        description "none";
+                    }
+                    enum 10gbase-kx4 {
+                        description "none";
+                    }
+                    enum 10gbase-l {
+                        description "none";
+                    }
+                    enum 10gbase-lr {
+                        description "none";
+                    }
+                    enum 10gbase-lrm {
+                        description "none";
+                    }
+                    enum 10gbase-lw {
+                        description "none";
+                    }
+                    enum 10gbase-lx4 {
+                        description "none";
+                    }
+                    enum 10gbase-pr {
+                        description "none";
+                    }
+                    enum 10gbase-prx {
+                        description "none";
+                    }
+                    enum 10gbase-r {
+                        description "none";
+                    }
+                    enum 10gbase-s {
+                        description "none";
+                    }
+                    enum 10gbase-sr {
+                        description "none";
+                    }
+                    enum 10gbase-sw {
+                        description "none";
+                    }
+                    enum 10gbase-t {
+                        description "none";
+                    }
+                    enum 10gbase-w {
+                        description "none";
+                    }
+                    enum 10gbase-x {
+                        description "none";
+                    }
+                    enum 100gbase-r {
+                        description "none";
+                    }
+                    enum 100gbase-cr10 {
+                        description "none";
+                    }
+                    enum 100gbase-er4 {
+                        description "none";
+                    }
+                    enum 100gbase-lr4 {
+                        description "none";
+                    }
+                    enum 100gbase-sr10 {
+                        description "none";
+                    }
+                    enum 40gbase-r {
+                        description "none";
+                    }
+                    enum 40gbase-cr4 {
+                        description "none";
+                    }
+                    enum 40gbase--fr {
+                        description "none";
+                    }
+                    enum 40gbase-kr4 {
+                        description "none";
+                    }
+                    enum 40gbase-lr4 {
+                        description "none";
+                    }
+                    enum 40gbase-sr4 {
+                        description "none";
+                    }
+                    enum 1base5 {
+                        description "none";
+                    }
+                    enum 2base-tl {
+                        description "none";
+                    }
+                    enum 1g-epon {
+                        description "none";
+                    }
+                    enum 10g-epon {
+                        description "none";
+                    }
+                    enum 10-1g-epon {
+                        description "none";
+                    }
+                    enum 10-10g-epon {
+                        description "none";
+                    }
+                    enum other {
+                        description "none";
+                    }
+                    enum none {
+                        description "none";
+                    }
+                }
+                description "IEEE802.3 (2012) defined list excluding 1000BASE-PX-D and 1000BASE-PX-U. NONE is added with further MEF 10.3 discussion, for supporting logical interfaces.";
+            }
+            grouping sync-mode-per-link {
+                leaf link-id {
+                    type natural-number;
+                    description "This is the link ID of the link in the Aggregation Link.";
+                }
+                leaf sync-mode-enabled {
+                    type boolean;
+                    description "This attribute denotes whether the Synchronous Mode is enabled (on the link with the Link ID).";
+                }
+                description "A link may consist of one or more physical ports. This data type includes the link ID and the sync mode of the physical port associated to the link Id.";
+            }
+            typedef interface-resiliency {
+                type enumeration {
+                    enum none {
+                        description "none";
+                    }
+                    enum 2-link-active-standby {
+                        description "none";
+                    }
+                    enum all-active {
+                        description "none";
+                    }
+                    enum other {
+                        description "none";
+                    }
+                }
+                description "The method for protection, if any, against a physical link failure. Refer to MEF 10.3.2 and MEF 26.2.";
+            }
+            grouping conversation-id-to-aggregation-link-map {
+                leaf conversation-id {
+                    type natural-number;
+                    description "The conversation ID is a Vlan ID or 0 for untagged or priority tagged frame.. ";
+                }
+                leaf-list link-id-list {
+                    type natural-number;
+                    min-elements 1;
+                    description "The link ID of the aggregation link.";
+                }
+                description "This is a Port Conversation ID to Aggregation Link Map as defined in IEEE Std 802.1AX – 2014.";
+            }
+            typedef cos-or-eec-mapping-type {
+                type enumeration {
+                    enum end-point {
+                        description "Using EVC End Point or OVC End Point to map to the CoS Name as CoS ID.";
+                    }
+                    enum pcp {
+                        description "Using PCP field to map to the CoS Name as CoS ID.";
+                    }
+                    enum dscp {
+                        description "Using DSCP field to map to the CoS Name as CoS ID.";
+                    }
+                }
+                description "This lists the Class of Service identifier type, or the Equivalence Class Identifier type. ";
+            }
+            grouping source-mac-address-limit {
+                leaf limit {
+                    type natural-number;
+                    description "This attribute denotes the maximum acceptable source MAC addresses.";
+                }
+                leaf time-interval {
+                    type natural-number;
+                    description "This attribute denotes the time interval in milliseconds.";
+                }
+                description "This limits the number of source MAC Addresses that can be used in ingress external interface frames mapped to the End Point of all types over a time interval.";
+            }
+            grouping agg-link-depth {
+                container vlan-id {
+                    uses vlan-id;
+                    description "The ingress frame Vlan ID. ";
+                }
+                leaf link-depth {
+                    type positive-integer;
+                    description "The number of links for the aggregation link.";
+                }
+                description "This is a pair of <VLAN ID, link depth> indicating that a given VLAN ID maps to a given number of links in the Port Conversation ID to Aggregation Link Map.";
+            }
+            typedef ovc-end-point-role {
+                type enumeration {
+                    enum root {
+                        description "OVC End Point has role of root for the OVC.";
+                    }
+                    enum leaf {
+                        description "OVC End Point has role of leaf for the OVC.";
+                    }
+                    enum trunk {
+                        description "OVC End Point has role of trunk for the OVC.";
+                    }
+                }
+                description "The value indicates how external interface frames mapped to the  OVC End Point can be forwarded.";
+            }
+            grouping vlan-id-listing {
+                leaf type {
+                    type vlan-id-mapping-type;
+                    description "Can be LIST, or ALL, or EXCEPT.";
+                }
+                list vlan-id-list {
+                    key 'vlan-id';
+                    uses vlan-id;
+                    description "This is a list of Vlan IDs.";
+                }
+                description "The list VLAN IDs, either when type=LIST, or when type==EXCEPT (which means the VLAN IDs except the listed). When type=ALL, the vlanId list is not applicable.";
+            }
+            typedef connection-type {
+                type enumeration {
+                    enum point-to-point {
+                        description "none";
+                    }
+                    enum multipoint {
+                        description "none";
+                    }
+                    enum rooted-multipoint {
+                        description "none";
+                    }
+                }
+                description "This is for EVC or OVC connection types, including point to point, multi-point and rooted multi-point.";
+            }
+            typedef frame-delivery {
+                type enumeration {
+                    enum discard {
+                        description "Frame must be discarded.";
+                    }
+                    enum conditionally {
+                        description "Frame will be delivered with specified condition.";
+                    }
+                    enum unconditionally {
+                        description "Frame will be delivered unconditionally.";
+                    }
+                }
+                description "Service frame delivery defined in MEF 10.3. When the value is conditionally, the specific condition has to be addresses by the users. What conditions should be supported are not in the scope.";
+            }
+            typedef vlan-id-preservation {
+                type enumeration {
+                    enum preserve {
+                        description "To achieve EVC CE-VLAN ID Preservation.";
+                    }
+                    enum retain {
+                        description "C-Tag, if present, is encapsulated with the C-Tag VLAN ID value retained.";
+                    }
+                    enum strip {
+                        description "C-Tag is discarded.";
+                    }
+                }
+                description "This is for Vlan ID Preservation. Refer to MEF 26.2 section 12.7.";
+            }
+            typedef available-meg-level {
+                type enumeration {
+                    enum none {
+                        description "Indicates that SOAM EI Frames are not guaranteed to pass over this OVC at any MEG Level.";
+                    }
+                    enum 0 {
+                        description "none";
+                    }
+                    enum 1 {
+                        description "none";
+                    }
+                    enum 2 {
+                        description "none";
+                    }
+                    enum 3 {
+                        description "none";
+                    }
+                    enum 4 {
+                        description "none";
+                    }
+                    enum 5 {
+                        description "none";
+                    }
+                    enum 6 {
+                        description "none";
+                    }
+                    enum 7 {
+                        description "none";
+                    }
+                }
+                description "This enumeration is for available MEG level, can be either NONE or value 0..7.  NONE indicates that SOAM EI Frames are not guaranteed to pass over at any MEG Level.";
+            }
+            typedef identifier45 {
+                type string;
+                description "Unique by network administrative domain, containing no more than 45 characters and non-null RFC Display String but not contain the characters 0x00 through 0x1f.";
+            }
+            grouping l2cp-protocol {
+                leaf l2cp-protocol-type {
+                    type l2cp-protocol-type;
+                    description "This attribute specifies the type of L2CP protocol, i.e., LLC or EtherType.";
+                }
+                leaf llc-address-or-ether-type {
+                    type natural-number;
+                    description "This attribute specifies the LLC address or the EtherType value.";
+                }
+                leaf sub-type {
+                    type natural-number;
+                    description "This attribute specifies the subtype of the L2CP protocol.";
+                }
+                description "This data type defines a L2CP protocol (LLC address type or EtherType) with possible subtype.";
+            }
+            typedef l2cp-protocol-type {
+                type enumeration {
+                    enum ethertype {
+                        description "EtherType for L2CP, e.g., LLDP (0x88CC).";
+                    }
+                    enum llc {
+                        description "Logical Link Control sublayer address for L2CP, e.g., STP (0x42).";
+                    }
+                }
+                description "This lists the L2CP protocol types, either EtherType, or LLC Address.";
+            }
+            typedef vlan-id-mapping-type {
+                type enumeration {
+                    enum all {
+                        description "All Vlan IDs.";
+                    }
+                    enum except {
+                        description "All Vlan IDs except the listed.";
+                    }
+                    enum list {
+                        description "List of Vlan IDs.";
+                    }
+                }
+                description "Vlan ID types, ALL for all vlan IDs, LIST for a list of Vlan IDs, EXCEPT for all Vlan IDs except the listed. ";
+            }
+
+
+}
diff --git a/nrp-api/src/main/yang/nrp-interface.yang b/nrp-api/src/main/yang/nrp-interface.yang
new file mode 100644 (file)
index 0000000..c36a8a1
--- /dev/null
@@ -0,0 +1,75 @@
+module nrp-interface {
+    namespace "urn:mef:yang:nrp-interface";
+    prefix nrp-interface;
+    import tapi-connectivity {
+        prefix tapi-connectivity;
+    }
+    import tapi-common {
+        prefix tapi-common;
+    }
+    import nrm-connectivity {
+        prefix nrm-connectivity;
+    }
+    organization "Metro Ethernet Forum (MEF)";
+    contact "MEF";
+    description "none";
+    revision 2017-02-27 {
+        description "MEF NRP 1.0.alpha";
+        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020 and RFC 6087";
+    }
+    augment "/tapi-common:context/tapi-connectivity:connectivity-service/tapi-connectivity:service-end-point" {
+        uses nrp-cg-eth-frame-flow-cpa-aspec;
+        description "none";
+    }
+    augment "/tapi-common:context/tapi-connectivity:connectivity-service" {
+        uses nrp-cg-eth-conn-serv-spec;
+        description "none";
+    }
+    augment "/tapi-common:context/tapi-common:service-interface-point/tapi-common:layer-protocol" {
+        uses nrp-augmentation;
+        description "none";
+    }
+    /***********************
+    * package diagrams
+    **********************/
+
+    /***********************
+    * package object-classes
+    **********************/
+        grouping nrp-cg-eth-uni-spec {
+            uses nrm-connectivity:cg-eth-uni-spec;
+            description "none";
+        }
+        grouping nrp-cg-eth-inni-spec {
+            uses nrm-connectivity:cg-eth-enni-spec;
+            description "none";
+        }
+        grouping nrp-cg-eth-frame-flow-cpa-aspec {
+            uses nrm-connectivity:cg-eth-frame-flow-cpa-aspec;
+            description "none";
+        }
+        grouping nrp-cg-eth-conn-serv-spec {
+            uses nrm-connectivity:cg-eth-conn-serv-spec;
+            description "none";
+        }
+        grouping nrp-cg-eth-enni-spec {
+            uses nrm-connectivity:cg-eth-enni-spec;
+            description "none";
+        }
+        grouping nrp-augmentation {
+            container nrp-cg-eth-uni-spec {
+                uses nrp-cg-eth-uni-spec;
+                description "none";
+            }
+            container nrp-cg-eth-inni-spec {
+                uses nrp-cg-eth-inni-spec;
+                description "none";
+            }
+            container nrp-cg-eth-enni-spec {
+                uses nrp-cg-eth-enni-spec;
+                description "none";
+            }
+            description "none";
+        }
+
+}
diff --git a/nrp-api/src/main/yang/tapi-common.yang b/nrp-api/src/main/yang/tapi-common.yang
new file mode 100644 (file)
index 0000000..372abb7
--- /dev/null
@@ -0,0 +1,410 @@
+module tapi-common {
+    namespace "urn:mef:yang:TapiCommon";
+    prefix tapi-common;
+    organization "Metro Ethernet Forum (MEF)";
+    contact "MEF";
+    description "none";
+    revision 2017-02-27 {
+        description "MEF NRP 1.0.alpha";
+        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020 and RFC 6087";
+    }
+    /***********************
+    * package object-classes
+    **********************/
+        grouping admin-state-pac {
+            leaf administrative-state {
+                type administrative-state;
+                description "none";
+            }
+            leaf operational-state {
+                type operational-state;
+                description "none";
+            }
+            leaf lifecycle-state {
+                type lifecycle-state;
+                description "none";
+            }
+            description "Provides state attributes that are applicable to an entity that can be administered. Such an entity also has operational and lifecycle aspects.";
+        }
+        grouping global-class {
+            leaf uuid {
+                type universal-id;
+                description "UUID: An identifier that is universally unique within an identifier space, where the identifier space is itself globally unique, and immutable. An UUID carries no semantics with respect to the purpose or state of the entity.
+                    UUID here uses string representation as defined in RFC 4122.  The canonical representation uses lowercase characters.
+                    Pattern: [0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-' + '[0-9a-fA-F]{4}-[0-9a-fA-F]{12} 
+                    Example of a UUID in string representation: f81d4fae-7dec-11d0-a765-00a0c91e6bf6";
+            }
+            list name {
+                key 'value-name';
+                uses name-and-value;
+                description "List of names. A property of an entity with a value that is unique in some namespace but may change during the life of the entity. A name carries no semantics with respect to the purpose of the entity.";
+            }
+            list label {
+                key 'value-name';
+                uses name-and-value;
+                description "List of labels.A property of an entity with a value that is not expected to be unique and is allowed to change. A label carries no semantics with respect to the purpose of the entity and has no effect on the entity behavior or state.";
+            }
+            description "The TAPI GlobalComponent serves as the super class for all TAPI entities that can be directly retrieved by their ID. As such, these are first class entities and their ID is expected to be globally unique. ";
+        }
+        grouping layer-protocol {
+            leaf layer-protocol-name {
+                type layer-protocol-name;
+                description "Indicate the specific layer-protocol described by the LayerProtocol entity.";
+            }
+            leaf termination-direction {
+                type termination-direction;
+                description "The overall directionality of the LP. 
+                    - A BIDIRECTIONAL LP will have some SINK and/or SOURCE flowss.
+                    - A SINK LP can only contain elements with SINK flows or CONTRA_DIRECTION_SOURCE flows
+                    - A SOURCE LP can only contain SOURCE flows or CONTRA_DIRECTION_SINK flows";
+            }
+            leaf termination-state {
+                type termination-state;
+                description "Indicates whether the layer is terminated and if so how.";
+            }
+            uses local-class;
+            description "Each transport layer is represented by a LayerProtocol (LP) instance. The LayerProtocol instances it can be used for controlling termination and monitoring functionality. 
+                It can also be used for controlling the adaptation (i.e. encapsulation and/or multiplexing of client signal), tandem connection monitoring, traffic conditioning and/or shaping functionality at an intermediate point along a connection. 
+                Where the client – server relationship is fixed 1:1 and immutable, the layers can be encapsulated in a single LTP instance. Where the is a n:1 relationship between client and server, the layers must be split over two separate instances of LTP. ";
+        }
+        grouping lifecycle-state-pac {
+            leaf lifecycle-state {
+                type lifecycle-state;
+                description "none";
+            }
+            description "Provides state attributes for an entity that has lifeccycle aspects only.";
+        }
+        grouping local-class {
+            leaf local-id {
+                type string;
+                description "none";
+            }
+            list name {
+                key 'value-name';
+                uses name-and-value;
+                description "List of names. A property of an entity with a value that is unique in some namespace but may change during the life of the entity. A name carries no semantics with respect to the purpose of the entity.";
+            }
+            description "The TAPI GlobalComponent serves as the super class for all TAPI entities that can be directly retrieved by their ID. As such, these are first class entities and their ID is expected to be globally unique. ";
+        }
+        grouping operational-state-pac {
+            leaf operational-state {
+                type operational-state;
+                description "none";
+            }
+            leaf lifecycle-state {
+                type lifecycle-state;
+                description "none";
+            }
+            description "Provides state attributes that are applicable to an entity that reflects operational aspects. Such an entity is expected to also have lifecycle aspects.";
+        }
+        grouping time-range {
+            leaf end-time {
+                type date-and-time;
+                description "none";
+            }
+            leaf start-time {
+                type date-and-time;
+                description "none";
+            }
+            description "none";
+        }
+        container context {
+            uses context-attrs;
+            description "none";
+        }
+        grouping context-attrs {
+            list service-interface-point {
+                key 'uuid';
+                config false;
+                min-elements 2;
+                uses service-interface-point;
+                description "none";
+            }
+            uses global-class;
+            description "The Network Control Domain (NCD) object class represents the scope of control that a particular SDN controller has with respect to a particular network, (i.e., encompassing a designated set of interconnected (virtual) network elements).";
+        }
+        grouping resource-spec {
+            uses global-class;
+            description "none";
+        }
+        grouping service-spec {
+            uses global-class;
+            description "none";
+        }
+        grouping service-interface-point {
+            list layer-protocol {
+                key 'local-id';
+                config false;
+                min-elements 1;
+                uses layer-protocol;
+                description "none";
+            }
+            container state {
+                config false;
+                uses lifecycle-state-pac;
+                description "none";
+            }
+            leaf direction {
+                type termination-direction;
+                config false;
+                description "none";
+            }
+            uses resource-spec;
+            description "The LogicalTerminationPoint (LTP) object class encapsulates the termination and adaptation functions of one or more transport layers. 
+                The structure of LTP supports all transport protocols including circuit and packet forms.";
+        }
+
+    /***********************
+    * package type-definitions
+    **********************/
+        typedef administrative-state {
+            type enumeration {
+                enum locked {
+                    description "Users are administratively prohibited from making use of the resource.";
+                }
+                enum unlocked {
+                    description "Users are allowed to use the resource";
+                }
+            }
+            description "The possible values of the administrativeState.";
+        }
+        typedef date-and-time {
+            type string;
+            description "This primitive type defines the date and time according to the following structure:
+                yyyyMMddhhmmss.s[Z|{+|-}HHMm] where:
+                yyyy    0000..9999    year
+                MM    01..12            month
+                dd        01..31            day
+                hh        00..23            hour
+                mm    00..59            minute
+                ss        00..59            second
+                s        .0...9            tenth of second (set to .0 if EMS or NE cannot support this granularity)
+                Z        Z                indicates UTC (rather than local time)
+                {+|-}    + or -            delta from UTC
+                HH        00..23            time zone difference in hours
+                Mm    00..59            time zone difference in minutes.";
+        }
+        typedef directive-value {
+            type enumeration {
+                enum minimize {
+                    description "none";
+                }
+                enum maximize {
+                    description "none";
+                }
+                enum allow {
+                    description "none";
+                }
+                enum disallow {
+                    description "none";
+                }
+                enum dont-care {
+                    description "none";
+                }
+            }
+            description "none";
+        }
+        typedef forwarding-direction {
+            type enumeration {
+                enum bidirectional {
+                    description "The Fowarding entity supports both BIDIRECTIONAL flows at all Ports (i.e. all Ports have both an INPUT flow and an OUTPUT flow defined)";
+                }
+                enum unidirectional {
+                    description "The Forwarding entity has Ports that are either INPUT or OUTPUT. It has no BIDIRECTIONAL Ports.";
+                }
+                enum undefined-or-unknown {
+                    description "Not a normal state. The system is unable to determine the correct value.";
+                }
+            }
+            description "The directionality of a Forwarding entity.";
+        }
+        typedef layer-protocol-name {
+            type enumeration {
+                enum och {
+                    description "none";
+                }
+                enum odu {
+                    description "none";
+                }
+                enum eth {
+                    description "none";
+                }
+                enum mpls-tp {
+                    description "none";
+                }
+            }
+            description "Provides a controlled list of layer protocol names and indicates the naming authority.
+                Note that it is expected that attributes will be added to this structure to convey the naming authority name, the name of the layer protocol using a human readable string and any particular standard reference.
+                Layer protocol names include:
+                -    Layer 1 (L1): OTU, ODU
+                -    Layer 2 (L2): Carrier Grade Ethernet (ETY, ETH), MPLS-TP (MT)
+                ";
+        }
+        typedef lifecycle-state {
+            type enumeration {
+                enum planned {
+                    description "The resource is planned but is not present in the network.";
+                }
+                enum potential {
+                    description "The supporting resources are present in the network but are shared with other clients; or require further configuration before they can be used; or both.
+                        o    When a potential resource is configured and allocated to a client it is moved to the “installed” state for that client.
+                        o    If the potential resource has been consumed (e.g. allocated to another client) it is moved to the “planned” state for all other clients.";
+                }
+                enum installed {
+                    description "The resource is present in the network and is capable of providing the service expected.";
+                }
+                enum pending-removal {
+                    description "The resource has been marked for removal";
+                }
+            }
+            description "The possible values of the lifecycleState.";
+        }
+        grouping name-and-value {
+            leaf value-name {
+                type string;
+                description "The name of the value. The value need not have a name.";
+            }
+            leaf value {
+                type string;
+                description "The value";
+            }
+            description "A scoped name-value pair";
+        }
+        typedef operational-state {
+            type enumeration {
+                enum disabled {
+                    description "The resource is unable to meet the SLA of the user of the resource. If no (explicit) SLA is defined the resource is disabled if it is totally inoperable and unable to provide service to the user.";
+                }
+                enum enabled {
+                    description "The resource is partially or fully operable and available for use";
+                }
+            }
+            description "The possible values of the operationalState.";
+        }
+        typedef port-direction {
+            type enumeration {
+                enum bidirectional {
+                    description "The Port has both an INPUT flow and an OUTPUT flow defined.";
+                }
+                enum input {
+                    description "The Port only has definition for a flow into the Forwarding entity (i.e. an ingress flow).";
+                }
+                enum output {
+                    description "The Port only has definition for a flow out of the Forwarding entity (i.e. an egress flow).";
+                }
+                enum unidentified-or-unknown {
+                    description "Not a normal state. The system is unable to determine the correct value.";
+                }
+            }
+            description "The orientation of flow at the Port of a Forwarding entity";
+        }
+        typedef port-role {
+            type enumeration {
+                enum symmetric {
+                    description "none";
+                }
+                enum root {
+                    description "none";
+                }
+                enum leaf {
+                    description "none";
+                }
+                enum unknown {
+                    description "none";
+                }
+            }
+            description "The role of an end in the context of the function of the forwarding entity that it bounds";
+        }
+        typedef termination-direction {
+            type enumeration {
+                enum bidirectional {
+                    description "A Termination with both SINK and SOURCE flows.";
+                }
+                enum sink {
+                    description "The flow is up the layer stack from the server side to the client side. 
+                        Considering an example of a Termination function within the termination entity, a SINK flow:
+                        - will arrive at at the base of the termination function (the server side) where it is essentially at an INPUT to the termination component
+                        - then will be decoded and deconstructed 
+                        - then relevant parts of the flow will be sent out of the termination function (the client side) where it is essentially at an OUTPUT from the termination component
+                        A SINK termination is one that only supports a SINK flow.
+                        A SINK termiation can be bound to an OUTPUT Port of a Forwarding entity";
+                }
+                enum source {
+                    description "The flow is down the layer stack from the server side to the client side. 
+                        Considering an example of a Termination function within the termination entity, a SOURCE flow:
+                        - will arrive at at the top of the termination function (the client side) where it is essentially at an INPUT to the termination component
+                        - then will be assembled with various overheads etc and will be coded 
+                        - then coded form of the assembly of flow will be sent out of the termination function (the server side) where it is essentially at an OUTPUT from the termination component
+                        A SOURCE termination is one that only supports a SOURCE flow.
+                        A SOURCE termiation can be bound to an INPUT Port of a Forwarding entity";
+                }
+                enum undefined-or-unknown {
+                    description "Not a normal state. The system is unable to determine the correct value.";
+                }
+            }
+            description "The directionality of a termination entity";
+        }
+        typedef termination-state {
+            type enumeration {
+                enum lp-can-never-terminate {
+                    description "A non-flexible case that can never be terminated.";
+                }
+                enum lt-not-terminated {
+                    description "A flexible termination that can terminate but is currently not terminated.";
+                }
+                enum terminated-server-to-client-flow {
+                    description "A flexible termination that is currently terminated for server to client flow only.";
+                }
+                enum terminated-client-to-server-flow {
+                    description "A flexible termination that is currently terminated for client to server flow only.";
+                }
+                enum terminated-bidirectional {
+                    description "A flexible termination that is currently terminated in both directions of flow.";
+                }
+                enum lt-permenantly-terminated {
+                    description "A non-flexible termination that is always terminated (in both directions of flow for a bidirectional case and in the one direction of flow for both unidirectional cases).";
+                }
+                enum termination-state-unknown {
+                    description "There TerminationState cannot be determined.";
+                }
+            }
+            description "Provides support for the range of behaviours and specific states that an LP can take with respect to termination of the signal.
+                Indicates to what degree the LayerTermination is terminated.";
+        }
+        typedef universal-id {
+            type string;
+            description "The univeral ID value where the mechanism for generation is defned by some authority not directly referenced in the structure.
+                UUID here uses string representation as defined in RFC 4122.  The canonical representation uses lowercase characters.
+                Pattern: [0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-' + '[0-9a-fA-F]{4}-[0-9a-fA-F]{12} 
+                Example of a UUID in string representation: f81d4fae-7dec-11d0-a765-00a0c91e6bf6";
+        }
+
+    /***********************
+    * package interfaces
+    **********************/
+        rpc get-service-interface-point-details {
+            description "none";
+            input {
+                leaf sip-id-or-name {
+                    type string;
+                    description "none";
+                }
+            }
+            output {
+                container sip {
+                    uses service-interface-point;
+                    description "none";
+                }
+            }
+        }
+        rpc get-service-interface-point-list {
+            description "none";
+            output {
+                list sip {
+                    uses service-interface-point;
+                    description "none";
+                }
+            }
+        }
+
+}
diff --git a/nrp-api/src/main/yang/tapi-connectivity.yang b/nrp-api/src/main/yang/tapi-connectivity.yang
new file mode 100644 (file)
index 0000000..f105be6
--- /dev/null
@@ -0,0 +1,626 @@
+module tapi-connectivity {
+    namespace "urn:mef:yang:TapiConnectivity";
+    prefix tapi-connectivity;
+    import tapi-common {
+        prefix tapi-common;
+    }
+    import tapi-topology {
+        prefix tapi-topology;
+    }
+    organization "Metro Ethernet Forum (MEF)";
+    contact "MEF";
+    description "none";
+    revision 2017-02-27 {
+        description "MEF NRP 1.0.alpha";
+        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020 and RFC 6087";
+    }
+    augment "/tapi-common:context" {
+        uses connectivity-context;
+        description "none";
+    }
+    /***********************
+    * package object-classes
+    **********************/
+        grouping connection {
+            list connection-end-point {
+                key 'uuid';
+                config false;
+                min-elements 2;
+                uses connection-end-point;
+                description "none";
+            }
+            list route {
+                key 'local-id';
+                config false;
+                uses route;
+                description "none";
+            }
+            leaf node {
+                type leafref {
+                    path '/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:uuid';
+                }
+                config false;
+                description "none";
+            }
+            list switch-control {
+                key 'local-id';
+                config false;
+                uses switch-control;
+                description "none";
+            }
+            container state {
+                config false;
+                uses tapi-common:operational-state-pac;
+                description "none";
+            }
+            leaf layer-protocol-name {
+                type tapi-common:layer-protocol-name;
+                config false;
+                description "none";
+            }
+            leaf direction {
+                type tapi-common:forwarding-direction;
+                config false;
+                description "none";
+            }
+            uses tapi-common:resource-spec;
+            description "The ForwardingConstruct (FC) object class models enabled potential for forwarding between two or more LTPs and like the LTP supports any transport protocol including all circuit and packet forms.
+                At the lowest level of recursion, a FC represents a cross-connection within an NE.";
+        }
+        grouping connection-end-point {
+            list layer-protocol {
+                key 'local-id';
+                config false;
+                min-elements 1;
+                uses tapi-common:layer-protocol;
+                description "none";
+            }
+            leaf-list client-node-edge-point {
+                type leafref {
+                    path '/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point/tapi-topology:uuid';
+                }
+                config false;
+                description "none";
+            }
+            leaf server-node-edge-point {
+                type leafref {
+                    path '/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point/tapi-topology:uuid';
+                }
+                config false;
+                description "none";
+            }
+            leaf peer-connection-end-point {
+                type leafref {
+                    path '/tapi-common:context/tapi-connectivity:connection/tapi-connectivity:connection-end-point/tapi-connectivity:uuid';
+                }
+                config false;
+                description "none";
+            }
+            container state {
+                config false;
+                uses tapi-common:operational-state-pac;
+                description "none";
+            }
+            leaf termination-direction {
+                type tapi-common:termination-direction;
+                config false;
+                description "none";
+            }
+            leaf connection-port-direction {
+                type tapi-common:port-direction;
+                config false;
+                description "The orientation of defined flow at the EndPoint.";
+            }
+            leaf connection-port-role {
+                type tapi-common:port-role;
+                config false;
+                description "Each EP of the FC has a role (e.g., working, protection, protected, symmetric, hub, spoke, leaf, root)  in the context of the FC with respect to the FC function. ";
+            }
+            uses tapi-common:resource-spec;
+            description "The LogicalTerminationPoint (LTP) object class encapsulates the termination and adaptation functions of one or more transport layers. 
+                The structure of LTP supports all transport protocols including circuit and packet forms.";
+        }
+        grouping connectivity-constraint {
+            leaf service-type {
+                type service-type;
+                config false;
+                description "none";
+            }
+            leaf service-level {
+                type string;
+                config false;
+                description "An abstract value the meaning of which is mutually agreed – typically represents metrics such as - Class of service, priority, resiliency, availability";
+            }
+            container requested-capacity {
+                config false;
+                uses tapi-topology:capacity;
+                description "none";
+            }
+            list cost-characteristic {
+                key 'cost-name cost-value cost-algorithm';
+                config false;
+                uses tapi-topology:cost-characteristic;
+                description "The list of costs where each cost relates to some aspect of the TopologicalEntity.";
+            }
+            list latency-characteristic {
+                key 'traffic-property-name traffic-property-queing-latency';
+                config false;
+                uses tapi-topology:latency-characteristic;
+                description "The effect on the latency of a queuing process. This only has significant effect for packet based systems and has a complex characteristic.";
+            }
+            leaf coroute-inclusion {
+                type leafref {
+                    path '/tapi-common:context/tapi-connectivity:connectivity-service/tapi-connectivity:uuid';
+                }
+                config false;
+                description "none";
+            }
+            leaf-list diversity-exclusion {
+                type leafref {
+                    path '/tapi-common:context/tapi-connectivity:connectivity-service/tapi-connectivity:uuid';
+                }
+                config false;
+                description "none";
+            }
+            uses tapi-common:local-class;
+            description "none";
+        }
+        grouping connectivity-service {
+            leaf-list connection {
+                type leafref {
+                    path '/tapi-common:context/tapi-connectivity:connection/tapi-connectivity:uuid';
+                }
+                config false;
+                description "none";
+            }
+            list service-end-point {
+                key 'local-id';
+                min-elements 2;
+                uses connectivity-service-end-point;
+                description "none";
+            }
+            container conn-constraint {
+                uses connectivity-constraint;
+                description "none";
+            }
+            container topo-constraint {
+                uses topology-constraint;
+                description "none";
+            }
+            container schedule {
+                uses tapi-common:time-range;
+                description "none";
+            }
+            container state {
+                uses tapi-common:admin-state-pac;
+                description "none";
+            }
+            leaf direction {
+                type tapi-common:forwarding-direction;
+                description "none";
+            }
+            leaf layer-protocol-name {
+                type tapi-common:layer-protocol-name;
+                description "none";
+            }
+            uses tapi-common:service-spec;
+            description "The ForwardingConstruct (FC) object class models enabled potential for forwarding between two or more LTPs and like the LTP supports any transport protocol including all circuit and packet forms.
+                At the lowest level of recursion, a FC represents a cross-connection within an NE.";
+        }
+        grouping connectivity-service-end-point {
+            leaf service-interface-point {
+                type leafref {
+                    path '/tapi-common:context/tapi-common:service-interface-point/tapi-common:uuid';
+                }
+                config false;
+                description "none";
+            }
+            leaf role {
+                type tapi-common:port-role;
+                config false;
+                description "Each EP of the FC has a role (e.g., working, protection, protected, symmetric, hub, spoke, leaf, root)  in the context of the FC with respect to the FC function. ";
+            }
+            leaf direction {
+                type tapi-common:port-direction;
+                config false;
+                description "The orientation of defined flow at the EndPoint.";
+            }
+            leaf layer-protocol-name {
+                type tapi-common:layer-protocol-name;
+                config false;
+                description "none";
+            }
+            uses tapi-common:local-class;
+            description "The association of the FC to LTPs is made via EndPoints.
+                The EndPoint (EP) object class models the access to the FC function. 
+                The traffic forwarding between the associated EPs of the FC depends upon the type of FC and may be associated with FcSwitch object instances.  
+                In cases where there is resilience the EndPoint may convey the resilience role of the access to the FC. 
+                It can represent a protected (resilient/reliable) point or a protecting (unreliable working or protection) point.
+                The EP replaces the Protection Unit of a traditional protection model. 
+                The ForwadingConstruct can be considered as a component and the EndPoint as a Port on that component";
+        }
+        grouping route {
+            leaf-list lower-connection {
+                type leafref {
+                    path '/tapi-common:context/tapi-connectivity:connection/tapi-connectivity:uuid';
+                }
+                config false;
+                min-elements 1;
+                description "none";
+            }
+            uses tapi-common:local-class;
+            description "The FC Route (FcRoute) object class models the individual routes of an FC. 
+                The route of an FC object is represented by a list of FCs at a lower level. 
+                Note that depending on the service supported by an FC, an the FC can have multiple routes.";
+        }
+        grouping connectivity-context {
+            list connectivity-service {
+                key 'uuid';
+                uses connectivity-service;
+                description "none";
+            }
+            list connection {
+                key 'uuid';
+                config false;
+                uses connection;
+                description "none";
+            }
+            description "none";
+        }
+        grouping switch {
+            leaf-list selected-connection-end-point {
+                type leafref {
+                    path '/tapi-common:context/tapi-connectivity:connection/tapi-connectivity:connection-end-point/tapi-connectivity:uuid';
+                }
+                min-elements 1;
+                description "none";
+            }
+            leaf-list selected-route {
+                type leafref {
+                    path '/tapi-common:context/tapi-connectivity:connection/tapi-connectivity:route/tapi-connectivity:local-id';
+                }
+                min-elements 1;
+                description "none";
+            }
+            leaf selection-control {
+                type selection-control;
+                description "Degree of administrative control applied to the switch selection.";
+            }
+            leaf selection-reason {
+                type selection-reason;
+                config false;
+                description "The reason for the current switch selection.";
+            }
+            leaf switch-direction {
+                type tapi-common:port-direction;
+                description "Indicates whether the switch selects from ingress to the FC or to egress of the FC, or both.";
+            }
+            uses tapi-common:local-class;
+            description "The class models the switched forwarding of traffic (traffic flow) between FcPorts (ConnectionEndPoints) and is present where there is protection functionality in the FC (Connection). 
+                If an FC exposes protection (having two or more FcPorts that provide alternative identical inputs/outputs), the FC will have one or more associated FcSwitch objects to represent the alternative flow choices visible at the edge of the FC.
+                The FC switch represents and defines a protection switch structure encapsulated in the FC. 
+                Essentially performs one of the functions of the Protection Group in a traditional model. It associates to 2 or more FcPorts each playing the role of a Protection Unit. 
+                One or more protection, i.e. standby/backup, FcPorts provide protection for one or more working (i.e. regular/main/preferred) FcPorts where either protection or working can feed one or more protected FcPort.
+                The switch may be used in revertive or non-revertive (symmetric) mode. When in revertive mode it may define a waitToRestore time.
+                It may be used in one of several modes including source switch, destination switched, source and destination switched etc (covering cases such as 1+1 and 1:1).
+                It may be locked out (prevented from switching), force switched or manual switched.
+                It will indicate switch state and change of state.
+                The switch can be switched away from all sources such that it becomes open and hence two coordinated switches can both feed the same LTP so long as at least one of the two is switched away from all sources (is 'open').
+                The ability for a Switch to be 'high impedance' allows bidirectional ForwardingConstructs to be overlaid on the same bidirectional LTP where the appropriate control is enabled to prevent signal conflict.
+                This ability allows multiple alternate routes to be present that otherwise would be in conflict.";
+        }
+        grouping switch-control {
+            leaf-list sub-switch-control {
+                type leafref {
+                    path '/tapi-common:context/tapi-connectivity:connection/tapi-connectivity:switch-control/tapi-connectivity:local-id';
+                }
+                description "none";
+            }
+            list switch {
+                key 'local-id';
+                uses switch;
+                description "none";
+            }
+            container control-parameters {
+                uses control-parameters-pac;
+                description "none";
+            }
+            uses tapi-common:local-class;
+            description "Represents the capability to control and coordinate switches, to add/delete/modify FCs and to add/delete/modify LTPs/LPs so as to realize a protection scheme.";
+        }
+        grouping control-parameters-pac {
+            leaf prot-type {
+                type protection-type;
+                description "Indicates the protection scheme that is used for the ProtectionGroup.";
+            }
+            leaf reversion-mode {
+                type reversion-mode;
+                description "Indcates whether the protection scheme is revertive or non-revertive.";
+            }
+            leaf wait-to-revert-time {
+                type uint64;
+                default "15";
+                description "If the protection system is revertive, this attribute specifies the time, in minutes, to wait after a fault clears on a higher priority (preferred) resource before reverting to the preferred resource.";
+            }
+            leaf hold-off-time {
+                type uint64;
+                description "This attribute indicates the time, in milliseconds, between declaration of signal degrade or signal fail, and the initialization of the protection switching algorithm.";
+            }
+            leaf is-lock-out {
+                type boolean;
+                description "none";
+            }
+            leaf is-frozen {
+                type boolean;
+                description "none";
+            }
+            leaf is-coordinated-switching-both-ends {
+                type boolean;
+                description "Is operating such that switching at both ends of each flow acorss the FC is coordinated at both ingress and egress ends.";
+            }
+            description "A list of control parameters to apply to a switch.";
+        }
+        grouping topology-constraint {
+            leaf-list include-topology {
+                type leafref {
+                    path '/tapi-common:context/tapi-topology:topology/tapi-topology:uuid';
+                }
+                config false;
+                description "none";
+            }
+            leaf-list avoid-topology {
+                type leafref {
+                    path '/tapi-common:context/tapi-topology:topology/tapi-topology:uuid';
+                }
+                config false;
+                description "none";
+            }
+            leaf-list include-path {
+                type string;
+                config false;
+                description "none";
+            }
+            leaf-list exclude-path {
+                type string;
+                config false;
+                description "none";
+            }
+            leaf-list include-link {
+                type leafref {
+                    path '/tapi-common:context/tapi-topology:topology/tapi-topology:link/tapi-topology:uuid';
+                }
+                config false;
+                description "none";
+            }
+            leaf-list exclude-link {
+                type leafref {
+                    path '/tapi-common:context/tapi-topology:topology/tapi-topology:link/tapi-topology:uuid';
+                }
+                config false;
+                description "none";
+            }
+            leaf-list preferred-transport-layer {
+                type tapi-common:layer-protocol-name;
+                config false;
+                description "soft constraint requested by client to indicate the layer(s) of transport connection that it prefers to carry the service. This could be same as the service layer or one of the supported server layers";
+            }
+            uses tapi-common:local-class;
+            description "none";
+        }
+
+    /***********************
+    * package type-definitions
+    **********************/
+        typedef service-type {
+            type enumeration {
+                enum point-to-point-connectivity {
+                    description "none";
+                }
+                enum point-to-multipoint-connectivty {
+                    description "none";
+                }
+                enum multipoint-connectivity {
+                    description "none";
+                }
+            }
+            description "none";
+        }
+        typedef reversion-mode {
+            type enumeration {
+                enum revertive {
+                    description "An FC switched to a lower priority (non-preferred) resource will revert to a higher priority (preferred) resource when that recovers (potentially after some hold-off time).";
+                }
+                enum non-revertive {
+                    description "An FC switched to a lower priority (non-preferred) resource will not revert to a higher priority (preferred) resource when that recovers.";
+                }
+            }
+            description "The reversion mode associated with protection.";
+        }
+        typedef selection-control {
+            type enumeration {
+                enum lock-out {
+                    description "The resource is configured to temporarily not be available for use in the protection scheme(s) it is part of.
+                        This overrides all other protection control states including forced.
+                        If the item is locked out then it cannot be used under any circumstances.
+                        Note: Only relevant when part of a protection scheme.";
+                }
+                enum normal {
+                    description "none";
+                }
+                enum manual {
+                    description "none";
+                }
+                enum forced {
+                    description "none";
+                }
+            }
+            description "Possible degrees of administrative control applied to the Route selection.";
+        }
+        typedef selection-reason {
+            type enumeration {
+                enum lockout {
+                    description "none";
+                }
+                enum normal {
+                    description "none";
+                }
+                enum manual {
+                    description "none";
+                }
+                enum forced {
+                    description "none";
+                }
+                enum wait-to-revert {
+                    description "none";
+                }
+                enum signal-degrade {
+                    description "none";
+                }
+                enum signal-fail {
+                    description "none";
+                }
+            }
+            description "The cause of the current route selection.";
+        }
+        typedef protection-type {
+            type enumeration {
+                enum linear-1-plus-1 {
+                    description "none";
+                }
+                enum linear-1-for-1 {
+                    description "none";
+                }
+            }
+            description "none";
+        }
+
+    /***********************
+    * package interfaces
+    **********************/
+        rpc get-connection-details {
+            description "none";
+            input {
+                leaf service-id-or-name {
+                    type string;
+                    description "none";
+                }
+                leaf connection-id-or-name {
+                    type string;
+                    description "none";
+                }
+            }
+            output {
+                container connection {
+                    uses connection;
+                    description "none";
+                }
+            }
+        }
+        rpc get-connectivity-service-list {
+            description "none";
+            output {
+                list service {
+                    uses connectivity-service;
+                    description "none";
+                }
+            }
+        }
+        rpc get-connectivity-service-details {
+            description "none";
+            input {
+                leaf service-id-or-name {
+                    type string;
+                    description "none";
+                }
+            }
+            output {
+                container service {
+                    uses connectivity-service;
+                    description "none";
+                }
+            }
+        }
+        rpc create-connectivity-service {
+            description "none";
+            input {
+                list sep {
+                    min-elements 2;
+                    uses connectivity-service-end-point;
+                    description "none";
+                }
+                container conn-constraint {
+                    uses connectivity-constraint;
+                    description "none";
+                }
+                container topo-constraint {
+                    uses topology-constraint;
+                    description "none";
+                }
+                leaf schedule {
+                    type string;
+                    description "none";
+                }
+                leaf state {
+                    type string;
+                    description "none";
+                }
+            }
+            output {
+                container service {
+                    uses connectivity-service;
+                    description "none";
+                }
+            }
+        }
+        rpc update-connectivity-service {
+            description "none";
+            input {
+                leaf service-id-or-name {
+                    type string;
+                    description "none";
+                }
+                container sep {
+                    uses connectivity-service-end-point;
+                    description "none";
+                }
+                container conn-constraint {
+                    uses connectivity-constraint;
+                    description "none";
+                }
+                container topo-constraint {
+                    uses topology-constraint;
+                    description "none";
+                }
+                leaf schedule {
+                    type string;
+                    description "none";
+                }
+                leaf state {
+                    type string;
+                    description "none";
+                }
+            }
+            output {
+                container service {
+                    uses connectivity-service;
+                    description "none";
+                }
+            }
+        }
+        rpc delete-connectivity-service {
+            description "none";
+            input {
+                leaf service-id-or-name {
+                    type string;
+                    description "none";
+                }
+            }
+            output {
+                container service {
+                    uses connectivity-service;
+                    description "none";
+                }
+            }
+        }
+
+}
diff --git a/nrp-api/src/main/yang/tapi-topology.yang b/nrp-api/src/main/yang/tapi-topology.yang
new file mode 100644 (file)
index 0000000..8b53879
--- /dev/null
@@ -0,0 +1,633 @@
+module tapi-topology {
+    namespace "urn:mef:yang:TapiTopology";
+    prefix tapi-topology;
+    import tapi-common {
+        prefix tapi-common;
+    }
+    organization "Metro Ethernet Forum (MEF)";
+    contact "MEF";
+    description "none";
+    revision 2017-02-27 {
+        description "MEF NRP 1.0.alpha";
+        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020 and RFC 6087";
+    }
+    augment "/tapi-common:context" {
+        uses topology-context;
+        description "none";
+    }
+    /***********************
+    * package object-classes
+    **********************/
+        grouping link {
+            leaf-list node-edge-point {
+                type leafref {
+                    path '/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point/tapi-topology:uuid';
+                }
+                config false;
+                min-elements 2;
+                description "none";
+            }
+            leaf-list node {
+                type leafref {
+                    path '/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:uuid';
+                }
+                config false;
+                min-elements 2;
+                description "none";
+            }
+            container state {
+                config false;
+                uses tapi-common:admin-state-pac;
+                description "none";
+            }
+            container transfer-capacity {
+                config false;
+                uses transfer-capacity-pac;
+                description "none";
+            }
+            container transfer-cost {
+                config false;
+                uses transfer-cost-pac;
+                description "none";
+            }
+            container transfer-integrity {
+                config false;
+                uses transfer-integrity-pac;
+                description "none";
+            }
+            container transfer-timing {
+                config false;
+                uses transfer-timing-pac;
+                description "none";
+            }
+            container risk-parameter {
+                config false;
+                uses risk-parameter-pac;
+                description "none";
+            }
+            container validation {
+                config false;
+                uses validation-pac;
+                description "none";
+            }
+            container lp-transition {
+                config false;
+                uses layer-protocol-transition-pac;
+                description "none";
+            }
+            leaf-list layer-protocol-name {
+                type tapi-common:layer-protocol-name;
+                config false;
+                min-elements 1;
+                description "none";
+            }
+            leaf direction {
+                type tapi-common:forwarding-direction;
+                config false;
+                description "The directionality of the Link. 
+                    Is applicable to simple Links where all LinkEnds are BIDIRECTIONAL (the Link will be BIDIRECTIONAL) or UNIDIRECTIONAL (the Link will be UNIDIRECTIONAL). 
+                    Is not present in more complex cases.";
+            }
+            uses tapi-common:resource-spec;
+            description "The Link object class models effective adjacency between two or more ForwardingDomains (FD). ";
+        }
+        grouping node {
+            list owned-node-edge-point {
+                key 'uuid';
+                config false;
+                uses node-edge-point;
+                description "none";
+            }
+            leaf-list aggregated-node-edge-point {
+                type leafref {
+                    path '/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point/tapi-topology:uuid';
+                }
+                config false;
+                description "none";
+            }
+            leaf encap-topology {
+                type leafref {
+                    path '/tapi-common:context/tapi-topology:topology/tapi-topology:uuid';
+                }
+                config false;
+                description "none";
+            }
+            container state {
+                config false;
+                uses tapi-common:admin-state-pac;
+                description "none";
+            }
+            container transfer-capacity {
+                config false;
+                uses transfer-capacity-pac;
+                description "none";
+            }
+            container transfer-cost {
+                config false;
+                uses transfer-cost-pac;
+                description "none";
+            }
+            container transfer-integrity {
+                config false;
+                uses transfer-integrity-pac;
+                description "none";
+            }
+            container transfer-timing {
+                config false;
+                uses transfer-timing-pac;
+                description "none";
+            }
+            leaf-list layer-protocol-name {
+                type tapi-common:layer-protocol-name;
+                config false;
+                min-elements 1;
+                description "none";
+            }
+            uses tapi-common:resource-spec;
+            description "The ForwardingDomain (FD) object class models the “ForwardingDomain” topological component which is used to effect forwarding of transport characteristic information and offers the potential to enable forwarding. 
+                At the lowest level of recursion, an FD (within a network element (NE)) represents a switch matrix (i.e., a fabric). Note that an NE can encompass multiple switch matrices (FDs). ";
+        }
+        grouping topology {
+            list node {
+                key 'uuid';
+                config false;
+                uses node;
+                description "none";
+            }
+            list link {
+                key 'uuid';
+                config false;
+                uses link;
+                description "none";
+            }
+            leaf-list layer-protocol-name {
+                type tapi-common:layer-protocol-name;
+                config false;
+                min-elements 1;
+                description "none";
+            }
+            uses tapi-common:resource-spec;
+            description "The ForwardingDomain (FD) object class models the “ForwardingDomain” topological component which is used to effect forwarding of transport characteristic information and offers the potential to enable forwarding. 
+                At the lowest level of recursion, an FD (within a network element (NE)) represents a switch matrix (i.e., a fabric). Note that an NE can encompass multiple switch matrices (FDs). ";
+        }
+        grouping layer-protocol-transition-pac {
+            leaf-list transitioned-layer-protocol-name {
+                type string;
+                min-elements 2;
+                description "Provides the ordered structure of layer protocol transitions encapsulated in the TopologicalEntity. The ordering relates to the LinkPort role.";
+            }
+            description "Relevant for a Link that is formed by abstracting one or more LTPs (in a stack) to focus on the flow and deemphasize the protocol transformation. 
+                This abstraction is relevant when considering multi-layer routing. 
+                The layer protocols of the LTP and the order of their application to the signal is still relevant and need to be accounted for. This is derived from the LTP spec details.
+                This Pac provides the relevant abstractions of the LTPs and provides the necessary association to the LTPs involved.
+                Links that included details in this Pac are often referred to as Transitional Links.";
+        }
+        grouping node-edge-point {
+            list layer-protocol {
+                key 'local-id';
+                config false;
+                min-elements 1;
+                uses tapi-common:layer-protocol;
+                description "none";
+            }
+            leaf-list aggregated-node-edge-point {
+                type leafref {
+                    path '/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point/tapi-topology:uuid';
+                }
+                config false;
+                description "none";
+            }
+            leaf-list mapped-service-interface-point {
+                type leafref {
+                    path '/tapi-common:context/tapi-common:service-interface-point/tapi-common:uuid';
+                }
+                description "none";
+            }
+            container state {
+                config false;
+                uses tapi-common:admin-state-pac;
+                description "none";
+            }
+            leaf termination-direction {
+                type tapi-common:termination-direction;
+                config false;
+                description "none";
+            }
+            leaf link-port-direction {
+                type tapi-common:port-direction;
+                config false;
+                description "The orientation of defined flow at the LinkEnd.";
+            }
+            leaf link-port-role {
+                type tapi-common:port-role;
+                config false;
+                description "Each LinkEnd of the Link has a role (e.g., symmetric, hub, spoke, leaf, root)  in the context of the Link with respect to the Link function. ";
+            }
+            uses tapi-common:resource-spec;
+            description "The LogicalTerminationPoint (LTP) object class encapsulates the termination and adaptation functions of one or more transport layers. 
+                The structure of LTP supports all transport protocols including circuit and packet forms.";
+        }
+        grouping risk-parameter-pac {
+            list risk-characteristic {
+                key 'risk-characteristic-name';
+                config false;
+                min-elements 1;
+                uses risk-characteristic;
+                description "A list of risk characteristics for consideration in an analysis of shared risk. Each element of the list represents a specific risk consideration.";
+            }
+            description "The risk characteristics of a TopologicalEntity come directly from the underlying physical realization. 
+                The risk characteristics propagate from the physical realization to the client and from the server layer to the client layer, this propagation may be modified by protection.
+                A TopologicalEntity may suffer degradation or failure as a result of a problem in a part of the underlying realization.
+                The realization can be partitioned into segments which have some relevant common failure modes.
+                There is a risk of failure/degradation of each segment of the underlying realization.
+                Each segment is a part of a larger physical/geographical unit that behaves as one with respect to failure (i.e. a failure will have a high probability of impacting the whole unit (e.g. all cables in the same duct).
+                Disruptions to that larger physical/geographical unit will impact (cause failure/errors to) all TopologicalEntities that use any part of that larger physical/geographical entity.
+                Any TopologicalEntity that uses any part of that larger physical/geographical unit will suffer impact and hence each TopologicalEntity shares risk.
+                The identifier of each physical/geographical unit that is involved in the realization of each segment of a Topological entity can be listed in the RiskParameter_Pac of that TopologicalEntity.
+                A segment has one or more risk characteristic.
+                Shared risk between two TopologicalEntities compromises the integrity of any solution that use one of those TopologicalEntity as a backup for the other.
+                Where two TopologicalEntities have a common risk characteristic they have an elevated probability of failing simultaneously compared to two TopologicalEntities that do not share risk characteristics.";
+        }
+        grouping transfer-capacity-pac {
+            container total-potential-capacity {
+                config false;
+                uses capacity;
+                description "An optimistic view of the capacity of the TopologicalEntity assuming that any shared capacity is available to be taken.";
+            }
+            container available-capacity {
+                config false;
+                uses capacity;
+                description "Capacity available to be assigned.";
+            }
+            list capacity-assigned-to-user-view {
+                key 'total-size';
+                config false;
+                uses capacity;
+                description "Capacity already assigned";
+            }
+            leaf capacity-interaction-algorithm {
+                type string;
+                config false;
+                description "A reference to an algorithm that describes how various chunks of allocated capacity interact (e.g. when shared)";
+            }
+            description "The TopologicalEntity derives capacity from the underlying realization. 
+                A TopologicalEntity may be an abstraction and virtualization of a subset of the underlying capability offered in a view or may be directly reflecting the underlying realization.
+                A TopologicalEntity may be directly used in the view or may be assigned to another view for use.
+                The clients supported by a multi-layer TopologicalEntity may interact such that the resources used by one client may impact those available to another. This is derived from the LTP spec details.
+                Represents the capacity available to user (client) along with client interaction and usage. 
+                A TopologicalEntity may reflect one or more client protocols and one or more members for each profile.";
+        }
+        grouping transfer-cost-pac {
+            list cost-characteristic {
+                key 'cost-name cost-value cost-algorithm';
+                config false;
+                min-elements 1;
+                uses cost-characteristic;
+                description "The list of costs where each cost relates to some aspect of the TopologicalEntity.";
+            }
+            description "The cost characteristics of a TopologicalEntity not necessarily correlated to the cost of the underlying physical realization. 
+                They may be quite specific to the individual TopologicalEntity e.g. opportunity cost. Relates to layer capacity
+                There may be many perspectives from which cost may be considered  for a particular TopologicalEntity and hence many specific costs and potentially cost algorithms. 
+                Using an entity will incur a cost. ";
+        }
+        grouping transfer-integrity-pac {
+            leaf error-characteristic {
+                type string;
+                config false;
+                description "Describes the degree to which the signal propagated can be errored. 
+                    Applies to TDM systems as the errored signal will be propagated and not packet as errored packets will be discarded.";
+            }
+            leaf loss-characteristic {
+                type string;
+                config false;
+                description "Describes the acceptable characteristic of lost packets where loss may result from discard due to errors or overflow.
+                    Applies to packet systems and not TDM (as for TDM errored signals are propagated unless grossly errored and overflow/underflow turns into timing slips).";
+            }
+            leaf repeat-delivery-characteristic {
+                type string;
+                config false;
+                description "Primarily applies to packet systems where a packet may be delivered more than once (in fault recovery for example). 
+                    It can also apply to TDM where several frames may be received twice due to switching in a system with a large differential propagation delay.";
+            }
+            leaf delivery-order-characteristic {
+                type string;
+                config false;
+                description "Describes the degree to which packets will be delivered out of sequence.
+                    Does not apply to TDM as the TDM protocols maintain strict order.";
+            }
+            leaf unavailable-time-characteristic {
+                type string;
+                config false;
+                description "Describes the duration for which there may be no valid signal propagated.";
+            }
+            leaf server-integrity-process-characteristic {
+                type string;
+                config false;
+                description "Describes the effect of any server integrity enhancement process on the characteristics of the TopologicalEntity.";
+            }
+            description "Transfer intergrity characteristic covers expected/specified/acceptable characteristic of degradation of the transfered signal.
+                It includes all aspects of possible degradation of signal content as well as any damage of any form to the total TopologicalEntity and to the carried signals.
+                Note that the statement is of total impact to the TopologicalEntity so any partial usage of the TopologicalEntity (e.g. a signal that does not use full capacity) will only suffer its portion of the impact.";
+        }
+        grouping transfer-timing-pac {
+            list latency-characteristic {
+                key 'traffic-property-name traffic-property-queing-latency';
+                config false;
+                min-elements 1;
+                uses latency-characteristic;
+                description "The effect on the latency of a queuing process. This only has significant effect for packet based systems and has a complex characteristic.";
+            }
+            description "A TopologicalEntity will suffer effects from the underlying physical realization related to the timing of the information passed by the TopologicalEntity.";
+        }
+        grouping validation-pac {
+            list validation-mechanism {
+                key 'validation-mechanism layer-protocol-adjacency-validated validation-robustness';
+                config false;
+                min-elements 1;
+                uses validation-mechanism;
+                description "Provides details of the specific validation mechanism(s) used to confirm the presence of an intended topologicalEntity.";
+            }
+            description "Validation covers the various adjacenct discovery and reachability verification protocols. Also may cover Information source and degree of integrity.";
+        }
+        grouping network-topology-service {
+            leaf-list topology {
+                type leafref {
+                    path '/tapi-common:context/tapi-topology:topology/tapi-topology:uuid';
+                }
+                config false;
+                description "none";
+            }
+            uses tapi-common:service-spec;
+            description "none";
+        }
+        grouping topology-context {
+            container nw-topology-service {
+                config false;
+                uses network-topology-service;
+                description "none";
+            }
+            list topology {
+                key 'uuid';
+                config false;
+                uses topology;
+                description "none";
+            }
+            description "none";
+        }
+
+    /***********************
+    * package type-definitions
+    **********************/
+        grouping capacity {
+            leaf total-size {
+                type fixed-capacity-value;
+                description "Total capacity of the TopologicalEntity in MB/s";
+            }
+            leaf packet-bw-profile-type {
+                type bandwidth-profile-type;
+                description "none";
+            }
+            leaf committed-information-rate {
+                type uint64;
+                description "none";
+            }
+            leaf committed-burst-size {
+                type uint64;
+                description "none";
+            }
+            leaf peak-information-rate {
+                type uint64;
+                description "none";
+            }
+            leaf peak-burst-size {
+                type uint64;
+                description "none";
+            }
+            leaf color-aware {
+                type boolean;
+                description "none";
+            }
+            leaf coupling-flag {
+                type boolean;
+                description "none";
+            }
+            description "Information on capacity of a particular TopologicalEntity.";
+        }
+        grouping cost-characteristic {
+            leaf cost-name {
+                type string;
+                description "The cost characteristic will related to some aspect of the TopologicalEntity (e.g. $ cost, routing weight). This aspect will be conveyed by the costName.";
+            }
+            leaf cost-value {
+                type string;
+                description "The specific cost.";
+            }
+            leaf cost-algorithm {
+                type string;
+                description "The cost may vary based upon some properties of the TopologicalEntity. The rules for the variation are conveyed by the costAlgorithm.";
+            }
+            description "The information for a particular cost characteristic.";
+        }
+        typedef fixed-capacity-value {
+            type enumeration {
+                enum not-applicable {
+                    description "none";
+                }
+                enum 10mbps {
+                    description "none";
+                }
+                enum 100mbps {
+                    description "none";
+                }
+                enum 1gbps {
+                    description "none";
+                }
+                enum 2-4gbps {
+                    description "none";
+                }
+                enum 10gbps {
+                    description "none";
+                }
+                enum 40gbps {
+                    description "none";
+                }
+                enum 100gbps {
+                    description "none";
+                }
+                enum 200gbps {
+                    description "none";
+                }
+                enum 400gbps {
+                    description "none";
+                }
+            }
+            description "The Capacity (Bandwidth) values that are applicable for digital layers. ";
+        }
+        grouping latency-characteristic {
+            leaf fixed-latency-characteristic {
+                type string;
+                config false;
+                description "A TopologicalEntity suffers delay caused by the realization of the servers (e.g. distance related; FEC encoding etc.) along with some client specific processing. This is the total average latency effect of the TopologicalEntity";
+            }
+            leaf jitter-characteristic {
+                type string;
+                config false;
+                description "High frequency deviation from true periodicity of a signal and therefore a small high rate of change of transfer latency.
+                    Applies to TDM systems (and not packet).";
+            }
+            leaf wander-characteristic {
+                type string;
+                config false;
+                description "Low frequency deviation from true periodicity of a signal and therefore a small low rate of change of transfer latency.
+                    Applies to TDM systems (and not packet).";
+            }
+            leaf traffic-property-name {
+                type string;
+                description "The identifier of the specific traffic property to which the queuing latency applies.";
+            }
+            leaf traffic-property-queing-latency {
+                type string;
+                description "The specific queuing latency for the traffic property.";
+            }
+            description "Provides information on latency characteristic for a particular stated trafficProperty.";
+        }
+        grouping risk-characteristic {
+            leaf risk-characteristic-name {
+                type string;
+                description "The name of the risk characteristic. The characteristic may be related to a specific degree of closeness. 
+                    For example a particular characteristic may apply to failures that are localized (e.g. to one side of a road) where as another characteristic may relate to failures that have a broader impact (e.g. both sides of a road that crosses a bridge).
+                    Depending upon the importance of the traffic being routed different risk characteristics will be evaluated.";
+            }
+            leaf-list risk-identifier-list {
+                type string;
+                min-elements 1;
+                description "A list of the identifiers of each physical/geographic unit (with the specific risk characteristic) that is related to a segment of the TopologicalEntity.";
+            }
+            description "The information for a particular risk characteristic where there is a list of risk identifiers related to that characteristic.";
+        }
+        grouping validation-mechanism {
+            leaf validation-mechanism {
+                type string;
+                description "Name of mechanism used to validate adjacency";
+            }
+            leaf layer-protocol-adjacency-validated {
+                type string;
+                description "State of validatiion";
+            }
+            leaf validation-robustness {
+                type string;
+                description "Quality of validation (i.e. how likely is the stated validation to be invalid)";
+            }
+            description "Identifies the validation mechanism and describes the characteristics of that mechanism";
+        }
+        typedef bandwidth-profile-type {
+            type enumeration {
+                enum not-applicable {
+                    description "none";
+                }
+                enum mef-10-x {
+                    description "none";
+                }
+                enum rfc-2697 {
+                    description "none";
+                }
+                enum rfc-2698 {
+                    description "none";
+                }
+                enum rfc-4115 {
+                    description "none";
+                }
+            }
+            description "none";
+        }
+
+    /***********************
+    * package interfaces
+    **********************/
+        rpc get-topology-details {
+            description "none";
+            input {
+                leaf topology-id-or-name {
+                    type string;
+                    description "none";
+                }
+            }
+            output {
+                container topology {
+                    uses topology;
+                    description "none";
+                }
+            }
+        }
+        rpc get-node-details {
+            description "none";
+            input {
+                leaf topology-id-or-name {
+                    type string;
+                    description "none";
+                }
+                leaf node-id-or-name {
+                    type string;
+                    description "none";
+                }
+            }
+            output {
+                container node {
+                    uses node;
+                    description "none";
+                }
+            }
+        }
+        rpc get-node-edge-point-details {
+            description "none";
+            input {
+                leaf topology-id-or-name {
+                    type string;
+                    description "none";
+                }
+                leaf node-id-or-name {
+                    type string;
+                    description "none";
+                }
+                leaf ep-id-or-name {
+                    type string;
+                    description "none";
+                }
+            }
+            output {
+                container node-edge-point {
+                    uses node-edge-point;
+                    description "none";
+                }
+            }
+        }
+        rpc get-link-details {
+            description "none";
+            input {
+                leaf topology-id-or-name {
+                    type string;
+                    description "none";
+                }
+                leaf link-id-or-name {
+                    type string;
+                    description "none";
+                }
+            }
+            output {
+                container link {
+                    uses link;
+                    description "none";
+                }
+            }
+        }
+        rpc get-topology-list {
+            description "none";
+            output {
+                list topology {
+                    uses topology;
+                    description "none";
+                }
+            }
+        }
+
+}
diff --git a/pom.xml b/pom.xml
index d5c43f2a1593fc99f43b6adf2f1c903c202db93b..349352bdcb2d957bd52c13dc740a866f2888c0d1 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -60,6 +60,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
         <module>api</module>
         <module>legato-api</module>
         <module>presto-api</module>
+        <module>nrp-api</module>
         <module>impl</module>
         <module>netvirt</module>
         <module>cisco-xr-driver</module>