Moved prifix counter after compare topo case and fixed dpid format

Change-Id: I0cd91e6755153f7983b9f968c19a5c31b24b3381
diff --git a/TestON/tests/CHOtest/CHOtest.py b/TestON/tests/CHOtest/CHOtest.py
index 93fe131..2b2d1d9 100644
--- a/TestON/tests/CHOtest/CHOtest.py
+++ b/TestON/tests/CHOtest/CHOtest.py
@@ -246,6 +246,8 @@
         import time
         import copy
 
+        main.prefix += 1
+
         main.newTopo = main.params['TOPO2']['topo']
         main.numMNswitches = int ( main.params[ 'TOPO2' ][ 'numSwitches' ] )
         main.numMNlinks = int ( main.params[ 'TOPO2' ][ 'numLinks' ] )
@@ -310,6 +312,8 @@
         import time
         import copy
 
+        main.prefix += 1
+
         main.newTopo = main.params['TOPO3']['topo']
         main.numMNswitches = int ( main.params[ 'TOPO3' ][ 'numSwitches' ] )
         main.numMNlinks = int ( main.params[ 'TOPO3' ][ 'numLinks' ] )
@@ -484,7 +488,6 @@
                                  onpass="Saving ONOS topology data test PASS",
                                  onfail="Saving ONOS topology data test FAIL" )
 
-        main.prefix += 1
 
     def CASE40( self, main ):
         """
@@ -901,7 +904,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",
@@ -939,7 +942,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 = "getDeviceLinksActiveCount",