Merge pull request #724 from drybjed/virt-babyjson
virt: remove BabyJSON
This commit is contained in:
commit
40b85c8431
1 changed files with 8 additions and 2 deletions
|
@ -93,8 +93,9 @@ import sys
|
||||||
try:
|
try:
|
||||||
import libvirt
|
import libvirt
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print "failed=True msg='libvirt python module unavailable'"
|
HAS_VIRT = False
|
||||||
sys.exit(1)
|
else:
|
||||||
|
HAS_VIRT = True
|
||||||
|
|
||||||
ALL_COMMANDS = []
|
ALL_COMMANDS = []
|
||||||
VM_COMMANDS = ['create','status', 'start', 'stop', 'pause', 'unpause',
|
VM_COMMANDS = ['create','status', 'start', 'stop', 'pause', 'unpause',
|
||||||
|
@ -481,6 +482,11 @@ def main():
|
||||||
xml = dict(),
|
xml = dict(),
|
||||||
))
|
))
|
||||||
|
|
||||||
|
if not HAS_VIRT:
|
||||||
|
module.fail_json(
|
||||||
|
msg='The `libvirt` module is not importable. Check the requirements.'
|
||||||
|
)
|
||||||
|
|
||||||
rc = VIRT_SUCCESS
|
rc = VIRT_SUCCESS
|
||||||
try:
|
try:
|
||||||
rc, result = core(module)
|
rc, result = core(module)
|
||||||
|
|
Loading…
Reference in a new issue