X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=RO-VIM-vmware%2Fosm_rovim_vmware%2Fvimconn_vmware.py;h=ff89b5adf80262c449f05a61f74e3fc63d374387;hb=refs%2Ftags%2Fv12.0.0;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..ff89b5ad 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,23 @@ 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") + + def resize_instance(self, vm_id, flavor_id=None): + """ + resize a vdu + param: + vm_id: ID of an instance + flavor_id: flavor_id to resize the vdu to + """ + # TODO: Add support for resize + raise vimconn.VimConnNotImplemented("Should have implemented this")