Fixed remove intent verification and added some docs
Change-Id: I298e361dcaff6f0f5be2c0e955b81809dcd9657f
diff --git a/TestON/tests/FUNCintent/Dependency/FuncIntentFunction.py b/TestON/tests/FUNCintent/Dependency/FuncIntentFunction.py
index 13877b2..545aca9 100644
--- a/TestON/tests/FUNCintent/Dependency/FuncIntentFunction.py
+++ b/TestON/tests/FUNCintent/Dependency/FuncIntentFunction.py
@@ -1064,27 +1064,31 @@
Remove all intents in the intentsId
"""
- intentsRemaining = []
+ onosSummary = []
removeIntentResult = main.TRUE
# Remove intents
for intent in intentsId:
main.CLIs[ 0 ].removeIntent( intentId=intent, purge=True )
time.sleep( 5 )
- # Checks if there is remaining intents using intents()
- intentsRemaining = main.CLIs[ 0 ].intents( jsonFormat=False )
- # If there is remianing intents then remove intents should fail
- if intentsRemaining:
- main.log.info( itemName + ": There are " +
- str( len( intentsRemaining ) ) + " intents remaining, "
- + "failed to remove all the intents " )
- removeIntentResult = main.FALSE
- main.log.info( intentsRemaining )
- else:
- main.log.info( itemName + ": There are no intents remaining, " +
+ # If there is remianing intents then remove intents should fail
+ for i in range( main.numCtrls ):
+ onosSummary.append( json.loads( main.CLIs[ i ].summary() ) )
+
+ for summary in onosSummary:
+ if summary.get( 'intents' ) != 0:
+ main.log.warn( itemName + ": There are " +
+ str( summary.get( 'intents' ) ) +
+ " intents remaining in node " +
+ str( summary.get( 'node' ) ) +
+ ", failed to remove all the intents " )
+ removeIntentResult = main.FALSE
+
+ if removeIntentResult:
+ main.log.info( itemName + ": There are no more intents remaining, " +
"successfully removed all the intents." )
- removeIntentResult = main.TRUE
+
return removeIntentResult
def checkFlowsCount( main ):
diff --git a/TestON/tests/FUNCintent/FUNCintent.params b/TestON/tests/FUNCintent/FUNCintent.params
index 1daba68..891f572 100644
--- a/TestON/tests/FUNCintent/FUNCintent.params
+++ b/TestON/tests/FUNCintent/FUNCintent.params
@@ -1,4 +1,16 @@
<PARAMS>
+ # CASE - Description
+ # 1 - Variable initialization and optional pull and build ONOS package
+ # 2 - Install ONOS
+ # 9 - Report logs
+ # 11 - Start Mininet
+ # 12 - Assign switch to controller
+ # 13 - Create a data of hosts information
+ # 14 - Stop Mininet
+ # 1000 - Test host intents
+ # 2000 - Test point intents
+ # 3000 - Test single to multi point intents
+ # 4000 - Test multi to single point intents
<testcases>1,2,11,12,13,1000,2000,3000,4000</testcases>