Add Transport-API Yang models.

Change-Id: Iaca69b8bd1adbd899b0b6faf255f2e202a80a927
diff --git a/models/pom.xml b/models/pom.xml
index e45e5ad..5d2287a 100644
--- a/models/pom.xml
+++ b/models/pom.xml
@@ -35,6 +35,7 @@
         <module>openconfig</module>
         <module>openroadm</module>
         <module>l3vpn</module>
+        <module>tapi</module>
     </modules>
 
 </project>
diff --git a/models/tapi/BUCK b/models/tapi/BUCK
new file mode 100644
index 0000000..c53b783
--- /dev/null
+++ b/models/tapi/BUCK
@@ -0,0 +1,5 @@
+
+yang_model(
+  app_name = 'org.onosproject.models.tapi',
+  title = 'Transport API YANG Models',
+)
\ No newline at end of file
diff --git a/models/tapi/pom.xml b/models/tapi/pom.xml
new file mode 100644
index 0000000..a7805a4
--- /dev/null
+++ b/models/tapi/pom.xml
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2017-present Open Networking Foundation
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<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">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.onosproject</groupId>
+        <artifactId>onos-models</artifactId>
+        <version>1.12.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>onos-models-tapi</artifactId>
+    <packaging>bundle</packaging>
+    <description>Transport API YANG models</description>
+
+    <properties>
+        <onos.app.name>org.onosproject.models.tapi</onos.app.name>
+    </properties>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-yang-model</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-apps-yang</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions combine.children="append">
+                        <Include-Resource>yang/resources/YangMetaData.ser=target/classes/yang/resources/YangMetaData.ser</Include-Resource>
+                    </instructions>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.onosproject</groupId>
+                <artifactId>onos-yang-compiler-maven-plugin</artifactId>
+            </plugin>
+
+            <plugin>
+                <groupId>org.onosproject</groupId>
+                <artifactId>onos-maven-plugin</artifactId>
+            </plugin>
+
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <version>3.0.0</version>
+                <executions>
+                  <execution>
+                    <id>add-source</id>
+                    <phase>generate-sources</phase>
+                    <goals>
+                      <goal>add-source</goal>
+                    </goals>
+                    <configuration>
+                      <sources>
+                        <source>${project.build.directory}/generated-sources</source>
+                      </sources>
+                    </configuration>
+                  </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-clean-plugin</artifactId>
+                <version>3.0.0</version>
+                <executions>
+                    <execution>
+                        <id>onos-yang-plugin-workaround</id>
+                        <!-- yang plugin cannot handle non-clean compilation -->
+                        <phase>initialize</phase>
+                        <goals>
+                            <goal>clean</goal>
+                        </goals>
+                        <configuration>
+                            <excludeDefaultDirectories>true</excludeDefaultDirectories>
+                            <filesets>
+                                <fileset>
+                                    <directory>target/generated-sources</directory>
+                                </fileset>
+                            </filesets>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+
+        </plugins>
+
+        <pluginManagement>
+            <plugins>
+                <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+                <plugin>
+                    <groupId>org.eclipse.m2e</groupId>
+                    <artifactId>lifecycle-mapping</artifactId>
+                    <version>1.0.0</version>
+                    <configuration>
+                        <lifecycleMappingMetadata>
+                            <pluginExecutions>
+                                <pluginExecution>
+                                    <pluginExecutionFilter>
+                                        <groupId>
+                                            org.apache.maven.plugins
+                                        </groupId>
+                                        <artifactId>
+                                            maven-clean-plugin
+                                        </artifactId>
+                                        <versionRange>
+                                            [3.0.0,)
+                                        </versionRange>
+                                        <goals>
+                                            <goal>clean</goal>
+                                        </goals>
+                                    </pluginExecutionFilter>
+                                    <action>
+                                        <ignore></ignore>
+                                    </action>
+                                </pluginExecution>
+                            </pluginExecutions>
+                        </lifecycleMappingMetadata>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+
+</project>
diff --git a/models/tapi/src/main/yang/tapi-common.yang b/models/tapi/src/main/yang/tapi-common.yang
new file mode 100644
index 0000000..fa7145e
--- /dev/null
+++ b/models/tapi/src/main/yang/tapi-common.yang
@@ -0,0 +1,541 @@
+module tapi-common {

+    namespace "urn:onf:params:xml:ns:yang:tapi-common";

+    prefix tapi-common;

+    organization "Open Networking Foundation (ONF) / Open Transport Working Group(OTWG) / Transport API (TAPI) Project";

+    contact "

+        WG Web: TAPI SDK Project <http://opensourcesdn.org/projects/project-snowmass/>

+        WG List: TAPI Discussion list <mailto: transport-api@login.opennetworking.org>,

+        WG Chair: Karthik Sethuraman <mailto:karthik.sethuraman@necam.com>,

+        Editor: Ricard Vilalta <mailto:ricard.vilalta@cttc.es>";

+    description "none";

+    revision 2017-05-31 {

+        description "TAPI SDK 2.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;

+                config false;

+                description "none";

+            }

+            leaf lifecycle-state {

+                type lifecycle-state;

+                config false;

+                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 uuid;

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

+            }

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

+                config false;

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

+                config false;

+                description "none";

+            }

+            leaf lifecycle-state {

+                type lifecycle-state;

+                config false;

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

+        }

+        container context {

+        	presence "TAPI";

+            uses context;

+            description "none";

+        }

+        grouping context {

+            list service-interface-point {

+                key 'uuid';

+                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';

+                min-elements 1;

+                uses layer-protocol;

+                description "Usage of layerProtocol [>1]  in the ServiceInterfacePoint should be considered experimental";

+            }

+            container state {

+                uses admin-state-pac;

+                description "none";

+            }

+            container capacity {

+                uses capacity-pac;

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

+        }

+        grouping 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.";

+            }

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

+        }

+

+    /***********************

+    * package type-definitions

+    **********************/ 

+        identity layer-protocol-name {

+            description "none";

+        }

+        identity otsi-a {

+            base layer-protocol-name;

+            description "none";

+        }

+        identity otu {

+            base layer-protocol-name;

+            description "none";

+        }

+        identity odu {

+            base layer-protocol-name;

+            description "none";

+        }

+        identity eth {

+            base layer-protocol-name;

+            description "none";

+        }

+        identity ety {

+            base layer-protocol-name;

+            description "none";

+        }

+        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 identityref {

+                base layer-protocol-name;

+            }

+            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 trunk {

+                    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 uuid {

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

+        }

+        grouping capacity {

+            container total-size {

+                uses capacity-value;

+                description "Total capacity of the TopologicalEntity in MB/s. In case of bandwidthProfile, this is expected to same as the committedInformationRate.";

+            }

+            container bandwidth-profile {

+                uses bandwidth-profile;

+                description "none";

+            }

+            description "Information on capacity of a particular TopologicalEntity.";

+        }

+        grouping bandwidth-profile {

+            leaf bw-profile-type {

+                type bandwidth-profile-type;

+                description "none";

+            }

+            container committed-information-rate {

+                uses capacity-value;

+                description "none";

+            }

+            container committed-burst-size {

+                uses capacity-value;

+                description "none";

+            }

+            container peak-information-rate {

+                uses capacity-value;

+                description "none";

+            }

+            container peak-burst-size {

+                uses capacity-value;

+                description "none";

+            }

+            leaf color-aware {

+                type boolean;

+                description "none";

+            }

+            leaf coupling-flag {

+                type boolean;

+                description "none";

+            }

+            description "none";

+        }

+        grouping capacity-value {

+            leaf value {

+                type uint64;

+                description "none";

+            }

+            leaf unit {

+                type capacity-unit;

+                description "none";

+            }

+            description "The Capacity (Bandwidth) values that are applicable for digital layers.";

+        }

+        typedef capacity-unit {

+            type enumeration {

+                enum gbps {

+                    description "Indicates that the integer CapacityValue is in Gigabit-per-second";

+                }

+                enum mbps {

+                    description "Indicates that the integer CapacityValue is in Megabit-per-second";

+                }

+                enum kbps {

+                    description "Indicates that the integer CapacityValue is in Kilobit-per-second";

+                }

+            }

+            description "none";

+        }

+        typedef bandwidth-profile-type {

+            type enumeration {

+                enum mef-10.x {

+                    description "none";

+                }

+                enum rfc-2697 {

+                    description "none";

+                }

+                enum rfc-2698 {

+                    description "none";

+                }

+                enum rfc-4115 {

+                    description "none";

+                }

+            }

+            description "none";

+        }

+        grouping time-range {

+            leaf end-time {

+                type date-and-time;

+                description "none";

+            }

+            leaf start-time {

+                type date-and-time;

+                description "none";

+            }

+            description "none";

+        }

+

+    /***********************

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

+                }

+            }

+        }

+        rpc update-service-interface-point {

+            description "none";

+            input {

+                leaf sip-id-or-name {

+                    type string;

+                    description "none";

+                }

+                leaf state {

+                    type administrative-state;

+                    description "none";

+                }

+            }

+        }

+

+}

diff --git a/models/tapi/src/main/yang/tapi-connectivity.yang b/models/tapi/src/main/yang/tapi-connectivity.yang
new file mode 100644
index 0000000..3957f0d
--- /dev/null
+++ b/models/tapi/src/main/yang/tapi-connectivity.yang
@@ -0,0 +1,819 @@
+module tapi-connectivity {

+    namespace "urn:onf:params:xml:ns:yang:tapi-connectivity";

+    prefix tapi-connectivity;

+    import tapi-common {

+        prefix tapi-common;

+    }

+    import tapi-topology {

+        prefix tapi-topology;

+    }

+    import tapi-path-computation {

+        prefix tapi-path-computation;

+    }

+    organization "Open Networking Foundation (ONF) / Open Transport Working Group(OTWG) / Transport API (TAPI) Project";

+    contact "

+        WG Web: TAPI SDK Project <http://opensourcesdn.org/projects/project-snowmass/>

+        WG List: TAPI Discussion list <mailto: transport-api@login.opennetworking.org>,

+        WG Chair: Karthik Sethuraman <mailto:karthik.sethuraman@necam.com>,

+        Editor: Ricard Vilalta <mailto:ricard.vilalta@cttc.es>";

+    description "none";

+    revision 2017-05-31 {

+        description "TAPI SDK 2.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 "Augments the base TAPI Context with ConnectivityService information";

+    }

+    augment "/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point" {

+        uses cep-list;

+        description "none";

+    }

+    /***********************

+    * package object-classes

+    **********************/ 

+        grouping connection {

+            leaf-list connection-end-point {

+                type leafref {

+                    path '/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point/tapi-connectivity:connection-end-point/tapi-connectivity:uuid';

+                }

+                config false;

+                min-elements 2;

+                description "none";

+            }

+            leaf-list lower-connection {

+                type leafref {

+                    path '/tapi-common:context/tapi-connectivity:connection/tapi-connectivity:uuid';

+                }

+                description "An Connection object supports a recursive aggregation relationship such that the internal construction of an Connection can be exposed as multiple lower level Connection objects (partitioning).

+                    Aggregation is used as for the Node/Topology  to allow changes in hierarchy. 

+                    Connection aggregation reflects Node/Topology aggregation. 

+                    The FC represents a Cross-Connection in an NE. The Cross-Connection in an NE is not necessarily the lowest level of FC partitioning.";

+            }

+            leaf-list supported-link {

+                type leafref {

+                    path '/tapi-common:context/tapi-topology:topology/tapi-topology:link/tapi-topology:uuid';

+                }

+                description "An Connection that spans between CEPs that terminate the LayerProtocol usually supports one or more links in the client layer.";

+            }

+            leaf container-node {

+                type leafref {

+                    path '/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:uuid';

+                }

+                config false;

+                description "none";

+            }

+            list route {

+                key 'local-id';

+                config false;

+                uses route;

+                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 direction {

+                type tapi-common:forwarding-direction;

+                config false;

+                description "none";

+            }

+            leaf layer-protocol-name {

+                type tapi-common:layer-protocol-name;

+                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-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point/tapi-connectivity:connection-end-point/tapi-connectivity:uuid';

+                }

+                config false;

+                description "none";

+            }

+            leaf-list associated-route {

+                type leafref {

+                    path '/tapi-common:context/tapi-connectivity:connection/tapi-connectivity:route/tapi-connectivity:local-id';

+                }

+                description "none";

+            }

+            container state {

+                config false;

+                uses tapi-common:operational-state-pac;

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

+            }

+            leaf is-exclusive {

+                type boolean;

+                default "true";

+                description "To distinguish if the resources are exclusive to the service  - for example between EPL(isExclusive=true) and EVPL (isExclusive=false), or between EPLAN (isExclusive=true) and EVPLAN (isExclusive=false)";

+            }

+            container requested-capacity {

+                config false;

+                uses tapi-common:capacity;

+                description "none";

+            }

+            container schedule {

+                uses tapi-common:time-range;

+                description "none";

+            }

+            list cost-characteristic {

+                key 'cost-name';

+                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';

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

+            }

+            container route-compute-policy {

+                uses route-compute-policy;

+                description "none";

+            }

+            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 {

+            list end-point {

+                key 'local-id';

+                min-elements 2;

+                uses connectivity-service-end-point;

+                description "none";

+            }

+            leaf-list connection {

+                type leafref {

+                    path '/tapi-common:context/tapi-connectivity:connection/tapi-connectivity:uuid';

+                }

+                config false;

+                description "none";

+            }

+            container conn-constraint {

+                uses connectivity-constraint;

+                description "none";

+            }

+            container topo-constraint {

+                uses topology-constraint;

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

+            }

+            list resilience-constraint {

+                key 'local-id';

+                uses resilience-constraint;

+                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';

+                }

+                description "none";

+            }

+            leaf-list connection-end-point {

+                type leafref {

+                    path '/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point/tapi-connectivity:connection-end-point/tapi-connectivity:uuid';

+                }

+                config false;

+                description "none";

+            }

+            list layer-protocol {

+                key 'local-id';

+                min-elements 1;

+                uses tapi-common:layer-protocol;

+                description "none";

+            }

+            container state {

+                uses tapi-common:admin-state-pac;

+                description "none";

+            }

+            container capacity {

+                uses tapi-common:capacity-pac;

+                description "none";

+            }

+            leaf direction {

+                type tapi-common:port-direction;

+                description "The orientation of defined flow at the EndPoint.";

+            }

+            leaf role {

+                type tapi-common:port-role;

+                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 protection-role {

+                type protection-role;

+                description "To specify the protection role of this Port when create or update ConnectivityService.";

+            }

+            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 connection-end-point {

+                type leafref {

+                    path '/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point/tapi-connectivity:connection-end-point/tapi-connectivity:uuid';

+                }

+                config false;

+                min-elements 2;

+                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-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point/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 resilience-constraint;

+                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 resilience-constraint {

+            container resilience-type {

+                uses tapi-topology:resilience-type;

+                description "none";

+            }

+            leaf restoration-coordinate-type {

+                type coordinate-type;

+                description " The coordination mechanism between multi-layers.";

+            }

+            leaf restore-priority {

+                type uint64;

+                description "none";

+            }

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

+            }

+            leaf is-frozen {

+                type boolean;

+                description "Temporarily prevents any switch action to be taken and, as such, freezes the current state. 

+                    Until the freeze is cleared, additional near-end external commands are rejected and fault condition changes and received APS messages are ignored.

+                    All administrative controls of any aspect of protection are rejected.";

+            }

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

+            }

+            leaf max-switch-times {

+                type uint64;

+                description "Used to limit the maximum swtich times. When work fault disappears , and traffic return to the original work path, switch counter reset.";

+            }

+            leaf layer-protocol {

+                type tapi-common:layer-protocol-name;

+                description "Indicate which layer this resilience parameters package configured for.";

+            }

+            uses tapi-common:local-class;

+            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 leafref {

+                    path '/tapi-common:context/tapi-path-computation:path/tapi-path-computation:uuid';

+                }

+                config false;

+                description "none";

+            }

+            leaf-list exclude-path {

+                type leafref {

+                    path '/tapi-common:context/tapi-path-computation:path/tapi-path-computation:uuid';

+                }

+                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 "This is a loose constraint - that is it is unordered and could be a partial list ";

+            }

+            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 include-node {

+                type leafref {

+                    path '/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:uuid';

+                }

+                config false;

+                description "This is a loose constraint - that is it is unordered and could be a partial list";

+            }

+            leaf-list exclude-node {

+                type leafref {

+                    path '/tapi-common:context/tapi-topology:topology/tapi-topology:node/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";

+        }

+        grouping cep-list {

+            list connection-end-point {

+                key 'uuid';

+                uses connection-end-point;

+                description "none";

+            }

+            description "none";

+        }

+        grouping route-compute-policy {

+            leaf route-objective-function {

+                type route-objective-function;

+                description "none";

+            }

+            leaf diversity-policy {

+                type diversity-policy;

+                description "none";

+            }

+            description "none";

+        }

+

+    /***********************

+    * package type-definitions

+    **********************/ 

+        typedef service-type {

+            type enumeration {

+                enum point-to-point-connectivity {

+                    description "none";

+                }

+                enum point-to-multipoint-connectivity {

+                    description "none";

+                }

+                enum multipoint-connectivity {

+                    description "none";

+                }

+                enum rooted-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 coordinate-type {

+            type enumeration {

+                enum no-coordinate {

+                    description "none";

+                }

+                enum hold-off-time {

+                    description "none";

+                }

+                enum wait-for-notification {

+                    description "none";

+                }

+            }

+            description "none";

+        }

+        typedef route-objective-function {

+            type enumeration {

+                enum min-work-route-hop {

+                    description "none";

+                }

+                enum min-work-route-cost {

+                    description "none";

+                }

+                enum min-work-route-latency {

+                    description "none";

+                }

+                enum min-sum-of-work-and-protection-route-hop {

+                    description "none";

+                }

+                enum min-sum-of-work-and-protection-route-cost {

+                    description "none";

+                }

+                enum min-sum-of-work-and-protection-route-latency {

+                    description "none";

+                }

+                enum load-balance-max-unused-capacity {

+                    description "none";

+                }

+            }

+            description "none";

+        }

+        typedef diversity-policy {

+            type enumeration {

+                enum srlg {

+                    description "none";

+                }

+                enum srng {

+                    description "none";

+                }

+                enum sng {

+                    description "none";

+                }

+                enum node {

+                    description "none";

+                }

+                enum link {

+                    description "none";

+                }

+            }

+            description "none";

+        }

+        typedef protection-role {

+            type enumeration {

+                enum work {

+                    description "none";

+                }

+                enum protect {

+                    description "none";

+                }

+                enum protected {

+                    description "none";

+                }

+                enum na {

+                    description "none";

+                }

+                enum work-restore {

+                    description "none";

+                }

+                enum protect-restore {

+                    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 end-point {

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

+                }

+                list resilience-constraint {

+                    uses resilience-constraint;

+                    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 end-point {

+                    uses connectivity-service-end-point;

+                    description "none";

+                }

+                container conn-constraint {

+                    uses connectivity-constraint;

+                    description "none";

+                }

+                container topo-constraint {

+                    uses topology-constraint;

+                    description "none";

+                }

+                list resilience-constraint {

+                    uses resilience-constraint;

+                    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/models/tapi/src/main/yang/tapi-eth.yang b/models/tapi/src/main/yang/tapi-eth.yang
new file mode 100644
index 0000000..500430f
--- /dev/null
+++ b/models/tapi/src/main/yang/tapi-eth.yang
@@ -0,0 +1,781 @@
+module tapi-eth {

+    namespace "urn:onf:params:xml:ns:yang:tapi-eth";

+    prefix tapi-eth;

+    import tapi-common {

+        prefix tapi-common;

+    }

+    import tapi-topology {

+        prefix tapi-topology;

+    }

+    import tapi-connectivity {

+        prefix tapi-connectivity;

+    }

+    organization "Open Networking Foundation (ONF) / Open Transport Working Group(OTWG) / Transport API (TAPI) Project";

+    contact "

+        WG Web: TAPI SDK Project <http://opensourcesdn.org/projects/project-snowmass/>

+        WG List: TAPI Discussion list <mailto: transport-api@login.opennetworking.org>,

+        WG Chair: Karthik Sethuraman <mailto:karthik.sethuraman@necam.com>,

+        Editor: Ricard Vilalta <mailto:ricard.vilalta@cttc.es>";

+    description "none";

+    revision 2017-05-31 {

+        description "TAPI SDK 2.0-alpha";

+        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020 and RFC 6087";

+    }

+    augment "/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point/tapi-connectivity:connection-end-point/tapi-connectivity:layer-protocol" {

+        uses connection-end-point-lp-spec;

+        description "Augments the base LayerProtocol information in ConnectionEndPoint with ETH-specific information";

+    }

+    augment "/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point/tapi-topology:layer-protocol" {

+        uses node-edge-point-lp-spec;

+        description "Augments the base LayerProtocol information in NodeEdgePoint with ETH-specific information";

+    }

+    /***********************

+    * package object-classes

+    **********************/ 

+        grouping connection-point-and-adapter-pac {

+            leaf-list auxiliary-function-position-sequence {

+                type uint64;

+                description "This attribute indicates the positions (i.e., the relative order) of all the MEP, MIP, and TCS objects which are associated with the CTP.";

+            }

+            leaf vlan-config {

+                type uint64;

+                description "This attribute models the ETHx/ETH-m_A_So_MI_Vlan_Config information defined in G.8021.

+                    range of type : -1, 0, 1..4094";

+            }

+            leaf csf-rdi-fdi-enable {

+                type boolean;

+                description "This attribute models the MI_CSFrdifdiEnable information defined in G.8021.";

+            }

+            leaf csf-report {

+                type boolean;

+                description "This attribute models the MI_CSF_Reported information defined in G.8021.

+                    range of type : true, false";

+            }

+            leaf-list filter-config-snk {

+                type mac-address;

+                description "This attribute models the FilteConfig MI defined in 8.3/G.8021. It indicates the configured filter action for each of the 33 group MAC addresses for control frames. The 33 MAC addresses are:

+                    01-80-C2-00-00-10, 

+                    01-80-C2-00-00-00 to 01-80-C2-00-00-0F, and 

+                    01-80-C2-00-00-20 to 01-80-C2-00-00-2F.

+                    The filter action is Pass or Block. 

+                    If the destination address of the incoming ETH_CI_D matches one of the above addresses, the filter process shall perform the corresponding configured filter action. 

+                    If none of the above addresses match, the ETH_CI_D is passed.";

+            }

+            leaf mac-length {

+                type uint64;

+                default "2000";

+                description "This attribute models the MAC_Lenght MI defined in 8.6/G.8021 for the MAC Length Check process. It indicates the allowed maximum frame length in bytes.

+                    range of type : 1518, 1522, 2000";

+            }

+            container filter-config {

+                uses control-frame-filter;

+                description "This attribute models the FilterConfig MI defined in section 8.3/G.8021. It indicates the configured filter action for each of the 33 group MAC addresses for control frames. The 33 MAC addresses are:

+                    - All bridges address: 01-80-C2-00-00-10,

+                    - Reserved addresses: 01-80-C2-00-00-00 to 01-80-C2-00-00-0F,

+                    - GARP Application addresses: 01-80-C2-00-00-20 to 01-80-C2-00-00-2F.

+                    The filter action is Pass or Block. 

+                    If the destination address of the incoming ETH_CI_D matches one of the above addresses, the filter process shall perform the corresponding configured filter action. 

+                    If none of the above addresses match, the ETH_CI_D is passed.";

+            }

+            leaf is-ssf-reported {

+                type boolean;

+                description "This attribute provisions whether the SSF defect should be reported as fault cause or not.

+                    It models the ETH-LAG_FT_Sk_MI_SSF_Reported defined in G.8021.";

+            }

+            leaf pll-thr {

+                type uint64;

+                description "This attribute provisions the threshold for the number of active ports. If the number of active ports is more than zero but less than the provisioned threshold, a cPLL (Partial Link Loss) is raised. See section 9.7.1.2 of G.8021.

+                    range of type : 0..number of ports";

+            }

+            leaf actor-oper-key {

+                type uint64;

+                config false;

+                description "See 802.1AX:

+                    The current operational value of the Key for the Aggregator. The administrative Key value may differ from the operational Key value for the reasons discussed in 5.6.2.

+                    The meaning of particular Key values is of local significance.

+                    range of type : 16 bit";

+            }

+            leaf actor-system-id {

+                type mac-address;

+                description "See 802.1AX:

+                    A MAC address used as a unique identifier for the System that contains this Aggregator.";

+            }

+            leaf actor-system-priority {

+                type uint64;

+                description "See 802.1AX:

+                    Indicating the priority associated with the Actor’s System ID.

+                    range of type : 2-octet";

+            }

+            leaf collector-max-delay {

+                type uint64;

+                description "See 802.1AX:

+                    The value of this attribute defines the maximum delay, in tens of microseconds, that may be imposed by the Frame Collector between receiving a frame from an Aggregator Parser, and either delivering the frame to its MAC Client or discarding the frame (see IEEE 802.1AX clause 5.2.3.1.1).

+                    range of type : 16-bit";

+            }

+            leaf data-rate {

+                type uint64;

+                config false;

+                description "See 802.1AX:

+                    The current data rate, in bits per second, of the aggregate link. The value is calculated as N times the data rate of a single link in the aggregation, where N is the number of active links.";

+            }

+            leaf partner-oper-key {

+                type uint64;

+                config false;

+                description "See 802.1AX:

+                    The current operational value of the Key for the Aggregator’s current protocol Partner. If the aggregation is manually configured, this Key value will be a value assigned by the local System.

+                    range of type : 16-bit";

+            }

+            leaf partner-system-id {

+                type mac-address;

+                config false;

+                description "See 802.1AX:

+                    A MAC address consisting of the unique identifier for the current protocol Partner of this Aggregator. A value of zero indicates that there is no known Partner. If the aggregation is manually configured, this System ID value will be a value assigned by the local System.";

+            }

+            leaf partner-system-priority {

+                type uint64;

+                config false;

+                description "See 802.1AX:

+                    Indicates the priority associated with the Partner’s System ID. If the aggregation is manually configured, this System Priority value will be a value assigned by the local System.

+                    range of type : 2-octet";

+            }

+            leaf csf-config {

+                type csf-config;

+                description "This attribute models the combination of all CSF related MI signals (MI_CSF_Enable, MI_CSFrdifdi_Enable, MI_CSFdci_Enable) as defined in G.8021.

+                    range of type : true, false";

+            }

+            container traffic-shaping {

+                uses traffic-shaping-pac;

+                description "none";

+            }

+            container traffic-conditioning {

+                uses traffic-conditioning-pac;

+                description "none";

+            }

+            description "none";

+        }

+        grouping connection-end-point-lp-spec {

+            container termination-spec {

+                uses eth-termination-pac;

+                description "none";

+            }

+            container adapter-spec {

+                uses connection-point-and-adapter-pac;

+                description "none";

+            }

+            description "none";

+        }

+        grouping eth-termination-pac {

+            container priority-regenerate {

+                uses priority-mapping;

+                description "This attribute models the ETHx/ETH-m _A_Sk_MI_P_Regenerate information defined in G.8021.";

+            }

+            leaf ether-type {

+                type vlan-type;

+                description "This attribute models the ETHx/ETH-m _A_Sk_MI_Etype information defined in G.8021.";

+            }

+            leaf-list filter-config {

+                type mac-address;

+                description "This attribute models the ETHx/ETH-m_A_Sk_MI_Filter_Config information defined in G.8021.

+                    It indicates the configured filter action for each of the 33 group MAC addresses for control frames.

+                    The 33 MAC addresses are:

+                    01-80-C2-00-00-10, 

+                    01-80-C2-00-00-00 to 01-80-C2-00-00-0F, and 

+                    01-80-C2-00-00-20 to 01-80-C2-00-00-2F.

+                    The filter action is Pass or Block. 

+                    If the destination address of the incoming ETH_CI_D matches one of the above addresses, the filter process shall perform the corresponding configured filter action. 

+                    If none of the above addresses match, the ETH_CI_D is passed.

+                    range of type : MacAddress: 

+                    01-80-C2-00-00-10, 

+                    01-80-C2-00-00-00 to 

+                    01-80-C2-00-00-0F, and 

+                    01-80-C2-00-00-20 to 

+                    01-80-C2-00-00-2F;

+                    ActionEnum:

+                    PASS, BLOCK";

+            }

+            leaf frametype-config {

+                type frame-type;

+                description "This attribute models the ETHx/ETH-m_A_Sk_MI_Frametype_Config information defined in G.8021.

+                    range of type : see Enumeration";

+            }

+            leaf port-vid {

+                type vid;

+                default "1";

+                description "This attribute models the ETHx/ETH-m _A_Sk_MI_PVID information defined in G.8021.";

+            }

+            leaf priority-code-point-config {

+                type pcp-coding;

+                description "This attribute models the ETHx/ETH-m _A_Sk_MI_PCP_Config information defined in G.8021.

+                    range of type : see Enumeration";

+            }

+            description "This object class models the Ethernet Flow Termination function located at a layer boundary.";

+        }

+        grouping ety-termination-pac {

+            leaf is-fts-enabled {

+                type boolean;

+                description "This attribute indicates whether Forced Transmitter Shutdown (FTS) is enabled or not. It models the ETYn_TT_So_MI_FTSEnable information.";

+            }

+            leaf is-tx-pause-enabled {

+                type boolean;

+                description "This attribute identifies whether the Transmit Pause process is enabled or not. It models the MI_TxPauseEnable defined in G.8021.";

+            }

+            leaf phy-type {

+                type ety-phy-type;

+                config false;

+                description "This attribute identifies the PHY type of the ETY trail termination. See IEEE 802.3 clause 30.3.2.1.2.";

+            }

+            leaf-list phy-type-list {

+                type ety-phy-type;

+                config false;

+                description "This attribute identifies the possible PHY types that could be supported at the ETY trail termination. See IEEE 802.3 clause 30.3.2.1.3.";

+            }

+            description "none";

+        }

+        grouping traffic-conditioning-pac {

+            list prio-config-list {

+                config false;

+                uses priority-configuration;

+                description "This attribute indicates the Priority Splitter function for the mapping of the Ethernet frame priority (ETH_CI_P) values to the output queue.";

+            }

+            list cond-config-list {

+                config false;

+                uses traffic-conditioning-configuration;

+                description "This attribute indicates for the conditioner process the conditioning parameters:

+                    - Queue ID: Indicates the Queue ID

+                    - Committed Information Rate (CIR): number of bits per second

+                    - Committed Burst Size (CBS): number of bytes

+                    - Excess Information Rate (EIR): number of bits per second

+                    - Excess Burst Size (EBS): number of bytes

+                    - Coupling flag (CF): 0 or 1

+                    - Color mode (CM): color-blind and color-aware.";

+            }

+            leaf codirectional {

+                type boolean;

+                config false;

+                description "This attribute indicates the direction of the conditioner. The value of true means that the conditioner (modeled as a TCS Sink according to G.8021) is associated with the sink part of the containing CTP. The value of false means that the conditioner (modeled as a TCS Sink according to G.8021) is associated with the source part of the containing CTP.";

+            }

+            description "This object class models the ETH traffic conditioning function as defined in G.8021.

+                Basic attributes: codirectional, condConfigList, prioConfigList";

+        }

+        grouping traffic-shaping-pac {

+            list prio-config-list {

+                config false;

+                uses priority-configuration;

+                description "This attribute configures the Priority Splitter function for the mapping of the Ethernet frame priority (ETH_CI_P) values to the output queue.";

+            }

+            list queue-config-list {

+                config false;

+                uses queue-configuration;

+                description "This attribute configures the Queue depth and Dropping threshold parameters of the Queue process. The Queue depth sets the maximum size of the queue in bytes. An incoming ETH_CI traffic unit is dropped if there is insufficient space in the queue to hold the whole unit. The Dropping threshold sets the threshold of the queue. If the queue is filled beyond this threshold, incoming ETH_CI traffic units accompanied by the ETH_CI_DE signal set are dropped.";

+            }

+            leaf sched-config {

+                type scheduling-configuration;

+                config false;

+                description "This attribute configures the scheduler process. The value of this attribute is for further study because it is for further study in G.8021.

+                    Scheduler is a pointer to a Scheduler object, which is to be defined in the future (because in G.8021, this is FFS).

+                    Note that the only significance of the GTCS function defined in G.8021 is the use of a common scheduler for shaping. Given that, G.8052 models the common scheduler feature by having a common value for this attribute.";

+            }

+            leaf codirectional {

+                type boolean;

+                config false;

+                description "This attribute indicates the direction of the shaping function. The value of true means that the shaping (modeled as a TCS Source according to G.8021) is associated with the source part of the containing CTP. The value of false means that the shaping (modeled as a TCS Source according to G.8021) is associated with the sink part of the containing CTP.";

+            }

+            description "This object class models the ETH traffic shaping function as defined in G.8021.

+                Basic attribute: codirectional, prioConfigList, queueConfigList, schedConfig";

+        }

+        grouping node-edge-point-lp-spec {

+            container termination-spec {

+                uses ety-termination-pac;

+                description "none";

+            }

+            description "none";

+        }

+

+    /***********************

+    * package type-definitions

+    **********************/ 

+        grouping priority-configuration {

+            leaf priority {

+                type uint64 {

+                    range "0..7";

+                }

+                description "none";

+            }

+            leaf queue-id {

+                type uint64 {

+                    range "1..8";

+                }

+                description "none";

+            }

+            description "none";

+        }

+        grouping queue-configuration {

+            leaf queue-id {

+                type uint64;

+                description "This attribute indicates the queue id.";

+            }

+            leaf queue-depth {

+                type uint64;

+                description "This attribute defines the depth of the queue in bytes.";

+            }

+            leaf queue-threshold {

+                type uint64;

+                description "This attribute defines the threshold of the queue in bytes.";

+            }

+            description "none";

+        }

+        grouping traffic-conditioning-configuration {

+            leaf cir {

+                type uint64;

+                description "This attribute indicates the Committed Information Rate in bits/s.";

+            }

+            leaf cbs {

+                type uint64;

+                description "This attribute indicates the Committed Burst Size in bytes.";

+            }

+            leaf eir {

+                type uint64;

+                description "This attribute indicates the Excess Information Rate in bits/s.";

+            }

+            leaf ebs {

+                type uint64;

+                description "This attribute indicates the Excess Burst Size in bytes.";

+            }

+            leaf coupling-flag {

+                type boolean;

+                description "This attribute indicates the coupling flag.";

+            }

+            leaf colour-mode {

+                type colour-mode;

+                description "This attribute indicates the colour mode.";

+            }

+            leaf queue-id {

+                type uint64 {

+                    range "1..8";

+                }

+                description "This attribute indicates the queue id.";

+            }

+            description "none";

+        }

+        typedef mac-address {

+            type string;

+            description "This primitive data type contains an Ethernet MAC address defined by IEEE 802a. The format of the address consists of 12 hexadecimal characters, grouped in pairs and separated by '-' (e.g., 03-27-AC-75-3E-1D).";

+        }

+        grouping priority-mapping {

+            leaf priority-0 {

+                type uint64 {

+                    range "0..7";

+                }

+                description "This attribute defines the new priority value for the old priority value 0.";

+            }

+            leaf priority-1 {

+                type uint64 {

+                    range "0..7";

+                }

+                default "1";

+                description "This attribute defines the new priority value for the old priority value 1.";

+            }

+            leaf priority-2 {

+                type uint64 {

+                    range "0..7";

+                }

+                default "2";

+                description "This attribute defines the new priority value for the old priority value 2.";

+            }

+            leaf priority-3 {

+                type uint64 {

+                    range "0..7";

+                }

+                default "3";

+                description "This attribute defines the new priority value for the old priority value 3.";

+            }

+            leaf priority-4 {

+                type uint64 {

+                    range "0..7";

+                }

+                default "4";

+                description "This attribute defines the new priority value for the old priority value 4.";

+            }

+            leaf priority-5 {

+                type uint64 {

+                    range "0..7";

+                }

+                default "5";

+                description "This attribute defines the new priority value for the old priority value 5.";

+            }

+            leaf priority-6 {

+                type uint64 {

+                    range "0..7";

+                }

+                default "6";

+                description "This attribute defines the new priority value for the old priority value 6.";

+            }

+            leaf priority-7 {

+                type uint64 {

+                    range "0..7";

+                }

+                default "7";

+                description "This attribute defines the new priority value for the old priority value 7.";

+            }

+            description "This data type provides the priority mapping done in the 'P Regenerate' process defined in G.8021.";

+        }

+        typedef vid {

+            type string;

+            description "This primitive type models the 12 Bit VLAN identifier of a VLAN tag.";

+        }

+        typedef modify-cross-connection-data {

+            type string;

+            description "none";

+        }

+        grouping address-tuple {

+            leaf address {

+                type mac-address;

+                description "This attribute contains the MAC address of the address tuple.";

+            }

+            leaf-list port-list {

+                type mac-address;

+                description "This attribute contains the ports associated to the MAC address in the address tuple.";

+            }

+            description "This data type contains an address tuple consisting of a MAC address and a corresponding port list.";

+        }

+        typedef scheduling-configuration {

+            type string;

+            description "The syntax of this dataType is pending on the specification in G.8021, which is for further study.";

+        }

+        grouping control-frame-filter {

+            leaf c-2-00-00-10 {

+                type boolean;

+                description "This attribute identifies the 'All LANs Bridge Management Group Address'.";

+            }

+            leaf c-2-00-00-00 {

+                type boolean;

+                description "This attribute identifies the STP/RSTP/MSTP protocol address.";

+            }

+            leaf c-2-00-00-01 {

+                type boolean;

+                description "This attribute identifies the IEEE MAC-specific Control Protocols group address (PAUSE protocol).";

+            }

+            leaf c-2-00-00-02 {

+                type boolean;

+                description "This attribute identifies the IEEE 802.3 Slow_Protocols_Multicast address (LACP/LAMP or Link OAM protocols).";

+            }

+            leaf c-2-00-00-03 {

+                type boolean;

+                description "This attribute identifies the Nearest non-TPMR Bridge group address (Port Authentication protocol).";

+            }

+            leaf c-2-00-00-04 {

+                type boolean;

+                description "This attribute identifies the IEEE MAC-specific Control Protocols group address.";

+            }

+            leaf c-2-00-00-05 {

+                type boolean;

+                description "Reserved for future standardization.";

+            }

+            leaf c-2-00-00-06 {

+                type boolean;

+                description "Reserved for future standardization.";

+            }

+            leaf c-2-00-00-07 {

+                type boolean;

+                description "This attribute identifies the Metro Ethernet Forum E-LMI protocol group address.";

+            }

+            leaf c-2-00-00-08 {

+                type boolean;

+                description "This attribute identifies the Provider Bridge Group address.";

+            }

+            leaf c-2-00-00-09 {

+                type boolean;

+                description "Reserved for future standardization.";

+            }

+            leaf c-2-00-00-0-a {

+                type boolean;

+                description "Reserved for future standardization.";

+            }

+            leaf c-2-00-00-0-b {

+                type boolean;

+                description "Reserved for future standardization.";

+            }

+            leaf c-2-00-00-0-c {

+                type boolean;

+                description "Reserved for future standardization.";

+            }

+            leaf c-2-00-00-0-d {

+                type boolean;

+                description "This attribute identifies the Provider Bridge MVRP address.";

+            }

+            leaf c-2-00-00-0-e {

+                type boolean;

+                description "This attribute identifies the Individual LAN Scope group address, Nearest Bridge group address (LLDP protocol).";

+            }

+            leaf c-2-00-00-0-f {

+                type boolean;

+                description "Reserved for future standardization.";

+            }

+            leaf c-2-00-00-20 {

+                type boolean;

+                description "This attribute identifies the Customer and Provider Bridge MMRP address.";

+            }

+            leaf c-2-00-00-21 {

+                type boolean;

+                description "This attribute identifies the Customer Bridge MVRP address.";

+            }

+            leaf c-2-00-00-22 {

+                type boolean;

+                description "Reserved for future standardization.";

+            }

+            leaf c-2-00-00-23 {

+                type boolean;

+                description "Reserved for future standardization.";

+            }

+            leaf c-2-00-00-24 {

+                type boolean;

+                description "Reserved for future standardization.";

+            }

+            leaf c-2-00-00-25 {

+                type boolean;

+                description "Reserved for future standardization.";

+            }

+            leaf c-2-00-00-26 {

+                type boolean;

+                description "Reserved for future standardization.";

+            }

+            leaf c-2-00-00-27 {

+                type boolean;

+                description "Reserved for future standardization.";

+            }

+            leaf c-2-00-00-28 {

+                type boolean;

+                description "Reserved for future standardization.";

+            }

+            leaf c-2-00-00-29 {

+                type boolean;

+                description "Reserved for future standardization.";

+            }

+            leaf c-2-00-00-2-a {

+                type boolean;

+                description "Reserved for future standardization.";

+            }

+            leaf c-2-00-00-2-b {

+                type boolean;

+                description "Reserved for future standardization.";

+            }

+            leaf c-2-00-00-2-c {

+                type boolean;

+                description "Reserved for future standardization.";

+            }

+            leaf c-2-00-00-2-d {

+                type boolean;

+                description "Reserved for future standardization.";

+            }

+            leaf c-2-00-00-2-e {

+                type boolean;

+                description "Reserved for future standardization.";

+            }

+            leaf c-2-00-00-2-f {

+                type boolean;

+                description "Reserved for future standardization.";

+            }

+            description "This data type identifies the filter action for each of the 33 group MAC addresses (control frames).

+                Value 'false' means block: The frame is discarded by the filter process.

+                Value 'true' means pass: The frame is passed unchanged through the filter process.";

+        }

+        grouping bandwidth-report {

+            leaf source-mac-address {

+                type mac-address;

+                description "The sourceMacAddress is the address from the far end.";

+            }

+            leaf port-id {

+                type uint64;

+                description "This attribute returns the far end port identifier.";

+            }

+            leaf nominal-bandwidth {

+                type uint64;

+                description "This attribute returns the configured bandwidth";

+            }

+            leaf current-bandwidth {

+                type uint64;

+                description "This attribute returns the current bandwidth.";

+            }

+            description "Data type for the bandwidth report.";

+        }

+        typedef admin-state {

+            type enumeration {

+                enum lock {

+                    description "none";

+                }

+                enum normal {

+                    description "none";

+                }

+            }

+            description "none";

+        }

+        typedef colour-mode {

+            type enumeration {

+                enum colour-blind {

+                    description "none";

+                }

+                enum colour-aware {

+                    description "none";

+                }

+            }

+            description "none";

+        }

+        typedef csf-config {

+            type enumeration {

+                enum disabled {

+                    description "This literal covers the following states of the CSF related MI informations:

+                        - MI_CSF_Enable is false

+                        - MI_CSFrdifdi_Enable is false

+                        - MI_CSFdci_Enable is false.";

+                }

+                enum enabled {

+                    description "This literal covers the following states of the CSF related MI informations:

+                        - MI_CSF_Enable is true

+                        - MI_CSFrdifdi_Enable is false

+                        - MI_CSFdci_Enable is false.";

+                }

+                enum enabled-with-rdi-fdi {

+                    description "This literal covers the following states of the CSF related MI informations:

+                        - MI_CSF_Enable is true

+                        - MI_CSFrdifdi_Enable is true

+                        - MI_CSFdci_Enable is false.";

+                }

+                enum enabled-with-rdi-fdi-dci {

+                    description "This literal covers the following states of the CSF related MI informations:

+                        - MI_CSF_Enable is true

+                        - MI_CSFrdifdi_Enable is true

+                        - MI_CSFdci_Enable is true.";

+                }

+                enum enabled-with-dci {

+                    description "This literal covers the following states of the CSF related MI informations:

+                        - MI_CSF_Enable is true

+                        - MI_CSFrdifdi_Enable is false

+                        - MI_CSFdci_Enable is true.";

+                }

+            }

+            description "none";

+        }

+        typedef ety-phy-type {

+            type enumeration {

+                enum other {

+                    description "none";

+                }

+                enum unknown {

+                    description "none";

+                }

+                enum none {

+                    description "none";

+                }

+                enum 2-base-tl {

+                    description "none";

+                }

+                enum 10-mbit-s {

+                    description "none";

+                }

+                enum 10-pass-ts {

+                    description "none";

+                }

+                enum 100-base-t-4 {

+                    description "none";

+                }

+                enum 100-base-x {

+                    description "none";

+                }

+                enum 100-base-t-2 {

+                    description "none";

+                }

+                enum 1000-base-x {

+                    description "none";

+                }

+                enum 1000-base-t {

+                    description "none";

+                }

+                enum 10-gbase-x {

+                    description "none";

+                }

+                enum 10-gbase-r {

+                    description "none";

+                }

+                enum 10-gbase-w {

+                    description "none";

+                }

+            }

+            description "none";

+        }

+        typedef frame-type {

+            type enumeration {

+                enum admit-only-vlan-tagged-frames {

+                    description "none";

+                }

+                enum admit-only-untagged-and-priority-tagged-frames {

+                    description "none";

+                }

+                enum admit-all-frames {

+                    description "none";

+                }

+            }

+            description "none";

+        }

+        typedef oam-period {

+            type enumeration {

+                enum 3-33-ms {

+                    description "Default for protection.";

+                }

+                enum 10-ms {

+                    description "none";

+                }

+                enum 100-ms {

+                    description "none";

+                }

+                enum 1-s {

+                    description "none";

+                }

+                enum 10-s {

+                    description "none";

+                }

+                enum 1-min {

+                    description "none";

+                }

+                enum 10-min {

+                    description "none";

+                }

+            }

+            description "Provides the frequency for the OAM PDU insertion.";

+        }

+        typedef pcp-coding {

+            type enumeration {

+                enum 8-p-0-d {

+                    description "none";

+                }

+                enum 7-p-1-d {

+                    description "none";

+                }

+                enum 6-p-2-d {

+                    description "none";

+                }

+                enum 5-p-3-d {

+                    description "none";

+                }

+                enum dei {

+                    description "This enumeration value means that all priorities should be drop eligible.

+                        DEI = Drop Eligibility Indicator";

+                }

+            }

+            description "This enum models the coding of the Priority Code Point as defined in section 'Priority Code Point encoding' of IEEE 802.1Q.";

+        }

+        typedef vlan-type {

+            type enumeration {

+                enum c-tag {

+                    description "0x8100";

+                }

+                enum s-tag {

+                    description "0x88a8";

+                }

+                enum i-tag {

+                    description "88-e7";

+                }

+            }

+            description "This enumeration contains the Ethertypes defined in IEEE 802.1Q.";

+        }

+

+}

diff --git a/models/tapi/src/main/yang/tapi-notification.yang b/models/tapi/src/main/yang/tapi-notification.yang
new file mode 100644
index 0000000..1ca3f52
--- /dev/null
+++ b/models/tapi/src/main/yang/tapi-notification.yang
@@ -0,0 +1,497 @@
+module tapi-notification {

+    namespace "urn:onf:params:xml:ns:yang:tapi-notification";

+    prefix tapi-notification;

+    import tapi-common {

+        prefix tapi-common;

+    }

+    organization "Open Networking Foundation (ONF) / Open Transport Working Group(OTWG) / Transport API (TAPI) Project";

+    contact "

+        WG Web: TAPI SDK Project <http://opensourcesdn.org/projects/project-snowmass/>

+        WG List: TAPI Discussion list <mailto: transport-api@login.opennetworking.org>,

+        WG Chair: Karthik Sethuraman <mailto:karthik.sethuraman@necam.com>,

+        Editor: Ricard Vilalta <mailto:ricard.vilalta@cttc.es>";

+    description "none";

+    revision 2017-05-31 {

+        description "TAPI SDK 2.0-alpha";

+        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020 and RFC 6087";

+    }

+    augment "/tapi-common:context" {

+        uses notification-context;

+        description "Augments the base TAPI Context with NotificationService information";

+    }

+    /***********************

+    * package object-classes

+    **********************/ 

+        grouping notification-subscription-service {

+            list notification {

+                key 'uuid';

+                config false;

+                uses notification;

+                description "none";

+            }

+            container notification-channel {

+                uses notification-channel;

+                description "none";

+            }

+            container subscription-filter {

+                uses subscription-filter;

+                description "none";

+            }

+            leaf subscription-state {

+                type subscription-state;

+                description "none";

+            }

+            leaf-list supported-notification-types {

+                type notification-type;

+                config false;

+                min-elements 1;

+                description "none";

+            }

+            leaf-list supported-object-types {

+                type object-type;

+                config false;

+                min-elements 1;

+                description "none";

+            }

+            uses tapi-common:service-spec;

+            description "none";

+        }

+        grouping subscription-filter {

+            leaf-list requested-notification-types {

+                type notification-type;

+                config false;

+                description "none";

+            }

+            leaf-list requested-object-types {

+                type object-type;

+                config false;

+                description "none";

+            }

+            leaf-list requested-layer-protocols {

+                type tapi-common:layer-protocol-name;

+                config false;

+                description "none";

+            }

+            leaf-list requested-object-identifier {

+                type tapi-common:uuid;

+                config false;

+                description "none";

+            }

+            leaf include-content {

+                type boolean;

+                config false;

+                description "Indicates whether the published Notification includes content or just the Notification Id (which enables retrieval of the notification at the later stage)";

+            }

+            uses tapi-common:local-class;

+            description "none";

+        }

+        notification notification {

+            uses notification;

+            description "none";

+        }

+        grouping notification {

+            leaf notification-type {

+                type notification-type;

+                description "none";

+            }

+            leaf target-object-type {

+                type object-type;

+                description "none";

+            }

+            leaf target-object-identifier {

+                type tapi-common:uuid;

+                description "none";

+            }

+            list target-object-name {

+                key 'value-name';

+                min-elements 1;

+                uses tapi-common:name-and-value;

+                description "none";

+            }

+            leaf event-time-stamp {

+                type tapi-common:date-and-time;

+                description "none";

+            }

+            leaf sequence-number {

+                type uint64;

+                config false;

+                description "A monotonous increasing sequence number associated with the notification.

+                    The exact semantics of how this sequence number is assigned (per channel or subscription or source or system) is left undefined.";

+            }

+            leaf source-indicator {

+                type source-indicator;

+                description "none";

+            }

+            leaf layer-protocol-name {

+                type tapi-common:layer-protocol-name;

+                description "none";

+            }

+            list changed-attributes {

+                key 'value-name';

+                uses name-and-value-change;

+                description "none";

+            }

+            list additional-info {

+                key 'value-name';

+                uses tapi-common:name-and-value;

+                description "none";

+            }

+            leaf additional-text {

+                type string;

+                description "none";

+            }

+            container tca-info {

+                uses tca-info;

+                description "none";

+            }

+            container alarm-info {

+                uses alarm-info;

+                description "none";

+            }

+            uses tapi-common:resource-spec;

+            description "none";

+        }

+        grouping notification-channel {

+            leaf stream-address {

+                type string;

+                config false;

+                description "The address/location/URI of the channel/stream to which the subscribed notifications are published.

+                    This specifics of this is typically dependent on the implementation protocol & mechanism and hence is typed as a string.";

+            }

+            leaf next-sequence-no {

+                type uint64;

+                config false;

+                description "The sequence number of the next notification that will be published on the channel";

+            }

+            uses tapi-common:local-class;

+            description "none";

+        }

+        grouping notification-context {

+            list notif-subscription {

+                key 'uuid';

+                uses notification-subscription-service;

+                description "none";

+            }

+            list notification {

+                key 'uuid';

+                config false;

+                uses notification;

+                description "none";

+            }

+            description "none";

+        }

+        grouping alarm-info {

+            leaf is-transient {

+                type boolean;

+                config false;

+                description "none";

+            }

+            leaf pervceived-severity {

+                type perceived-serverity-type;

+                config false;

+                description "none";

+            }

+            leaf probable-cause {

+                type string;

+                config false;

+                description "none";

+            }

+            leaf service-affecting {

+                type service-affecting;

+                description "none";

+            }

+            description "none";

+        }

+        grouping tca-info {

+            leaf is-transient {

+                type boolean;

+                config false;

+                description "none";

+            }

+            leaf threshold-crossing {

+                type threshold-crossing-type;

+                description "none";

+            }

+            leaf threshold-parameter {

+                type string;

+                config false;

+                description "none";

+            }

+            leaf threshold-value {

+                type uint64;

+                config false;

+                description "none";

+            }

+            description "none";

+        }

+

+    /***********************

+    * package type-definitions

+    **********************/ 

+        grouping name-and-value-change {

+            leaf value-name {

+                type string;

+                description "The name of the value. The value need not have a name.";

+            }

+            leaf old-value {

+                type string;

+                description "The value";

+            }

+            leaf new-value {

+                type string;

+                description "The value";

+            }

+            description "A scoped name-value triple, including old value and new value";

+        }

+        typedef notification-type {

+            type enumeration {

+                enum object-creation {

+                    description "Not a normal state. The system is unable to determine the correct value.";

+                }

+                enum object-deletion {

+                    description "none";

+                }

+                enum attribute-value-change {

+                    description "none";

+                }

+                enum alarm-event {

+                    description "none";

+                }

+                enum threshold-crossing-alert {

+                    description "none";

+                }

+            }

+            description "The orientation of flow at the Port of a Forwarding entity";

+        }

+        typedef object-type {

+            type enumeration {

+                enum topology {

+                    description "none";

+                }

+                enum node {

+                    description "none";

+                }

+                enum link {

+                    description "none";

+                }

+                enum connection {

+                    description "none";

+                }

+                enum path {

+                    description "none";

+                }

+                enum connectivity-service {

+                    description "none";

+                }

+                enum virtual-network-service {

+                    description "none";

+                }

+                enum path-computation-service {

+                    description "none";

+                }

+                enum node-edge-point {

+                    description "none";

+                }

+                enum service-interface-point {

+                    description "none";

+                }

+                enum connection-end-point {

+                    description "none";

+                }

+            }

+            description "The orientation of flow at the Port of a Forwarding entity";

+        }

+        typedef source-indicator {

+            type enumeration {

+                enum resource-operation {

+                    description "none";

+                }

+                enum management-operation {

+                    description "none";

+                }

+                enum unknown {

+                    description "none";

+                }

+            }

+            description "none";

+        }

+        typedef subscription-state {

+            type enumeration {

+                enum suspended {

+                    description "none";

+                }

+                enum active {

+                    description "none";

+                }

+            }

+            description "none";

+        }

+        typedef perceived-serverity-type {

+            type enumeration {

+                enum critical {

+                    description "none";

+                }

+                enum major {

+                    description "none";

+                }

+                enum minor {

+                    description "none";

+                }

+                enum warning {

+                    description "none";

+                }

+                enum cleared {

+                    description "none";

+                }

+            }

+            description "none";

+        }

+        typedef threshold-crossing-type {

+            type enumeration {

+                enum threshold-above {

+                    description "none";

+                }

+                enum threshold-below {

+                    description "none";

+                }

+                enum cleared {

+                    description "none";

+                }

+            }

+            description "none";

+        }

+        typedef service-affecting {

+            type enumeration {

+                enum service-affecting {

+                    description "none";

+                }

+                enum not-service-affecting {

+                    description "none";

+                }

+                enum unknown {

+                    description "none";

+                }

+            }

+            description "none";

+        }

+

+    /***********************

+    * package interfaces

+    **********************/ 

+        rpc get-supported-notification-types {

+            description "none";

+            output {

+                leaf-list supported-notification-types {

+                    type notification-type;

+                    min-elements 1;

+                    description "none";

+                }

+                leaf-list supported-object-types {

+                    type object-type;

+                    min-elements 1;

+                    description "none";

+                }

+            }

+        }

+        rpc create-notification-subscription-service {

+            description "none";

+            input {

+                container subscription-filter {

+                    uses subscription-filter;

+                    description "none";

+                }

+                leaf subscription-state {

+                    type subscription-state;

+                    description "none";

+                }

+            }

+            output {

+                container subscription-service {

+                    uses notification-subscription-service;

+                    description "none";

+                }

+            }

+        }

+        rpc update-notification-subscription-service {

+            description "none";

+            input {

+                leaf subscription-id-or-name {

+                    type string;

+                    description "none";

+                }

+                container subscription-filter {

+                    uses subscription-filter;

+                    description "none";

+                }

+                leaf subscription-state {

+                    type subscription-state;

+                    description "none";

+                }

+            }

+            output {

+                container subscription-service {

+                    uses notification-subscription-service;

+                    description "none";

+                }

+            }

+        }

+        rpc delete-notification-subscription-service {

+            description "none";

+            input {

+                leaf subscription-id-or-name {

+                    type string;

+                    description "none";

+                }

+            }

+            output {

+                container subscription-service {

+                    uses notification-subscription-service;

+                    description "none";

+                }

+            }

+        }

+        rpc get-notification-subscription-service-details {

+            description "none";

+            input {

+                leaf subscription-id-or-name {

+                    type string;

+                    description "none";

+                }

+            }

+            output {

+                container subscription-service {

+                    uses notification-subscription-service;

+                    description "none";

+                }

+            }

+        }

+        rpc get-notification-subscription-service-list {

+            description "none";

+            output {

+                list subscription-service {

+                    uses notification-subscription-service;

+                    description "none";

+                }

+            }

+        }

+        rpc get-notification-list {

+            description "none";

+            input {

+                leaf subscription-id-or-name {

+                    type string;

+                    description "none";

+                }

+                leaf time-period {

+                    type string;

+                    description "none";

+                }

+            }

+            output {

+                list notification {

+                    uses notification;

+                    description "none";

+                }

+            }

+        }

+

+}

diff --git a/models/tapi/src/main/yang/tapi-oam.yang b/models/tapi/src/main/yang/tapi-oam.yang
new file mode 100644
index 0000000..da16273
--- /dev/null
+++ b/models/tapi/src/main/yang/tapi-oam.yang
@@ -0,0 +1,273 @@
+module tapi-oam {

+    namespace "urn:onf:params:xml:ns:yang:tapi-oam";

+    prefix tapi-oam;

+    import tapi-common {

+        prefix tapi-common;

+    }

+    import tapi-connectivity {

+        prefix tapi-connectivity;

+    }

+    import tapi-topology {

+        prefix tapi-topology;

+    }

+    organization "Open Networking Foundation (ONF) / Open Transport Working Group(OTWG) / Transport API (TAPI) Project";

+    contact "

+        WG Web: TAPI SDK Project <http://opensourcesdn.org/projects/project-snowmass/>

+        WG List: TAPI Discussion list <mailto: transport-api@login.opennetworking.org>,

+        WG Chair: Karthik Sethuraman <mailto:karthik.sethuraman@necam.com>,

+        Editor: Ricard Vilalta <mailto:ricard.vilalta@cttc.es>";

+    description "none";

+    revision 2017-05-31 {

+        description "TAPI SDK 2.0-alpha";

+        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020 and RFC 6087";

+    }

+    augment "/tapi-common:context" {

+        uses oam-context;

+        description "Augments the base TAPI Context with OamService information";

+    }

+    augment "/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point" {

+        uses mep-mip-list;

+        description "none";

+    }

+    augment "/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point/tapi-connectivity:connection-end-point" {

+        uses mep-mip-list;

+        description "none";

+    }

+    /***********************

+    * package object-classes

+    **********************/ 

+        grouping mep {

+            leaf-list on-demand-measurement-job {

+                type leafref {

+                    path '/tapi-common:context/tapi-oam:oam-service/tapi-oam:end-point/tapi-oam:on-demand-measurement-job/tapi-oam:local-id';

+                }

+                config false;

+                description "none";

+            }

+            leaf-list pro-active-measurement-job {

+                type leafref {

+                    path '/tapi-common:context/tapi-oam:oam-service/tapi-oam:end-point/tapi-oam:pro-active-measurement-job/tapi-oam:local-id';

+                }

+                config false;

+                description "none";

+            }

+            leaf layer-protocol-name {

+                type tapi-common:layer-protocol-name;

+                config false;

+                description "none";

+            }

+            leaf meg-identifier {

+                type string;

+                config false;

+                description "none";

+            }

+            leaf mep-identifier {

+                type string;

+                config false;

+                description "none";

+            }

+            leaf-list peer-mep-identifier {

+                type string;

+                config false;

+                min-elements 1;

+                description "none";

+            }

+            leaf monitored-direction {

+                type tapi-common:termination-direction;

+                description "none";

+            }

+            uses tapi-common:local-class;

+            description "none";

+        }

+        grouping on-demand-measurement-job {

+            container state {

+                uses tapi-common:admin-state-pac;

+                description "none";

+            }

+            uses tapi-common:local-class;

+            description "none";

+        }

+        grouping pro-active-measurement-job {

+            container state {

+                uses tapi-common:admin-state-pac;

+                description "none";

+            }

+            uses tapi-common:local-class;

+            description "none";

+        }

+        grouping meg {

+            list me {

+                key 'local-id';

+                config false;

+                min-elements 1;

+                uses me;

+                description "none";

+            }

+            list mep {

+                key 'local-id';

+                config false;

+                uses mep;

+                description "1. ME may have 0 MEPs (case of transit domains where at least 1 MIP is present)

+                    2. ME may have 1 MEP (case of edge domaind, where the peer MEP is ouside the managed domain)

+                    3. ME may have 2 MEPs";

+            }

+            list mip {

+                key 'local-id';

+                config false;

+                uses mip;

+                description "ME may 0, 1, or more MIPs";

+            }

+            leaf meg-level {

+                type uint64;

+                config false;

+                description "none";

+            }

+            uses tapi-common:resource-spec;

+            description "none";

+        }

+        grouping me {

+            leaf-list mep {

+                type leafref {

+                    path '/tapi-common:context/tapi-oam:meg/tapi-oam:mep/tapi-oam:local-id';

+                }

+                config false;

+                max-elements 2;

+                description "none";

+            }

+            leaf-list mip {

+                type leafref {

+                    path '/tapi-common:context/tapi-oam:meg/tapi-oam:mip/tapi-oam:local-id';

+                }

+                config false;

+                description "none";

+            }

+            leaf connection-route {

+                type leafref {

+                    path '/tapi-common:context/tapi-connectivity:connection/tapi-connectivity:route/tapi-connectivity:local-id';

+                }

+                config false;

+                description "none";

+            }

+            uses tapi-common:local-class;

+            description "none";

+        }

+        grouping mip {

+            leaf layer-protocol-name {

+                type tapi-common:layer-protocol-name;

+                config false;

+                description "none";

+            }

+            uses tapi-common:local-class;

+            description "none";

+        }

+        grouping oam-service {

+            leaf meg {

+                type leafref {

+                    path '/tapi-common:context/tapi-oam:meg/tapi-oam:uuid';

+                }

+                config false;

+                description "none";

+            }

+            list end-point {

+                key 'local-id';

+                min-elements 1;

+                uses oam-service-end-point;

+                description "none";

+            }

+            uses tapi-common:service-spec;

+            description "none";

+        }

+        grouping oam-context {

+            list oam-service {

+                key 'uuid';

+                uses oam-service;

+                description "none";

+            }

+            list meg {

+                key 'uuid';

+                config false;

+                uses meg;

+                description "none";

+            }

+            description "none";

+        }

+        grouping oam-service-end-point {

+            leaf service-interface-point {

+                type leafref {

+                    path '/tapi-common:context/tapi-common:service-interface-point/tapi-common:uuid';

+                }

+                description "none";

+            }

+            leaf connectivity-service-end-point {

+                type leafref {

+                    path '/tapi-common:context/tapi-connectivity:connectivity-service/tapi-connectivity:end-point/tapi-connectivity:local-id';

+                }

+                description "none";

+            }

+            list pro-active-measurement-job {

+                key 'local-id';

+                uses pro-active-measurement-job;

+                description "none";

+            }

+            list on-demand-measurement-job {

+                key 'local-id';

+                uses on-demand-measurement-job;

+                description "none";

+            }

+            leaf associated-mep {

+                type leafref {

+                    path '/tapi-common:context/tapi-oam:meg/tapi-oam:mep/tapi-oam:local-id';

+                }

+                config false;

+                description "none";

+            }

+            leaf direction {

+                type tapi-common:port-direction;

+                config false;

+                description "none";

+            }

+            uses tapi-common:local-class;

+            description "none";

+        }

+        grouping mep-mip-list {

+            leaf-list mip {

+                type leafref {

+                    path '/tapi-common:context/tapi-oam:meg/tapi-oam:mip/tapi-oam:local-id';

+                }

+                description "none";

+            }

+            leaf-list mep {

+                type leafref {

+                    path '/tapi-common:context/tapi-oam:meg/tapi-oam:mep/tapi-oam:local-id';

+                }

+                description "none";

+            }

+            description "none";

+        }

+

+    /***********************

+    * package interfaces

+    **********************/ 

+        rpc abort-measurement-job {

+            description "none";

+        }

+        rpc disable-pro-active-measurement-job {

+            description "none";

+        }

+        rpc enable-pro-active-measurement-job {

+            description "none";

+        }

+        rpc establish-measurement-job {

+            description "none";

+        }

+        rpc get-contained-measurement-jobs {

+            description "none";

+        }

+        rpc terminate-measurement-job {

+            description "none";

+        }

+        rpc get-all-contained-meg {

+            description "none";

+        }

+

+}

diff --git a/models/tapi/src/main/yang/tapi-odu.yang b/models/tapi/src/main/yang/tapi-odu.yang
new file mode 100644
index 0000000..2d5496b
--- /dev/null
+++ b/models/tapi/src/main/yang/tapi-odu.yang
@@ -0,0 +1,692 @@
+module tapi-odu {

+    namespace "urn:onf:params:xml:ns:yang:tapi-odu";

+    prefix tapi-odu;

+    import tapi-common {

+        prefix tapi-common;

+    }

+    import tapi-connectivity {

+        prefix tapi-connectivity;

+    }

+    import tapi-topology {

+        prefix tapi-topology;

+    }

+    import tapi-oam {

+        prefix tapi-oam;

+    }

+    organization "Open Networking Foundation (ONF) / Open Transport Working Group(OTWG) / Transport API (TAPI) Project";

+    contact "

+        WG Web: TAPI SDK Project <http://opensourcesdn.org/projects/project-snowmass/>

+        WG List: TAPI Discussion list <mailto: transport-api@login.opennetworking.org>,

+        WG Chair: Karthik Sethuraman <mailto:karthik.sethuraman@necam.com>,

+        Editor: Ricard Vilalta <mailto:ricard.vilalta@cttc.es>";

+    description "none";

+    revision 2017-05-31 {

+        description "TAPI SDK 2.0-alpha";

+        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020 and RFC 6087";

+    }

+    augment "/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point" {

+        uses odu-node-edge-point-spec;

+        description "Augments the base LayerProtocol information in NodeEdgePoint with ODU-specific information";

+    }

+    augment "/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point/tapi-connectivity:connection-end-point" {

+        uses odu-connection-end-point-spec;

+        description "none";

+    }

+    augment "/tapi-common:context/tapi-oam:meg/tapi-oam:mep" {

+        uses odu-connection-end-point-spec;

+        description "none";

+    }

+    augment "/tapi-common:context/tapi-oam:meg/tapi-oam:mip" {

+        uses odu-mip-spec;

+        description "none";

+    }

+    /***********************

+    * package object-classes

+    **********************/ 

+        grouping odu-termination-and-client-adaptation-pac {

+            leaf opu-tributary-slot-size {

+                type odu-slot-size;

+                config false;

+                description "This attribute is applicable for ODU2 and ODU3 CTP only. It indicates the slot size of the ODU CTP.";

+            }

+            leaf auto-payload-type {

+                type boolean;

+                config false;

+                description "This attribute is applicable when the ODU CTP object instance represents a lower order ODU CTP Source at the client layer of the ODUP/ODUj-21 adaptation function. The value of true of this attribute configures that the adaptation source function shall fall back to the payload type PT=20 if the conditions specified in 14.3.10.1/G.798 are satisfied. ";

+            }

+            leaf configured-client-type {

+                type string;

+                config false;

+                description "This attribute configures the type of the client CTP of the server ODU TTP.";

+            }

+            leaf configured-mapping-type {

+                type mapping-type;

+                config false;

+                description "This attributes indicates the configured mapping type.";

+            }

+            container accepted-payload-type {

+                config false;

+                uses odu-payload-type;

+                description "This attribute is applicable when the ODU CTP object instance represents a lower order ODU CTP Sink at the client layer of the ODUP/ODU[i]j or ODUP/ODUj-21 adaptation function. 

+                    This attribute is a 2-digit Hex code that indicates the new accepted payload type.

+                    Valid values are defined in Table 15-8 of ITU-T Recommendation G.709 with one additional value UN_INTERPRETABLE.";

+            }

+            description "This Pac contains the attributes associated with the client adaptation function of the server layer TTP

+                It is present only if the CEP contains a TTP";

+        }

+        grouping odu-connection-end-point-spec {

+            container odu-common {

+                uses odu-common-pac;

+                description "none";

+            }

+            container odu-term-and-adapter {

+                config false;

+                uses odu-termination-and-client-adaptation-pac;

+                description "none";

+            }

+            container odu-ctp {

+                config false;

+                uses odu-ctp-pac;

+                description "none";

+            }

+            container odu-protection {

+                config false;

+                uses odu-protection-pac;

+                description "none";

+            }

+            description "none";

+        }

+        grouping odu-pool-pac {

+            leaf client-capacity {

+                type uint64;

+                description "none";

+            }

+            leaf max-client-instances {

+                type uint64;

+                config false;

+                description "none";

+            }

+            leaf max-client-size {

+                type uint64;

+                config false;

+                description "none";

+            }

+            description "none";

+        }

+        grouping odu-node-edge-point-spec {

+            container odu-pool {

+                config false;

+                uses odu-pool-pac;

+                description "none";

+            }

+            description "none";

+        }

+        grouping odu-ctp-pac {

+            leaf-list tributary-slot-list {

+                type uint64;

+                config false;

+                description "This attribute contains a set of distinct (i.e. unique) integers (e.g. 2, 3, 5, 9, 15 representing the tributary slots TS2, TS3, TS5, TS9 and TS15) which represents the resources occupied by the Low Order ODU Link Connection (e.g. carrying an ODUflex with a bit rate of 6.25G). 

+                    This attribute applies when the LO ODU_ ConnectionTerminationPoint connects with an HO ODU_TrailTerminationPoint object. 

+                    It will not apply if this ODU_ ConnectionTerminationPoint object directly connects to an OTU_TrailTerminationPoint object (i.e. OTU has no trib slots). 

+                    The upper bound of the integer allowed in this set is a function of the HO-ODU server layer to which the ODU connection has been mapped (adapted). 

+                    Thus, for example, M=8/32/80 for ODU2/ODU3/ODU4 server layers (respectively). Note that the value of this attribute can be changed only in the case of ODUflex and has to be through specific operations (i.e. not be changing the attribute tributarySlotList directly).";

+            }

+            leaf tributary-port-number {

+                type uint64;

+                config false;

+                description "This attribute identifies the tributary port number that is associated with the ODU CTP.

+                    range of type : The value range depends on the size of the Tributary Port Number (TPN) field used which depends on th server-layer ODU or OTU.

+                    In case of ODUk mapping into OTUk, there is no TPN field, so the tributaryPortNumber shall be zero.

+                    In case of LO ODUj mapping over ODU1, ODU2 or ODU3, the TPN is encoded in a 6-bit field so the value range is 0-63. See clause 14.4.1/G.709-2016.

+                    In case of LO ODUj mapping over ODU4, the TPN is encoded in a 7-bit field so the value range is 0-127. See clause 14.4.1.4/G.709-2016.

+                    In case of ODUk mapping over ODUCn, the TPN is encoded in a 14-bit field so the value range is 0-16383. See clause 20.4.1.1/G.709-2016.

+                    ";

+            }

+            leaf accepted-m-si {

+                type string;

+                config false;

+                description "This attribute is applicable when the ODU CTP object instance represents a lower order ODU1 or ODU2 CTP Sink at the client layer of the ODU3P/ODU12 adaptation function or represents a lower order ODUj CTP Sink at the client layer of the ODUP/ODUj-21 adaptation function. This attribute is a 1-byte field that represents the accepted multiplex structure of the adaptation function. ";

+            }

+            description "This Pac contains the attributes associated with the CTP

+                It is present only if the CEP contains a CTP";

+        }

+        grouping odu-mep-spec {

+            container odu-mep {

+                uses odu-mep-pac;

+                description "none";

+            }

+            container odu-ncm {

+                config false;

+                uses odu-ncm-pac;

+                description "none";

+            }

+            container odu-tcm {

+                config false;

+                uses odu-tcm-mep-pac;

+                description "none";

+            }

+            container odu-defect {

+                uses odu-defect-pac;

+                description "none";

+            }

+            container odu-pm {

+                uses odu-pm-pac;

+                description "none";

+            }

+            description "none";

+        }

+        grouping odu-protection-pac {

+            leaf aps-enable {

+                type boolean;

+                default "true";

+                description "This attribute is for enabling/disabling the automatic protection switching (APS) capability at the transport adaptation function that is represented by the ODU_ConnectionTerminationPoint object class. It triggers the MI_APS_EN signal to the transport adaptation function.";

+            }

+            leaf aps-level {

+                type uint64;

+                description "This attribute is for configuring the automatic protection switching (APS) level that should operate at the transport adaptation function that is represented by the ODU_ConnectionTerminationPoint object class. It triggers the MI_APS_LVL signal to the transport adaptation function. The value 0 means path and the values 1 through 6 mean TCM level 1 through 6 respectively.";

+            }

+            description "none";

+        }

+        grouping odu-ncm-pac {

+            leaf-list tcm-fields-in-use {

+                type uint64;

+                config false;

+                description "This attribute indicates the used TCM fields of the ODU OH.";

+            }

+            description "none";

+        }

+        grouping odu-tcm-mep-pac {

+            leaf tcm-extension {

+                type tcm-extension;

+                description "none";

+            }

+            leaf tcm-mode {

+                type tcm-mode;

+                description "This attribute specifies the TCM mode at the entity. Valid values are: Operational, Monitor, and Transparent.";

+            }

+            leaf codirectional {

+                type boolean;

+                config false;

+                description "This attribute specifies the directionality of the ODUT MEP with respect to the associated ODU CEP. The value of TRUE means that the sink part of the ODUT MEP terminates the same signal direction as the sink part of the ODU CEP. The Source part behaves similarly. This attribute is meaningful only on objects instantiated under ODU CEP, and at least one among ODU CEP and the subordinate object is bidirectional.";

+            }

+            leaf ac-status-source {

+                type tcm-status;

+                config false;

+                description "This attribute indicates the status of the accepted TCM. ";

+            }

+            leaf ac-status-sink {

+                type tcm-status;

+                config false;

+                description "This attribute indicates the status of the accepted TCM. ";

+            }

+            leaf admin-state-source {

+                type tapi-common:administrative-state;

+                description "This attribute provides the capability to provision the LOCK signal at the source, which is one of the ODU maintenance signals.  When a Tandem Connection endpoint is set to admin state locked, it will insert the ODU-LCK signal in the source direction.";

+            }

+            leaf admin-state-sink {

+                type tapi-common:administrative-state;

+                description "This attribute provides the capability to provision the LOCK signal at the sink, which is one of the ODU maintenance signals. When a Tandem Connection endpoint is set to admin state locked, it will insert the ODU-LCK signal in the downstream direction.";

+            }

+            uses odu-tcm-mip-pac;

+            description "none";

+        }

+        grouping odu-mip-spec {

+            container odu-mip {

+                config false;

+                uses odu-mip-pac;

+                description "none";

+            }

+            container odu-ncm {

+                config false;

+                uses odu-ncm-pac;

+                description "none";

+            }

+            container odu-tcm {

+                config false;

+                uses odu-tcm-mip-pac;

+                description "none";

+            }

+            container odu-pm {

+                uses odu-pm-pac;

+                description "none";

+            }

+            container odu-defect {

+                uses odu-defect-pac;

+                description "none";

+            }

+            description "none";

+        }

+        grouping odu-mip-pac {

+            leaf acti {

+                type string;

+                config false;

+                description "The Trail Trace Identifier (TTI) information recovered (Accepted) from the TTI overhead position at the sink of a trail.";

+            }

+            leaf ex-dapi {

+                type string;

+                description "The Expected Destination Access Point Identifier (ExDAPI), provisioned by the managing system, to be compared with the TTI accepted at the overhead position of the sink for the purpose of checking the integrity of connectivity.";

+            }

+            leaf ex-sapi {

+                type string;

+                description "The Expected Source Access Point Identifier (ExSAPI), provisioned by the managing system, to be compared with the TTI accepted at the overhead position of the sink for the purpose of checking the integrity of connectivity.

+                    ";

+            }

+            leaf tim-act-disabled {

+                type boolean;

+                default "true";

+                description "This attribute provides the control capability for the managing system to enable or disable the Consequent Action function when detecting Trace Identifier Mismatch (TIM) at the trail termination sink.";

+            }

+            leaf tim-det-mode {

+                type tim-det-mo;

+                description "This attribute indicates the mode of the Trace Identifier Mismatch (TIM) Detection function allowed values: OFF, SAPIonly, DAPIonly, SAPIandDAPI";

+            }

+            leaf deg-m {

+                type uint64;

+                description "This attribute indicates the threshold level for declaring a Degraded Signal defect (dDEG). A dDEG shall be declared if DegM consecutive bad PM Seconds are detected.";

+            }

+            container deg-thr {

+                uses deg-thr;

+                description "This attribute indicates the threshold level for declaring a performance monitoring (PM) Second to be bad. The value of the threshold can be provisioned in terms of number of errored blocks or in terms of percentage of errored blocks. For percentage-based specification, in order to support provision of less than 1%, the specification consists of two fields. The first field indicates the granularity of percentage. For examples, in 1%, in 0.1%, or in 0.01%, etc. The second field indicates the multiple of the granularity. For number of errored block based, the value is a positive integer.";

+            }

+            description "none";

+        }

+        grouping odu-tcm-mip-pac {

+            leaf tcm-field {

+                type uint64;

+                config false;

+                description "This attribute indicates the tandem connection monitoring field of the ODU OH.";

+            }

+            description "none";

+        }

+        grouping odu-mep-pac {

+            leaf dm-source {

+                type boolean;

+                description "This attribute is for configuring the delay measurement process at the trail termination function represented by the subject TTP object class. It models the MI_DM_Source MI signal. If MI_DM_Source is false, then the value of the DMp bit is determined by the RI_DM. If MI_DM_Source is true, then the value of the DMp bit is set to MI_DMValue.";

+            }

+            leaf dm-value {

+                type boolean;

+                description "This attribute is for setting the DMp and DMti bits of the delay measurement process. The value of 'true' sets the DMp and DMti bits to 0 and the value of 'false' to 1.";

+            }

+            leaf txti {

+                type string;

+                description "The Trail Trace Identifier (TTI) information, provisioned by the managing system at the termination source, to be placed in the TTI overhead position of the source of a trail for transmission.

+                    ";

+            }

+            uses odu-mip-pac;

+            description "none";

+        }

+        grouping odu-common-pac {

+            leaf odu-type {

+                type odu-type;

+                config false;

+                description "This attribute specifies the type of the ODU termination point.";

+            }

+            leaf odu-rate {

+                type uint64;

+                config false;

+                description "This attribute indicates the rate of the ODU terminatino point. 

+                    This attribute is Set at create; i.e., once created it cannot be changed directly. 

+                    In case of resizable ODU flex, its value can be changed via HAO (not directly on the attribute). 

+                    ";

+            }

+            leaf odu-rate-tolerance {

+                type uint64;

+                config false;

+                description "This attribute indicates the rate tolerance of the ODU termination point. 

+                    Valid values are real value in the unit of ppm. 

+                    Standardized values are defined in Table 7-2/G.709.";

+            }

+            description "none";

+        }

+        grouping odu-pm-pac {

+            leaf n-bbe {

+                type uint64;

+                description "Near-end Background Block Error";

+            }

+            leaf f-bbe {

+                type uint64;

+                config false;

+                description "Far-end Background Block Error";

+            }

+            leaf n-ses {

+                type uint64;

+                description "Near-end Severely Errored Second";

+            }

+            leaf f-ses {

+                type uint64;

+                description "Far-end Severely Errored Second";

+            }

+            container uas {

+                uses uas-choice;

+                description "UnAvailable Second";

+            }

+            description "Instance of this object class contains the ODUP layer-specific Current Data. This object class is a subclass of the OTN_CurrentData object class.

+                PM data attributes: fBbe, fSes, nBbe, nSes. uas";

+        }

+        grouping odu-defect-pac {

+            leaf bdi {

+                type boolean;

+                config false;

+                description "Backward Defect Indication";

+            }

+            leaf deg {

+                type boolean;

+                config false;

+                description "Signal Degraded";

+            }

+            leaf lck {

+                type boolean;

+                config false;

+                description "Locked";

+            }

+            leaf oci {

+                type boolean;

+                config false;

+                description "Open Connection Indicator";

+            }

+            leaf ssf {

+                type boolean;

+                config false;

+                description "Server Signal Failure";

+            }

+            leaf tim {

+                type boolean;

+                config false;

+                description "Trail Trace Identifier Mismatch";

+            }

+            description "The valid list of defects raised on the entity. If the value of any attribute is true, then the corresponding defect is raised.";

+        }

+        feature odu {

+            description "none";

+        }

+

+    /***********************

+    * package type-definitions

+    **********************/ 

+        identity deg-thr-type {

+            description "none";

+        }

+        identity percentage {

+            base deg-thr-type;

+            description "Choice of % or Number of errored blocks";

+        }

+        identity number-errored-blocks {

+            base deg-thr-type;

+            description "Number of % or blocks";

+        }

+        identity tcm-status {

+            description "none";

+        }

+        identity no-source-tc {

+            base tcm-status;

+            description "TCM byte 3 (bits 6 7 8) -- 0 0 0, No source Tandem Connection";

+        }

+        identity in-use-without-iae {

+            base tcm-status;

+            description "TCM byte 3 (bits 6 7 8) -- 0 0 1,  In use without IAE (Incoming Alignment Error)";

+        }

+        identity in-use-with-iae {

+            base tcm-status;

+            description "TCM byte 3 (bits 6 7 8) -- 0 1 0, In use with IAE (Incoming Alignment Error)";

+        }

+        identity reserved-1 {

+            base tcm-status;

+            description "TCM byte 3 (bits 6 7 8) -- 0 1 1, Reserved for future international standardization";

+        }

+        identity reserved-2 {

+            base tcm-status;

+            description "TCM byte 3 (bits 6 7 8) -- 1 0 0, Reserved for future international standardization";

+        }

+        identity lck {

+            base tcm-status;

+            description "TCM byte 3 (bits 6 7 8) -- 1 0 1, Maintenance signal: ODU-LCK";

+        }

+        identity oci {

+            base tcm-status;

+            description "TCM byte 3 (bits 6 7 8) -- 1 1 0, Maintenance signal: ODU-OCI";

+        }

+        identity ais {

+            base tcm-status;

+            description "TCM byte 3 (bits 6 7 8) -- 1 1 1, Maintenance signal: ODU-AIS";

+        }

+        identity tcm-mode {

+            description "none";

+        }

+        identity operational {

+            base tcm-mode;

+            description "none";

+        }

+        identity transparent {

+            base tcm-mode;

+            description "none";

+        }

+        identity monitor {

+            base tcm-mode;

+            description "none";

+        }

+        identity tcm-monitoring {

+            description "none";

+        }

+        identity intrusive {

+            base tcm-monitoring;

+            description "none";

+        }

+        identity non-intrusive {

+            base tcm-monitoring;

+            description "none";

+        }

+        identity tcm-extension {

+            description "none";

+        }

+        identity normal {

+            base tcm-extension;

+            description "none";

+        }

+        identity pass-through {

+            base tcm-extension;

+            description "none";

+        }

+        identity erase {

+            base tcm-extension;

+            description "none";

+        }

+        identity percentage-granularity {

+            description "none";

+        }

+        identity ones {

+            base percentage-granularity;

+            description "none";

+        }

+        identity one-tenths {

+            base percentage-granularity;

+            description "value * (1/10)";

+        }

+        identity one-hundredths {

+            base percentage-granularity;

+            description "value * (1/100)";

+        }

+        identity one-thousandths {

+            base percentage-granularity;

+            description "value * (1/1000)";

+        }

+        typedef odu-type {

+            type enumeration {

+                enum odu-0 {

+                    description "none";

+                }

+                enum odu-1 {

+                    description "none";

+                }

+                enum odu-2 {

+                    description "none";

+                }

+                enum odu-2-e {

+                    description "none";

+                }

+                enum odu-3 {

+                    description "none";

+                }

+                enum odu-4 {

+                    description "none";

+                }

+                enum odu-flex {

+                    description "none";

+                }

+                enum odu-cn {

+                    description "none";

+                }

+            }

+            description "none";

+        }

+        typedef mapping-type {

+            type enumeration {

+                enum amp {

+                    description "none";

+                }

+                enum bmp {

+                    description "none";

+                }

+                enum gfp-f {

+                    description "none";

+                }

+                enum gmp {

+                    description "none";

+                }

+                enum ttp-gfp-bmp {

+                    description "none";

+                }

+                enum null {

+                    description "none";

+                }

+            }

+            description "none";

+        }

+        typedef tim-det-mo {

+            type enumeration {

+                enum dapi {

+                    description "none";

+                }

+                enum sapi {

+                    description "none";

+                }

+                enum both {

+                    description "none";

+                }

+                enum off {

+                    description "none";

+                }

+            }

+            description "List of modes for trace identifier mismatch detection.";

+        }

+        typedef odu-slot-size {

+            type enumeration {

+                enum 1-g-25 {

+                    description "none";

+                }

+                enum 2-g-5 {

+                    description "none";

+                }

+            }

+            description "none";

+        }

+        grouping odu-payload-type {

+            leaf named-payload-type {

+                type odu-named-payload-type;

+                description "none";

+            }

+            leaf hex-payload-type {

+                type uint64;

+                description "none";

+            }

+            description "none";

+        }

+        typedef odu-named-payload-type {

+            type enumeration {

+                enum unknown {

+                    description "none";

+                }

+                enum uninterpretable {

+                    description "none";

+                }

+            }

+            description "none";

+        }

+        grouping deg-thr {

+            leaf deg-thr-value {

+                type uint64;

+                description "Percentage of detected errored blocks";

+            }

+            leaf deg-thr-type {

+                type deg-thr-type;

+                description "Number of errored blocks";

+            }

+            leaf percentage-granularity {

+                type percentage-granularity;

+                description "none";

+            }

+            description "Degraded Threshold, specify either the percentage or the number of Errored Blocks in the defined interval. 

+                degThrValue when type is PERCENTAGE:

+                percentageGranularity is used to indicate the number of decimal points

+                So if percentageGranularity is ones, a value of 1 in degThrValue would indicate 1%, a value of 10 = 10%, a value of 100 = 100%

+                So if percentageGranularity is thousandths a value of 1 in degThrValue would indicate 0.001%, a value of 1000 = 1%, a value of 1000000 = 100%

+                degThrValue when type is NUMBER_ERROR_BLOCKS:

+                Number of Errored Blocks is captured in an integer value.";

+        }

+        typedef deg-thr-type {

+            type identityref {

+                base deg-thr-type;

+            }

+            description "The value of the threshold can be provisioned in terms of number of errored blocks or in terms of percentage of errored blocks. For percentage-based specification, in order to support provision of less than 1%, the specification consists of two fields. The first field indicates the granularity of percentage. For examples, in 1%, in 0.1%, or in 0.01%, etc. The second field indicates the multiple of the granularity. For number of errored block based, the value is a positive integer.";

+        }

+        typedef tcm-status {

+            type identityref {

+                base tcm-status;

+            }

+            description "See Table 15-5/G.709/Y.1331 ";

+        }

+        typedef tcm-mode {

+            type identityref {

+                base tcm-mode;

+            }

+            description "List of value modes for the sink side of the tandem connection monitoring function.";

+        }

+        typedef tcm-monitoring {

+            type identityref {

+                base tcm-monitoring;

+            }

+            description "Monitoring types for the tandem connection monitoring function.";

+        }

+        typedef tcm-extension {

+            type identityref {

+                base tcm-extension;

+            }

+            description "none";

+        }

+        typedef percentage-granularity {

+            type identityref {

+                base percentage-granularity;

+            }

+            description "none";

+        }

+        grouping uas-choice {

+            leaf bidirectional {

+                type boolean;

+                default "true";

+                description "none";

+            }

+            leaf uas {

+                type uint64;

+                description "none";

+            }

+            leaf nuas {

+                type uint64;

+                description "none";

+            }

+            leaf fuas {

+                type uint64;

+                description "none";

+            }

+            description "If bidirectional is TRUE then use the uas attribute, if bidirectional is FALSE use the nuas, and fuas attributes";

+        }

+

+}

diff --git a/models/tapi/src/main/yang/tapi-otsi.yang b/models/tapi/src/main/yang/tapi-otsi.yang
new file mode 100644
index 0000000..13c95c8
--- /dev/null
+++ b/models/tapi/src/main/yang/tapi-otsi.yang
@@ -0,0 +1,284 @@
+module tapi-otsi {

+    namespace "urn:onf:params:xml:ns:yang:tapi-otsi";

+    prefix tapi-otsi;

+    import tapi-common {

+        prefix tapi-common;

+    }

+    import tapi-connectivity {

+        prefix tapi-connectivity;

+    }

+    import tapi-topology {

+        prefix tapi-topology;

+    }

+    organization "Open Networking Foundation (ONF) / Open Transport Working Group(OTWG) / Transport API (TAPI) Project";

+    contact "

+        WG Web: TAPI SDK Project <http://opensourcesdn.org/projects/project-snowmass/>

+        WG List: TAPI Discussion list <mailto: transport-api@login.opennetworking.org>,

+        WG Chair: Karthik Sethuraman <mailto:karthik.sethuraman@necam.com>,

+        Editor: Ricard Vilalta <mailto:ricard.vilalta@cttc.es>";

+    description "none";

+    revision 2017-05-31 {

+        description "TAPI SDK 2.0-alpha";

+        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020 and RFC 6087";

+    }

+    augment "/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point/tapi-connectivity:connection-end-point" {

+        uses otsi-connection-end-point-spec;

+        description "Augments the base LayerProtocol information in ConnectionEndPoint with OCH-specific information";

+    }

+    augment "/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point" {

+        uses otsi-node-edge-point-spec;

+        description "Augments the base LayerProtocol information in NodeEdgePoint with OCH-specific information";

+    }

+    /***********************

+    * package object-classes

+    **********************/ 

+        grouping otsi-a-client-adaptation-pac {

+            description "none";

+        }

+        grouping otsi-connection-end-point-spec {

+            container otsi-adapter {

+                config false;

+                uses otsi-a-client-adaptation-pac;

+                description "none";

+            }

+            list otsi-termination {

+                config false;

+                uses otsi-termination-pac;

+                description "none";

+            }

+            container otsi-ctp {

+                config false;

+                uses otsi-g-ctp-pac;

+                description "none";

+            }

+            description "none";

+        }

+        grouping otsi-termination-pac {

+            container selected-nominal-central-frequency {

+                uses nominal-central-frequency-or-wavelength;

+                description "This attribute indicates the nominal central frequency or wavelength of the optical channel associated with the OCh Trail Termination function. The value of this attribute is a pair {LinkType, Integer}, in which LinkType is DWDM, or CWDM, or NO_WDM. When LinkType is DWDM, the integer represents the nominal central frequency in unit of MHz. When LinkType is CWDM, the integer represents the nominal central wavelength in unit of pm (picometer). When LinkType is NO_WDM, the Integer field is null. For frequency and wavelength, the value shall be within the range of the maximum and minimum central frequencies or wavelengths specified for the corresponding application code used at the OCh Trail Termination.

+                    This attribute is required for the OCh Trial Termination Point Source at the transmitter.  For the OCh Trail Termination Point Sink at the receiver, this attribute may not be needed since the receiver is required to operate at any frequency/wavelength between the maximum and minimum range for the standard application code.

+                    ";

+            }

+            container supportable-lower-nominal-central-frequency {

+                config false;

+                uses nominal-central-frequency-or-wavelength;

+                description "none";

+            }

+            container supportable-upper-nominal-central-frequency {

+                config false;

+                uses nominal-central-frequency-or-wavelength;

+                description "none";

+            }

+            container selected-application-identifier {

+                uses application-identifier;

+                description "This attribute indicates the selected Application Identifier that is used by the OCh trail termination function. The syntax of ApplicationIdentifier is a pair {ApplicationIdentifierType, PrintableString}. The value of ApplicationIdentifierType is either STANDARD or PROPRIETARY. The value of PrintableString represents the standard application code as defined in the ITU-T Recommendations or a vendor-specific proprietary code. If the ApplicationIdentifierType is STANDARD the value of PrintableString represents a standard application code as defined in the ITU-T Recommendations. If the ApplicationIdentifierType is PROPRIETARY, the first six characters of the PrintableString must contain the Hexadecimal representation of an OUI assigned to the vendor whose implementation generated the Application Identifier; the remaining octets of the PrintableString are unspecified. The value of this attribute of an object instance has to be one of the values identified in the attribute SupportableApplicationIdentifierList of the same object instance. The values and value ranges of the optical interface parameters of a standard application code must be consistent with those values specified in the ITU-T Recommendation for that application code.";

+            }

+            container supportable-application-identifier {

+                config false;

+                uses application-identifier;

+                description "none";

+            }

+            description "none";

+        }

+        grouping otsi-a-pool-pac {

+            list available-frequency-slot {

+                config false;

+                uses frequency-slot;

+                description "none";

+            }

+            list occupied-frequency-slot {

+                config false;

+                uses frequency-slot;

+                description "none";

+            }

+            description "none";

+        }

+        grouping otsi-node-edge-point-spec {

+            container otsi-pool {

+                config false;

+                uses otsi-a-pool-pac;

+                description "none";

+            }

+            description "none";

+        }

+        grouping otsi-routing-spec {

+            leaf optical-routing-strategy {

+                type optical-routing-strategy;

+                description "none";

+            }

+            description "none";

+        }

+        grouping otsi-g-ctp-pac {

+            list selected-frequency-slot {

+                uses frequency-slot;

+                description "none";

+            }

+            description "none";

+        }

+        feature otsia {

+            description "none";

+        }

+

+    /***********************

+    * package type-definitions

+    **********************/ 

+        identity application-identifier-type {

+            description "none";

+        }

+        identity proprietary {

+            base application-identifier-type;

+            description "none";

+        }

+        identity itut-g-959-1 {

+            base application-identifier-type;

+            description "none";

+        }

+        identity itut-g-698-1 {

+            base application-identifier-type;

+            description "none";

+        }

+        identity itut-g-698-2 {

+            base application-identifier-type;

+            description "none";

+        }

+        identity itut-g-696-1 {

+            base application-identifier-type;

+            description "none";

+        }

+        identity itut-g-695 {

+            base application-identifier-type;

+            description "none";

+        }

+        identity grid-type {

+            description "none";

+        }

+        identity dwdm {

+            base grid-type;

+            description "Fixed frequency grid in C & L bands as specified in ITU-T G.694.1

+                ";

+        }

+        identity cwdm {

+            base grid-type;

+            description "Fixed frequency grid as specified in ITU-T G.694.2";

+        }

+        identity flex {

+            base grid-type;

+            description "Flexible frequency grid as specified in ITU-T G.694.1. In this case,

+                - the allowed frequency slots have a nominal central frequency (in THz) defined by:

+                193.1 + n × 0.00625 where n is a positive or negative integer including 0 and 0.00625 is the nominal central frequency granularity in THz

+                - and a slot width defined by:

+                12.5 × m where m is a positive integer and 12.5 is the slot width granularity in GHz.

+                Any combination of frequency slots is allowed as long as no two frequency slots overlap.";

+        }

+        identity unspecified {

+            base grid-type;

+            description "Unspecified/proprietary frequency grid";

+        }

+        identity adjustment-granularity {

+            description "none";

+        }

+        identity g-100-ghz {

+            base adjustment-granularity;

+            description "0.1 THz";

+        }

+        identity g-50-ghz {

+            base adjustment-granularity;

+            description "0.05 THz";

+        }

+        identity g-25-ghz {

+            base adjustment-granularity;

+            description "0.025 THz";

+        }

+        identity g-12-5-ghz {

+            base adjustment-granularity;

+            description "0.0125 THz";

+        }

+        identity g-6-25-ghz {

+            base adjustment-granularity;

+            description "0.00625 THz";

+        }

+        grouping application-identifier {

+            leaf application-identifier-type {

+                type application-identifier-type;

+                description "none";

+            }

+            leaf application-identifier-value {

+                type string;

+                description "none";

+            }

+            description "none";

+        }

+        grouping nominal-central-frequency-or-wavelength {

+            leaf grid-type {

+                type grid-type;

+                description "Specifies the frequency grid standard used to determine the nominal central frequency and frequency slot width";

+            }

+            leaf adjustment-granularity {

+                type adjustment-granularity;

+                description "Adjustment granularity in Gigahertz. As per ITU-T G.694.1, it is used to calculate nominal central frequency (in THz)";

+            }

+            leaf channel-number {

+                type uint64;

+                description "As per ITU-T G.694.1, this attribute is denoted as 'n' and is used to calculate the nominal central frequency (in THz) as follows:

+                    193.1 + <channelNumber> × <adjustmentGranularity> where channelNumber is a positive or negative integer including 0 and adjustment_granularity is the nominal central frequency granularity in THz";

+            }

+            description "This data-type holds the information to determine the nominal central frequency of a FIXED grid (DWDM or CWDM) and FLEX grid type systems.

+                As per ITU-T G.694.1, the nominal central frequency (in THz) is calculated as follows:

+                193.1 + <channelNumber> × <adjustmentGranularity> where channelNumber is a positive or negative integer including 0 and <adjustment_granularity> is the nominal central frequency granularity in THz

+                For FIXED grid types, the adjustmentGranularity is one of (0.1/0.05/0.025/0.0125) THz corresponding to channel spacing of one of (100/50/25/12.5) GHz

+                For FLEX grid type, the adjusmentGranularity is 0.00625 THz and the slot width is variable in increments of 12.5 GHz";

+        }

+        typedef optical-routing-strategy {

+            type enumeration {

+                enum optimal-osnr {

+                    description "none";

+                }

+                enum no-relay {

+                    description "none";

+                }

+                enum min-relay {

+                    description "none";

+                }

+                enum preferred-no-change-wavelength-as-restore {

+                    description "none";

+                }

+                enum preferred-no-skipping-wavelength {

+                    description "none";

+                }

+            }

+            description "none";

+        }

+        typedef application-identifier-type {

+            type identityref {

+                base application-identifier-type;

+            }

+            description "none";

+        }

+        typedef grid-type {

+            type identityref {

+                base grid-type;

+            }

+            description "The frequency grid standard that specify reference set of frequencies used to denote allowed nominal central frequencies that may be used for defining applications.";

+        }

+        typedef adjustment-granularity {

+            type identityref {

+                base adjustment-granularity;

+            }

+            description "Adjustment granularity in Gigahertz. As per ITU-T G.694.1, it is used to calculate nominal central frequency (in THz)";

+        }

+        grouping frequency-slot {

+            container nominal-central-frequency {

+                uses nominal-central-frequency-or-wavelength;

+                description "none";

+            }

+            leaf slot-width-number {

+                type uint64;

+                description "As per ITU-T G.694.1, this attribute is denoted as 'm' and is used to calculate the slot width (in GHz) as follows:

+                    12.5 × m where m is a positive integer and 12.5 is the slot width granularity in GHz.";

+            }

+            description "The frequency range allocated to a slot and unavailable to other slots within a flexible grid. A frequency slot is defined by its nominal central frequency. As per ITU-T G.694.1  the slot width is calculated as follows:

+                12.5 × <slotWidthNumber> where slotWidthNumber is a positive integer and 12.5 is the slot width granularity in GHz";

+        }

+

+}

diff --git a/models/tapi/src/main/yang/tapi-path-computation.yang b/models/tapi/src/main/yang/tapi-path-computation.yang
new file mode 100644
index 0000000..cf62669
--- /dev/null
+++ b/models/tapi/src/main/yang/tapi-path-computation.yang
@@ -0,0 +1,277 @@
+module tapi-path-computation {

+    namespace "urn:onf:params:xml:ns:yang:tapi-path-computation";

+    prefix tapi-path-computation;

+    import tapi-topology {

+        prefix tapi-topology;

+    }

+    import tapi-common {

+        prefix tapi-common;

+    }

+    organization "Open Networking Foundation (ONF) / Open Transport Working Group(OTWG) / Transport API (TAPI) Project";

+    contact "

+        WG Web: TAPI SDK Project <http://opensourcesdn.org/projects/project-snowmass/>

+        WG List: TAPI Discussion list <mailto: transport-api@login.opennetworking.org>,

+        WG Chair: Karthik Sethuraman <mailto:karthik.sethuraman@necam.com>,

+        Editor: Ricard Vilalta <mailto:ricard.vilalta@cttc.es>";

+    description "none";

+    revision 2017-05-31 {

+        description "TAPI SDK 2.0-alpha";

+        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020 and RFC 6087";

+    }

+    augment "/tapi-common:context" {

+        uses path-computation-context;

+        description "Augments the base TAPI Context with PathComputationService information";

+    }

+    /***********************

+    * package object-classes

+    **********************/ 

+        grouping path {

+            leaf-list link {

+                type leafref {

+                    path '/tapi-common:context/tapi-topology:topology/tapi-topology:link/tapi-topology:uuid';

+                }

+                config false;

+                min-elements 1;

+                description "none";

+            }

+            container routing-constraint {

+                config false;

+                uses routing-constraint;

+                description "none";

+            }

+            uses tapi-common:resource-spec;

+            description "Path is described by an ordered list of TE Links. A TE Link is defined by a pair of Node/NodeEdgePoint IDs. A Connection is realized by concatenating link resources (associated with a Link) and the lower-level connections (cross-connections) in the different nodes";

+        }

+        grouping path-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 service-layer {

+                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 path-computation-service {

+            leaf-list path {

+                type leafref {

+                    path '/tapi-common:context/tapi-path-computation:path/tapi-path-computation:uuid';

+                }

+                config false;

+                min-elements 1;

+                description "none";

+            }

+            list end-point {

+                key 'local-id';

+                min-elements 2;

+                max-elements 2;

+                uses path-service-end-point;

+                description "none";

+            }

+            container routing-constraint {

+                uses routing-constraint;

+                description "none";

+            }

+            container objective-function {

+                uses path-objective-function;

+                description "none";

+            }

+            container optimization-constraint {

+                uses path-optimization-constraint;

+                description "none";

+            }

+            uses tapi-common:service-spec;

+            description "none";

+        }

+        grouping path-objective-function {

+            leaf bandwidth-optimization {

+                type tapi-common:directive-value;

+                config false;

+                description "none";

+            }

+            leaf concurrent-paths {

+                type tapi-common:directive-value;

+                config false;

+                description "none";

+            }

+            leaf cost-optimization {

+                type tapi-common:directive-value;

+                config false;

+                description "none";

+            }

+            leaf link-utilization {

+                type tapi-common:directive-value;

+                config false;

+                description "none";

+            }

+            leaf resource-sharing {

+                type tapi-common:directive-value;

+                config false;

+                description "none";

+            }

+            uses tapi-common:local-class;

+            description "none";

+        }

+        grouping path-optimization-constraint {

+            leaf traffic-interruption {

+                type tapi-common:directive-value;

+                config false;

+                description "none";

+            }

+            uses tapi-common:local-class;

+            description "none";

+        }

+        grouping routing-constraint {

+            container requested-capacity {

+                config false;

+                uses tapi-common:capacity;

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

+            }

+            leaf-list path-layer {

+                type tapi-common:layer-protocol-name;

+                config false;

+                description "none";

+            }

+            list cost-characteristic {

+                key 'cost-name';

+                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';

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

+            }

+            uses tapi-common:local-class;

+            description "none";

+        }

+        grouping path-computation-context {

+            list path-comp-service {

+                key 'uuid';

+                uses path-computation-service;

+                description "none";

+            }

+            list path {

+                key 'uuid';

+                config false;

+                uses path;

+                description "none";

+            }

+            description "none";

+        }

+

+    /***********************

+    * package interfaces

+    **********************/ 

+        rpc compute-p-2-p-path {

+            description "none";

+            input {

+                list sep {

+                    min-elements 2;

+                    max-elements 2;

+                    uses path-service-end-point;

+                    description "none";

+                }

+                container routing-constraint {

+                    uses routing-constraint;

+                    description "none";

+                }

+                container objective-function {

+                    uses path-objective-function;

+                    description "none";

+                }

+            }

+            output {

+                container service {

+                    uses path-computation-service;

+                    description "none";

+                }

+            }

+        }

+        rpc optimize-p-2-p-path {

+            description "none";

+            input {

+                leaf path-id-or-name {

+                    type string;

+                    description "none";

+                }

+                container routing-constraint {

+                    uses routing-constraint;

+                    description "none";

+                }

+                container optimization-constraint {

+                    uses path-optimization-constraint;

+                    description "none";

+                }

+                container objective-function {

+                    uses path-objective-function;

+                    description "none";

+                }

+            }

+            output {

+                container service {

+                    uses path-computation-service;

+                    description "none";

+                }

+            }

+        }

+        rpc delete-p-2-p-path {

+            description "none";

+            input {

+                leaf path-id-or-name {

+                    type string;

+                    description "none";

+                }

+            }

+            output {

+                container service {

+                    uses path-computation-service;

+                    description "none";

+                }

+            }

+        }

+

+}

diff --git a/models/tapi/src/main/yang/tapi-topology.yang b/models/tapi/src/main/yang/tapi-topology.yang
new file mode 100644
index 0000000..a5b6c3e
--- /dev/null
+++ b/models/tapi/src/main/yang/tapi-topology.yang
@@ -0,0 +1,706 @@
+module tapi-topology {

+    namespace "urn:onf:params:xml:ns:yang:tapi-topology";

+    prefix tapi-topology;

+    import tapi-common {

+        prefix tapi-common;

+    }

+    organization "Open Networking Foundation (ONF) / Open Transport Working Group(OTWG) / Transport API (TAPI) Project";

+    contact "

+        WG Web: TAPI SDK Project <http://opensourcesdn.org/projects/project-snowmass/>

+        WG List: TAPI Discussion list <mailto: transport-api@login.opennetworking.org>,

+        WG Chair: Karthik Sethuraman <mailto:karthik.sethuraman@necam.com>,

+        Editor: Ricard Vilalta <mailto:ricard.vilalta@cttc.es>";

+    description "none";

+    revision 2017-05-31 {

+        description "TAPI SDK 2.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 "Augments the base TAPI Context with TopologyService information";

+    }

+    /***********************

+    * 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 tapi-common: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.";

+            }

+            container resilience-type {

+                uses resilience-type;

+                description "none";

+            }

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

+            }

+            list node-rule-group {

+                key 'uuid';

+                uses node-rule-group;

+                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 tapi-common: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 "NodeEdgePoint mapped to more than ServiceInterfacePoint (slicing/virtualizing) or a ServiceInterfacePoint mapped to more than one NodeEdgePoint (load balancing/Resilience) should be considered experimental";

+            }

+            container state {

+                config false;

+                uses tapi-common:admin-state-pac;

+                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-cost-pac {

+            list cost-characteristic {

+                key 'cost-name';

+                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';

+                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';

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

+        }

+        grouping inter-rule-group {

+            list rule {

+                key 'local-id';

+                min-elements 1;

+                uses rule;

+                description "none";

+            }

+            leaf-list associated-node-rule-group {

+                type leafref {

+                    path '/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:node-rule-group/tapi-topology:uuid';

+                }

+                min-elements 2;

+                description "none";

+            }

+            container transfer-capacity {

+                uses tapi-common:capacity-pac;

+                description "none";

+            }

+            container transfer-cost {

+                uses transfer-cost-pac;

+                description "none";

+            }

+            container transfer-timing {

+                uses transfer-timing-pac;

+                description "none";

+            }

+            container risk-parameter {

+                uses risk-parameter-pac;

+                description "none";

+            }

+            uses tapi-common:resource-spec;

+            description "none";

+        }

+        grouping node-rule-group {

+            list rule {

+                key 'local-id';

+                min-elements 1;

+                uses rule;

+                description "none";

+            }

+            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';

+                }

+                min-elements 1;

+                description "none";

+            }

+            leaf-list node-rule-group {

+                type leafref {

+                    path '/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:node-rule-group/tapi-topology:uuid';

+                }

+                description "none";

+            }

+            list inter-rule-group {

+                key 'uuid';

+                uses inter-rule-group;

+                description "none";

+            }

+            container transfer-capacity {

+                uses tapi-common:capacity-pac;

+                description "none";

+            }

+            container transfer-cost {

+                uses transfer-cost-pac;

+                description "none";

+            }

+            container transfer-timing {

+                uses transfer-timing-pac;

+                description "none";

+            }

+            container risk-parameter {

+                uses risk-parameter-pac;

+                description "none";

+            }

+            uses tapi-common:resource-spec;

+            description "none";

+        }

+        grouping rule {

+            leaf rule-type {

+                type rule-type;

+                description "none";

+            }

+            leaf forwarding-rule {

+                type forwarding-rule;

+                description "none";

+            }

+            leaf override-priority {

+                type uint64;

+                description "none";

+            }

+            uses tapi-common:local-class;

+            description "none";

+        }

+

+    /***********************

+    * package type-definitions

+    **********************/ 

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

+        }

+        grouping latency-characteristic {

+            leaf traffic-property-name {

+                type string;

+                description "The identifier of the specific traffic property to which the queuing latency applies.";

+            }

+            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 queing-latency-characteristic {

+                type string;

+                description "The specific queuing latency for the traffic property.";

+            }

+            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).";

+            }

+            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 forwarding-rule {

+            type enumeration {

+                enum may-forward-across-group {

+                    description "none";

+                }

+                enum must-forward-across-group {

+                    description "none";

+                }

+                enum cannot-forward-across-group {

+                    description "none";

+                }

+                enum no-statement-on-forwarding {

+                    description "none";

+                }

+            }

+            description "none";

+        }

+        typedef rule-type {

+            type enumeration {

+                enum forwarding {

+                    description "none";

+                }

+                enum capacity {

+                    description "none";

+                }

+                enum cost {

+                    description "none";

+                }

+                enum timing {

+                    description "none";

+                }

+                enum risk {

+                    description "none";

+                }

+                enum grouping {

+                    description "none";

+                }

+            }

+            description "none";

+        }

+        grouping resilience-type {

+            leaf restoration-policy {

+                type restoration-policy;

+                description "none";

+            }

+            leaf protection-type {

+                type protection-type;

+                description "none";

+            }

+            description "none";

+        }

+        typedef restoration-policy {

+            type enumeration {

+                enum per-domain-restoration {

+                    description "none";

+                }

+                enum end-to-end-restoration {

+                    description "none";

+                }

+                enum na {

+                    description "none";

+                }

+            }

+            description "none";

+        }

+        typedef protection-type {

+            type enumeration {

+                enum no-protecton {

+                    description "none";

+                }

+                enum one-plus-one-protection {

+                    description "none";

+                }

+                enum one-plus-one-protection-with-dynamic-restoration {

+                    description "none";

+                }

+                enum permanent-one-plus-one-protection {

+                    description "none";

+                }

+                enum one-for-one-protection {

+                    description "none";

+                }

+                enum dynamic-restoration {

+                    description "none";

+                }

+                enum pre-computed-restoration {

+                    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/models/tapi/src/main/yang/tapi-virtual-network.yang b/models/tapi/src/main/yang/tapi-virtual-network.yang
new file mode 100644
index 0000000..087ff01
--- /dev/null
+++ b/models/tapi/src/main/yang/tapi-virtual-network.yang
@@ -0,0 +1,220 @@
+module tapi-virtual-network {

+    namespace "urn:onf:params:xml:ns:yang:tapi-virtual-network";

+    prefix tapi-virtual-network;

+    import tapi-topology {

+        prefix tapi-topology;

+    }

+    import tapi-common {

+        prefix tapi-common;

+    }

+    organization "Open Networking Foundation (ONF) / Open Transport Working Group(OTWG) / Transport API (TAPI) Project";

+    contact "

+        WG Web: TAPI SDK Project <http://opensourcesdn.org/projects/project-snowmass/>

+        WG List: TAPI Discussion list <mailto: transport-api@login.opennetworking.org>,

+        WG Chair: Karthik Sethuraman <mailto:karthik.sethuraman@necam.com>,

+        Editor: Ricard Vilalta <mailto:ricard.vilalta@cttc.es>";

+    description "none";

+    revision 2017-05-31 {

+        description "TAPI SDK 2.0-alpha";

+        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020 and RFC 6087";

+    }

+    augment "/tapi-common:context" {

+        uses virtual-network-context;

+        description "Augments the base TAPI Context with VirtualNetworkService information";

+    }

+    /***********************

+    * package object-classes

+    **********************/ 

+        grouping virtual-network-constraint {

+            leaf src-service-end-point {

+                type leafref {

+                    path '/tapi-common:context/tapi-common:service-interface-point/tapi-common:uuid';

+                }

+                config false;

+                description "none";

+            }

+            leaf sink-service-end-point {

+                type leafref {

+                    path '/tapi-common:context/tapi-common:service-interface-point/tapi-common:uuid';

+                }

+                config false;

+                description "none";

+            }

+            leaf-list diversity-exclusion {

+                type leafref {

+                    path '/tapi-common:context/tapi-virtual-network:virtual-nw-service/tapi-virtual-network:vnw-constraint/tapi-virtual-network:local-id';

+                }

+                config false;

+                description "none";

+            }

+            container requested-capacity {

+                uses tapi-common:capacity;

+                description "none";

+            }

+            leaf service-level {

+                type string;

+                description "An abstract value the meaning of which is mutually agreed – typically represents metrics such as - Class of service, priority, resiliency, availability";

+            }

+            leaf-list service-layer {

+                type tapi-common:layer-protocol-name;

+                description "none";

+            }

+            list cost-characteristic {

+                key 'cost-name';

+                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';

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

+            }

+            uses tapi-common:local-class;

+            description "none";

+        }

+        grouping virtual-network-service {

+            leaf topology {

+                type leafref {

+                    path '/tapi-common:context/tapi-topology:topology/tapi-topology:uuid';

+                }

+                config false;

+                description "none";

+            }

+            list end-point {

+                key 'local-id';

+                min-elements 2;

+                uses virtual-network-service-end-point;

+                description "none";

+            }

+            list vnw-constraint {

+                key 'local-id';

+                min-elements 1;

+                uses virtual-network-constraint;

+                description "none";

+            }

+            leaf schedule {

+                type string;

+                description "none";

+            }

+            container state {

+                uses tapi-common:admin-state-pac;

+                description "none";

+            }

+            leaf-list layer-protocol-name {

+                type tapi-common:layer-protocol-name;

+                min-elements 1;

+                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 virtual-network-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 service-layer {

+                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 virtual-network-context {

+            list virtual-nw-service {

+                key 'uuid';

+                uses virtual-network-service;

+                description "none";

+            }

+            description "none";

+        }

+

+    /***********************

+    * package interfaces

+    **********************/ 

+        rpc create-virtual-network-service {

+            description "none";

+            input {

+                list sep {

+                    min-elements 2;

+                    uses virtual-network-service-end-point;

+                    description "none";

+                }

+                container vnw-constraint {

+                    uses virtual-network-constraint;

+                    description "none";

+                }

+                leaf conn-schedule {

+                    type string;

+                    description "none";

+                }

+            }

+            output {

+                container service {

+                    uses virtual-network-service;

+                    description "none";

+                }

+            }

+        }

+        rpc delete-virtual-network-service {

+            description "none";

+            input {

+                leaf service-id-or-name {

+                    type string;

+                    description "none";

+                }

+            }

+            output {

+                container service {

+                    uses virtual-network-service;

+                    description "none";

+                }

+            }

+        }

+        rpc get-virtual-network-service-details {

+            description "none";

+            input {

+                leaf service-id-or-name {

+                    type string;

+                    description "none";

+                }

+            }

+            output {

+                container service {

+                    uses virtual-network-service;

+                    description "none";

+                }

+            }

+        }

+        rpc get-virtual-network-service-list {

+            description "none";

+            output {

+                list service {

+                    uses virtual-network-service;

+                    description "none";

+                }

+            }

+        }

+

+}