TAPI 2.0.2-SNAPSHOT

- based on https://github.com/OpenNetworkingFoundation/TAPI/pull/302
           https://github.com/OpenNetworkingFoundation/TAPI/pull/303
  not official 2.0.2 release yet

Change-Id: Idf9dc67e77521e707cad67f5d8d609991cf8ce42
diff --git a/models/tapi/src/main/yang/tapi-common@2018-02-16.yang b/models/tapi/src/main/yang/tapi-common@2018-03-07.yang
similarity index 97%
rename from models/tapi/src/main/yang/tapi-common@2018-02-16.yang
rename to models/tapi/src/main/yang/tapi-common@2018-03-07.yang
index 6a21829..05c668b 100644
--- a/models/tapi/src/main/yang/tapi-common@2018-02-16.yang
+++ b/models/tapi/src/main/yang/tapi-common@2018-03-07.yang
@@ -2,10 +2,10 @@
     namespace "urn:onf:otcc:yang:tapi-common";

     prefix tapi-common;

     organization "ONF OTCC (Open Transport Configuration & Control) Project";

-    contact "
-        Project Web: <https://wiki.opennetworking.org/display/OTCC/TAPI>
-        Project List: <mailto:transport-api@opennetworking.org>
-        Editor: Karthik Sethuraman
+    contact "

+        Project Web: <https://wiki.opennetworking.org/display/OTCC/TAPI>

+        Project List: <mailto:transport-api@opennetworking.org>

+        Editor: Karthik Sethuraman

                 <mailto:karthik.sethuraman@necam.com>";

     description "

         This module contains TAPI Common Model definitions.

@@ -13,14 +13,26 @@
         Copyright (c) 2018 Open Networking Foundation (ONF). All rights reserved.

         License: This module is distributed under the Apache License 2.0

         ";

-    revision 2018-02-16 {

-        description "ONF Transport API version 2.0.1
-        This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool version .
-        <https://wiki.opennetworking.org/display/OIMT/IISOMI>
-        Changes in this revision: <https://github.com/OpenNetworkingFoundation/Snowmass-ONFOpenTransport/blob/develop/change-log.md>";

-        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model
-                  <https://github.com/OpenNetworkingFoundation/Snowmass-ONFOpenTransport/tree/develop/UML>";

+    revision 2018-03-07 {

+        description "ONF Transport API version 2.0.2

+        This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool version .

+        <https://wiki.opennetworking.org/display/OIMT/IISOMI>

+        Changes in this revision: <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/change-log.md>";

+        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model

+                  <https://github.com/OpenNetworkingFoundation/TAPI/tree/develop/UML>";

     }

+

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

+    * definitions of refrences

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

+    grouping service-interface-point-ref {

+        leaf service-interface-point-id {

+            type leafref {

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

+            }

+        }

+    }

+

     /***********************

     * package object-classes

     **********************/ 

diff --git a/models/tapi/src/main/yang/tapi-connectivity@2018-02-16.yang b/models/tapi/src/main/yang/tapi-connectivity@2018-03-07.yang
similarity index 87%
rename from models/tapi/src/main/yang/tapi-connectivity@2018-02-16.yang
rename to models/tapi/src/main/yang/tapi-connectivity@2018-03-07.yang
index f5bc637..5a03060 100644
--- a/models/tapi/src/main/yang/tapi-connectivity@2018-02-16.yang
+++ b/models/tapi/src/main/yang/tapi-connectivity@2018-03-07.yang
@@ -11,23 +11,23 @@
         prefix tapi-path-computation;

     }

     organization "ONF OTCC (Open Transport Configuration & Control) Project";

-    contact "
-        Project Web: <https://wiki.opennetworking.org/display/OTCC/TAPI>
-        Project List: <mailto:transport-api@opennetworking.org>
-        Editor: Karthik Sethuraman
+    contact "

+        Project Web: <https://wiki.opennetworking.org/display/OTCC/TAPI>

+        Project List: <mailto:transport-api@opennetworking.org>

+        Editor: Karthik Sethuraman

                 <mailto:karthik.sethuraman@necam.com>";

     description "

         This module contains TAPI Connectivity Model definitions.

         Source: TapiConnectivity.uml

         Copyright (c) 2018 Open Networking Foundation (ONF). All rights reserved.

         License: This module is distributed under the Apache License 2.0";

-    revision 2018-02-16 {

-        description "ONF Transport API version 2.0.1
-        This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool version .
-        <https://wiki.opennetworking.org/display/OIMT/IISOMI>
-        Changes in this revision: <https://github.com/OpenNetworkingFoundation/Snowmass-ONFOpenTransport/blob/develop/change-log.md>";

-        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model
-                  <https://github.com/OpenNetworkingFoundation/Snowmass-ONFOpenTransport/tree/develop/UML>";

+    revision 2018-03-07 {

+        description "ONF Transport API version 2.0.2

+        This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool version .

+        <https://wiki.opennetworking.org/display/OIMT/IISOMI>

+        Changes in this revision: <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/change-log.md>";

+        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model

+                  <https://github.com/OpenNetworkingFoundation/TAPI/tree/develop/UML>";

     }

     augment "/tapi-common:context" {

         uses connectivity-context;

@@ -37,14 +37,51 @@
         uses cep-list;

         description "none";

     }

+

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

+    * definitions of refrences

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

+    grouping connectivity-service-ref {

+        leaf connectivity-service-id {

+            type leafref {

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

+            }

+        }

+    }

+

+    grouping connection-end-point-ref {

+        uses tapi-topology:owned-node-edge-point-ref;

+        leaf connection-end-point-id {

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

+            }

+        }

+    }

+

+    grouping connection-ref {

+        leaf connection-id {

+            type leafref {

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

+            }

+        }

+    }

+

+    grouping switch-control-ref {

+        uses connection-ref;

+        leaf switch-control-id {

+            type leafref {

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

+            }

+        }

+    }

+

     /***********************

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

-                }

+            list connection-end-point {

+                uses connection-end-point-ref;

+                key 'topology-id node-id owned-node-edge-point-id connection-end-point-id';

                 config false;

                 min-elements 2;

                 description "none";

@@ -54,8 +91,8 @@
                     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. 

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

             }

             list route {

@@ -97,18 +134,16 @@
                 }

                 description "none";

             }

-            leaf-list parent-node-edge-point {

-                type leafref {

-                    path '/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point/tapi-topology:uuid';

-                }

+            list parent-node-edge-point {

+                uses tapi-topology:owned-node-edge-point-ref;

+                key 'topology-id node-id owned-node-edge-point-id';

                 config false;

                 min-elements 1;

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

-                }

+            list client-node-edge-point {

+                uses tapi-topology:owned-node-edge-point-ref;

+                key 'topology-id node-id owned-node-edge-point-id';

                 config false;

                 description "none";

             }

@@ -125,7 +160,7 @@
             uses tapi-common:resource-spec;

             uses tapi-common:operational-state-pac;

             uses tapi-common:termination-pac;

-            description "The LogicalTerminationPoint (LTP) object class encapsulates the termination and adaptation functions of one or more transport layers. 

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

@@ -166,10 +201,9 @@
                 }

                 description "none";

             }

-            leaf-list diversity-exclusion {

-                type leafref {

-                    path '/tapi-common:context/tapi-connectivity:connectivity-service/tapi-connectivity:uuid';

-                }

+            list diversity-exclusion {

+                uses connectivity-service-ref;

+                key 'connectivity-service-id';

                 description "none";

             }

             uses route-compute-policy;

@@ -210,10 +244,8 @@
                 type tapi-common:layer-protocol-name;

                 description "none";

             }

-            leaf service-interface-point {

-                type leafref {

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

-                }

+            container service-interface-point {

+                uses tapi-common:service-interface-point-ref;

                 description "none";

             }

             container capacity {

@@ -235,11 +267,11 @@
             uses tapi-common:local-class;

             uses tapi-common:admin-state-pac;

             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. 

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

@@ -252,8 +284,8 @@
                 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. 

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

@@ -271,10 +303,9 @@
             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';

-                }

+            list selected-connection-end-point {

+                uses connection-end-point-ref;

+                key 'topology-id node-id owned-node-edge-point-id connection-end-point-id';

                 min-elements 1;

                 description "none";

             }

@@ -299,10 +330,10 @@
                 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). 

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

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

@@ -313,10 +344,9 @@
                 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:uuid';

-                }

+            list sub-switch-control {

+                uses switch-control-ref;

+                key 'connection-id switch-control-id';

                 description "none";

             }

             list switch {

@@ -363,7 +393,7 @@
             }

             leaf is-frozen {

                 type boolean;

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

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

             }

@@ -382,59 +412,51 @@
             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';

-                }

+            list include-topology {

+                uses tapi-topology:topology-ref;

+                key 'topology-id';

                 config false;

                 description "none";

             }

-            leaf-list avoid-topology {

-                type leafref {

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

-                }

+            list avoid-topology {

+                uses tapi-topology:topology-ref;

+                key 'topology-id';

                 config false;

                 description "none";

             }

-            leaf-list include-path {

-                type leafref {

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

-                }

+            list include-path {

+                uses tapi-path-computation:path-ref;

+                key 'path-id';

                 config false;

                 description "none";

             }

-            leaf-list exclude-path {

-                type leafref {

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

-                }

+            list exclude-path {

+                uses tapi-path-computation:path-ref;

+                key 'path-id';

                 config false;

                 description "none";

             }

-            leaf-list include-link {

-                type leafref {

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

-                }

+            list include-link {

+                uses tapi-topology:link-ref;

+                key 'topology-id link-id';

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

-                }

+            list exclude-link {

+                uses tapi-topology:link-ref;

+                key 'topology-id link-id';

                 config false;

                 description "none";

             }

-            leaf-list include-node {

-                type leafref {

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

-                }

+            list include-node {

+                uses tapi-topology:node-ref;

+                key 'topology-id node-id';

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

-                }

+            list exclude-node {

+                uses tapi-topology:node-ref;

+                key 'topology-id node-id';

                 config false;

                 description "none";

             }

@@ -676,7 +698,7 @@
             description "none";

             input {

                 list end-point {

-                    key 'local-id';
+                    key 'local-id';

                     min-elements 2;

                     uses connectivity-service-end-point;

                     description "none";

diff --git a/models/tapi/src/main/yang/tapi-path-computation@2018-02-16.yang b/models/tapi/src/main/yang/tapi-path-computation@2018-03-07.yang
similarity index 90%
rename from models/tapi/src/main/yang/tapi-path-computation@2018-02-16.yang
rename to models/tapi/src/main/yang/tapi-path-computation@2018-03-07.yang
index 9db5ab3..fa5745b 100644
--- a/models/tapi/src/main/yang/tapi-path-computation@2018-02-16.yang
+++ b/models/tapi/src/main/yang/tapi-path-computation@2018-03-07.yang
@@ -8,36 +8,47 @@
         prefix tapi-common;

     }

     organization "ONF OTCC (Open Transport Configuration & Control) Project";

-    contact "
-        Project Web: <https://wiki.opennetworking.org/display/OTCC/TAPI>
-        Project List: <mailto:transport-api@opennetworking.org>
-        Editor: Karthik Sethuraman
+    contact "

+        Project Web: <https://wiki.opennetworking.org/display/OTCC/TAPI>

+        Project List: <mailto:transport-api@opennetworking.org>

+        Editor: Karthik Sethuraman

                 <mailto:karthik.sethuraman@necam.com>";

     description "

         This module contains TAPI Path Computation Model definitions.

         Source: TapiPathComputation.uml

         Copyright (c) 2018 Open Networking Foundation (ONF). All rights reserved.

         License: This module is distributed under the Apache License 2.0";

-    revision 2018-02-16 {

-        description "ONF Transport API version 2.0.1
-        This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool version .
-        <https://wiki.opennetworking.org/display/OIMT/IISOMI>
-        Changes in this revision: <https://github.com/OpenNetworkingFoundation/Snowmass-ONFOpenTransport/blob/develop/change-log.md>";

-        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model
-                  <https://github.com/OpenNetworkingFoundation/Snowmass-ONFOpenTransport/tree/develop/UML>";

+    revision 2018-03-07 {

+        description "ONF Transport API version 2.0.2

+        This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool version .

+        <https://wiki.opennetworking.org/display/OIMT/IISOMI>

+        Changes in this revision: <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/change-log.md>";

+        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model

+                  <https://github.com/OpenNetworkingFoundation/TAPI/tree/develop/UML>";

     }

     augment "/tapi-common:context" {

         uses path-computation-context;

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

     }

+

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

+    * definitions of refrences

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

+    grouping path-ref {

+        leaf path-id {

+            type leafref {

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

+            }

+        }

+    }

+

     /***********************

     * package object-classes

-    **********************/ 

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

         grouping path {

-            leaf-list link {

-                type leafref {

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

-                }

+            list link {

+                uses tapi-topology:link-ref;

+                key 'topology-id link-id';

                 config false;

                 min-elements 1;

                 description "none";

@@ -75,18 +86,17 @@
             }

             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. 

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

-                }

+            list path {

+                uses path-ref;

+                key 'path-id';

                 config false;

                 min-elements 1;

                 description "none";

@@ -179,10 +189,9 @@
                 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';

-                }

+            list include-topology {

+                uses tapi-topology:topology-ref;

+                key 'topology-id';

                 config false;

                 description "none";

             }

diff --git a/models/tapi/src/main/yang/tapi-topology@2018-02-16.yang b/models/tapi/src/main/yang/tapi-topology@2018-03-07.yang
similarity index 90%
rename from models/tapi/src/main/yang/tapi-topology@2018-02-16.yang
rename to models/tapi/src/main/yang/tapi-topology@2018-03-07.yang
index e6928de..db6cabc 100644
--- a/models/tapi/src/main/yang/tapi-topology@2018-02-16.yang
+++ b/models/tapi/src/main/yang/tapi-topology@2018-03-07.yang
@@ -5,36 +5,84 @@
         prefix tapi-common;

     }

     organization "ONF OTCC (Open Transport Configuration & Control) Project";

-    contact "
-        Project Web: <https://wiki.opennetworking.org/display/OTCC/TAPI>
-        Project List: <mailto:transport-api@opennetworking.org>
-        Editor: Karthik Sethuraman
+    contact "

+        Project Web: <https://wiki.opennetworking.org/display/OTCC/TAPI>

+        Project List: <mailto:transport-api@opennetworking.org>

+        Editor: Karthik Sethuraman

                 <mailto:karthik.sethuraman@necam.com>";

     description "

         This module contains TAPI Topology Model definitions.

         Source: TapiTopology.uml

         Copyright (c) 2018 Open Networking Foundation (ONF). All rights reserved.

         License: This module is distributed under the Apache License 2.0";

-    revision 2018-02-16 {

-        description "ONF Transport API version 2.0.1
-        This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool version .
-        <https://wiki.opennetworking.org/display/OIMT/IISOMI>
-        Changes in this revision: <https://github.com/OpenNetworkingFoundation/Snowmass-ONFOpenTransport/blob/develop/change-log.md>";

-        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model
-                  <https://github.com/OpenNetworkingFoundation/Snowmass-ONFOpenTransport/tree/develop/UML>";

+    revision 2018-03-07 {

+        description "ONF Transport API version 2.0.2

+        This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool version .

+        <https://wiki.opennetworking.org/display/OIMT/IISOMI>

+        Changes in this revision: <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/change-log.md>";

+        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model

+                  <https://github.com/OpenNetworkingFoundation/TAPI/tree/develop/UML>";

     }

     augment "/tapi-common:context" {

         uses topology-context;

         description "Augments the base TAPI Context with TopologyService information";

     }

+

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

+    * definitions of refrences

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

+

+    grouping topology-ref {

+        leaf topology-id {

+            type leafref {

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

+            }

+        }

+    }

+

+    grouping link-ref {

+        uses topology-ref;

+        leaf link-id {

+            type leafref {

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

+            }

+        }

+    }

+

+    grouping node-ref {

+        uses topology-ref;

+        leaf node-id {

+            type leafref {

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

+            }

+        }

+    }

+

+    grouping owned-node-edge-point-ref {

+        uses node-ref;

+        leaf owned-node-edge-point-id {

+            type leafref {

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

+            }

+        }

+    }

+

+    grouping node-rule-group-ref {

+        uses node-ref;

+        leaf node-rule-group-id {

+            type leafref {

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

+            }

+        }

+    }

+

     /***********************

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

-                }

+            list node-edge-point {

+                uses owned-node-edge-point-ref;

+                key 'topology-id node-id owned-node-edge-point-id';

                 config false;

                 min-elements 2;

                 description "none";

@@ -48,8 +96,8 @@
             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). 

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

@@ -86,10 +134,8 @@
                 uses node-rule-group;

                 description "none";

             }

-            leaf encap-topology {

-                type leafref {

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

-                }

+            container encap-topology {

+                uses topology-ref;

                 config false;

                 description "none";

             }

@@ -105,7 +151,7 @@
             uses transfer-cost-pac;

             uses transfer-integrity-pac;

             uses transfer-timing-pac;

-            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. 

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

@@ -128,7 +174,7 @@
                 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. 

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

@@ -137,8 +183,8 @@
                 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. 

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

@@ -156,10 +202,9 @@
                 config false;

                 description "none";

             }

-            leaf-list mapped-service-interface-point {

-                type leafref {

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

-                }

+            list mapped-service-interface-point {

+                uses tapi-common:service-interface-point-ref;

+                key 'service-interface-point-id';

                 config false;

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

             }

@@ -177,7 +222,7 @@
             uses tapi-common:admin-state-pac;

             uses tapi-common:termination-pac;

             uses tapi-common:capacity-pac;

-            description "The LogicalTerminationPoint (LTP) object class encapsulates the termination and adaptation functions of one or more transport layers. 

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

@@ -188,7 +233,7 @@
                 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. 

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

@@ -209,16 +254,16 @@
                 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. 

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

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

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

@@ -230,7 +275,7 @@
             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). 

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

@@ -305,10 +350,9 @@
                 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';

-                }

+            list associated-node-rule-group {

+                uses node-rule-group-ref;

+                key 'topology-id node-id node-rule-group-id';

                 min-elements 2;

                 description "none";

             }

@@ -333,10 +377,9 @@
                 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';

-                }

+            list composed-rule-group {

+                uses node-rule-group-ref;

+                key 'topology-id node-id node-rule-group-id';

                 description "none";

             }

             list inter-rule-group {

diff --git a/models/tapi/src/main/yang/tapi-virtual-network@2018-02-16.yang b/models/tapi/src/main/yang/tapi-virtual-network@2018-03-07.yang
similarity index 93%
rename from models/tapi/src/main/yang/tapi-virtual-network@2018-02-16.yang
rename to models/tapi/src/main/yang/tapi-virtual-network@2018-03-07.yang
index 0965cc5..3157955 100644
--- a/models/tapi/src/main/yang/tapi-virtual-network@2018-02-16.yang
+++ b/models/tapi/src/main/yang/tapi-virtual-network@2018-03-07.yang
@@ -8,23 +8,23 @@
         prefix tapi-common;

     }

     organization "ONF OTCC (Open Transport Configuration & Control) Project";

-    contact "
-        Project Web: <https://wiki.opennetworking.org/display/OTCC/TAPI>
-        Project List: <mailto:transport-api@opennetworking.org>
-        Editor: Karthik Sethuraman
+    contact "

+        Project Web: <https://wiki.opennetworking.org/display/OTCC/TAPI>

+        Project List: <mailto:transport-api@opennetworking.org>

+        Editor: Karthik Sethuraman

                 <mailto:karthik.sethuraman@necam.com>";

     description "

         This module contains TAPI Virtual Network Model definitions.

         Source: TapiVirtualNetwork.uml

         Copyright (c) 2018 Open Networking Foundation (ONF). All rights reserved.

         License: This module is distributed under the Apache License 2.0";

-    revision 2018-02-16 {

-        description "ONF Transport API version 2.0.1
-        This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool version .
-        <https://wiki.opennetworking.org/display/OIMT/IISOMI>
-        Changes in this revision: <https://github.com/OpenNetworkingFoundation/Snowmass-ONFOpenTransport/blob/develop/change-log.md>";

-        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model
-                  <https://github.com/OpenNetworkingFoundation/Snowmass-ONFOpenTransport/tree/develop/UML>";

+    revision 2018-03-07 {

+        description "ONF Transport API version 2.0.1

+        This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool version .

+        <https://wiki.opennetworking.org/display/OIMT/IISOMI>

+        Changes in this revision: <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/change-log.md>";

+        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model

+                  <https://github.com/OpenNetworkingFoundation/TAPI/tree/develop/UML>";

     }

     augment "/tapi-common:context" {

         uses virtual-network-context;

@@ -32,12 +32,10 @@
     }

     /***********************

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

-                }

+            container src-service-end-point {

+                uses tapi-common:service-interface-point-ref;

                 config false;

                 description "none";

             }

@@ -81,10 +79,8 @@
             description "none";

         }

         grouping virtual-network-service {

-            leaf topology {

-                type leafref {

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

-                }

+            container topology {

+                uses tapi-topology:topology-ref;

                 config false;

                 description "none";

             }