Added Flow Objectives testing to FUNCintent
Change-Id: I39a64f032799a15cc7d02782ff8b36d334bf9df2
diff --git a/TestON/tests/FUNCintent/FUNCintent.params b/TestON/tests/FUNCintent/FUNCintent.params
index 26ee48d..59db14d 100644
--- a/TestON/tests/FUNCintent/FUNCintent.params
+++ b/TestON/tests/FUNCintent/FUNCintent.params
@@ -11,7 +11,8 @@
# 14 - Discover hosts with Mininet Pingall
# 15 - Discover hosts with Scapy arping ( only discovers scapy hosts )
# 16 - Balance ownership of switches
- # 17 - Stop Mininet
+ # 17 - Activate Flow Objectives
+ # 18 - Stop Mininet
# 1000 - Test host intents
# 2000 - Test point intents
# 3000 - Test single to multi point intents
@@ -19,10 +20,10 @@
# 5000 - Test host mobility
# 6000 - Test Multi Point intent End Point Failure
- <testcases>1,[2,10,12,13,15,16,1000,2000,3000,4000,5000,6000,17]*2,[2,11,12,13,15,16,1000,2000,3000,4000,5000,6000,17]*2</testcases>
+ <testcases>1,[2,10,12,13,15,16,1000,2000,3000,4000,5000,6000,18]*2,[2,10,12,13,15,16,17,1000,2000,3000,4000,5000,6000,18]*2,[2,11,12,13,15,16,1000,2000,3000,4000,5000,6000,18]*2,[2,11,12,13,15,16,17,1000,2000,3000,4000,5000,6000,18]*2</testcases>
<SCALE>
- <size>1,3,1,3</size>
+ <size>1,3,1,3,1,3,1,3</size>
</SCALE>
<DEPENDENCY>
diff --git a/TestON/tests/FUNCintent/FUNCintent.py b/TestON/tests/FUNCintent/FUNCintent.py
index ba4e8dd..2c7bcc9 100644
--- a/TestON/tests/FUNCintent/FUNCintent.py
+++ b/TestON/tests/FUNCintent/FUNCintent.py
@@ -57,6 +57,7 @@
main.CLIs = []
main.ONOSip = []
main.scapyHostNames = main.params[ 'SCAPY' ][ 'HOSTNAMES' ].split( ',' )
+ main.flowCompiler = "Flow Rules"
main.scapyHosts = [] # List of scapy hosts for iterating
main.assertReturnString = '' # Assembled assert return string
@@ -548,12 +549,31 @@
balanceResult = utilities.retry( f=main.CLIs[ 0 ].balanceMasters, retValue=main.FALSE, args=[] )
utilities.assert_equals( expect=main.TRUE,
- actual=stepResult,
+ actual=balanceResult,
onpass="Successfully balanced mastership of switches",
onfail="Failed to balance mastership of switches" )
def CASE17( self, main ):
"""
+ Use Flow Objectives
+ """
+ main.case( "Enable intent compilation using Flow Objectives" )
+ main.step( "Enabling Flow Objectives" )
+
+ main.flowCompiler = "Flow Objectives"
+
+ cmd = "org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator"
+
+ stepResult = main.CLIs[ 0 ].setCfg( component=cmd,
+ propName="useFlowObjectives", value="true" )
+
+ utilities.assert_equals( expect=main.TRUE,
+ actual=stepResult,
+ onpass="Successfully activated Flow Objectives",
+ onfail="Failed to activate Flow Objectives" )
+
+ def CASE18( self, main ):
+ """
Stop mininet and remove scapy host
"""
main.log.report( "Stop Mininet and Scapy" )
@@ -626,13 +646,14 @@
main.testName = "Host Intents"
main.case( main.testName + " Test - " + str( main.numCtrls ) +
- " NODE(S) - OF " + main.OFProtocol )
+ " NODE(S) - OF " + main.OFProtocol + " - Using " + main.flowCompiler )
main.caseExplanation = "This test case tests Host intents using " +\
str( main.numCtrls ) + " node(s) cluster;\n" +\
"Different type of hosts will be tested in " +\
"each step such as IPV4, Dual stack, VLAN " +\
"etc;\nThe test will use OF " + main.OFProtocol\
- + " OVS running in Mininet"
+ + " OVS running in Mininet and compile intents" +\
+ " using " + main.flowCompiler
main.step( "IPV4: Add host intents between h1 and h9" )
main.assertReturnString = "Assertion Result for IPV4 host intent with mac addresses\n"
@@ -856,14 +877,15 @@
main.testName = "Point Intents"
main.case( main.testName + " Test - " + str( main.numCtrls ) +
- " NODE(S) - OF " + main.OFProtocol )
+ " NODE(S) - OF " + main.OFProtocol + " - Using " + main.flowCompiler )
main.caseExplanation = "This test case will test point to point" +\
" intents using " + str( main.numCtrls ) +\
" node(s) cluster;\n" +\
"Different type of hosts will be tested in " +\
"each step such as IPV4, Dual stack, VLAN etc" +\
";\nThe test will use OF " + main.OFProtocol +\
- " OVS running in Mininet"
+ " OVS running in Mininet and compile intents" +\
+ " using " + main.flowCompiler
# No option point intents
main.step( "NOOPTION: Add point intents between h1 and h9" )
@@ -1177,14 +1199,15 @@
main.testName = "Single to Multi Point Intents"
main.case( main.testName + " Test - " + str( main.numCtrls ) +
- " NODE(S) - OF " + main.OFProtocol )
+ " NODE(S) - OF " + main.OFProtocol + " - Using " + main.flowCompiler )
main.caseExplanation = "This test case will test single point to" +\
" multi point intents using " +\
str( main.numCtrls ) + " node(s) cluster;\n" +\
"Different type of hosts will be tested in " +\
"each step such as IPV4, Dual stack, VLAN etc" +\
";\nThe test will use OF " + main.OFProtocol +\
- " OVS running in Mininet"
+ " OVS running in Mininet and compile intents" +\
+ " using " + main.flowCompiler
main.step( "NOOPTION: Install and test single point to multi point intents" )
main.assertReturnString = "Assertion results for IPV4 single to multi point intent with no options set\n"
@@ -1382,14 +1405,15 @@
main.testName = "Multi To Single Point Intents"
main.case( main.testName + " Test - " + str( main.numCtrls ) +
- " NODE(S) - OF " + main.OFProtocol )
+ " NODE(S) - OF " + main.OFProtocol + " - Using " + main.flowCompiler )
main.caseExplanation = "This test case will test single point to" +\
" multi point intents using " +\
str( main.numCtrls ) + " node(s) cluster;\n" +\
"Different type of hosts will be tested in " +\
"each step such as IPV4, Dual stack, VLAN etc" +\
";\nThe test will use OF " + main.OFProtocol +\
- " OVS running in Mininet"
+ " OVS running in Mininet and compile intents" +\
+ " using " + main.flowCompiler
main.step( "NOOPTION: Add multi point to single point intents" )
main.assertReturnString = "Assertion results for NOOPTION multi to single point intent\n"