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-odu@2017-05-31.yang b/models/tapi/src/main/yang/tapi-odu@2017-05-31.yang
index 2d5496b..00a5bc9 100644
--- a/models/tapi/src/main/yang/tapi-odu@2017-05-31.yang
+++ b/models/tapi/src/main/yang/tapi-odu@2017-05-31.yang
@@ -75,25 +75,10 @@
                 It is present only if the CEP contains a TTP";

         }

         grouping odu-connection-end-point-spec {

-            container odu-common {

-                uses odu-common-pac;

-                description "none";

-            }

-            container odu-term-and-adapter {

-                config false;

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

-                description "none";

-            }

-            container odu-ctp {

-                config false;

-                uses odu-ctp-pac;

-                description "none";

-            }

-            container odu-protection {

-                config false;

-                uses odu-protection-pac;

-                description "none";

-            }

+            uses tapi-odu:odu-common-pac;

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

+            uses tapi-odu:odu-ctp-pac;

+            uses tapi-odu:odu-protection-pac;

             description "none";

         }

         grouping odu-pool-pac {

@@ -114,11 +99,7 @@
             description "none";

         }

         grouping odu-node-edge-point-spec {

-            container odu-pool {

-                config false;

-                uses odu-pool-pac;

-                description "none";

-            }

+            uses tapi-odu:odu-pool-pac;

             description "none";

         }

         grouping odu-ctp-pac {

@@ -151,28 +132,11 @@
                 It is present only if the CEP contains a CTP";

         }

         grouping odu-mep-spec {

-            container odu-mep {

-                uses odu-mep-pac;

-                description "none";

-            }

-            container odu-ncm {

-                config false;

-                uses odu-ncm-pac;

-                description "none";

-            }

-            container odu-tcm {

-                config false;

-                uses odu-tcm-mep-pac;

-                description "none";

-            }

-            container odu-defect {

-                uses odu-defect-pac;

-                description "none";

-            }

-            container odu-pm {

-                uses odu-pm-pac;

-                description "none";

-            }

+            uses tapi-odu:odu-mep-pac;

+            uses tapi-odu:odu-ncm-pac;

+            uses tapi-odu:odu-tcm-mep-pac;

+            uses tapi-odu:odu-defect-pac;

+            uses tapi-odu:odu-pm-pac;

             description "none";

         }

         grouping odu-protection-pac {

@@ -231,29 +195,11 @@
             description "none";

         }

         grouping odu-mip-spec {

-            container odu-mip {

-                config false;

-                uses odu-mip-pac;

-                description "none";

-            }

-            container odu-ncm {

-                config false;

-                uses odu-ncm-pac;

-                description "none";

-            }

-            container odu-tcm {

-                config false;

-                uses odu-tcm-mip-pac;

-                description "none";

-            }

-            container odu-pm {

-                uses odu-pm-pac;

-                description "none";

-            }

-            container odu-defect {

-                uses odu-defect-pac;

-                description "none";

-            }

+            uses tapi-odu:odu-mip-pac;

+            uses tapi-odu:odu-ncm-pac;

+            uses tapi-odu:odu-tcm-mip-pac;

+            uses tapi-odu:odu-pm-pac;

+            uses tapi-odu:odu-defect-pac;

             description "none";

         }

         grouping odu-mip-pac {

@@ -403,136 +349,30 @@
     /***********************

     * package type-definitions

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

-        identity deg-thr-type {

-            description "none";

-        }

-        identity percentage {

-            base deg-thr-type;

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

-        }

-        identity number-errored-blocks {

-            base deg-thr-type;

-            description "Number of % or blocks";

-        }

-        identity tcm-status {

-            description "none";

-        }

-        identity no-source-tc {

-            base tcm-status;

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

-        }

-        identity in-use-without-iae {

-            base tcm-status;

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

-        }

-        identity in-use-with-iae {

-            base tcm-status;

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

-        }

-        identity reserved-1 {

-            base tcm-status;

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

-        }

-        identity reserved-2 {

-            base tcm-status;

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

-        }

-        identity lck {

-            base tcm-status;

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

-        }

-        identity oci {

-            base tcm-status;

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

-        }

-        identity ais {

-            base tcm-status;

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

-        }

-        identity tcm-mode {

-            description "none";

-        }

-        identity operational {

-            base tcm-mode;

-            description "none";

-        }

-        identity transparent {

-            base tcm-mode;

-            description "none";

-        }

-        identity monitor {

-            base tcm-mode;

-            description "none";

-        }

-        identity tcm-monitoring {

-            description "none";

-        }

-        identity intrusive {

-            base tcm-monitoring;

-            description "none";

-        }

-        identity non-intrusive {

-            base tcm-monitoring;

-            description "none";

-        }

-        identity tcm-extension {

-            description "none";

-        }

-        identity normal {

-            base tcm-extension;

-            description "none";

-        }

-        identity pass-through {

-            base tcm-extension;

-            description "none";

-        }

-        identity erase {

-            base tcm-extension;

-            description "none";

-        }

-        identity percentage-granularity {

-            description "none";

-        }

-        identity ones {

-            base percentage-granularity;

-            description "none";

-        }

-        identity one-tenths {

-            base percentage-granularity;

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

-        }

-        identity one-hundredths {

-            base percentage-granularity;

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

-        }

-        identity one-thousandths {

-            base percentage-granularity;

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

-        }

         typedef odu-type {

             type enumeration {

-                enum odu-0 {

+                enum ODU0 {

                     description "none";

                 }

-                enum odu-1 {

+                enum ODU1 {

                     description "none";

                 }

-                enum odu-2 {

+                enum ODU2 {

                     description "none";

                 }

-                enum odu-2-e {

+                enum ODU2E {

                     description "none";

                 }

-                enum odu-3 {

+                enum ODU3 {

                     description "none";

                 }

-                enum odu-4 {

+                enum ODU4 {

                     description "none";

                 }

-                enum odu-flex {

+                enum ODU_FLEX {

                     description "none";

                 }

-                enum odu-cn {

+                enum ODU_CN {

                     description "none";

                 }

             }

@@ -540,22 +380,22 @@
         }

         typedef mapping-type {

             type enumeration {

-                enum amp {

+                enum AMP {

                     description "none";

                 }

-                enum bmp {

+                enum BMP {

                     description "none";

                 }

-                enum gfp-f {

+                enum GFP-F {

                     description "none";

                 }

-                enum gmp {

+                enum GMP {

                     description "none";

                 }

-                enum ttp-gfp-bmp {

+                enum TTP_GFP_BMP {

                     description "none";

                 }

-                enum null {

+                enum NULL {

                     description "none";

                 }

             }

@@ -563,16 +403,16 @@
         }

         typedef tim-det-mo {

             type enumeration {

-                enum dapi {

+                enum DAPI {

                     description "none";

                 }

-                enum sapi {

+                enum SAPI {

                     description "none";

                 }

-                enum both {

+                enum BOTH {

                     description "none";

                 }

-                enum off {

+                enum OFF {

                     description "none";

                 }

             }

@@ -580,10 +420,10 @@
         }

         typedef odu-slot-size {

             type enumeration {

-                enum 1-g-25 {

+                enum 1G25 {

                     description "none";

                 }

-                enum 2-g-5 {

+                enum 2G5 {

                     description "none";

                 }

             }

@@ -602,10 +442,10 @@
         }

         typedef odu-named-payload-type {

             type enumeration {

-                enum unknown {

+                enum UNKNOWN {

                     description "none";

                 }

-                enum uninterpretable {

+                enum UNINTERPRETABLE {

                     description "none";

                 }

             }

@@ -633,38 +473,98 @@
                 Number of Errored Blocks is captured in an integer value.";

         }

         typedef deg-thr-type {

-            type identityref {

-                base deg-thr-type;

+            type enumeration {

+                enum PERCENTAGE {

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

+                }

+                enum NUMBER_ERRORED_BLOCKS {

+                    description "Number of % or blocks";

+                }

             }

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

         }

         typedef tcm-status {

-            type identityref {

-                base tcm-status;

+            type enumeration {

+                enum NO_SOURCE_TC {

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

+                }

+                enum IN_USE_WITHOUT_IAE {

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

+                }

+                enum IN_USE_WITH_IAE {

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

+                }

+                enum RESERVED_1 {

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

+                }

+                enum RESERVED_2 {

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

+                }

+                enum LCK {

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

+                }

+                enum OCI {

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

+                }

+                enum AIS {

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

+                }

             }

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

         }

         typedef tcm-mode {

-            type identityref {

-                base tcm-mode;

+            type enumeration {

+                enum OPERATIONAL {

+                    description "none";

+                }

+                enum TRANSPARENT {

+                    description "none";

+                }

+                enum MONITOR {

+                    description "none";

+                }

             }

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

         }

         typedef tcm-monitoring {

-            type identityref {

-                base tcm-monitoring;

+            type enumeration {

+                enum INTRUSIVE {

+                    description "none";

+                }

+                enum NON-INTRUSIVE {

+                    description "none";

+                }

             }

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

         }

         typedef tcm-extension {

-            type identityref {

-                base tcm-extension;

+            type enumeration {

+                enum NORMAL {

+                    description "none";

+                }

+                enum PASS-THROUGH {

+                    description "none";

+                }

+                enum ERASE {

+                    description "none";

+                }

             }

             description "none";

         }

         typedef percentage-granularity {

-            type identityref {

-                base percentage-granularity;

+            type enumeration {

+                enum ONES {

+                    description "none";

+                }

+                enum ONE_TENTHS {

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

+                }

+                enum ONE_HUNDREDTHS {

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

+                }

+                enum ONE_THOUSANDTHS {

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

+                }

             }

             description "none";

         }