Added testcase to balance ownership of switches to FUNCintent and
FUNCintentRest
Added new cli-driver function to remove all intents
Change-Id: If5ae4760f25fbc3334dc9dab8d0c5faf8defd088
diff --git a/TestON/tests/FUNCintentRest/FUNCintentRest.params b/TestON/tests/FUNCintentRest/FUNCintentRest.params
index 94339b4..07a5cff 100644
--- a/TestON/tests/FUNCintentRest/FUNCintentRest.params
+++ b/TestON/tests/FUNCintentRest/FUNCintentRest.params
@@ -10,14 +10,15 @@
# 13 - Create Scapy Components
# 14 - Discover all hosts and Create a dictionary of hosts information
# 15 - Discover hosts with scapy arping ( only discovers scapy hosts )
- # 16 - Stop Mininet
+ # 16 - Balance ownership of switches
+ # 17 - Stop Mininet
# 1000 - Test host intents
# 2000 - Test point intents
# 3000 - Test single to multi point intents
# 4000 - Test multi to single point intents
# 5000 - Test host mobility
- <testcases>1,[2,10,12,13,15,1000,2000,5000,16]*2,[2,11,12,13,15,1000,2000,5000,16]*2</testcases>
+ <testcases>1,[2,10,12,13,15,16,1000,2000,5000,17]*2,[2,11,12,13,15,16,1000,2000,5000,17]*2</testcases>
<SCALE>
<size>1,3,1,3</size>
diff --git a/TestON/tests/FUNCintentRest/FUNCintentRest.py b/TestON/tests/FUNCintentRest/FUNCintentRest.py
index ede3459..1a32bc1 100644
--- a/TestON/tests/FUNCintentRest/FUNCintentRest.py
+++ b/TestON/tests/FUNCintentRest/FUNCintentRest.py
@@ -167,6 +167,7 @@
" before initiating environment setup" )
time.sleep( main.startUpSleep )
+
main.step( "Uninstalling ONOS package" )
onosUninstallResult = main.TRUE
for ip in main.ONOSip:
@@ -178,6 +179,8 @@
onpass="Successfully uninstalled ONOS package",
onfail="Failed to uninstall ONOS package" )
+ time.sleep( main.startUpSleep )
+
for i in range( main.maxNodes ):
main.ONOSbench.onosDie( main.ONOSip[ i ] )
@@ -653,6 +656,21 @@
def CASE16( self, main ):
"""
+ Balance Masters
+ """
+ main.case( "Balance mastership of switches" )
+ main.step( "Balancing mastership of switches" )
+
+ balanceResult = main.FALSE
+ balanceResult = utilities.retry( f=main.CLIs2[ 0 ].balanceMasters, retValue=main.FALSE, args=[] )
+
+ utilities.assert_equals( expect=main.TRUE,
+ actual=stepResult,
+ onpass="Successfully balanced mastership of switches",
+ onfail="Failed to balance mastership of switches" )
+
+ def CASE17( self, main ):
+ """
Stop mininet and remove scapy hosts
"""
main.log.report( "Stop Mininet and Scapy" )