diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2017-08-22 22:53:57 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2017-08-22 23:08:44 +0200 |
commit | e295740c719ff8057ed98c90637c50a14d1b3935 (patch) | |
tree | 6e84e5703f862926942384ae848c5450a9383bd3 /functest/opnfv_tests/vnf/ims/orchestra_clearwaterims.py | |
parent | f44ec39992cd794deed624c48b1f5dc22ac91213 (diff) |
Complete caching images for vnf testcases
It conforms with snaps API for publishing local images.
It completes [1] which only modifies the yaml files.
[1] https://gerrit.opnfv.org/gerrit/#/c/39757/
Change-Id: I325a245c0e7bb15bb1f9570996500573cfe257b0
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/opnfv_tests/vnf/ims/orchestra_clearwaterims.py')
-rw-r--r-- | functest/opnfv_tests/vnf/ims/orchestra_clearwaterims.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/functest/opnfv_tests/vnf/ims/orchestra_clearwaterims.py b/functest/opnfv_tests/vnf/ims/orchestra_clearwaterims.py index 9e14711c..a5405996 100644 --- a/functest/opnfv_tests/vnf/ims/orchestra_clearwaterims.py +++ b/functest/opnfv_tests/vnf/ims/orchestra_clearwaterims.py @@ -195,9 +195,7 @@ class ClearwaterImsVnf(vnf.VnfOnBoarding): if not os.path.exists(self.data_dir): os.makedirs(self.data_dir) - self.images = get_config( - "tenant_images.%s" % - self.case_name, config_file) + self.images = get_config("tenant_images.orchestrator", config_file) self.images.update( get_config( "tenant_images.%s" % @@ -228,15 +226,15 @@ class ClearwaterImsVnf(vnf.VnfOnBoarding): def prepare_images(self): """Upload images if they doen't exist yet""" self.logger.info("Upload images if they doen't exist yet") - for image_name, image_url in self.images.iteritems(): - self.logger.info("image: %s, url: %s", image_name, image_url) - if image_url and image_name: + for image_name, image_file in self.images.iteritems(): + self.logger.info("image: %s, file: %s", image_name, image_file) + if image_file and image_name: image = OpenStackImage( self.snaps_creds, ImageSettings(name=image_name, image_user='cloud', img_format='qcow2', - url=image_url)) + image_file=image_file)) image.create() # self.created_resources.append(image); |