|
|
|
@ -93,8 +93,9 @@ import sys
|
|
|
|
|
try:
|
|
|
|
|
import libvirt
|
|
|
|
|
except ImportError:
|
|
|
|
|
print "failed=True msg='libvirt python module unavailable'"
|
|
|
|
|
sys.exit(1)
|
|
|
|
|
HAS_VIRT = False
|
|
|
|
|
else:
|
|
|
|
|
HAS_VIRT = True
|
|
|
|
|
|
|
|
|
|
ALL_COMMANDS = []
|
|
|
|
|
VM_COMMANDS = ['create','status', 'start', 'stop', 'pause', 'unpause',
|
|
|
|
@ -481,6 +482,11 @@ def main():
|
|
|
|
|
xml = dict(),
|
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
if not HAS_VIRT:
|
|
|
|
|
module.fail_json(
|
|
|
|
|
msg='The `libvirt` module is not importable. Check the requirements.'
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
rc = VIRT_SUCCESS
|
|
|
|
|
try:
|
|
|
|
|
rc, result = core(module)
|
|
|
|
|