Improve SCPF tests
- Add flowObj param to check if test run with FlowObject
- Clean up old FlowObject tests
Change-Id: I04f455983a13a3221306fdde12ff6e9392fe7399
diff --git a/TestON/tests/SCPF/SCPFscalingMaxIntents/SCPFscalingMaxIntents.params b/TestON/tests/SCPF/SCPFscalingMaxIntents/SCPFscalingMaxIntents.params
index cb75b01..8510204 100644
--- a/TestON/tests/SCPF/SCPFscalingMaxIntents/SCPFscalingMaxIntents.params
+++ b/TestON/tests/SCPF/SCPFscalingMaxIntents/SCPFscalingMaxIntents.params
@@ -22,7 +22,9 @@
<cellName>productionCell</cellName>
<cellApps>drivers,openflow</cellApps>
</ENV>
-
+ <TEST>
+ <flowObj>False</flowObj>
+ </TEST>
<GIT>
<pull>False</pull>
<branch>master</branch>
@@ -47,7 +49,8 @@
</ATTEMPTS>
<DATABASE>
- <file>/tmp/ScalingMaxIntentDB</file>
+ <dbName>/tmp/ScalingMaxIntentDB</dbName>
+ <dbFlowObj>/tmp/ScalingMaxIntentDBWFO</dbFlowObj>
<nic>1gig</nic>
<node>baremetal</node>
</DATABASE>
diff --git a/TestON/tests/SCPF/SCPFscalingMaxIntents/SCPFscalingMaxIntents.py b/TestON/tests/SCPF/SCPFscalingMaxIntents/SCPFscalingMaxIntents.py
index 5420010..c688207 100644
--- a/TestON/tests/SCPF/SCPFscalingMaxIntents/SCPFscalingMaxIntents.py
+++ b/TestON/tests/SCPF/SCPFscalingMaxIntents/SCPFscalingMaxIntents.py
@@ -43,9 +43,15 @@
main.verifyAttempts = int( main.params['ATTEMPTS']['verify'] )
main.ingress = main.params['LINK']['ingress']
main.egress = main.params['LINK']['egress']
- main.dbFileName = main.params['DATABASE']['file']
main.cellData = {} # for creating cell file
main.reroute = main.params['reroute']
+ main.flowObj = main.params['TEST']['flowObj']
+ if main.flowObj == "True":
+ main.flowObj = True
+ main.dbFileName = main.params['DATABASE']['dbFlowObj']
+ else:
+ main.flowObj = False
+ main.dbFileName = main.params['DATABASE']['dbName']
main.threadID = 0
if main.reroute == "True":
@@ -312,6 +318,9 @@
main.CLIs[0].deviceRemove( d )
time.sleep(main.startUpSleep)
+ if main.flowObj:
+ main.CLIs[0].setCfg("org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator",
+ "useFlowObjectives", value="true")
main.step('Starting mininet topology')
mnStatus = main.Mininet1.startNet(topoFile='~/mininet/custom/rerouteTopo.py')
utilities.assert_equals( expect=main.TRUE,