[ONOS-7475] Refactoring SR tests
Change-Id: I10e51fcb8b416167e6a338e9030933162640af89
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
index 7566ff4..cecb915 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
@@ -30,7 +30,7 @@
self.default = ''
@staticmethod
- def runTest( main, test_idx, onosNodes, dhcp, routers, ipv4, ipv6, description):
+ def runTest( main, test_idx, onosNodes, dhcp, routers, ipv4, ipv6, description ):
skipPackage = False
init = False
@@ -42,41 +42,41 @@
if not init and onosNodes == main.Cluster.numCtrls:
skipPackage = True
- main.case('%s, ONOS instance%s' %
- (description, onosNodes))
+ main.case( '%s, ONOS instance%s' % ( description, onosNodes ) )
main.cfgName = 'COMCAST_CONFIG_ipv4=%d_ipv6=%d_dhcp=%d_routers=%d' % \
- (ipv4, ipv6, dhcp, routers)
- main.configPath = main.path + "/dependencies/"
+ ( ipv4, ipv6, dhcp, routers )
main.resultFileName = 'CASE%02d' % test_idx
- main.Cluster.setRunningNode(onosNodes)
+ main.Cluster.setRunningNode( onosNodes )
- run.installOnos(main, skipPackage=skipPackage, cliSleep=5,
- parallel=False)
+ run.installOnos( main, skipPackage=skipPackage, cliSleep=5,
+ parallel=False )
+ run.loadJson( main )
+ run.loadChart( main )
# wait some
- time.sleep(5)
+ time.sleep( 5 )
- if hasattr(main, 'Mininet1'):
+ if hasattr( main, 'Mininet1' ):
# Run the test with Mininet
- mininet_args = ' --dhcp=%s --routers=%s --ipv6=%s --ipv4=%s' % (dhcp, routers, ipv6, ipv4)
- run.startMininet(main, 'comcast_fabric.py', args=mininet_args)
+ mininet_args = ' --dhcp=%s --routers=%s --ipv6=%s --ipv4=%s' % ( dhcp, routers, ipv6, ipv4 )
+ run.startMininet( main, 'comcast_fabric.py', args=mininet_args )
else:
# Run the test with physical devices
# TODO: connect TestON to the physical network
pass
# wait some time for onos to install the rules!
- time.sleep(25)
+ time.sleep( 25 )
- if (dhcp):
- time.sleep(60)
+ if ( dhcp ):
+ time.sleep( 60 )
# ping hosts
run.pingAll( main, 'CASE%02d' % test_idx, acceptableFailed=5, basedOnIp=True )
- if hasattr(main, 'Mininet1'):
- run.cleanup(main)
+ if hasattr( main, 'Mininet1' ):
+ run.cleanup( main )
else:
# TODO: disconnect TestON from the physical network
pass