def postprocess_image(test, params):
    """
    Postprocess a single QEMU image according to the instructions in params.

    @param test: An Autotest test object.
    @param params: A dict containing image postprocessing parameters.
    """
    if params.get("check_image") == "yes":
        virt_vm.check_image(params, test.bindir)
    if params.get("remove_image") == "yes":
        virt_vm.remove_image(params, test.bindir)
Exemple #2
0
def postprocess_image(test, params):
    """
    Postprocess a single QEMU image according to the instructions in params.

    @param test: An Autotest test object.
    @param params: A dict containing image postprocessing parameters.
    """
    if params.get("check_image") == "yes":
        virt_vm.check_image(params, test.bindir)
    if params.get("remove_image") == "yes":
        virt_vm.remove_image(params, test.bindir)
Exemple #3
0
def postprocess_image(test, params):
    """
    Postprocess a single QEMU image according to the instructions in params.

    @param test: An Autotest test object.
    @param params: A dict containing image postprocessing parameters.
    """
    if params.get("check_image") == "yes":
        try:
            virt_vm.check_image(params, test.bindir)
        except Exception, e:
            if params.get("restore_image_on_check_error", "no") == "yes":
                virt_vm.backup_image(params, test.bindir, 'restore', True)
            raise e
def postprocess_image(test, params):
    """
    Postprocess a single QEMU image according to the instructions in params.

    @param test: An Autotest test object.
    @param params: A dict containing image postprocessing parameters.
    """
    if params.get("check_image") == "yes":
        try:
            virt_vm.check_image(params, test.bindir)
        except Exception, e:
            if params.get("restore_image_on_check_error", "no") == "yes":
                virt_vm.backup_image(params, test.bindir, 'restore', True)
            raise e