qvm-check: whitespace fixes
This commit is contained in:
parent
44da6d7940
commit
776393e97b
@ -38,7 +38,7 @@ Specify no state options to check if VM exists"""
|
|||||||
help="Determine if VM is paused")
|
help="Determine if VM is paused")
|
||||||
parser.add_option ("--template", action="store_true", dest="template", default=False,
|
parser.add_option ("--template", action="store_true", dest="template", default=False,
|
||||||
help="Determine if VM is a template")
|
help="Determine if VM is a template")
|
||||||
|
|
||||||
(options, args) = parser.parse_args ()
|
(options, args) = parser.parse_args ()
|
||||||
if (len (args) != 1):
|
if (len (args) != 1):
|
||||||
parser.error ("You must specify VM name!")
|
parser.error ("You must specify VM name!")
|
||||||
@ -54,27 +54,27 @@ Specify no state options to check if VM exists"""
|
|||||||
if options.verbose:
|
if options.verbose:
|
||||||
print >> sys.stdout, "A VM with the name '{0}' does not exist in the system!".format(vmname)
|
print >> sys.stdout, "A VM with the name '{0}' does not exist in the system!".format(vmname)
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
elif options.running:
|
elif options.running:
|
||||||
vm_state=not vm.is_running()
|
vm_state = not vm.is_running()
|
||||||
if options.verbose:
|
if options.verbose:
|
||||||
print >> sys.stdout, "A VM with the name {0} is {1}running.".format(vmname, "not " * vm_state)
|
print >> sys.stdout, "A VM with the name {0} is {1}running.".format(vmname, "not " * vm_state)
|
||||||
exit(vm_state)
|
exit(vm_state)
|
||||||
|
|
||||||
elif options.paused:
|
elif options.paused:
|
||||||
vm_state=not vm.is_paused()
|
vm_state = not vm.is_paused()
|
||||||
if options.verbose:
|
if options.verbose:
|
||||||
print >> sys.stdout, "A VM with the name {0} is {1}paused.".format(vmname, "not " * vm_state)
|
print >> sys.stdout, "A VM with the name {0} is {1}paused.".format(vmname, "not " * vm_state)
|
||||||
exit(vm_state)
|
exit(vm_state)
|
||||||
|
|
||||||
elif options.template:
|
elif options.template:
|
||||||
vm_state=not vm.is_template()
|
vm_state = not vm.is_template()
|
||||||
if options.verbose:
|
if options.verbose:
|
||||||
print >> sys.stdout, "A VM with the name {0} is {1}a template.".format(vmname, "not " * vm_state)
|
print >> sys.stdout, "A VM with the name {0} is {1}a template.".format(vmname, "not " * vm_state)
|
||||||
exit(vm_state)
|
exit(vm_state)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if options.verbose:
|
if options.verbose:
|
||||||
print >> sys.stdout, "A VM with the name '{0}' does exist.".format(vmname)
|
print >> sys.stdout, "A VM with the name '{0}' does exist.".format(vmname)
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user