Storing the correct dpids

Change-Id: I62acbcdaa0b2a54473dc1ad020d6a6110cbdc247
diff --git a/TestON/tests/CHOtest/CHOtest.py b/TestON/tests/CHOtest/CHOtest.py
index 1bdfa5b..0f14f7e 100644
--- a/TestON/tests/CHOtest/CHOtest.py
+++ b/TestON/tests/CHOtest/CHOtest.py
@@ -40,6 +40,7 @@
         main.pingSleep = int( main.params['timers']['pingSleep'] )
         main.newTopo = ""
         main.CLIs = []
+        main.prefix = 0
 
         main.failSwitch = True if main.failSwitch == "on" else False
         main.emailOnStop = True if main.emailOnStop == "on" else False
@@ -394,7 +395,7 @@
         if ( ( main.numMNswitches == int(numOnosDevices) ) and ( main.numMNlinks == int(numOnosLinks) ) ):
             main.step( "Store Device DPIDs" )
             for i in range( 1, (main.numMNswitches+1) ):
-                main.deviceDPIDs.append( "of:00000000000000" + format( i, '02x' ) )
+                main.deviceDPIDs.append( "of:" + str(main.prefix) + "0000000000000%02d" % i )
             print "Device DPIDs in Store: \n", str( main.deviceDPIDs )
 
             main.step( "Store Host MACs" )
@@ -425,7 +426,7 @@
                 for cli in main.CLIs:
                     if i >=  main.numMNswitches + 1:
                         break
-                    dpid = "of:00000000000000" + format( i,'02x' )
+                    dpid = "of:" + str(main.prefix) + "0000000000000%02d" % i
                     t = main.Thread(target = cli.getDevicePortsEnabledCount,threadID = main.threadID, name = "getDevicePortsEnabledCount",args = [dpid])
                     t.start()
                     pool.append(t)
@@ -447,7 +448,7 @@
                 for cli in main.CLIs:
                     if i >=  main.numMNswitches + 1:
                         break
-                    dpid = "of:00000000000000" + format( i,'02x' )
+                    dpid = "of:" + str(main.prefix) + "0000000000000%02d" % i
                     t = main.Thread( target = cli.getDeviceLinksActiveCount,
                                      threadID = main.threadID,
                                      name = "getDevicePortsEnabledCount",
@@ -481,6 +482,8 @@
                                  onpass="Saving ONOS topology data test PASS",
                                  onfail="Saving ONOS topology data test FAIL" )
 
+        main.prefix += 1
+
     def CASE40( self, main ):
         """
         Verify Reactive forwarding (Att Topology)