Skip to content

Commit

Permalink
Merge pull request autotest#5458 from nanli1/fix_storage_case_inappro…
Browse files Browse the repository at this point in the history
…priate_message

fix storage case inappropriate message
  • Loading branch information
chunfuwen authored Mar 4, 2024
2 parents 624bc71 + db41657 commit 1836fc0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libvirt/tests/src/storage/virsh_pool_autostart.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,12 @@ def change_source_path(new_path, update_policy="set"):
virsh.pool_start(pool_name, debug=True, ignore_status=False)
res = virsh.vol_list(pool_name, debug=True,
ignore_status=False).stdout_text
vol = re.findall(r"(\S+)\ +(\S+)", str(res.strip()))[1][0]

vol = re.findall(r"(\S+)\ +(\S+)", str(res.strip()))[1]
if not vol:
test.fail('Expect to get vol in %s pool' % pool_name)
libvirt_vmxml.modify_vm_device(
vmxml, 'disk', eval(disk_dict % (pool_name, vol)), index=1)
vmxml, 'disk', eval(disk_dict % (pool_name, vol[0])), index=1)
virsh.start(vm_name)
vmxml = vm_xml.VMXML.new_from_dumpxml(vm_name)
test.log.debug("Get guest xml is:\n%s", vmxml)
Expand Down

0 comments on commit 1836fc0

Please sign in to comment.