Update Cluster Driver
Change-Id: I8a3a57e19637ff210548e57d41178e6f194cf694
diff --git a/TestON/tests/FUNC/FUNCovsdbtest/FUNCovsdbtest.py b/TestON/tests/FUNC/FUNCovsdbtest/FUNCovsdbtest.py
index 785c125..f16adb8 100644
--- a/TestON/tests/FUNC/FUNCovsdbtest/FUNCovsdbtest.py
+++ b/TestON/tests/FUNC/FUNCovsdbtest/FUNCovsdbtest.py
@@ -73,17 +73,15 @@
cellName = main.params[ 'ENV' ][ 'cellName' ]
main.startUpSleep = int( main.params[ 'SLEEP' ][ 'startup' ] )
main.apps = main.params[ 'ENV' ][ 'cellApps' ]
-
- main.maxNodes = 1
-
- stepResult = main.testSetUp.envSetup( hasNode=True )
+ stepResult = main.testSetUp.envSetup()
except Exception as e:
main.testSetUp.envSetupException( e )
main.testSetUp.evnSetupConclusion( stepResult )
- cliResults = main.testSetUp.ONOSSetUp( main.OVSDB1, cellName=cellName, removeLog=True )
+ cliResults = main.testSetUp.ONOSSetUp( main.OVSDB1, main.Cluster,
+ cellName=cellName, removeLog=True )
if cliResults == main.FALSE:
main.log.error( "Failed to start ONOS, stopping test" )
@@ -91,24 +89,24 @@
main.exit()
main.step( "App Ids check" )
- appCheck = main.ONOScli1.appToIDCheck()
+ appCheck = main.Cluster.active( 0 ).CLI.appToIDCheck()
if appCheck != main.TRUE:
- main.log.warn( main.CLIs[ 0 ].apps() )
- main.log.warn( main.CLIs[ 0 ].appIDs() )
+ main.log.warn( main.Cluster.active( 0 ).CLI.apps() )
+ main.log.warn( main.Cluster.active( 0 ).CLI.appIDs() )
utilities.assert_equals( expect=main.TRUE, actual=appCheck,
onpass="App Ids seem to be correct",
onfail="Something is wrong with app Ids" )
main.step( "Install onos-ovsdb" )
- installResults = main.ONOScli1.activateApp( "org.onosproject.ovsdb" )
+ installResults = main.Cluster.active( 0 ).CLI.activateApp( "org.onosproject.ovsdb" )
utilities.assert_equals( expect=main.TRUE, actual=installResults,
onpass="Install onos-ovsdatabase successful",
onfail="Install onos-ovsdatabase failed" )
main.step( "Install onos-app-vtn" )
- installResults = main.ONOScli1.activateApp( "org.onosproject.vtn" )
+ installResults = main.Cluster.active( 0 ).CLI.activateApp( "org.onosproject.vtn" )
utilities.assert_equals( expect=main.TRUE, actual=installResults,
onpass="Install onos-app-vtn successful",
onfail="Install onos-app-vtn failed" )
@@ -351,7 +349,7 @@
str( ctrlip ) + " failed\n" + str( main.OVSDB2.show() ) )
main.step( "Check onoscli devices have ovs " + str( OVSDB1Ip ) )
- response = main.ONOScli1.devices()
+ response = main.Cluster.active( 0 ).CLI.devices()
if re.search( OVSDB1Ip, response ) and not re.search( "false", response ):
stepResult = main.TRUE
else:
@@ -362,7 +360,7 @@
onfail="Check onoscli devices have ovs " + str( OVSDB1Ip ) + " failed" )
main.step( "Check onoscli devices have ovs " + str( OVSDB2Ip ) )
- response = main.ONOScli1.devices()
+ response = main.Cluster.active( 0 ).CLI.devices()
if re.search( OVSDB2Ip, response ) and not re.search( "false", response ):
stepResult = main.TRUE
else:
@@ -472,7 +470,7 @@
port2postdata = port2.DictoJson()
main.step( "Post Network Data via HTTP(Post port need post network)" )
- Poststatus, result = main.ONOSrest.send( ctrlip, httpport, '', path + 'networks/',
+ Poststatus, result = main.Cluster.active( 0 ).REST.send( ctrlip, httpport, '', path + 'networks/',
'POST', None, networkpostdata )
utilities.assert_equals(
expect='200',
@@ -481,7 +479,7 @@
onfail="Post Network Failed " + str( Poststatus ) + "," + str( result ) )
main.step( "Post Subnet Data via HTTP(Post port need post subnet)" )
- Poststatus, result = main.ONOSrest.send( ctrlip, httpport, '', path + 'subnets/',
+ Poststatus, result = main.Cluster.active( 0 ).REST.send( ctrlip, httpport, '', path + 'subnets/',
'POST', None, subnetpostdata )
utilities.assert_equals(
expect='202',
@@ -490,7 +488,7 @@
onfail="Post Subnet Failed " + str( Poststatus ) + "," + str( result ) )
main.step( "Post Port1 Data via HTTP" )
- Poststatus, result = main.ONOSrest.send( ctrlip, httpport, '', path + 'ports/',
+ Poststatus, result = main.Cluster.active( 0 ).REST.send( ctrlip, httpport, '', path + 'ports/',
'POST', None, port1postdata )
utilities.assert_equals(
expect='200',
@@ -499,7 +497,7 @@
onfail="Post Port Failed " + str( Poststatus ) + "," + str( result ) )
main.step( "Post Port2 Data via HTTP" )
- Poststatus, result = main.ONOSrest.send( ctrlip, httpport, '', path + 'ports/',
+ Poststatus, result = main.Cluster.active( 0 ).REST.send( ctrlip, httpport, '', path + 'ports/',
'POST', None, port2postdata )
utilities.assert_equals(
expect='200',
@@ -686,7 +684,7 @@
onfail="Delete ip netns host on the ovsdb node 2 failed" )
main.step( "Check onoscli devices openflow session is false " + str( OVSDB1Ip ) )
- response = main.ONOScli1.devices()
+ response = main.Cluster.active( 0 ).CLI.devices()
if re.search( OVSDB1Ip, response ) and not re.search( "true", response ):
stepResult = main.TRUE
else:
@@ -697,7 +695,7 @@
onfail="Check openflow session is false " + str( OVSDB1Ip ) + " failed" )
main.step( "Check onoscli devices have ovs " + str( OVSDB2Ip ) )
- response = main.ONOScli1.devices()
+ response = main.Cluster.active( 0 ).CLI.devices()
if re.search( OVSDB2Ip, response ) and not re.search( "true", response ):
stepResult = main.TRUE
else:
diff --git a/TestON/tests/FUNC/FUNCovsdbtest/FUNCovsdbtest.topo b/TestON/tests/FUNC/FUNCovsdbtest/FUNCovsdbtest.topo
index b669d4f..40098fd 100644
--- a/TestON/tests/FUNC/FUNCovsdbtest/FUNCovsdbtest.topo
+++ b/TestON/tests/FUNC/FUNCovsdbtest/FUNCovsdbtest.topo
@@ -1,58 +1,32 @@
<TOPOLOGY>
<COMPONENT>
- <ONOSbench>
- <host>OCN</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>
- <prompt></prompt>
- </COMPONENTS>
- </ONOSbench>
-
- <ONOScli1>
- <host>OCN</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></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> 1 </nodes> # number of nodes in the cluster
</COMPONENTS>
- </ONOScli1>
-
- <ONOS1>
- <host>OC1</host>
- <user>sdn</user>
- <password>rocks</password>
- <type>OnosDriver</type>
- <connect_order>3</connect_order>
- <COMPONENTS>
- <prompt></prompt>
- </COMPONENTS>
- </ONOS1>
-
- <ONOSrest>
- <host>OC1</host>
- <user>sdn</user>
- <password>rocks</password>
- <type>OnosRestDriver</type>
- <connect_order>4</connect_order>
- <COMPONENTS>
- <prompt></prompt>
- </COMPONENTS>
- </ONOSrest>
+ </ONOScell>
<OVSDB1>
<host>OCN</host>
<user>sdn</user>
<password>rocks</password>
<type>OvsdbDriver</type>
- <connect_order>5</connect_order>
+ <connect_order>2</connect_order>
<COMPONENTS>
<prompt></prompt>
</COMPONENTS>
@@ -63,7 +37,7 @@
<user>sdn</user>
<password>rocks</password>
<type>OvsdbDriver</type>
- <connect_order>6</connect_order>
+ <connect_order>2</connect_order>
<COMPONENTS>
<prompt></prompt>
</COMPONENTS>