Fix appStatus function
Change-Id: I0a849df528b09d8cdeddba82c7ad6e575a97ce79
diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index 069805b..416ecf2 100755
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -3731,7 +3731,7 @@
main.log.exception( self.name + ": Uncaught exception!" )
main.cleanAndExit()
- def appStatus( self, appName, appNamePrefix="org.onosproject." ):
+ def appStatus( self, appName ):
"""
Uses the onos:apps cli command to return the status of an application.
Returns:
@@ -3745,7 +3745,6 @@
main.log.error( self.name + ".appStatus(): appName must be" +
" a string" )
return None
- appName = appNamePrefix + appName
output = self.apps( jsonFormat=True )
appsJson = json.loads( output )
state = None
diff --git a/TestON/tests/dependencies/ONOSSetup.py b/TestON/tests/dependencies/ONOSSetup.py
index 440e616..66d104d 100644
--- a/TestON/tests/dependencies/ONOSSetup.py
+++ b/TestON/tests/dependencies/ONOSSetup.py
@@ -466,7 +466,8 @@
functions( *args ) if args is not None else functions()
def ONOSSetUp( self, cluster, hasMultiNodeRounds=False, startOnos=True, newCell=True,
- cellName="temp", cellApps="drivers", mininetIp="", removeLog=False, extraApply=None, applyArgs=None,
+ cellName="temp", cellApps="drivers", appPrefix="org.onosproject.",
+ mininetIp="", removeLog=False, extraApply=None, applyArgs=None,
extraClean=None, cleanArgs=None, skipPack=False, installMax=False, useSSH=True,
killRemoveMax=True, stopAtomix=False, stopOnos=False, installParallel=True, cellApply=True,
includeCaseDesc=True ):
@@ -492,6 +493,7 @@
* newCell - True for making a new cell and False for not making it.
* cellName - Name of the cell that will be used.
* cellApps - The cell apps string. Will be overwritten by main.apps if it exists
+ * appPrefix - Prefix of app names. Will use "org.onosproject." by default
* mininetIp - Mininet IP address.
* removeLog - True if wish to remove raft logs
* extraApply - Function( s ) that will be called before building ONOS. Default to None.
@@ -572,6 +574,7 @@
if cellApply:
if apps:
apps = apps.split( ',' )
+ apps = [ appPrefix + app for app in apps ]
onosAppsResult = self.checkOnosApps( cluster, apps )
else:
main.log.warn( "No apps were specified to be checked after startup" )