Enable core flow number check in CHO Test
Change-Id: I537912145d5cc797c51dd5be8ef6c45f934776f0
diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index ff3a56c..8ff6577 100755
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -2654,14 +2654,20 @@
main.cleanup()
main.exit()
- def FlowAddedCount( self, deviceId ):
+ def flowAddedCount( self, deviceId, core=False ):
"""
Determine the number of flow rules for the given device id that are
in the added state
+ Params:
+ core: if True, only return the number of core flows added
"""
try:
- cmdStr = "flows any " + str( deviceId ) + " | " +\
- "grep 'state=ADDED' | wc -l"
+ if core:
+ cmdStr = "flows any " + str( deviceId ) + " | " +\
+ "grep 'state=ADDED' | grep org.onosproject.core | wc -l"
+ else:
+ cmdStr = "flows any " + str( deviceId ) + " | " +\
+ "grep 'state=ADDED' | wc -l"
handle = self.sendline( cmdStr )
assert "Command not found:" not in handle, handle
return handle