def status_webapp(app, url='http://localhost:8080/manager', timeout=180):
 webapps = ls(url, timeout=timeout)
 for i in webapps:
  if (i == app):
   return webapps[i]['mode']
 return 'missing'

def status_webapp ( app , url = 'http://localhost:8080/manager' , timeout = 180 ) : webapps = ls ( url , timeout = timeout ) for i in webapps : if ( i == app ) : return webapps [ i ] [ 'mode' ] return 'missing'
return the status of the webapp app the webapp context path url : URL the url of the server manager webapp timeout : 180 timeout for http request cli examples: .