X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=RO-VIM-vmware%2Fosm_rovim_vmware%2Fvimconn_vmware.py;h=b3cff595485f208d2c8fb8265b691b421d2199ef;hb=8658c2cd33bcea66c9b99aabb0825071c5c42df0;hp=5a58cf98ed90b2bc27da4f965265eff828f19622;hpb=049cbb1b256805f589c24776dcf092c77fefec6a;p=osm%2FRO.git diff --git a/RO-VIM-vmware/osm_rovim_vmware/vimconn_vmware.py b/RO-VIM-vmware/osm_rovim_vmware/vimconn_vmware.py index 5a58cf98..b3cff595 100644 --- a/RO-VIM-vmware/osm_rovim_vmware/vimconn_vmware.py +++ b/RO-VIM-vmware/osm_rovim_vmware/vimconn_vmware.py @@ -1907,6 +1907,7 @@ class vimconnector(vimconn.VimConnector): start=False, image_id=None, flavor_id=None, + affinity_group_list=[], net_list=[], cloud_config=None, disk_list=None, @@ -6230,7 +6231,7 @@ class vimconnector(vimconn.VimConnector): ) return None - deviceId = hex(host_pci_dev.deviceId % 2 ** 16).lstrip("0x") + deviceId = hex(host_pci_dev.deviceId % 2**16).lstrip("0x") backing = vim.VirtualPCIPassthroughDeviceBackingInfo( deviceId=deviceId, id=host_pci_dev.id, @@ -7493,13 +7494,10 @@ if [ "$1" = "precustomization" ];then for device in devices: if type(device) is vim.vm.device.VirtualDisk: - if ( - isinstance( - device.backing, - vim.vm.device.VirtualDisk.FlatVer2BackingInfo, - ) - and hasattr(device.backing, "fileName") - ): + if isinstance( + device.backing, + vim.vm.device.VirtualDisk.FlatVer2BackingInfo, + ) and hasattr(device.backing, "fileName"): disk_info["full_path"] = device.backing.fileName disk_info["datastore"] = device.backing.datastore disk_info["capacityKB"] = device.capacityInKB @@ -8661,3 +8659,13 @@ if [ "$1" = "precustomization" ];then poweron_task = self.get_task_from_response(response.text) return poweron_task + + def migrate_instance(self, vm_id, compute_host=None): + """ + Migrate a vdu + param: + vm_id: ID of an instance + compute_host: Host to migrate the vdu to + """ + # TODO: Add support for migration + raise vimconn.VimConnNotImplemented("Should have implemented this")