Add TAPI Topology simulated network function type.
[sim/o1-interface.git] / ntsimulator / deploy / smo-nts-ng-topology-server / yang / tapi-connectivity@2020-06-16.yang
diff --git a/ntsimulator/deploy/smo-nts-ng-topology-server/yang/tapi-connectivity@2020-06-16.yang b/ntsimulator/deploy/smo-nts-ng-topology-server/yang/tapi-connectivity@2020-06-16.yang
new file mode 100644 (file)
index 0000000..2dda923
--- /dev/null
@@ -0,0 +1,884 @@
+module tapi-connectivity {\r
+    namespace "urn:onf:otcc:yang:tapi-connectivity";\r
+    prefix tapi-connectivity;\r
+    import tapi-common {\r
+        prefix tapi-common;\r
+    }\r
+    import tapi-topology {\r
+        prefix tapi-topology;\r
+    }\r
+    import tapi-path-computation {\r
+        prefix tapi-path-computation;\r
+    }\r
+    organization "ONF OTCC (Open Transport Configuration & Control) Project";\r
+    contact "\r
+         Project Web: <https://urldefense.com/v3/__https://wiki.opennetworking.org/display/OTCC/TAPI__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_yiFzE6g$ >\r
+         Project List: <mailto:transport-api@opennetworking.org>\r
+         Editor: Karthik Sethuraman <mailto:karthik.sethuraman@necam.com>\r
+         Andrea Mazzini <mailto:andrea.mazzini@nokia.com>\r
+         Arturo Mayoral <mailto:arturo.mayoral@telefonica.com>\r
+         Nigel Davis <mailto:ndavis@ciena.com>";\r
+    description "\r
+        This module contains TAPI Connectivity Model definitions.\r
+        Source: TapiConnectivity.uml\r
+        - The TAPI YANG models included in this TAPI release are a *normative* part of the TAPI SDK.\r
+        - The YANG specifications have been generated from the corresponding UML model using the [ONF EAGLE UML2YANG mapping tool]\r
+        <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/EagleUmlYang__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_6pxiNxl$ >\r
+        and further edited manually to comply with the [ONF IISOMI UML2YANG mapping guidelines]\r
+        <https://urldefense.com/v3/__https://wiki.opennetworking.org/display/OIMT/UML*-*YANG*Guidelines__;Kysr!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_wxKUbJ_$ >\r
+        - Status of YANG model artifacts can be determined by referring to the corresponding UML artifacts.\r
+        As described in the UML models, some artifacts are considered *experimental*, and thus the corresponding YANG artifacts.\r
+        - The ONF TAPI release process does not guarantee backward compatibility of YANG models across major versions of TAPI releases.\r
+        The YANG model backward compatibility criteria are outlined in section 11 of <https://urldefense.com/v3/__https://tools.ietf.org/html/rfc7950__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_zcAY1P4$ >.\r
+        YANG models included in this release may not be backward compatible with previous TAPI releases.\r
+        Copyright (c) 2018 Open Networking Foundation (ONF). All rights reserved.\r
+        License: This module is distributed under the Apache License 2.0.";\r
+    revision 2020-06-16 {\r
+        description "ONF Transport API version 2.1.3.\r
+                   - Minor corrections in comments.\r
+                   Changes included in this TAPI release (v2.1.3) are listed in\r
+                   <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/TAPI/blob/develop_v2_1/CHANGE_LOG/change-log.2.1.3.md__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_xm1nx_D$ >";\r
+        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 7950, RFC 6087 and ONF TAPI UML model\r
+                  <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.1.0/UML__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_8UH3XnH$ >";\r
+    }\r
+    revision 2019-07-16 {\r
+        description "ONF Transport API version 2.1.2.\r
+                   Changes included in this TAPI release (v2.1.2) are listed in\r
+                   <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/TAPI/blob/develop_v2_1/CHANGE_LOG/change-log.2.1.2.md__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_0xFu4bN$ >";\r
+        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 7950, RFC 6087 and ONF TAPI UML model\r
+                  <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.1.0/UML__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_8UH3XnH$ >";\r
+    }\r
+    revision 2018-12-10 {\r
+        description "ONF Transport API version 2.1.1.\r
+                   Changes included in this TAPI release (v2.1.1) are listed in\r
+                   <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.1.1.md__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur__2p0od1$ >";\r
+        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 7950, RFC 6087 and ONF TAPI UML model\r
+                  <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.1.0/UML__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_8UH3XnH$ >";\r
+    }\r
+    revision 2018-10-16 {\r
+        description "ONF Transport API version 2.1.0.\r
+                   Changes included in this TAPI release (v2.1.0) are listed in\r
+                   <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.1.0.md__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_4DGi8ul$ >";\r
+        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 7950, RFC 6087 and ONF TAPI UML model\r
+                  <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.1.0/UML__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_8UH3XnH$ >";\r
+    }\r
+    revision 2018-03-07 {\r
+        description "ONF Transport API version 2.0.2\r
+        This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool.\r
+        Changes in this revision: <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.0.2.md__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_8KlxwJZ$ >";\r
+        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model\r
+                  <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.0.2/UML__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_-hMD5Xl$ >";\r
+    }\r
+    revision 2018-02-16 {\r
+        description "ONF Transport API version 2.0.1\r
+        This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool.\r
+        Changes in this revision: <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.0.1.md__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur__C1vuym$ >";\r
+        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model\r
+                  <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.0.1/UML__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_5DYNwzZ$ >";\r
+    }\r
+    revision 2018-01-02 {\r
+        description "ONF Transport API version 2.0.0\r
+        This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool.\r
+        Changes in this revision: <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.0.0.md__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_1xZSBRA$ >";\r
+        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model\r
+                  <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.0.0/UML__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_xt-GtqY$ >";\r
+    }\r
+    augment "/tapi-common:context" {\r
+        container connectivity-context {\r
+            uses connectivity-context;\r
+            description "Augments the base TAPI Context with ConnectivityService information";\r
+        }\r
+        description "Augments the base TAPI Context with ConnectivityService information";\r
+    }\r
+    augment "/tapi-common:context/tapi-topology:topology-context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point" {\r
+        container cep-list {\r
+            uses cep-list;\r
+            description "none";\r
+        }\r
+        description "none";\r
+    }\r
+   /**************************\r
+    * definitions of references\r
+    **************************/\r
+    grouping connectivity-service-ref {\r
+        leaf connectivity-service-uuid {\r
+            type leafref {\r
+                path '/tapi-common:context/tapi-connectivity:connectivity-context/tapi-connectivity:connectivity-service/tapi-connectivity:uuid';\r
+            }\r
+            description "none";\r
+        }\r
+        description "none";\r
+    }\r
+    grouping connectivity-service-end-point-ref {\r
+        uses connectivity-service-ref;\r
+        leaf connectivity-service-end-point-local-id {\r
+            type leafref {\r
+                path '/tapi-common:context/tapi-connectivity:connectivity-context/tapi-connectivity:connectivity-service/tapi-connectivity:end-point/tapi-connectivity:local-id';\r
+            }\r
+            description "none";\r
+        }\r
+        description "none";\r
+    }\r
+    grouping connection-end-point-ref {\r
+        uses tapi-topology:node-edge-point-ref;\r
+        leaf connection-end-point-uuid {\r
+            type leafref {\r
+                path '/tapi-common:context/tapi-topology:topology-context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point/tapi-connectivity:cep-list/tapi-connectivity:connection-end-point/tapi-connectivity:uuid';\r
+            }\r
+            description "none";\r
+        }\r
+        description "none";\r
+    }\r
+    grouping connection-ref {\r
+        leaf connection-uuid {\r
+            type leafref {\r
+                path '/tapi-common:context/tapi-connectivity:connectivity-context/tapi-connectivity:connection/tapi-connectivity:uuid';\r
+            }\r
+            description "none";\r
+        }\r
+        description "none";\r
+    }\r
+    grouping switch-control-ref {\r
+        uses connection-ref;\r
+        leaf switch-control-uuid {\r
+            type leafref {\r
+                path '/tapi-common:context/tapi-connectivity:connectivity-context/tapi-connectivity:connection/tapi-connectivity:switch-control/tapi-connectivity:uuid';\r
+            }\r
+            description "none";\r
+        }\r
+        description "none";\r
+    }\r
+    grouping route-ref {\r
+        uses connection-ref;\r
+        leaf route-local-id {\r
+            type leafref {\r
+                path '/tapi-common:context/tapi-connectivity:connectivity-context/tapi-connectivity:connection/tapi-connectivity:route/tapi-connectivity:local-id';\r
+            }\r
+            description "none";\r
+        }\r
+        description "none";\r
+    }\r
+\r
+   /**************************\r
+    * package object-classes\r
+    **************************/ \r
+    grouping connection {\r
+        list connection-end-point {\r
+            uses connection-end-point-ref;\r
+            key 'topology-uuid node-uuid node-edge-point-uuid connection-end-point-uuid';\r
+            config false;\r
+            min-elements 2;\r
+            description "none";\r
+        }\r
+        list lower-connection {\r
+            uses connection-ref;\r
+            key 'connection-uuid';\r
+            config false;\r
+            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).\r
+                Aggregation is used as for the Node/Topology  to allow changes in hierarchy. \r
+                Connection aggregation reflects Node/Topology aggregation. \r
+                The FC represents a Cross-Connection in an NE. The Cross-Connection in an NE is not necessarily the lowest level of FC partitioning.";\r
+        }\r
+        list supported-client-link {\r
+            uses tapi-topology:link-ref;\r
+            key 'topology-uuid link-uuid';\r
+            config false;\r
+            description "none";\r
+        }\r
+        list route {\r
+            key 'local-id';\r
+            config false;\r
+            uses route;\r
+            description "none";\r
+        }\r
+        list switch-control {\r
+            key 'uuid';\r
+            config false;\r
+            uses switch-control;\r
+            description "none";\r
+        }\r
+        leaf direction {\r
+            type tapi-common:forwarding-direction;\r
+            config false;\r
+            description "none";\r
+        }\r
+        leaf layer-protocol-name {\r
+            type tapi-common:layer-protocol-name;\r
+            config false;\r
+            description "none";\r
+        }\r
+        container connection-spec-reference {\r
+            config false;\r
+            uses connection-spec-reference;\r
+            description "Provides the reference to the spec that defines the connection type and cepRoles.";\r
+        }\r
+        uses tapi-common:resource-spec;\r
+        uses tapi-common:operational-state-pac;\r
+        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.\r
+            At the lowest level of recursion, a FC represents a cross-connection within an NE.";\r
+    }\r
+    grouping connection-end-point {\r
+        leaf layer-protocol-name {\r
+            type tapi-common:layer-protocol-name;\r
+            config false;\r
+            description "none";\r
+        }\r
+        leaf layer-protocol-qualifier {\r
+            type tapi-common:layer-protocol-qualifier;\r
+            config false;\r
+            description "none";\r
+        }\r
+        container parent-node-edge-point {\r
+            uses tapi-topology:node-edge-point-ref;\r
+            config false;\r
+            description "none";\r
+        }\r
+        list client-node-edge-point {\r
+            uses tapi-topology:node-edge-point-ref;\r
+            key 'topology-uuid node-uuid node-edge-point-uuid';\r
+            config false;\r
+            description "none";\r
+        }\r
+        list aggregated-connection-end-point {\r
+            uses connection-end-point-ref;\r
+            key 'topology-uuid node-uuid node-edge-point-uuid connection-end-point-uuid';\r
+            config false;\r
+            description "none";\r
+        }\r
+        leaf connection-port-direction {\r
+            type tapi-common:port-direction;\r
+            config false;\r
+            description "The orientation of defined flow at the EndPoint.";\r
+        }\r
+        leaf connection-port-role {\r
+            type tapi-common:port-role;\r
+            config false;\r
+            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. ";\r
+        }\r
+        list cep-role {\r
+            uses cep-role;\r
+                       config false;\r
+            description "Defines the role of the CEP in the context of the connection spec.\r
+                There may be many cep role - connection spec combinations for a particular CEP where each corresponds to a specific connection associated with the CEP.";\r
+        }\r
+        uses tapi-common:resource-spec;\r
+        uses tapi-common:operational-state-pac;\r
+        uses tapi-common:termination-pac;\r
+        description "The LogicalTerminationPoint (LTP) object class encapsulates the termination and adaptation functions of one or more transport layers. \r
+            The structure of LTP supports all transport protocols including circuit and packet forms.";\r
+    }\r
+    grouping connectivity-constraint {\r
+        leaf service-layer {\r
+            type tapi-common:layer-protocol-name;\r
+            description "none";\r
+        }\r
+        leaf service-type {\r
+            type service-type;\r
+            description "none";\r
+        }\r
+        leaf service-level {\r
+            type string;\r
+            description "An abstract value the meaning of which is mutually agreed – typically represents metrics such as - Class of service, priority, resiliency, availability";\r
+        }\r
+        container requested-capacity {\r
+            uses tapi-common:capacity;\r
+            description "none";\r
+        }\r
+        leaf connectivity-direction {\r
+            type tapi-common:forwarding-direction;\r
+            description "none";\r
+        }\r
+        container schedule {\r
+            uses tapi-common:time-range;\r
+            description "none";\r
+        }\r
+        container coroute-inclusion {\r
+            uses connectivity-service-ref;\r
+            description "none";\r
+        }\r
+        list diversity-exclusion {\r
+            uses connectivity-service-ref;\r
+            key 'connectivity-service-uuid';\r
+            description "none";\r
+        }\r
+        leaf-list connection-exclusion {\r
+            type tapi-common:uuid;\r
+            description "none";\r
+        }\r
+        leaf-list connection-inclusion {\r
+            type tapi-common:uuid;\r
+            description "A ConnectivityService may use one or more existing Connections.\r
+                A common traditional strategy is to set up “stranded” connectivity in the core of the network as “express channels” (this is essentially a serial compound link, but can be treated as simple connections)\r
+                A connection inclusion capability allows for adoption of a discovered Connections.\r
+                A ConnectivityService is requested with a connection inclusion constraint that identifies a connection (or chain of connections) that is bounded by CEPs that each belong to a NEP that references a SIP that is referenced by a CSEP of the ConnectivityService such that all CSEPs are satisfied by CEPs of the existing Connection. will allow discovered Connections with no stated intent to be associated with an intent via the ConnectivityService.";\r
+        }\r
+        description "none";\r
+    }\r
+    grouping connectivity-service {\r
+        list end-point {\r
+            key 'local-id';\r
+            min-elements 2;\r
+            uses connectivity-service-end-point;\r
+            description "none";\r
+        }\r
+        list connection {\r
+            uses connection-ref;\r
+            key 'connection-uuid';\r
+            config false;\r
+            description "none";\r
+        }\r
+        uses tapi-common:service-spec;\r
+        uses connectivity-constraint;\r
+        uses tapi-path-computation:routing-constraint;\r
+        uses tapi-path-computation:topology-constraint;\r
+        uses resilience-constraint;\r
+        uses tapi-common:admin-state-pac;\r
+        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.\r
+            At the lowest level of recursion, a FC represents a cross-connection within an NE.";\r
+    }\r
+    grouping connectivity-service-end-point {\r
+        leaf layer-protocol-name {\r
+            type tapi-common:layer-protocol-name;\r
+            description "none";\r
+        }\r
+        leaf layer-protocol-qualifier {\r
+            type tapi-common:layer-protocol-qualifier;\r
+            description "none";\r
+        }\r
+        container service-interface-point {\r
+            uses tapi-common:service-interface-point-ref;\r
+            description "none";\r
+        }\r
+        list connection-end-point {\r
+            uses connection-end-point-ref;\r
+            key 'topology-uuid node-uuid node-edge-point-uuid connection-end-point-uuid';\r
+            config false;\r
+            description "none";\r
+        }\r
+        container capacity {\r
+            uses tapi-common:capacity;\r
+            description "none";\r
+        }\r
+        leaf direction {\r
+            type tapi-common:port-direction;\r
+            description "The orientation of defined flow at the EndPoint.";\r
+        }\r
+        leaf role {\r
+            type tapi-common:port-role;\r
+            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. ";\r
+        }\r
+        leaf protection-role {\r
+            type protection-role;\r
+            description "To specify the protection role of this Port when create or update ConnectivityService.";\r
+        }\r
+        container peer-fwd-connectivity-service-end-point {\r
+            uses connectivity-service-end-point-ref;\r
+            description "none";\r
+        }\r
+        container protecting-connectivity-service-end-point {\r
+            uses connectivity-service-end-point-ref;\r
+            description "none";\r
+        }\r
+        container server-connectivity-service-end-point {\r
+            uses connectivity-service-end-point-ref;\r
+            description "none";\r
+        }\r
+        uses tapi-common:local-class;\r
+        uses tapi-common:admin-state-pac;\r
+        description "The association of the FC to LTPs is made via EndPoints.\r
+            The EndPoint (EP) object class models the access to the FC function. \r
+            The traffic forwarding between the associated EPs of the FC depends upon the type of FC and may be associated with FcSwitch object instances.  \r
+            In cases where there is resilience the EndPoint may convey the resilience role of the access to the FC. \r
+            It can represent a protected (resilient/reliable) point or a protecting (unreliable working or protection) point.\r
+            The EP replaces the Protection Unit of a traditional protection model. \r
+            The ForwadingConstruct can be considered as a component and the EndPoint as a Port on that component";\r
+    }\r
+    grouping route {\r
+        list connection-end-point {\r
+            uses connection-end-point-ref;\r
+            key 'topology-uuid node-uuid node-edge-point-uuid connection-end-point-uuid';\r
+            config false;\r
+            min-elements 2;\r
+            description "none";\r
+        }\r
+        container resilience-route-pac {\r
+            uses resilience-route;\r
+            description "Provides optional resilience and state attributes to the Route.";\r
+        }\r
+        uses tapi-common:local-class;\r
+        description "The Route of a Connection is modeled as a collection of Connection End Points.\r
+            The logical order of the Connection End Points within the Route object can be inferred by the TAPI client by the knowledge of the Topology information.";\r
+    }\r
+    grouping connectivity-context {\r
+        list connectivity-service {\r
+            key 'uuid';\r
+            uses connectivity-service;\r
+            description "none";\r
+        }\r
+        list connection {\r
+            key 'uuid';\r
+            config false;\r
+            uses connection;\r
+            description "none";\r
+        }\r
+        description "none";\r
+    }\r
+    grouping switch {\r
+        list selected-connection-end-point {\r
+            uses connection-end-point-ref;\r
+            key 'topology-uuid node-uuid node-edge-point-uuid connection-end-point-uuid';\r
+            config false;\r
+            min-elements 1;\r
+            description "none";\r
+        }\r
+        list selected-route {\r
+            uses route-ref;\r
+            key 'connection-uuid route-local-id';\r
+                       config false;\r
+            min-elements 1;\r
+            description "none";\r
+        }\r
+        leaf selection-control {\r
+            type selection-control;\r
+            description "Degree of administrative control applied to the switch selection.";\r
+        }\r
+        leaf selection-reason {\r
+            type selection-reason;\r
+            config false;\r
+            description "The reason for the current switch selection.";\r
+        }\r
+        leaf switch-direction {\r
+            type tapi-common:port-direction;\r
+            description "Indicates whether the switch selects from ingress to the FC or to egress of the FC, or both.";\r
+        }\r
+        uses tapi-common:local-class;\r
+        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). \r
+            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.\r
+            The FC switch represents and defines a protection switch structure encapsulated in the FC. \r
+            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. \r
+            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.\r
+            The switch may be used in revertive or non-revertive (symmetric) mode. When in revertive mode it may define a waitToRestore time.\r
+            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).\r
+            It may be locked out (prevented from switching), force switched or manual switched.\r
+            It will indicate switch state and change of state.\r
+            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').\r
+            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.\r
+            This ability allows multiple alternate routes to be present that otherwise would be in conflict.";\r
+    }\r
+    grouping switch-control {\r
+        list sub-switch-control {\r
+            uses switch-control-ref;\r
+            key 'connection-uuid switch-control-uuid';\r
+            config false;\r
+            description "none";\r
+        }\r
+        list switch {\r
+            key 'local-id';\r
+            uses switch;\r
+            description "none";\r
+        }\r
+        uses tapi-common:resource-spec;\r
+        uses resilience-constraint;\r
+        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.";\r
+    }\r
+    grouping resilience-constraint {\r
+        container resilience-type {\r
+            uses tapi-topology:resilience-type;\r
+            description "none";\r
+        }\r
+        leaf restoration-coordinate-type {\r
+            type coordinate-type;\r
+            description " The coordination mechanism between multi-layers.";\r
+        }\r
+        leaf restore-priority {\r
+            type uint64;\r
+            description "none";\r
+        }\r
+        leaf reversion-mode {\r
+            type reversion-mode;\r
+            description "Indcates whether the protection scheme is revertive or non-revertive.";\r
+        }\r
+        leaf wait-to-revert-time {\r
+            type uint64;\r
+            default "15";\r
+            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.";\r
+        }\r
+        leaf hold-off-time {\r
+            type uint64;\r
+            description "This attribute indicates the time, in milliseconds, between declaration of signal degrade or signal fail, and the initialization of the protection switching algorithm.";\r
+        }\r
+        leaf is-lock-out {\r
+            type boolean;\r
+            description "The resource is configured to temporarily not be available for use in the protection scheme(s) it is part of.\r
+                This overrides all other protection control states including forced.\r
+                If the item is locked out then it cannot be used under any circumstances.\r
+                Note: Only relevant when part of a protection scheme.";\r
+        }\r
+        leaf is-frozen {\r
+            type boolean;\r
+            description "Temporarily prevents any switch action to be taken and, as such, freezes the current state. \r
+                Until the freeze is cleared, additional near-end external commands are rejected and fault condition changes and received APS messages are ignored.\r
+                All administrative controls of any aspect of protection are rejected.";\r
+        }\r
+        leaf is-coordinated-switching-both-ends {\r
+            type boolean;\r
+            description "Is operating such that switching at both ends of each flow acorss the FC is coordinated at both ingress and egress ends.";\r
+        }\r
+        leaf max-switch-times {\r
+            type uint64;\r
+            description "Used to limit the maximum swtich times. When work fault disappears , and traffic return to the original work path, switch counter reset.";\r
+        }\r
+        leaf-list preferred-restoration-layer {\r
+            type tapi-common:layer-protocol-name;\r
+            description "Indicate which layer this resilience parameters package configured for.";\r
+        }\r
+        description "A list of control parameters to apply to a switch.";\r
+    }\r
+    grouping cep-list {\r
+        list connection-end-point {\r
+            key 'uuid';\r
+            uses connection-end-point;\r
+            description "none";\r
+        }\r
+        description "none";\r
+    }\r
+    grouping resilience-route {\r
+        leaf priority {\r
+            type uint64;\r
+            config false;\r
+            description "Value of 0 (zero) means 'unspecified priority'.\r
+                Highest priority is 1, sometimes referred as 'preferred' or 'main' or 'intended' route.\r
+                2 has lower priority than 1, 3 has lower priority than 2, etc.";\r
+        }\r
+        leaf route-state {\r
+            type route-state;\r
+            config false;\r
+            description "Current information on the route selection.";\r
+        }\r
+        uses tapi-common:local-class;\r
+        description "This object adds resilience and state attributes to the Route.\r
+            When this object is not present, then the Route is intendend as 'current' Route of the Connection.";\r
+    }\r
+\r
+    /**************************\r
+    * package type-definitions\r
+    **************************/ \r
+    identity ROUTE_STATE {\r
+        description "none";\r
+    }\r
+    identity ROUTE_STATE_CURRENT {\r
+        base ROUTE_STATE;\r
+        description "The route identified is the current route, i.e., is the one that is active and selected to support service.\r
+            ";\r
+    }\r
+    identity ROUTE_STATE_NOT_CURRENT {\r
+        base ROUTE_STATE;\r
+        description "The route is not the one supporting the service.";\r
+    }\r
+    identity ROUTE_STATE_UNKNOWN {\r
+        base ROUTE_STATE;\r
+        description "The route state is unknown.";\r
+    }\r
+    typedef service-type {\r
+        type enumeration {\r
+            enum POINT_TO_POINT_CONNECTIVITY {\r
+                description "none";\r
+            }\r
+            enum POINT_TO_MULTIPOINT_CONNECTIVITY {\r
+                description "none";\r
+            }\r
+            enum MULTIPOINT_CONNECTIVITY {\r
+                description "none";\r
+            }\r
+            enum ROOTED_MULTIPOINT_CONNECTIVITY {\r
+                description "none";\r
+            }\r
+        }\r
+        description "none";\r
+    }\r
+    typedef reversion-mode {\r
+        type enumeration {\r
+            enum REVERTIVE {\r
+                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).";\r
+            }\r
+            enum NON-REVERTIVE {\r
+                description "An FC switched to a lower priority (non-preferred) resource will not revert to a higher priority (preferred) resource when that recovers.";\r
+            }\r
+        }\r
+        description "The reversion mode associated with protection.";\r
+    }\r
+    typedef selection-control {\r
+        type enumeration {\r
+            enum LOCK_OUT {\r
+                description "The resource is configured to temporarily not be available for use in the protection scheme(s) it is part of.\r
+                    This overrides all other protection control states including forced.\r
+                    If the item is locked out then it cannot be used under any circumstances.\r
+                    Note: Only relevant when part of a protection scheme.";\r
+            }\r
+            enum NORMAL {\r
+                description "none";\r
+            }\r
+            enum MANUAL {\r
+                description "none";\r
+            }\r
+            enum FORCED {\r
+                description "none";\r
+            }\r
+        }\r
+        description "Possible degrees of administrative control applied to the Route selection.";\r
+    }\r
+    typedef selection-reason {\r
+        type enumeration {\r
+            enum LOCKOUT {\r
+                description "none";\r
+            }\r
+            enum NORMAL {\r
+                description "none";\r
+            }\r
+            enum MANUAL {\r
+                description "none";\r
+            }\r
+            enum FORCED {\r
+                description "none";\r
+            }\r
+            enum WAIT_TO_REVERT {\r
+                description "none";\r
+            }\r
+            enum SIGNAL_DEGRADE {\r
+                description "none";\r
+            }\r
+            enum SIGNAL_FAIL {\r
+                description "none";\r
+            }\r
+        }\r
+        description "The cause of the current route selection.";\r
+    }\r
+    typedef coordinate-type {\r
+        type enumeration {\r
+            enum NO_COORDINATE {\r
+                description "none";\r
+            }\r
+            enum HOLD_OFF_TIME {\r
+                description "none";\r
+            }\r
+            enum WAIT_FOR_NOTIFICATION {\r
+                description "none";\r
+            }\r
+        }\r
+        description "none";\r
+    }\r
+    typedef protection-role {\r
+        type enumeration {\r
+            enum WORK {\r
+                description "none";\r
+            }\r
+            enum PROTECT {\r
+                description "none";\r
+            }\r
+            enum PROTECTED {\r
+                description "none";\r
+            }\r
+            enum NA {\r
+                description "none";\r
+            }\r
+            enum WORK_RESTORE {\r
+                description "none";\r
+            }\r
+            enum PROTECT_RESTORE {\r
+                description "none";\r
+            }\r
+        }\r
+        description "none";\r
+    }\r
+    grouping cep-role {\r
+        leaf role-name {\r
+            type string;\r
+            description "The name of the cep role in the context of the referenced spec.";\r
+        }\r
+        container connection-spec-reference {\r
+            config false;\r
+            uses connection-spec-reference;\r
+            description "The reference to the spec that defines the cep role.";\r
+        }\r
+        description "The role of the cep in the context of the connection spec.";\r
+    }\r
+    grouping connection-spec-reference {\r
+        leaf connection-spec-id {\r
+            type tapi-common:uuid;\r
+            config false;\r
+            description "The reference to a formal spec. \r
+                This reference need not be provided (e.g., where there is no formal machine interpretable spec for the type of connection).";\r
+        }\r
+        leaf connection-spec-name {\r
+            type string;\r
+            config false;\r
+            description "The name of the connection spec.\r
+                This can be used alone (with no spec reference) where there is only a paper spec.";\r
+        }\r
+        description "The reference to a spec for a type of connection.";\r
+    }\r
+    typedef route-state {\r
+        type identityref {\r
+            base ROUTE_STATE;\r
+        }\r
+        description "Potential route states.";\r
+    }\r
+\r
+    /**************************\r
+    * package interfaces\r
+    **************************/ \r
+    rpc get-connection-details {\r
+        description "none";\r
+        input {\r
+            leaf connection-id-or-name {\r
+                type string;\r
+                description "none";\r
+            }\r
+        }\r
+        output {\r
+            container connection {\r
+                uses connection;\r
+                description "none";\r
+            }\r
+        }\r
+    }\r
+    rpc get-connectivity-service-list {\r
+        description "none";\r
+        output {\r
+            list service {\r
+                key 'uuid';\r
+                uses connectivity-service;\r
+                description "none";\r
+            }\r
+        }\r
+    }\r
+    rpc get-connectivity-service-details {\r
+        description "none";\r
+        input {\r
+            leaf service-id-or-name {\r
+                type string;\r
+                description "none";\r
+            }\r
+        }\r
+        output {\r
+            container service {\r
+                uses connectivity-service;\r
+                description "none";\r
+            }\r
+        }\r
+    }\r
+    rpc create-connectivity-service {\r
+        description "none";\r
+        input {\r
+            list end-point {\r
+                key 'local-id';\r
+                min-elements 2;\r
+                uses connectivity-service-end-point;\r
+                description "none";\r
+            }\r
+            container connectivity-constraint {\r
+                uses connectivity-constraint;\r
+                description "none";\r
+            }\r
+            container routing-constraint {\r
+                uses tapi-path-computation:routing-constraint;\r
+                description "none";\r
+            }\r
+            container topology-constraint {\r
+                uses tapi-path-computation:topology-constraint;\r
+                description "none";\r
+            }\r
+            container resilience-constraint {\r
+                uses resilience-constraint;\r
+                description "none";\r
+            }\r
+            leaf state {\r
+                type string;\r
+                description "none";\r
+            }\r
+        }\r
+        output {\r
+            container service {\r
+                uses connectivity-service;\r
+                description "none";\r
+            }\r
+        }\r
+    }\r
+    rpc update-connectivity-service {\r
+        description "none";\r
+        input {\r
+            leaf service-id-or-name {\r
+                type string;\r
+                description "none";\r
+            }\r
+            list end-point {\r
+                key 'local-id';\r
+                uses connectivity-service-end-point;\r
+                description "none";\r
+            }\r
+            container connectivity-constraint {\r
+                uses connectivity-constraint;\r
+                description "none";\r
+            }\r
+            container routing-constraint {\r
+                uses tapi-path-computation:routing-constraint;\r
+                description "none";\r
+            }\r
+            container topology-constraint {\r
+                uses tapi-path-computation:topology-constraint;\r
+                description "none";\r
+            }\r
+            container resilience-constraint {\r
+                uses resilience-constraint;\r
+                description "none";\r
+            }\r
+            leaf state {\r
+                type string;\r
+                description "none";\r
+            }\r
+        }\r
+        output {\r
+            container service {\r
+                uses connectivity-service;\r
+                description "none";\r
+            }\r
+        }\r
+    }\r
+    rpc delete-connectivity-service {\r
+        description "none";\r
+        input {\r
+            leaf service-id-or-name {\r
+                type string;\r
+                description "none";\r
+            }\r
+        }\r
+    }\r
+    rpc get-connection-end-point-details {\r
+        description "none";\r
+        input {\r
+            leaf topology-id-or-name {\r
+                type string;\r
+                description "none";\r
+            }\r
+            leaf node-id-or-name {\r
+                type string;\r
+                description "none";\r
+            }\r
+            leaf nep-id-or-name {\r
+                type string;\r
+                description "none";\r
+            }\r
+            leaf cep-id-or-name {\r
+                type string;\r
+                description "none";\r
+            }\r
+        }\r
+        output {\r
+            container connection-end-point {\r
+                uses connection-end-point;\r
+                description "none";\r
+            }\r
+        }\r
+    }\r
+\r
+}\r