ONOS-7419 Compare and update TAPI yang currently in ONOS with TAPI 2.0 release

Change-Id: I009d4b9da4eea359a4ce164fd425769f68743c6b
diff --git a/models/tapi/src/main/yang/tapi-otsi@2017-05-31.yang b/models/tapi/src/main/yang/tapi-otsi@2017-05-31.yang
index 13c95c8..861daff 100644
--- a/models/tapi/src/main/yang/tapi-otsi@2017-05-31.yang
+++ b/models/tapi/src/main/yang/tapi-otsi@2017-05-31.yang
@@ -36,45 +36,35 @@
             description "none";

         }

         grouping otsi-connection-end-point-spec {

-            container otsi-adapter {

-                config false;

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

-                description "none";

-            }

-            list otsi-termination {

-                config false;

-                uses otsi-termination-pac;

-                description "none";

-            }

-            container otsi-ctp {

-                config false;

-                uses otsi-g-ctp-pac;

-                description "none";

-            }

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

+            uses tapi-otsi:otsi-termination-pac;

+            uses tapi-otsi:otsi-g-ctp-pac;

             description "none";

         }

         grouping otsi-termination-pac {

-            container selected-nominal-central-frequency {

+            list selected-nominal-central-frequency {

+                config false;

                 uses nominal-central-frequency-or-wavelength;

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

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

                     ";

             }

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

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

                 config false;

                 uses nominal-central-frequency-or-wavelength;

                 description "none";

             }

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

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

                 config false;

                 uses nominal-central-frequency-or-wavelength;

                 description "none";

             }

-            container selected-application-identifier {

+            list selected-application-identifier {

+                config false;

                 uses application-identifier;

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

             }

-            container supportable-application-identifier {

+            list supportable-application-identifier {

                 config false;

                 uses application-identifier;

                 description "none";

@@ -95,11 +85,7 @@
             description "none";

         }

         grouping otsi-node-edge-point-spec {

-            container otsi-pool {

-                config false;

-                uses otsi-a-pool-pac;

-                description "none";

-            }

+            uses tapi-otsi:otsi-a-pool-pac;

             description "none";

         }

         grouping otsi-routing-spec {

@@ -111,6 +97,7 @@
         }

         grouping otsi-g-ctp-pac {

             list selected-frequency-slot {

+                config false;

                 uses frequency-slot;

                 description "none";

             }

@@ -123,81 +110,6 @@
     /***********************

     * package type-definitions

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

-        identity application-identifier-type {

-            description "none";

-        }

-        identity proprietary {

-            base application-identifier-type;

-            description "none";

-        }

-        identity itut-g-959-1 {

-            base application-identifier-type;

-            description "none";

-        }

-        identity itut-g-698-1 {

-            base application-identifier-type;

-            description "none";

-        }

-        identity itut-g-698-2 {

-            base application-identifier-type;

-            description "none";

-        }

-        identity itut-g-696-1 {

-            base application-identifier-type;

-            description "none";

-        }

-        identity itut-g-695 {

-            base application-identifier-type;

-            description "none";

-        }

-        identity grid-type {

-            description "none";

-        }

-        identity dwdm {

-            base grid-type;

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

-                ";

-        }

-        identity cwdm {

-            base grid-type;

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

-        }

-        identity flex {

-            base grid-type;

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

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

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

-                - and a slot width defined by:

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

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

-        }

-        identity unspecified {

-            base grid-type;

-            description "Unspecified/proprietary frequency grid";

-        }

-        identity adjustment-granularity {

-            description "none";

-        }

-        identity g-100-ghz {

-            base adjustment-granularity;

-            description "0.1 THz";

-        }

-        identity g-50-ghz {

-            base adjustment-granularity;

-            description "0.05 THz";

-        }

-        identity g-25-ghz {

-            base adjustment-granularity;

-            description "0.025 THz";

-        }

-        identity g-12-5-ghz {

-            base adjustment-granularity;

-            description "0.0125 THz";

-        }

-        identity g-6-25-ghz {

-            base adjustment-granularity;

-            description "0.00625 THz";

-        }

         grouping application-identifier {

             leaf application-identifier-type {

                 type application-identifier-type;

@@ -231,39 +143,87 @@
         }

         typedef optical-routing-strategy {

             type enumeration {

-                enum optimal-osnr {

+                enum OPTIMAL_OSNR {

                     description "none";

                 }

-                enum no-relay {

+                enum NO_RELAY {

                     description "none";

                 }

-                enum min-relay {

+                enum MIN_RELAY {

                     description "none";

                 }

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

+                enum PREFERRED_NO_CHANGE_WAVELENGTH_AS_RESTORE {

                     description "none";

                 }

-                enum preferred-no-skipping-wavelength {

+                enum PREFERRED_NO_SKIPPING_WAVELENGTH {

                     description "none";

                 }

             }

             description "none";

         }

         typedef application-identifier-type {

-            type identityref {

-                base application-identifier-type;

+            type enumeration {

+                enum PROPRIETARY {

+                    description "none";

+                }

+                enum ITUT_G959_1 {

+                    description "none";

+                }

+                enum ITUT_G698_1 {

+                    description "none";

+                }

+                enum ITUT_G698_2 {

+                    description "none";

+                }

+                enum ITUT_G696_1 {

+                    description "none";

+                }

+                enum ITUT_G695 {

+                    description "none";

+                }

             }

             description "none";

         }

         typedef grid-type {

-            type identityref {

-                base grid-type;

+            type enumeration {

+                enum DWDM {

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

+                        ";

+                }

+                enum CWDM {

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

+                }

+                enum FLEX {

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

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

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

+                        - and a slot width defined by:

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

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

+                }

+                enum UNSPECIFIED {

+                    description "Unspecified/proprietary frequency grid";

+                }

             }

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

         }

         typedef adjustment-granularity {

-            type identityref {

-                base adjustment-granularity;

+            type enumeration {

+                enum G_100GHZ {

+                    description "0.1 THz";

+                }

+                enum G_50GHZ {

+                    description "0.05 THz";

+                }

+                enum G_25GHZ {

+                    description "0.025 THz";

+                }

+                enum G_12_5GHZ {

+                    description "0.0125 THz";

+                }

+                enum G_6_25GHZ {

+                    description "0.00625 THz";

+                }

             }

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

         }