Merge "WIP Added topology and topo dependency. Implemented the add flow case."
diff --git a/TestON/tests/CHOtest/CHOtest.params b/TestON/tests/CHOtest/CHOtest.params
index 03574a0..4f34b11 100644
--- a/TestON/tests/CHOtest/CHOtest.params
+++ b/TestON/tests/CHOtest/CHOtest.params
@@ -94,7 +94,7 @@
</timers>
<TEST>
- <pause_test>on</pause_test>
+ <pause_test>off</pause_test>
<email>off</email>
<intent_check>8</intent_check>
</TEST>
diff --git a/TestON/tests/FUNCovsdbtest/FUNCovsdbtest.py b/TestON/tests/FUNCovsdbtest/FUNCovsdbtest.py
index 95e90fd..3c76596 100644
--- a/TestON/tests/FUNCovsdbtest/FUNCovsdbtest.py
+++ b/TestON/tests/FUNCovsdbtest/FUNCovsdbtest.py
@@ -384,7 +384,8 @@
utilities.assert_equals( expect=main.TRUE,
actual=stepResult,
onpass="ovsdb node 1 manager is " + str( response ) ,
- onfail="ovsdb node 1 manager check failed" )
+ onfail="ovsdb node 1 manager check failed\n" +\
+ str( main.OVSDB1.show() ) )
main.step( "Check ovsdb node 2 manager is " + str( ctrlip ) )
response = main.OVSDB2.getManager()
@@ -395,7 +396,8 @@
utilities.assert_equals( expect=main.TRUE,
actual=stepResult,
onpass="ovsdb node 2 manager is " + str( response ) ,
- onfail="ovsdb node 2 manager check failed" )
+ onfail="ovsdb node 2 manager check failed\n" +\
+ str( main.OVSDB2.show() ) )
main.step( "Check ovsdb node 1 bridge br-int controller set to " + str( ctrlip ) )
response = main.OVSDB1.getController( "br-int" )
@@ -408,7 +410,7 @@
onpass="Check ovsdb node 1 bridge br-int controller set to " +\
str( ctrlip ) + " sucess",
onfail="Check ovsdb node 1 bridge br-int controller set to " +\
- str( ctrlip ) + " failed" )
+ str( ctrlip ) + " failed\n" + str( main.OVSDB1.show() ) )
main.step( "Check ovsdb node 2 bridge br-int controller set to " + str( ctrlip ) )
response = main.OVSDB2.getController( "br-int" )
@@ -421,7 +423,7 @@
onpass="Check ovsdb node 2 bridge br-int controller set to " +\
str( ctrlip ) + " sucess",
onfail="Check ovsdb node 2 bridge br-int controller set to " +\
- str( ctrlip ) + " failed" )
+ str( ctrlip ) + " failed\n" + str( main.OVSDB2.show()) )
main.step( "Check onoscli devices have ovs " + str( OVSDB1Ip ) )
response = main.ONOScli1.devices()
diff --git a/TestON/tests/SCPFintentRerouteLat/SCPFintentRerouteLat.py b/TestON/tests/SCPFintentRerouteLat/SCPFintentRerouteLat.py
index e62c633..0dafc51 100644
--- a/TestON/tests/SCPFintentRerouteLat/SCPFintentRerouteLat.py
+++ b/TestON/tests/SCPFintentRerouteLat/SCPFintentRerouteLat.py
@@ -170,7 +170,6 @@
#from scipy import stats
ts = time.time()
- date = datetime.datetime.fromtimestamp(ts).strftime('%Y-%m-%d')
sampleSize = int(main.params[ 'TEST' ][ 'sampleSize' ])
warmUp = int(main.params[ 'TEST' ][ 'warmUp' ])
@@ -260,25 +259,21 @@
if debug: main.log.debug("raw: " + raw)
- try:
- temp = raw.splitlines()
- except ValueError:
- main.log.error("Exception at line 264: cannot split lines")
- continue
+ temp = raw.splitlines()
if debug: main.log.debug("temp (after splitlines): " + str(temp))
- for line in temp:
- if str(date) in line:
- temp = line
- break
+ # Since the string is deterministic the date is always the 3rd element.
+ # However, if the data were grepping for in the onos log changes then this will
+ # not work. This is why we print out the raw and temp string so we can visually
+ # check if everything is in the correct order. temp should like this:
+ # temp = ['/onos$ onos-ssh $OC1 cat /opt/onos/log/karaf.log | grep Top ',
+ # 'ologyManager| tail -1', '2015-10-15 12:03:33,736 ... ]
+ temp = temp[2]
if debug: main.log.debug("temp (checking for date): " + str(temp))
- try:
- cutTimestamp = (temp.split(" "))[0] + " " + (temp.split(" "))[1]
- except ValueError:
- main.log.error("Exception at line 279: cannot split on spaces")
+ cutTimestamp = (temp.split(" "))[0] + " " + (temp.split(" "))[1]
if debug: main.log.info("Cut timestamp: " + cutTimestamp)
diff --git a/TestON/tests/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.py b/TestON/tests/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.py
index 4efd38a..0c0844d 100644
--- a/TestON/tests/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.py
+++ b/TestON/tests/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.py
@@ -726,14 +726,27 @@
expectAllSuccess = True )
main.step( "Kill speaker1" )
- result = main.TRUE
- command = "sudo kill -9 `ps -ef | grep quagga-sdn.conf | grep -v grep | awk '{print $2}'`"
- result = main.Mininet.node( "root", command )
+ command1 = "ps -e | grep bgp -c"
+ result1 = main.Mininet.node( "root", command1 )
+
+ # The total BGP daemon number in this test environment is 5.
+ if "5" in result1:
+ main.log.debug( "Before kill speaker1, 5 BGP daemons - correct" )
+ else:
+ main.log.warn( "Before kill speaker1, number of BGP daemons is wrong" )
+ main.log.info( result1 )
+
+ command2 = "sudo kill -9 `ps -ef | grep quagga-sdn.conf | grep -v grep | awk '{print $2}'`"
+ result2 = main.Mininet.node( "root", command2 )
+
+ result3 = main.Mininet.node( "root", command1 )
+
utilities.assert_equals( expect = True,
- actual = ( "quagga-sdn.conf" in result ),
+ actual = ( "4" in result3 ),
onpass = "Kill speaker1 succeeded",
onfail = "Kill speaker1 failed" )
- if ( "quagga-sdn.conf" not in result ) :
+ if ( "4" not in result3 ) :
+ main.log.info( result3 )
main.cleanup()
main.exit()