WIP Additional methods to log and test application startup
diff --git a/TestON/tests/FuncPlatform/Dependency/App.py b/TestON/tests/FuncPlatform/Dependency/App.py
index f6fecd6..ceb0023 100644
--- a/TestON/tests/FuncPlatform/Dependency/App.py
+++ b/TestON/tests/FuncPlatform/Dependency/App.py
@@ -1,3 +1,8 @@
+"""
+Methods related to application interaction
+
+"""
+
def __init__( self ):
self.ip = '127.0.0.1'
@@ -10,27 +15,44 @@
nodeToActivateFrom = range( 0, nodes )
"""
if isinstance( apps, ( int, basestring ) ):
- main.log.error( "Please pass in a list of strings for args" )
+ main.log.error( 'Please pass in a list of strings for args' )
return main.FALSE
if not isinstance( nodeToActivateFrom, ( int ) ) or \
nodeToActivateFrom < 0:
- main.log.error( "Incorrect node specified" )
+ main.log.error( 'Incorrect node specified' )
return main.FALSE
+ # TODO: Start log capture and listen for exceptions
+ # and errors. Also investigate possible keywords
+ # to listen for when activating applications
+
+
for app in apps:
# Check if app str in appList is in the main scope
# definition main.appList
if app not in main.appList:
- main.log.error( "Invalid app name given" )
+ main.log.error( 'Invalid app name given' )
return main.FALSE
-
- # NOTE: assumes node 1 is always activating application
- appOutput = main.CLIs[nodeToActivateFrom].activateApp(
+
+ try:
+ # NOTE: assumes node 1 is always activating application
+ appOutput = main.CLIs[nodeToActivateFrom].activateApp(
main.appList[app] )
+ except KeyError:
+ main.log.error( 'There was an error with the key '+
+ str(app) )
+ return main.FALSE
return main.TRUE
+def deactivate( apps, nodeToDeactivateFrom=0 ):
+ """
+ Deactivate specified applications from node specified
+
+ """
+ main.log.report( 'deactivate implment me' )
+
def isAppInstallSuccess():
"""
Check the app list across clusters to determine
@@ -38,5 +60,5 @@
"""
- main.log.report( "isAppInstallSuccess" )
+ main.log.report( 'isAppInstallSuccess implement me' )