示例#1
0
文件: nova_manage.py 项目: abhi52/op
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)
示例#2
0
文件: nova_manage.py 项目: abhi52/op
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")