Commvault / cvpysdk

Developer SDK - Python
https://commvault.github.io/cvpysdk/
Apache License 2.0
54 stars 41 forks source link

google cloud VM restore doesn't work #95

Closed marekk1717 closed 4 years ago

marekk1717 commented 4 years ago
in ----> 1 rj = gcpsb1.full_vm_restore_out_of_place(vm_to_restore='proxy1', new_name='proxy1rst', zone='europe-west6-a', power_on=False, machine_type='n1-standard-2') c:\users\mkedzierski\appdata\local\programs\python\python37-32\lib\site-packages\cvpysdk-11.20-py3.7.egg\cvpysdk\subclients\virtualserver\google_cloud_platform.py in full_vm_restore_out_of_place(self, vm_to_restore, proxy_client, new_name, zone, machine_type, overwrite, power_on, public_ip, copy_precedence, restore_option) 200 ) 201 --> 202 request_json = self._prepare_fullvm_restore_json(restore_option) 203 return self._process_restore_response(request_json) c:\users\mkedzierski\appdata\local\programs\python\python37-32\lib\site-packages\cvpysdk-11.20-py3.7.egg\cvpysdk\subclients\vssubclient.py in _prepare_fullvm_restore_json(self, restore_option) 2370 self._backupset_object._instance_object._restore_association = self._subClientEntity 2371 self._json_restore_virtualServerRstOption(restore_option) -> 2372 self._json_restore_diskLevelVMRestoreOption(restore_option) 2373 self._json_vcenter_instance(restore_option) 2374 c:\users\mkedzierski\appdata\local\programs\python\python37-32\lib\site-packages\cvpysdk-11.20-py3.7.egg\cvpysdk\subclients\vssubclient.py in _json_restore_diskLevelVMRestoreOption(self, value) 834 if not isinstance(value, dict): 835 raise SDKException('Subclient', '101') --> 836 vcenter_userpwd = self._instance_object._user_name 837 838 json_disklevel_option_restore = { AttributeError: 'GoogleCloudInstance' object has no attribute '_user_name'
Vairavaprakash commented 4 years ago

Hi Marekk1717,

This has been fixed, will update you once fix is available in Dev branch

spakhare commented 4 years ago

Hi @marekk1717 ,

The fix is available in dev branch.