Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multihost: Testing image #4203

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions qemu/tests/cfg/multihost.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
- multihost:
type = multihost
vms = ''
start_vm = no
kill_vm = no
nodes = node1
multihost = yes
storage_type = nfs
force_create_image = yes
remove_image = yes
images = top
image_chain_top = base top
image_name_base = base
image_name_top = top
image_format_base = luks
image_secret_base = redhat
image_format_top = qcow2
preallocated_base = metadata
image_cluster_size = 1M
28 changes: 28 additions & 0 deletions qemu/tests/multihost.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
from virttest.vt_imgr import vt_imgr


def run(test, params, env):
images = dict()
for image_tag in params.objects("images"):
images[image_tag] = vt_imgr.query_image(image_tag)
vt_imgr.backup_image(images[image_tag])
test.log.info(
"after backup: %s: %s", image_tag, vt_imgr.get_image_info(images[image_tag])
)
vt_imgr.restore_image(images[image_tag])
test.log.info(
"after restore: %s: %s",
image_tag,
vt_imgr.get_image_info(images[image_tag]),
)

for image_id in images.values():
test.log.info("source: %s: %s", image_id, vt_imgr.get_image_info(image_id))
cloned_image_id = vt_imgr.clone_image(image_id)
test.log.info(
"cloned: %s: %s", cloned_image_id, vt_imgr.get_image_info(cloned_image_id)
)
vt_imgr.update_image(cloned_image_id, {"destroy": {}})
vt_imgr.destroy_image_object(cloned_image_id)
vt_imgr.update_image(image_id, {"destroy": {}})
vt_imgr.destroy_image_object(image_id)
Loading