Merge dev/fluorine work across to master
[unimgr.git] / nrp-api / src / main / yang / tapi-common@2018-03-07.yang
similarity index 80%
rename from nrp-api/src/main/yang/tapi-common.yang
rename to nrp-api/src/main/yang/tapi-common@2018-03-07.yang
index 846228fed777547079d3d31031e96a944d7d1a16..d5ffb25d7b44ee952496c89048be7b5fc26aac85 100644 (file)
@@ -1,16 +1,38 @@
 module tapi-common {
-    namespace "urn:onf:params:xml:ns:yang:tapi-common";
+    namespace "urn:onf:otcc:yang:tapi-common";
     prefix tapi-common;
-    organization "ONF (Open Networking Foundation) IMP Working Group";
-    contact "WG Web: <https://www.open{[]}networking.org/technical-communities/areas/services/> 
- WG List: mailto: <wg list name>@opennetworking.org>, 
-.WG Chair: your-WG-chair<mailto:your-WG-chair@example.com> 
-Editor: your-name<mailto:your-email@example.com>";
-    description "none";
-    revision 2017-11-13 {
-        description "TAPI SDK 2.0-alpha";
-        reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020 and RFC 6087";
+    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
+                <mailto:karthik.sethuraman@necam.com>";
+    description "
+        This module contains TAPI Common Model definitions.
+        Source: TapiCommon.uml
+        Copyright (c) 2018 Open Networking Foundation (ONF). All rights reserved.
+        License: This module is distributed under the Apache License 2.0
+        ";
+    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
     **********************/ 
@@ -46,27 +68,6 @@ Editor: your-name<mailto:your-email@example.com>";
             }
             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;
@@ -101,13 +102,13 @@ Editor: your-name<mailto:your-email@example.com>";
             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 {
-            uses context-attrs;
+            uses tapi-context;
+            presence "Root container for all TAPI interaction";
             description "none";
         }
-        grouping context-attrs {
+        grouping tapi-context {
             list service-interface-point {
                 key 'uuid';
-                
                 uses service-interface-point;
                 description "none";
             }
@@ -123,21 +124,15 @@ Editor: your-name<mailto:your-email@example.com>";
             description "none";
         }
         grouping service-interface-point {
-            list layer-protocol {
-                key 'local-id';
+            leaf-list layer-protocol-name {
+                type layer-protocol-name;
+                config false;
                 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";
+                description "Usage of layerProtocolName [>1]  in the ServiceInterfacePoint should be considered experimental";
             }
             uses resource-spec;
+            uses admin-state-pac;
+            uses capacity-pac;
             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.";
         }
@@ -159,48 +154,28 @@ Editor: your-name<mailto:your-email@example.com>";
                 Represents the capacity available to user (client) along with client interaction and usage. 
                 A TopologicalEntity may reflect one or more client protocols and one or more members for each profile.";
         }
+        grouping termination-pac {
+            leaf termination-direction {
+                type termination-direction;
+                config false;
+                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;
+                config false;
+                description "Indicates whether the layer is terminated and if so how.";
+            }
+            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. ";
+        }
 
     /***********************
     * package type-definitions
     **********************/ 
-        identity layer-protocol-name {
-            description "none";
-        }
-        identity OCH {
-            base layer-protocol-name;
-            description "none";
-        }
-        identity ODU {
-            base layer-protocol-name;
-            description "none";
-        }
-        identity ETH {
-            base layer-protocol-name;
-            description "none";
-        }
-        identity MPLS_TP {
-            base layer-protocol-name;
-            description "none";
-        }
-        identity capacity-unit {
-            description "none";
-        }
-        identity GBPS {
-            base capacity-unit;
-            description "none";
-        }
-        identity KBPS {
-            base capacity-unit;
-            description "none";
-        }
-        identity MBPS {
-            base capacity-unit;
-            description "none";
-        }
-        identity NOT_APPLICABLE {
-            base capacity-unit;
-            description "none";
-        }
         typedef administrative-state {
             type enumeration {
                 enum LOCKED {
@@ -263,8 +238,28 @@ Editor: your-name<mailto:your-email@example.com>";
             description "The directionality of a Forwarding entity.";
         }
         typedef layer-protocol-name {
-            type identityref {
-                base layer-protocol-name;
+            type enumeration {
+                enum OTSiA {
+                    description "Models the OTSiA layer as per ITU-T G.872 (2017) version 4";
+                }
+                enum OCH {
+                    description "Models the legacy OCH layer as per ITU-T G.872";
+                }
+                enum OTU {
+                    description "Models the OTU layer as per ITU-T G.872";
+                }
+                enum ODU {
+                    description "Models the ODU layer as per ITU-T G.872";
+                }
+                enum ETH {
+                    description "Models the ETH layer as per ITU-T G.8010";
+                }
+                enum ETY {
+                    description "Models the ETY layer as per ITU-T G.8010";
+                }
+                enum DSR {
+                    description "Models a Digital Signal of an unspecified rate. This value can be used when the intent is to respresent an generic digital layer signal without making any statement on its format or overhead (processing) capabilities.";
+                }
             }
             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.
@@ -278,7 +273,12 @@ Editor: your-name<mailto:your-email@example.com>";
                 enum PLANNED {
                     description "The resource is planned but is not present in the network.";
                 }
-                enum POTENTIAL {
+                enum POTENTIAL_AVAILABLE {
+                    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 POTENTIAL_BUSY {
                     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.";
@@ -416,8 +416,8 @@ Editor: your-name<mailto:your-email@example.com>";
         }
         grouping capacity {
             container total-size {
-                uses fixed-capacity-value;
-                description "Total capacity of the TopologicalEntity in MB/s";
+                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;
@@ -430,20 +430,20 @@ Editor: your-name<mailto:your-email@example.com>";
                 type bandwidth-profile-type;
                 description "none";
             }
-            leaf committed-information-rate {
-                type uint64;
+            container committed-information-rate {
+                uses capacity-value;
                 description "none";
             }
-            leaf committed-burst-size {
-                type uint64;
+            container committed-burst-size {
+                uses capacity-value;
                 description "none";
             }
-            leaf peak-information-rate {
-                type uint64;
+            container peak-information-rate {
+                uses capacity-value;
                 description "none";
             }
-            leaf peak-burst-size {
-                type uint64;
+            container peak-burst-size {
+                uses capacity-value;
                 description "none";
             }
             leaf color-aware {
@@ -456,7 +456,7 @@ Editor: your-name<mailto:your-email@example.com>";
             }
             description "none";
         }
-        grouping fixed-capacity-value {
+        grouping capacity-value {
             leaf value {
                 type uint64;
                 description "none";
@@ -468,16 +468,36 @@ Editor: your-name<mailto:your-email@example.com>";
             description "The Capacity (Bandwidth) values that are applicable for digital layers.";
         }
         typedef capacity-unit {
-            type identityref {
-                base capacity-unit;
+            type enumeration {
+                enum TB {
+                    description "Indicates that the integer CapacityValue is in TeraBytes";
+                }
+                enum TBPS {
+                    description "Indicates that the integer CapacityValue is in Terabit-per-second";
+                }
+                enum GB {
+                    description "Indicates that the integer CapacityValue is in GigaBytes";
+                }
+                enum GBPS {
+                    description "Indicates that the integer CapacityValue is in Gigabit-per-second";
+                }
+                enum MB {
+                    description "Indicates that the integer CapacityValue is in MegaBytes";
+                }
+                enum MBPS {
+                    description "Indicates that the integer CapacityValue is in Megabit-per-second";
+                }
+                enum KB {
+                    description "Indicates that the integer CapacityValue is in KiloBytes";
+                }
+                enum KBPS {
+                    description "Indicates that the integer CapacityValue is in Kilobit-per-second";
+                }
             }
             description "none";
         }
         typedef bandwidth-profile-type {
             type enumeration {
-                enum NOT_APPLICABLE {
-                    description "none";
-                }
                 enum MEF_10.x {
                     description "none";
                 }