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

Move disk related APIs into utils_disk #2148

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
5 changes: 3 additions & 2 deletions virttest/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

from virttest import iscsi
from virttest import utils_misc
from virttest import utils_disk
from virttest import virt_vm
from virttest import gluster
from virttest import lvm
Expand Down Expand Up @@ -259,15 +260,15 @@ def copy_nfs_image(params, image_name, root_dir):
base_dir = params.get("images_base_dir", data_dir.get_data_dir())
dst = get_image_filename(params, base_dir)
if(not os.path.isfile(dst) or
utils_misc.get_image_info(dst)['lcounts'].lower() == "true"):
utils_disk.get_image_info(dst)['lcounts'].lower() == "true"):
source = os.path.join(root_dir, "images", image_name)
if image_format not in source:
source = "%s.%s" % (source, image_format)
logging.debug("Checking for image available in image data "
"path - %s", source)
# check for image availability in images data directory
if(os.path.isfile(source) and not
utils_misc.get_image_info(source)['lcounts'].lower() == "true"):
utils_disk.get_image_info(source)['lcounts'].lower() == "true"):
logging.debug("Copying guest image from %s to %s", source,
dst)
shutil.copy(source, dst)
Expand Down
Loading