def _get_remote_disk_data(self, vmutils_remote, disk_paths, dest_host): # TODO(claudiub): Remove this after the livemigrationutils usage has # been updated to create planned VM on the destination host beforehand. remote_iscsi_initiator = iscsi_wmi_utils.ISCSIInitiatorWMIUtils( dest_host) disk_paths_remote = {} for (rasd_rel_path, disk_path) in disk_paths.items(): target = self._iscsi_initiator.get_target_from_disk_path(disk_path) if target: (target_iqn, target_lun) = target dev_num = remote_iscsi_initiator.get_device_number_for_target( target_iqn, target_lun) disk_path_remote = ( vmutils_remote.get_mounted_disk_by_drive_number(dev_num)) disk_paths_remote[rasd_rel_path] = disk_path_remote else: LOG.debug("Could not retrieve iSCSI target " "from disk path: %s", disk_path) return disk_paths_remote
def __init__(self): super(LiveMigrationUtils, self).__init__() self._vmutils = vmutils.VMUtils() self._jobutils = jobutils.JobUtils() self._iscsi_initiator = iscsi_wmi_utils.ISCSIInitiatorWMIUtils()
def __init__(self): super(LiveMigrationUtils, self).__init__() self._iscsi_initiator = iscsi_wmi_utils.ISCSIInitiatorWMIUtils()
def __init__(self): self._vmutils = vmutils.VMUtils() self._jobutils = jobutils.JobUtils() self._iscsi_initiator = iscsi_wmi_utils.ISCSIInitiatorWMIUtils()
def setUp(self): super(ISCSIInitiatorWMIUtilsTestCase, self).setUp() self._initiator = iscsi_wmi_utils.ISCSIInitiatorWMIUtils() self._initiator._conn_storage = mock.MagicMock() self._initiator._conn_wmi = mock.MagicMock()