import sys sys.path.append("/home/cl/op/") from includes import system_command #from .. import includes stdout, stderr = system_command("nova-manage service list | grep XXX | grep -c enabled") if stdout: print ("%s service(s) are enabled but not working") % (stdout[0]) else: print ("All enabled services are working") sys.exit(0)
def nova_manage_check(): stdout, stderr = system_command("nova-manage service list | grep XXX | grep -c enabled") if stdout: print ("%s service(s) are enabled but not working") % (stdout[0]) else: print ("All enabled services are working")