def _qemu_io(img, cmd):
     """Run qemu-io cmd to a given img."""
     image_filename = img.image_filename
     logging.info("Run qemu-io %s" % image_filename)
     if img.image_format == "luks":
         image_secret_object = img._secret_objects[-1]
         image_json_str = get_image_json(img.tag, img.params, img.root_dir)
         image_json_str = " '%s'" % image_json_str
         image_filename = image_secret_object + image_json_str
     q = QemuIOSystem(test, params, image_filename)
     q.cmd_output(cmd, 120)
Exemplo n.º 2
0
 def _qemu_io(img, cmd):
     """Run qemu-io cmd to a given img."""
     try:
         QemuIOSystem(test, params, img.image_filename).cmd_output(cmd, 120)
     except process.CmdError as err:
         test.fail("qemu-io to '%s' failed: %s." %
                   (img.image_filename, str(err)))
Exemplo n.º 3
0
 def _qemu_io(img, cmd):
     """Run qemu-io cmd to a given img."""
     logging.info("Run qemu-io %s", img.image_filename)
     try:
         QemuIOSystem(test, params, img.image_filename).cmd_output(cmd, 120)
     except process.CmdError:
         test.fail("qemu-io to '%s' failed." % img.image_filename)
Exemplo n.º 4
0
 def _qemu_io(img, cmd):
     """Run qemu-io cmd to a given img."""
     logging.info("Run qemu-io %s", img.image_filename)
     QemuIOSystem(test, params, img.image_filename).cmd_output(cmd, 120)
 def _qemu_io(img, cmd):
     """Run qemu-io cmd to a given img."""
     logging.info("Run qemu-io %s" % img.image_filename)
     q = QemuIOSystem(test, params, img.image_filename)
     q.cmd_output(cmd, 120)