Added a cleanup case to allow the reuse of dpids
- Created two drivers to remove hosts and devices
- Removed the unique dpids from the topologies

Change-Id: I10cfcc34da545fd34e7635bd86527f23e50ed10e
diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index cce13d3..5b51ed7 100644
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -4134,3 +4134,79 @@
             main.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
+
+    def removeDevice( self, device ):
+        '''
+        Description:
+            Remove a device from ONOS by passing the uri of the device(s).
+        Parameters:
+            device - (str or list) the id or uri of the device ex. "of:0000000000000001"
+        Returns:
+            Returns main.FALSE if an exception is thrown or an error is present
+            in the response. Otherwise, returns main.TRUE.
+        NOTE:
+            If a host cannot be removed, then this function will return main.FALSE
+        '''
+        try:
+            if type( device ) is str:
+                device = list( device )
+
+            for d in device:
+                time.sleep( 1 )
+                response = self.sendline( "device-remove {}".format( d ) )
+                if "Error" in response:
+                    main.log.warn( "Error for device: {}\nResponse: {}".format( d, response ) )
+                    return main.FALSE
+
+            return main.TRUE
+
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return main.FALSE
+        except pexpect.EOF:
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
+            main.cleanup()
+            main.exit()
+        except Exception:
+            main.log.exception( self.name + ": Uncaught exception!" )
+            main.cleanup()
+            main.exit()
+
+    def removeHost( self, host ):
+        '''
+        Description:
+            Remove a host from ONOS by passing the id of the host(s)
+        Parameters:
+            hostId - (str or list) the id or mac of the host ex. "00:00:00:00:00:01"
+        Returns:
+            Returns main.FALSE if an exception is thrown or an error is present
+            in the response. Otherwise, returns main.TRUE.
+        NOTE:
+            If a host cannot be removed, then this function will return main.FALSE
+        '''
+        try:
+            if type( host ) is str:
+                host = list( host )
+
+            for h in host:
+                time.sleep( 1 )
+                response = self.sendline( "host-remove {}".format( h ) )
+                if "Error" in response:
+                    main.log.warn( "Error for host: {}\nResponse: {}".format( h, response ) )
+                    return main.FALSE
+
+            return main.TRUE
+
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return main.FALSE
+        except pexpect.EOF:
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
+            main.cleanup()
+            main.exit()
+        except Exception:
+            main.log.exception( self.name + ": Uncaught exception!" )
+            main.cleanup()
+            main.exit()
diff --git a/TestON/tests/CHOtest/CHOtest.params b/TestON/tests/CHOtest/CHOtest.params
index 2aee8f2..168d935 100644
--- a/TestON/tests/CHOtest/CHOtest.params
+++ b/TestON/tests/CHOtest/CHOtest.params
@@ -18,7 +18,7 @@
     # 19X. IPv6 ping across Point,Multi-single,Single-Multi Intents
 
 <testcases>
-1,20,3,[40,5,60,70,80,10,5,90,71,81,10,5]*20,21,3,[40,5,61,72,82,10,5,91,73,83,10,5]*20,22,3,[40,5,62,74,84,10,5,92,75,85,10,5]*20
+1,21,[3,41,5,61,72,82,10,5,91,73,83,10,5]*20,200,20,[3,40,5,60,70,80,10,5,90,71,81,10,5]*20,200
 </testcases>
 
     <GIT>
@@ -94,6 +94,8 @@
         <topoCheckDelay>15</topoCheckDelay>
         <pingSleep>3</pingSleep>
         <pingTimeout>1200</pingTimeout>
+        <remHostDelay>5</remHostDelay>
+        <remDevDelay>10</remDevDelay>
     </timers>
 
     <TEST>
diff --git a/TestON/tests/CHOtest/CHOtest.py b/TestON/tests/CHOtest/CHOtest.py
index 9feb9b8..dca0585 100644
--- a/TestON/tests/CHOtest/CHOtest.py
+++ b/TestON/tests/CHOtest/CHOtest.py
@@ -40,9 +40,10 @@
         main.pingSleep = int( main.params['timers']['pingSleep'] )
         main.topoCheckDelay = int( main.params['timers']['topoCheckDelay'] )
         main.pingTimeout = int( main.params['timers']['pingTimeout'] )
+        main.remHostDelay = int( main.params['timers']['remHostDelay'] )
+        main.remDevDelay = int( main.params['timers']['remDevDelay'] )
         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
@@ -190,11 +191,6 @@
         main.case(
             "Assign and Balance all Mininet switches across controllers" )
 
-        main.step( "Stop any previous Mininet network topology" )
-        cliResult = main.TRUE
-        if main.newTopo == main.params['TOPO3']['topo']:
-            stopStatus = main.Mininet1.stopNet( fileName = "topoSpine" )
-
         main.step( "Start Mininet with Att topology" )
         main.newTopo = main.params['TOPO1']['topo']
         mininetDir = main.Mininet1.home + "/custom/"
@@ -260,9 +256,6 @@
         main.case(
             "Assign and Balance all Mininet switches across controllers" )
 
-        main.step( "Stop any previous Mininet network topology" )
-        stopStatus = main.Mininet1.stopNet(fileName = "topoAtt" )
-
         main.step("Start Mininet with Chordal topology")
         mininetDir = main.Mininet1.home + "/custom/"
         topoPath = main.testDir + "/" + main.TEST  + "/Dependencies/" + main.newTopo
@@ -324,10 +317,7 @@
             "Load Spine and Leaf topology and Balance all Mininet switches across controllers" )
         main.log.report(
             "________________________________________________________________________" )
-        main.case(
-            "Assign and Balance all Mininet switches across controllers" )
-        main.step( "Stop any previous Mininet network topology" )
-        stopStatus = main.Mininet1.stopNet(fileName = "topoChordal" )
+        main.case( "Assign and Balance all Mininet switches across controllers" )
 
         main.step("Start Mininet with Spine topology")
         mininetDir = main.Mininet1.home + "/custom/"
@@ -336,9 +326,6 @@
         topoPath = mininetDir + main.newTopo
         startStatus = main.Mininet1.startNet(topoFile = topoPath)
 
-        time.sleep(60)
-        main.step( "Assign switches to controllers" )
-
         for i in range( 1, ( main.numMNswitches + 1 ) ):  # 1 to ( num of switches +1 )
             main.Mininet1.assignSwController(
                 sw="s" + str( i ),
@@ -402,7 +389,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:" + str(main.prefix) + "0000000000000%02d" % i )
+                    main.deviceDPIDs.append( "of:00000000000000" + format( i, "02x" ) )
                 print "Device DPIDs in Store: \n", str( main.deviceDPIDs )
 
                 main.step( "Store Host MACs" )
@@ -433,7 +420,7 @@
                     for cli in main.CLIs:
                         if i >=  main.numMNswitches + 1:
                             break
-                        dpid = "of:" + str(main.prefix) + "0000000000000%02d" % i
+                        dpid = "of:00000000000000" + format( i, "02x" )
                         t = main.Thread(target = cli.getDevicePortsEnabledCount,threadID = main.threadID, name = "getDevicePortsEnabledCount",args = [dpid])
                         t.start()
                         pool.append(t)
@@ -455,7 +442,7 @@
                     for cli in main.CLIs:
                         if i >=  main.numMNswitches + 1:
                             break
-                        dpid = "of:" + str(main.prefix) + "0000000000000%02d" % i
+                        dpid = "of:00000000000000" + format( i, "02x" )
                         t = main.Thread( target = cli.getDeviceLinksActiveCount,
                                          threadID = main.threadID,
                                          name = "getDevicePortsEnabledCount",
@@ -491,6 +478,56 @@
                                  onfail="Saving ONOS topology data test FAIL" )
 
 
+
+    def CASE200( self, main ):
+
+        import time
+        main.log.report( "Clean up ONOS" )
+        main.log.case( "Stop topology and remove hosts and devices" )
+
+        main.step( "Stop Topology" )
+        stopStatus = main.Mininet1.stopNet()
+        utilities.assert_equals( expect=main.TRUE, actual=stopStatus,
+                                 onpass="Stopped mininet",
+                                 onfail="Failed to stop mininet" )
+
+
+        main.log.info( "Constructing host id list" )
+        hosts = []
+        for i in range( main.numMNhosts ):
+            hosts.append( "h" + str(i+1) )
+
+        main.step( "Getting host ids" )
+        hostList = main.CLIs[0].getHostsId( hosts )
+        hostIdResult = True if hostList else False
+        utilities.assert_equals( expect=True, actual=hostIdResult,
+                                 onpass="Successfully obtained the host ids.",
+                                 onfail="Failed to obtain the host ids" )
+
+        main.step( "Removing hosts" )
+        hostResult = main.CLIs[0].removeHost( hostList )
+        utilities.assert_equals( expect=main.TRUE, actual=hostResult,
+                                 onpass="Successfully removed hosts",
+                                 onfail="Failed remove hosts" )
+
+        time.sleep( main.remHostDelay )
+
+        main.log.info( "Constructing device uri list" )
+        deviceList = []
+        for i in range( main.numMNswitches ):
+            deviceList.append( "of:00000000000000" + format( i+1, "02x" ) )
+
+        main.step( "Removing devices" )
+        deviceResult = main.CLIs[0].removeDevice( deviceList )
+        utilities.assert_equals( expect=main.TRUE, actual=deviceResult,
+                                 onpass="Successfully removed devices",
+                                 onfail="Failed remove devices" )
+
+        time.sleep( main.remDevDelay )
+
+        main.log.info( "Summary\n{}".format( main.CLIs[0].summary( jsonFormat=False ) ) )
+
+
     def CASE40( self, main ):
         """
         Verify Reactive forwarding
@@ -868,7 +905,7 @@
                 for cli in main.CLIs:
                     if i >=  main.numMNswitches + 1:
                         break
-                    dpid = "of:" + str(main.prefix) + "0000000000000%02d" % i
+                    dpid = "of:00000000000000" + format( i, "02x" )
                     t = main.Thread(target = cli.getDevicePortsEnabledCount,
                             threadID = main.threadID,
                             name = "getDevicePortsEnabledCount",
@@ -906,7 +943,7 @@
                 for cli in main.CLIs:
                     if i >=  main.numMNswitches + 1:
                         break
-                    dpid = "of:" + str(main.prefix) + "0000000000000%02d" % i
+                    dpid = "of:00000000000000" + format( i, "02x" )
                     t = main.Thread(target = cli.getDeviceLinksActiveCount,
                             threadID = main.threadID,
                             name = "getDeviceLinksActiveCount",
diff --git a/TestON/tests/CHOtest/Dependencies/topoAttIpv6.py b/TestON/tests/CHOtest/Dependencies/topoAttIpv6.py
index 505cc0c..d2b8df7 100755
--- a/TestON/tests/CHOtest/Dependencies/topoAttIpv6.py
+++ b/TestON/tests/CHOtest/Dependencies/topoAttIpv6.py
@@ -29,31 +29,31 @@
         # Initialize Topology
         Topo.__init__( self, **opts )
 
-        NY54 = self.addSwitch( 's1', dpid='0000000000000001' )
-        CMBR = self.addSwitch( 's2', dpid='0000000000000002' )
-        CHCG = self.addSwitch( 's3', dpid='0000000000000003' )
-        CLEV = self.addSwitch( 's4', dpid='0000000000000004' )
-        RLGH = self.addSwitch( 's5', dpid='0000000000000005' )
-        ATLN = self.addSwitch( 's6', dpid='0000000000000006' )
-        PHLA = self.addSwitch( 's7', dpid='0000000000000007' )
-        WASH = self.addSwitch( 's8', dpid='0000000000000008' )
-        NSVL = self.addSwitch( 's9', dpid='0000000000000009' )
-        STLS = self.addSwitch( 's10', dpid='0000000000000010' )
-        NWOR = self.addSwitch( 's11', dpid='0000000000000011' )
-        HSTN = self.addSwitch( 's12', dpid='0000000000000012' )
-        SNAN = self.addSwitch( 's13', dpid='0000000000000013' )
-        DLLS = self.addSwitch( 's14', dpid='0000000000000014' )
-        ORLD = self.addSwitch( 's15', dpid='0000000000000015' )
-        DNVR = self.addSwitch( 's16', dpid='0000000000000016' )
-        KSCY = self.addSwitch( 's17', dpid='0000000000000017' )
-        SNFN = self.addSwitch( 's18', dpid='0000000000000018' )
-        SCRM = self.addSwitch( 's19', dpid='0000000000000019' )
-        PTLD = self.addSwitch( 's20', dpid='0000000000000020' )
-        STTL = self.addSwitch( 's21', dpid='0000000000000021' )
-        SLKC = self.addSwitch( 's22', dpid='0000000000000022' )
-        LA03 = self.addSwitch( 's23', dpid='0000000000000023' )
-        SNDG = self.addSwitch( 's24', dpid='0000000000000024' )
-        PHNX = self.addSwitch( 's25', dpid='0000000000000025' )
+        NY54 = self.addSwitch( 's1' )
+        CMBR = self.addSwitch( 's2' )
+        CHCG = self.addSwitch( 's3' )
+        CLEV = self.addSwitch( 's4' )
+        RLGH = self.addSwitch( 's5' )
+        ATLN = self.addSwitch( 's6' )
+        PHLA = self.addSwitch( 's7' )
+        WASH = self.addSwitch( 's8' )
+        NSVL = self.addSwitch( 's9' )
+        STLS = self.addSwitch( 's10' )
+        NWOR = self.addSwitch( 's11' )
+        HSTN = self.addSwitch( 's12' )
+        SNAN = self.addSwitch( 's13' )
+        DLLS = self.addSwitch( 's14' )
+        ORLD = self.addSwitch( 's15' )
+        DNVR = self.addSwitch( 's16' )
+        KSCY = self.addSwitch( 's17' )
+        SNFN = self.addSwitch( 's18' )
+        SCRM = self.addSwitch( 's19' )
+        PTLD = self.addSwitch( 's20' )
+        STTL = self.addSwitch( 's21' )
+        SLKC = self.addSwitch( 's22' )
+        LA03 = self.addSwitch( 's23' )
+        SNDG = self.addSwitch( 's24' )
+        PHNX = self.addSwitch( 's25' )
 
         # ... and now hosts
         NY54_host = self.addHost( 'h1', ip='10.1.0.1/24', cls=dualStackHost, v6Addr='1000::1/64' )
diff --git a/TestON/tests/CHOtest/Dependencies/topoChordalIpv6.py b/TestON/tests/CHOtest/Dependencies/topoChordalIpv6.py
index b181c6c..cb065c2 100755
--- a/TestON/tests/CHOtest/Dependencies/topoChordalIpv6.py
+++ b/TestON/tests/CHOtest/Dependencies/topoChordalIpv6.py
@@ -27,31 +27,31 @@
         # Initialize Topology
         Topo.__init__( self, **opts )
 
-        s1 = self.addSwitch( 's1', dpid='1000000000000001' )
-        s2 = self.addSwitch( 's2', dpid='1000000000000002')
-        s3 = self.addSwitch( 's3', dpid='1000000000000003')
-        s4 = self.addSwitch( 's4', dpid='1000000000000004')
-        s5 = self.addSwitch( 's5', dpid='1000000000000005')
-        s6 = self.addSwitch( 's6', dpid='1000000000000006')
-        s7 = self.addSwitch( 's7', dpid='1000000000000007')
-        s8 = self.addSwitch( 's8', dpid='1000000000000008')
-        s9 = self.addSwitch( 's9', dpid='1000000000000009')
-        s10 = self.addSwitch( 's10', dpid='1000000000000010')
-        s11 = self.addSwitch( 's11', dpid='1000000000000011')
-        s12 = self.addSwitch( 's12', dpid='1000000000000012')
-        s13 = self.addSwitch( 's13', dpid='1000000000000013')
-        s14 = self.addSwitch( 's14', dpid='1000000000000014')
-        s15 = self.addSwitch( 's15', dpid='1000000000000015')
-        s16 = self.addSwitch( 's16', dpid='1000000000000016')
-        s17 = self.addSwitch( 's17', dpid='1000000000000017')
-        s18 = self.addSwitch( 's18', dpid='1000000000000018')
-        s19 = self.addSwitch( 's19', dpid='1000000000000019')
-        s20 = self.addSwitch( 's20', dpid='1000000000000020')
-        s21 = self.addSwitch( 's21', dpid='1000000000000021')
-        s22 = self.addSwitch( 's22', dpid='1000000000000022')
-        s23 = self.addSwitch( 's23', dpid='1000000000000023')
-        s24 = self.addSwitch( 's24', dpid='1000000000000024')
-        s25 = self.addSwitch( 's25', dpid='1000000000000025')
+        s1 = self.addSwitch( 's1' )
+        s2 = self.addSwitch( 's2' )
+        s3 = self.addSwitch( 's3' )
+        s4 = self.addSwitch( 's4' )
+        s5 = self.addSwitch( 's5' )
+        s6 = self.addSwitch( 's6' )
+        s7 = self.addSwitch( 's7' )
+        s8 = self.addSwitch( 's8' )
+        s9 = self.addSwitch( 's9' )
+        s10 = self.addSwitch( 's10' )
+        s11 = self.addSwitch( 's11' )
+        s12 = self.addSwitch( 's12' )
+        s13 = self.addSwitch( 's13' )
+        s14 = self.addSwitch( 's14' )
+        s15 = self.addSwitch( 's15' )
+        s16 = self.addSwitch( 's16' )
+        s17 = self.addSwitch( 's17' )
+        s18 = self.addSwitch( 's18' )
+        s19 = self.addSwitch( 's19' )
+        s20 = self.addSwitch( 's20' )
+        s21 = self.addSwitch( 's21' )
+        s22 = self.addSwitch( 's22' )
+        s23 = self.addSwitch( 's23' )
+        s24 = self.addSwitch( 's24' )
+        s25 = self.addSwitch( 's25' )
 
         # ... and now hosts
         s1_host = self.addHost( 'h1', ip='10.1.0.1/24', cls=dualStackHost, v6Addr='1000::1/64' )
diff --git a/TestON/tests/CHOtest/Dependencies/topoSpineIpv6.py b/TestON/tests/CHOtest/Dependencies/topoSpineIpv6.py
index c51a75d..7db4fa1 100755
--- a/TestON/tests/CHOtest/Dependencies/topoSpineIpv6.py
+++ b/TestON/tests/CHOtest/Dependencies/topoSpineIpv6.py
@@ -26,86 +26,86 @@
         Topo.__init__( self, **opts )
 
         # add nodes, Leaf switches
-        s1 = self.addSwitch( 's1', dpid='2000000000000001')
-        s2 = self.addSwitch( 's2', dpid='2000000000000002' )
-        s3 = self.addSwitch( 's3', dpid='2000000000000003' )
-        s4 = self.addSwitch( 's4', dpid='2000000000000004' )
-        s5 = self.addSwitch( 's5', dpid='2000000000000005' )
-        s6 = self.addSwitch( 's6', dpid='2000000000000006' )
-        s7 = self.addSwitch( 's7', dpid='2000000000000007' )
-        s8 = self.addSwitch( 's8', dpid='2000000000000008' )
-        s9 = self.addSwitch( 's9', dpid='2000000000000009' )
-        s10 = self.addSwitch( 's10', dpid='2000000000000010' )
-        s11 = self.addSwitch( 's11', dpid='2000000000000011' )
-        s12 = self.addSwitch( 's12', dpid='2000000000000012' )
-        s13 = self.addSwitch( 's13', dpid='2000000000000013' )
-        s14 = self.addSwitch( 's14', dpid='2000000000000014' )
+        s1 = self.addSwitch( 's1' )
+        s2 = self.addSwitch( 's2' )
+        s3 = self.addSwitch( 's3' )
+        s4 = self.addSwitch( 's4' )
+        s5 = self.addSwitch( 's5' )
+        s6 = self.addSwitch( 's6' )
+        s7 = self.addSwitch( 's7' )
+        s8 = self.addSwitch( 's8' )
+        s9 = self.addSwitch( 's9' )
+        s10 = self.addSwitch( 's10' )
+        s11 = self.addSwitch( 's11' )
+        s12 = self.addSwitch( 's12' )
+        s13 = self.addSwitch( 's13' )
+        s14 = self.addSwitch( 's14' )
 
         # add nodes, Spine switches first...
-        s15 = self.addSwitch( 's15', dpid='2000000000000015' )
-        s16 = self.addSwitch( 's16', dpid='2000000000000016' )
-        s17 = self.addSwitch( 's17', dpid='2000000000000017' )
-        s18 = self.addSwitch( 's18', dpid='2000000000000018' )
-        s19 = self.addSwitch( 's19', dpid='2000000000000019' )
-        s20 = self.addSwitch( 's20', dpid='2000000000000020' )
-        s21 = self.addSwitch( 's21', dpid='2000000000000021' )
-        s22 = self.addSwitch( 's22', dpid='2000000000000022' )
-        s23 = self.addSwitch( 's23', dpid='2000000000000023' )
-        s24 = self.addSwitch( 's24', dpid='2000000000000024' )
-        s25 = self.addSwitch( 's25', dpid='2000000000000025' )
-        s26 = self.addSwitch( 's26', dpid='2000000000000026' )
-        s27 = self.addSwitch( 's27', dpid='2000000000000027' )
-        s28 = self.addSwitch( 's28', dpid='2000000000000028' )
-        s29 = self.addSwitch( 's29', dpid='2000000000000029' )
-        s30 = self.addSwitch( 's30', dpid='2000000000000030' )
-        s31 = self.addSwitch( 's31', dpid='2000000000000031' )
-        s32 = self.addSwitch( 's32', dpid='2000000000000032' )
-        s33 = self.addSwitch( 's33', dpid='2000000000000033' )
-        s34 = self.addSwitch( 's34', dpid='2000000000000034' )
-        s35 = self.addSwitch( 's35', dpid='2000000000000035' )
-        s36 = self.addSwitch( 's36', dpid='2000000000000036' )
-        s37 = self.addSwitch( 's37', dpid='2000000000000037' )
-        s38 = self.addSwitch( 's38', dpid='2000000000000038' )
-        s39 = self.addSwitch( 's39', dpid='2000000000000039' )
-        s40 = self.addSwitch( 's40', dpid='2000000000000040' )
-        s41 = self.addSwitch( 's41', dpid='2000000000000041' )
-        s42 = self.addSwitch( 's42', dpid='2000000000000042' )
-        s43 = self.addSwitch( 's43', dpid='2000000000000043' )
-        s44 = self.addSwitch( 's44', dpid='2000000000000044' )
-        s45 = self.addSwitch( 's45', dpid='2000000000000045' )
-        s46 = self.addSwitch( 's46', dpid='2000000000000046' )
-        s47 = self.addSwitch( 's47', dpid='2000000000000047' )
-        s48 = self.addSwitch( 's48', dpid='2000000000000048' )
-        s49 = self.addSwitch( 's49', dpid='2000000000000049' )
-        s50 = self.addSwitch( 's50', dpid='2000000000000050' )
-        s51 = self.addSwitch( 's51', dpid='2000000000000051' )
-        s52 = self.addSwitch( 's52', dpid='2000000000000052' )
-        s53 = self.addSwitch( 's53', dpid='2000000000000053' )
-        s54 = self.addSwitch( 's54', dpid='2000000000000054' )
-        s55 = self.addSwitch( 's55', dpid='2000000000000055' )
-        s56 = self.addSwitch( 's56', dpid='2000000000000056' )
-        s57 = self.addSwitch( 's57', dpid='2000000000000057' )
-        s58 = self.addSwitch( 's58', dpid='2000000000000058' )
-        s59 = self.addSwitch( 's59', dpid='2000000000000059' )
-        s60 = self.addSwitch( 's60', dpid='2000000000000060' )
-        s61 = self.addSwitch( 's61', dpid='2000000000000061' )
-        s62 = self.addSwitch( 's62', dpid='2000000000000062' )
-        s63 = self.addSwitch( 's63', dpid='2000000000000063' )
-        s64 = self.addSwitch( 's64', dpid='2000000000000064' )
-        s65 = self.addSwitch( 's65', dpid='2000000000000065' )
-        s66 = self.addSwitch( 's66', dpid='2000000000000066' )
-        s67 = self.addSwitch( 's67', dpid='2000000000000067' )
-        s68 = self.addSwitch( 's68', dpid='2000000000000068' )
-        s69 = self.addSwitch( 's69', dpid='2000000000000069' )
-        s70 = self.addSwitch( 's70', dpid='2000000000000070' )
-        s71 = self.addSwitch( 's71', dpid='2000000000000071' )
-        s72 = self.addSwitch( 's72', dpid='2000000000000072' )
-        s73 = self.addSwitch( 's73', dpid='2000000000000073' )
-        s74 = self.addSwitch( 's74', dpid='2000000000000074' )
-        s75 = self.addSwitch( 's75', dpid='2000000000000075' )
-        s76 = self.addSwitch( 's76', dpid='2000000000000076' )
-        s77 = self.addSwitch( 's77', dpid='2000000000000077' )
-        s78 = self.addSwitch( 's78', dpid='2000000000000078' )
+        s15 = self.addSwitch( 's15' )
+        s16 = self.addSwitch( 's16' )
+        s17 = self.addSwitch( 's17' )
+        s18 = self.addSwitch( 's18' )
+        s19 = self.addSwitch( 's19' )
+        s20 = self.addSwitch( 's20' )
+        s21 = self.addSwitch( 's21' )
+        s22 = self.addSwitch( 's22' )
+        s23 = self.addSwitch( 's23' )
+        s24 = self.addSwitch( 's24' )
+        s25 = self.addSwitch( 's25' )
+        s26 = self.addSwitch( 's26' )
+        s27 = self.addSwitch( 's27' )
+        s28 = self.addSwitch( 's28' )
+        s29 = self.addSwitch( 's29' )
+        s30 = self.addSwitch( 's30' )
+        s31 = self.addSwitch( 's31' )
+        s32 = self.addSwitch( 's32' )
+        s33 = self.addSwitch( 's33' )
+        s34 = self.addSwitch( 's34' )
+        s35 = self.addSwitch( 's35' )
+        s36 = self.addSwitch( 's36' )
+        s37 = self.addSwitch( 's37' )
+        s38 = self.addSwitch( 's38' )
+        s39 = self.addSwitch( 's39' )
+        s40 = self.addSwitch( 's40' )
+        s41 = self.addSwitch( 's41' )
+        s42 = self.addSwitch( 's42' )
+        s43 = self.addSwitch( 's43' )
+        s44 = self.addSwitch( 's44' )
+        s45 = self.addSwitch( 's45' )
+        s46 = self.addSwitch( 's46' )
+        s47 = self.addSwitch( 's47' )
+        s48 = self.addSwitch( 's48' )
+        s49 = self.addSwitch( 's49' )
+        s50 = self.addSwitch( 's50' )
+        s51 = self.addSwitch( 's51' )
+        s52 = self.addSwitch( 's52' )
+        s53 = self.addSwitch( 's53' )
+        s54 = self.addSwitch( 's54' )
+        s55 = self.addSwitch( 's55' )
+        s56 = self.addSwitch( 's56' )
+        s57 = self.addSwitch( 's57' )
+        s58 = self.addSwitch( 's58' )
+        s59 = self.addSwitch( 's59' )
+        s60 = self.addSwitch( 's60' )
+        s61 = self.addSwitch( 's61' )
+        s62 = self.addSwitch( 's62' )
+        s63 = self.addSwitch( 's63' )
+        s64 = self.addSwitch( 's64' )
+        s65 = self.addSwitch( 's65' )
+        s66 = self.addSwitch( 's66' )
+        s67 = self.addSwitch( 's67' )
+        s68 = self.addSwitch( 's68' )
+        s69 = self.addSwitch( 's69' )
+        s70 = self.addSwitch( 's70' )
+        s71 = self.addSwitch( 's71' )
+        s72 = self.addSwitch( 's72' )
+        s73 = self.addSwitch( 's73' )
+        s74 = self.addSwitch( 's74' )
+        s75 = self.addSwitch( 's75' )
+        s76 = self.addSwitch( 's76' )
+        s77 = self.addSwitch( 's77' )
+        s78 = self.addSwitch( 's78' )
 
 
         # ... and now hosts