Skip to content

Commit

Permalink
dev: debugging device call on dev_path
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudguruab committed Oct 26, 2023
1 parent efb1439 commit bda3318
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion os_migrate/plugins/module_utils/workload_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def _wait_for_volume_dev_path(self, conn, volume, vm, timeout):
volume = conn.get_volume_by_id(volume_id)
if volume.attachments:
attachment = self._get_attachment(volume, vm)
if attachment.device.startswith('/dev/'):
if attachment['device'].startswith('/dev/'):
return
time.sleep(1)
raise RuntimeError('Timed out waiting for volume device path!')
Expand Down
5 changes: 3 additions & 2 deletions os_migrate/plugins/modules/import_workload_export_volumes.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,12 +350,13 @@ def _get_root_and_data_volumes(self):
self.log.info('Volume is not in specified disk list, ignoring.')
continue

dev_path = self._get_attachment(volume, sourcevm).device
dev_path = self._get_attachment(volume, sourcevm)
dev_path = dev_path["device"]
self.volume_map[dev_path] = dict(
source_dev=None, source_id=volume.id, dest_dev=None,
dest_id=None, snap_id=None, image_id=None, name=volume.name,
size=volume.size, port=None, url=None, progress=None,
bootable=volume.bootable)
bootable=volume['bootable'])
self._update_progress(dev_path, 0.0)

def _validate_volumes_match_data(self):
Expand Down

0 comments on commit bda3318

Please sign in to comment.