diff options
author | Kerim Gokarslan <kgokarsl@cisco.com> | 2017-09-14 20:17:41 -0700 |
---|---|---|
committer | Kerim Gokarslan <kgokarsl@cisco.com> | 2017-09-15 15:37:27 -0700 |
commit | 836341027030bcb12973cb91f7d1dbdfdb3317d7 (patch) | |
tree | 9065a51213430ef7d8beaa08cb6053b6316815ee /nfvbench/compute.py | |
parent | 1b0cb25e5fbf4fa6bd618c8d111cf62b872ae2c5 (diff) |
NFVBENCH-27 Search vm image under project folder
Change-Id: I0d9c148e868fbcd665734eb92ac5c182693c3c67
Signed-off-by: Kerim Gokarslan <kgokarsl@cisco.com>
Diffstat (limited to 'nfvbench/compute.py')
-rw-r--r-- | nfvbench/compute.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/nfvbench/compute.py b/nfvbench/compute.py index 681a852..5806164 100644 --- a/nfvbench/compute.py +++ b/nfvbench/compute.py @@ -51,9 +51,7 @@ class Compute(object): retry = 0 try: # check image is file/url based. - file_prefix = "file://" - image_location = image_file.split(file_prefix)[1] - with open(image_location) as f_image: + with open(image_file) as f_image: img = self.glance_client.images.create(name=str(final_image_name), disk_format="qcow2", container_format="bare", @@ -82,8 +80,7 @@ class Compute(object): return False except Exception: LOG.error(traceback.format_exc()) - LOG.error("Failed while uploading the image, please make sure the " - "cloud under test has the access to file: %s.", image_file) + LOG.error("Failed to upload image %s.", image_file) return False return True |