Update Cluster Driver
Change-Id: I8a3a57e19637ff210548e57d41178e6f194cf694
diff --git a/TestON/tests/USECASE/SegmentRouting/SRHighAvailability/SRHighAvailability.py b/TestON/tests/USECASE/SegmentRouting/SRHighAvailability/SRHighAvailability.py
index 7e3565e..ba0242d 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRHighAvailability/SRHighAvailability.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRHighAvailability/SRHighAvailability.py
@@ -52,14 +52,14 @@
description = "High Availability tests - ONOS failures with 2x2 Leaf-spine "
main.case( description )
- run.config(main, '2x2', 3)
+ run.config(main, '2x2')
run.installOnos( main )
run.startMininet( main, 'cord_fabric.py' )
# pre-configured routing and bridging test
run.checkFlows( main, minFlowCount=116 )
run.pingAll( main )
for i in range(0, main.failures):
- toKill = i % main.numCtrls
+ toKill = i % main.Cluster.numCtrls
run.killOnos( main, [ toKill ], '4', '8', '2' )
run.pingAll( main, 'CASE1_Failure%d' % (i+1) )
run.recoverOnos( main, [ toKill ], '4', '8', '3' )
@@ -86,7 +86,7 @@
description = "High Availability tests - ONOS random failures with 2x2 Leaf-spine "
main.case( description )
- run.config(main, '2x2', 3)
+ run.config(main, '2x2')
run.installOnos( main )
run.startMininet( main, 'cord_fabric.py' )
# pre-configured routing and bridging test
@@ -94,7 +94,7 @@
run.pingAll( main )
random.seed(datetime.now())
for i in range(0, main.failures):
- toKill = randint(0, (main.numCtrls-1))
+ toKill = randint( 0, ( main.Cluster.numCtrls - 1 ) )
run.killOnos( main, [ toKill ], '4', '8', '2' )
run.pingAll( main, 'CASE2_Failure%d' % (i+1) )
run.recoverOnos( main, [ toKill ], '4', '8', '3' )
@@ -118,14 +118,14 @@
description = "High Availability tests - ONOS failures with 4x4 Leaf-spine "
main.case( description )
- run.config(main, '4x4', 3)
+ run.config(main, '4x4')
run.installOnos( main )
run.startMininet( main, 'cord_fabric.py', args="--leaf=4 --spine=4" )
# pre-configured routing and bridging test
run.checkFlows( main, minFlowCount=350 )
run.pingAll( main )
for i in range(0, main.failures):
- toKill = i % main.numCtrls
+ toKill = i % main.Cluster.numCtrls
run.killOnos( main, [ toKill ], '8', '32', '2' )
run.pingAll( main, 'CASE3_Failure%d' % (i+1) )
run.recoverOnos( main, [ toKill ], '8', '32', '3' )
@@ -152,7 +152,7 @@
description = "High Availability tests - ONOS random failures with 4x4 Leaf-spine "
main.case( description )
- run.config(main, '4x4', 3)
+ run.config(main, '4x4')
run.installOnos( main )
run.startMininet( main, 'cord_fabric.py', args="--leaf=4 --spine=4" )
# pre-configured routing and bridging test
@@ -160,7 +160,7 @@
run.pingAll( main )
random.seed(datetime.now())
for i in range(0, main.failures):
- toKill = randint(0, (main.numCtrls-1))
+ toKill = randint( 0, ( main.Cluster.numCtrls - 1 ) )
run.killOnos( main, [ toKill ], '8', '32', '2' )
run.pingAll( main, 'CASE4_Failure%d' % (i+1) )
run.recoverOnos( main, [ toKill ], '8', '32', '3' )
@@ -187,14 +187,14 @@
description = "High Availability tests - ONOS failures and Switch failures with 2x2 Leaf-spine "
main.case( description )
- run.config(main, '2x2', 3)
+ run.config(main, '2x2')
run.installOnos( main )
run.startMininet( main, 'cord_fabric.py' )
# pre-configured routing and bridging test
run.checkFlows( main, minFlowCount=116 )
run.pingAll( main )
for i in range(0, main.failures):
- onosToKill = i % main.numCtrls
+ onosToKill = i % main.Cluster.numCtrls
switchToKill = i % len(main.spines)
run.killOnos( main, [ onosToKill ], '4', '8', '2' )
run.pingAll( main, 'CASE5_ONOS_Failure%d' % (i+1) )
@@ -231,14 +231,14 @@
description = "High Availability tests - ONOS random failures and Switch random failures with 2x2 Leaf-spine "
main.case( description )
- run.config(main, '2x2', 3)
+ run.config(main, '2x2')
run.installOnos( main )
run.startMininet( main, 'cord_fabric.py' )
# pre-configured routing and bridging test
run.checkFlows( main, minFlowCount=116 )
run.pingAll( main )
for i in range(0, main.failures):
- onosToKill = randint(0, (main.numCtrls-1))
+ onosToKill = randint( 0, ( main.Cluster.numCtrls - 1 ) )
switchToKill = randint(0, 1)
run.killOnos( main, [ onosToKill ], '4', '8', '2' )
run.pingAll( main, 'CASE6_ONOS_Failure%d' % (i+1) )
@@ -272,14 +272,14 @@
description = "High Availability tests - ONOS failures and Switch failures with 4x4 Leaf-spine "
main.case( description )
- run.config(main, '4x4', 3)
+ run.config(main, '4x4')
run.installOnos( main )
run.startMininet( main, 'cord_fabric.py', args="--leaf=4 --spine=4" )
# pre-configured routing and bridging test
run.checkFlows( main, minFlowCount=350 )
run.pingAll( main )
for i in range(0, main.failures):
- onosToKill = i % main.numCtrls
+ onosToKill = i % main.Cluster.numCtrls
switchToKill = i % len(main.spines)
run.killOnos( main, [ onosToKill ], '8', '32', '2' )
run.pingAll( main, 'CASE7_ONOS_Failure%d' % (i+1) )
@@ -316,14 +316,14 @@
description = "High Availability tests - ONOS random failures and Switch random failures with 4x4 Leaf-spine "
main.case( description )
- run.config(main, '4x4', 3)
+ run.config(main, '4x4')
run.installOnos( main )
run.startMininet( main, 'cord_fabric.py', args="--leaf=4 --spine=4" )
# pre-configured routing and bridging test
run.checkFlows( main, minFlowCount=350 )
run.pingAll( main )
for i in range(0, main.failures):
- onosToKill = randint(0, (main.numCtrls-1))
+ onosToKill = randint( 0, ( main.Cluster.numCtrls - 1 ) )
switchToKill = randint(0, 3)
run.killOnos( main, [ onosToKill ], '8', '32', '2' )
run.pingAll( main, 'CASE8_ONOS_Failure%d' % (i+1) )
diff --git a/TestON/tests/USECASE/SegmentRouting/SRHighAvailability/SRHighAvailability.topo b/TestON/tests/USECASE/SegmentRouting/SRHighAvailability/SRHighAvailability.topo
index 6c83bb2..f6661f8 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRHighAvailability/SRHighAvailability.topo
+++ b/TestON/tests/USECASE/SegmentRouting/SRHighAvailability/SRHighAvailability.topo
@@ -1,95 +1,32 @@
<TOPOLOGY>
<COMPONENT>
- <ONOSbench>
- <host>localhost</host>
+ <ONOScell>
+ <host>localhost</host> # ONOS "bench" machine
<user>sdn</user>
<password>rocks</password>
- <type>OnosDriver</type>
+ <type>OnosClusterDriver</type>
<connect_order>1</connect_order>
<COMPONENTS>
- <nodes>3</nodes>
- <prompt></prompt>
- </COMPONENTS>
- </ONOSbench>
-
- <ONOScli1>
- <host>OC1</host>
- <user>sdn</user>
- <password>rocks</password>
- <type>OnosCliDriver</type>
- <connect_order>2</connect_order>
- <COMPONENTS>
+ <cluster_name></cluster_name> # Used as a prefix for cluster components. Defaults to 'ONOS'
+ <diff_clihost>True</diff_clihost> # if it has different host other than localhost for CLI. True or empty. OC# will be used if True.
<karaf_username></karaf_username>
<karaf_password></karaf_password>
- <prompt></prompt>
+ <web_user></web_user>
+ <web_pass></web_pass>
+ <rest_port></rest_port>
+ <prompt></prompt> # TODO: we technically need a few of these, one per component
+ <onos_home></onos_home> # defines where onos home is
+ <nodes> 3 </nodes> # number of nodes in the cluster
</COMPONENTS>
- </ONOScli1>
-
- <ONOScli2>
- <host>OC2</host>
- <user>sdn</user>
- <password>rocks</password>
- <type>OnosCliDriver</type>
- <connect_order>3</connect_order>
- <COMPONENTS>
- <prompt></prompt>
- </COMPONENTS>
- </ONOScli2>
-
- <ONOScli3>
- <host>OC3</host>
- <user>sdn</user>
- <password>rocks</password>
- <type>OnosCliDriver</type>
- <connect_order>4</connect_order>
- <COMPONENTS>
- <prompt></prompt>
- </COMPONENTS>
- </ONOScli3>
-
- <ONOSrest1>
- <host>OC1</host>
- <port>8181</port>
- <user>onos</user>
- <password>rocks</password>
- <type>OnosRestDriver</type>
- <connect_order>5</connect_order>
- <COMPONENTS>
- <prompt></prompt>
- </COMPONENTS>
- </ONOSrest1>
-
- <ONOSrest2>
- <host>OC2</host>
- <port>8181</port>
- <user>onos</user>
- <password>rocks</password>
- <type>OnosRestDriver</type>
- <connect_order>6</connect_order>
- <COMPONENTS>
- <prompt></prompt>
- </COMPONENTS>
- </ONOSrest2>
-
- <ONOSrest3>
- <host>OC3</host>
- <port>8181</port>
- <user>onos</user>
- <password>rocks</password>
- <type>OnosRestDriver</type>
- <connect_order>7</connect_order>
- <COMPONENTS>
- <prompt></prompt>
- </COMPONENTS>
- </ONOSrest3>
+ </ONOScell>
<Mininet1>
<host>OCN</host>
<user>sdn</user>
<password>rocks</password>
<type>MininetCliDriver</type>
- <connect_order>7</connect_order>
+ <connect_order>2</connect_order>
<COMPONENTS>
<home>~/mininet/custom/</home>
<prompt></prompt>