Added test case to activate Flow Objectives
Change-Id: Id99e78eb8405a5a3da4947bc2acdc70fd7b80c4c
diff --git a/TestON/tests/FUNCintentRest/FUNCintentRest.params b/TestON/tests/FUNCintentRest/FUNCintentRest.params
index 07a5cff..7b29e9d 100644
--- a/TestON/tests/FUNCintentRest/FUNCintentRest.params
+++ b/TestON/tests/FUNCintentRest/FUNCintentRest.params
@@ -11,17 +11,18 @@
# 14 - Discover all hosts and Create a dictionary of hosts information
# 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
# 4000 - Test multi to single point intents
# 5000 - Test host mobility
- <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>
+ <testcases>1,[2,10,12,13,15,16,1000,2000,5000,18]*2,[2,10,12,13,15,16,17,1000,2000,5000,18]*2,[2,11,12,13,15,16,1000,2000,5000,18]*2,[2,11,12,13,15,16,17,1000,2000,5000,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/FUNCintentRest/FUNCintentRest.py b/TestON/tests/FUNCintentRest/FUNCintentRest.py
index 1a32bc1..8c6c8d5 100644
--- a/TestON/tests/FUNCintentRest/FUNCintentRest.py
+++ b/TestON/tests/FUNCintentRest/FUNCintentRest.py
@@ -154,6 +154,7 @@
# main.scale[ 0 ] determines the current number of ONOS controller
main.numCtrls = int( main.scale[ 0 ] )
+ main.flowCompiler = "Flow Rules"
main.case( "Starting up " + str( main.numCtrls ) +
" node(s) ONOS cluster" )
@@ -671,6 +672,25 @@
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.CLIs2[ 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 hosts
"""
main.log.report( "Stop Mininet and Scapy" )
@@ -743,13 +763,14 @@
intentLeadersOld = main.CLIs2[ 0 ].leaderCandidates()
main.case( "Host Intents 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"
+ "etc;\nThe test will use OF " + main.OFProtocol +\
+ " OVS running in Mininet and compile intents" +\
+ " using " + main.flowCompiler
main.step( "IPV4: Add and test host intents between h1 and h9" )
main.assertReturnString = "Assertion result for IPV4 host intent with mac addresses\n"
@@ -960,14 +981,15 @@
main.numSwitch"
main.case( "Point Intents 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" )
@@ -1255,14 +1277,15 @@
main.numSwitch"
main.case( "Single To Multi Point Intents Test - " +
- str( main.numCtrls ) + " NODE(S) - OF " + main.OFProtocol )
+ str( main.numCtrls ) + " 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 single point to multi point intents" )
stepResult = main.TRUE
@@ -1395,14 +1418,15 @@
main.numSwitch"
main.case( "Multi To Single Point Intents Test - " +
- str( main.numCtrls ) + " NODE(S) - OF " + main.OFProtocol )
+ str( main.numCtrls ) + " 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" )
stepResult = main.TRUE