[ 6322 ] Update the code to only accept a MAC address as a datapath id (DPID). If
one is provided and it is already assigned to a logical device then an exception
 will be raised.

VOL-500 : Allow adapters to set the datapath id using the MAC address of the OLT device.  The logical device id will use this datapath id as well

Change-Id: Ib6ae48861c3a449000360469f7fb7332ff39961a
diff --git a/voltha/adapters/ponsim_olt/ponsim_olt.py b/voltha/adapters/ponsim_olt/ponsim_olt.py
index d7a75eb..bb5b533 100644
--- a/voltha/adapters/ponsim_olt/ponsim_olt.py
+++ b/voltha/adapters/ponsim_olt/ponsim_olt.py
@@ -432,7 +432,8 @@
         ))
 
         ld = LogicalDevice(
-            # not setting id and datapth_id will let the adapter agent pick id
+            # not setting id and datapath_id.  Adapter agent will pick the id
+            # and will pick the datapath_id is it is not provided
             desc=ofp_desc(
                 mfr_desc='cord porject',
                 hw_desc='simualted pon',
@@ -452,7 +453,9 @@
             ),
             root_device_id=device.id
         )
-        ld_initialized = self.adapter_agent.create_logical_device(ld)
+        mac_address = "AA:BB:CC:DD:EE:FF"
+        ld_initialized = self.adapter_agent.create_logical_device(ld,
+                                                                  dpid=mac_address)
         cap = OFPPF_1GB_FD | OFPPF_FIBER
         self.ofp_port_no = info.nni_port
         self.adapter_agent.add_logical_port(ld_initialized.id, LogicalPort(
@@ -751,7 +754,9 @@
             ),
             root_device_id=device.id
         )
-        ld_initialized = self.adapter_agent.create_logical_device(ld)
+        mac_address = "AA:BB:CC:DD:EE:FF"
+        ld_initialized = self.adapter_agent.create_logical_device(ld,
+                                                                  dpid=mac_address)
         cap = OFPPF_1GB_FD | OFPPF_FIBER
         self.adapter_agent.add_logical_port(ld_initialized.id, LogicalPort(
             id='nni',