def _do_test_extract_snapshot(self, mock_execute, dest_format='raw', out_format='raw'): libvirt_utils.extract_snapshot('/path/to/disk/image', 'qcow2', '/extracted/snap', dest_format) mock_execute.assert_called_once_with( 'qemu-img', 'convert', '-f', 'qcow2', '-O', out_format, '/path/to/disk/image', '/extracted/snap')
def _do_test_extract_snapshot(self, mock_execute, dest_format='raw', out_format='raw'): libvirt_utils.extract_snapshot('/path/to/disk/image', 'qcow2', '/extracted/snap', dest_format) mock_execute.assert_called_once_with('qemu-img', 'convert', '-f', 'qcow2', '-O', out_format, '/path/to/disk/image', '/extracted/snap')
def snapshot_extract(self, target, out_format): libvirt_utils.extract_snapshot(self.path, 'qcow2', target, out_format)