VOL-172: Support configuration of  traffic descriptor profile for upstream BW allocation to ONU

 * As an operator, I should be able to configure traffic descriptor profiles for upstream BW configuration.
 * As an operator, I should be able to retrieve the configured traffic descriptor profiles.

Additional Notes:
 * xPON Handler and xPON Agent should be able to handle the traffic descriptor configuration.
 * This story does not have impact on adapters until the traffic descriptor is referenced by a TCONT
 * The traffic descriptor profiles should be saved to the database(in memory until config/restore feature is ready).
 * The impact to HA-proxy for load-balancing & distributing of workload is still TBD. As of now, it can be assumed that profiles are available to all VOLTHA instances.

VOL-173: Support configuration of TCONTs as per WT-385 and auto-allocation of alloc-ids

 * As an operator, I should be able to provision a TCONT for the ONU with an existing traffic descriptor profile
 * As an operator, I should be able to retrieve the provisioned TCONT
 * As an operator, I should be able to change the traffic descriptor profile for a TCONT

Additional Notes:

 * alloc-ids should be allocated for the TCONT
 * generic IAdapter interface to be provided that will be used by OLT and ONU adapters for TCONT/alloc-id/BW configuration
 * In the best interest of schedules/timing, in the first step(e.g. POC-3 & trial), assume the queueing model to be supported (to be detailed)  (i.e. no configuration of queueing model)
 * The concerned ONU should receive upstream grants upon provisioning of  TCONT for the ONU

VOL-174: Support configuration of GEMs as per WT-385 and auto-allocation of gemport-ids

 * As an operator, I should be able to provision a GEMPORT object for the ONU and assign to a UNI
 * As an operator, I should be able to retrieve the provisioned GEMPORT

Additional Notes:

 * gemport-ids should be auto-allocated for the GEMPORT object
 * generic IAdapter interface to be provided that will be used by OLT and ONU adapters for GEM port configuration
 * In the best interest of schedules/timing, in the first step(e.g. POC-3 & trial), assume the queueing model to be supported (to be detailed) (i.e. no configuration of queueing model)
 * The concerned OLT and ONU should be configured with the allocated gemport-ids

Change-Id: I5f4f4d61959604f0bb2565c3bbb0e4f33f4be2d3
diff --git a/tests/itests/voltha/test_voltha_xpon.py b/tests/itests/voltha/test_voltha_xpon.py
index 9136e67..2413457 100644
--- a/tests/itests/voltha/test_voltha_xpon.py
+++ b/tests/itests/voltha/test_voltha_xpon.py
@@ -180,63 +180,6 @@
             "tcont_ref": "TCont 1",
             }
         }
-    },
-    {'cg-mod': {
-        'pb2': fb.ChannelgroupConfig(),
-        'rpc': {
-            "interface": {
-                "enabled": True,
-                "name": "Manhattan",
-                "description": "Channel Group for Manhattan"
-                },
-            "data": {
-                "polling_period": 100,
-                "system_id": "000000",
-                "raman_mitigation": "RAMAN_NONE"
-                },
-            "name": "Manhattan"
-            }
-        }
-    },
-    {'gemport-del': {
-        'pb2': gemport.GemportsConfigData(),
-        'rpc': {"name": "GEMPORT 1"}}
-    },
-    {'tcont-del': {
-        'pb2': tcont.TcontsConfigData(),
-        'rpc': {"name": "TCont 1"}}
-    },
-    {'tdp-del': {
-        'pb2': tdp.TrafficDescriptorProfileData(),
-        'rpc': {"name": "TDP 1"}}
-    },
-    {'venet-del': {
-        'pb2': fb.VEnetConfig(),
-        'rpc': {"name": "Enet UNI 1"}}
-    },
-    {'ontani-del': {
-        'pb2': fb.OntaniConfig(),
-        'rpc': {"name": "Golden User"}}
-    },
-    {'vontani-del': {
-        'pb2': fb.VOntaniConfig(),
-        'rpc': {"name": "Golden User"}}
-    },
-    {'cterm-del': {
-        'pb2': fb.ChannelterminationConfig(),
-        'rpc': {"name": "PON port"}}
-    },
-    {'cpair-del': {
-        'pb2': fb.ChannelpairConfig(),
-        'rpc': {"name": "PON port"}}
-    },
-    {'cpart-del': {
-        'pb2': fb.ChannelpartitionConfig(),
-        'rpc': {"name": "Freedom Tower"}}
-    },
-    {'cg-del': {
-        'pb2': fb.ChannelgroupConfig(),
-        'rpc': {"name": "Manhattan"}}
     }
 ]
 
@@ -264,7 +207,7 @@
         self.verify_device_preprovisioned_state(device['id'])
         self.activate_device(device['id'])
 
-    def test_999_remove_device(self):
+    def _remove_device(self):
         self.deactivate_device(device['id'])
         self.delete_device(device['id'])
 
@@ -348,7 +291,14 @@
         dict1 = MessageToDict(req,
                               including_default_value_fields = True,
                               preserving_proto_field_name = True)
+        #skip comparison of READ-ONLY fields
         result['id'] = ''
+        if isinstance(req, fb.ChannelgroupConfig):
+            result['cg_index'] = 0
+        elif isinstance(req, tcont.TcontsConfigData):
+            result['alloc_id'] = 0
+        elif isinstance(req, gemport.GemportsConfigData):
+            result['gemport_id'] = 0
         return dict1 == result