X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=vmwarerecli.py;h=acd4240b367ef3f43bcd74eed8e10955b587e2a2;hb=06e6c396413630640cafae3488442a0869f1642d;hp=c85b1d5715ad94eb6307609db3c02ecf862a9764;hpb=fe3f3c9af04a7250408d9a91c41de3e11684166c;p=osm%2FRO.git diff --git a/vmwarerecli.py b/vmwarerecli.py index c85b1d57..acd4240b 100755 --- a/vmwarerecli.py +++ b/vmwarerecli.py @@ -552,6 +552,7 @@ def boot_image(vim=None, image_name=None, vm_name=None): if vim_catalog is None: return None + print (" Booting {} image id {} ".format(vm_name, vim_catalog)) vm_uuid = vim.new_vminstance(name=vm_name, image_id=vim_catalog) if vm_uuid is not None and validate_uuid4(vm_uuid): print("Image booted and vm uuid {}".format(vm_uuid)) @@ -559,10 +560,17 @@ def boot_image(vim=None, image_name=None, vm_name=None): if vapp_dict is not None: print_vapp(vapp_dict=vapp_dict) return True + except vimconn.vimconnNotFoundException as notFound: + print("Failed boot {} image".format(image_name)) + print(notFound.message) + except vimconn.vimconnException as vimconError: + print("Failed boot {} image".format(image_name)) + print(vimconError.message) except: - print("Failed uploaded {} image".format(image_name)) + print("Failed boot {} image".format(image_name)) - return False + + return False def image_action(vim=None, action=None, namespace=None):