aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorashishk1994 <ashishk.iiit@gmail.com>2017-02-21 13:40:24 +0530
committerashishk1994 <ashishk.iiit@gmail.com>2017-02-21 13:48:38 +0530
commit67bfce2b36cd675a6c38ec0c7fa34add45d44f78 (patch)
tree36f5b71084081d349bb9cb7a8963c6b1844f13b6
parent5d423d64f243c28e5a0d7ec866dfd4eee4eeff9f (diff)
Refactoring of cloudify_ims.
Change the way of using few variables like vnf from object to dictionary for consistency. Change-Id: I5cf92ff16ba1296f223a60f85de4b815aadc8875 Signed-off-by: ashishk1994 <ashishk.iiit@gmail.com>
-rw-r--r--functest/opnfv_tests/vnf/ims/cloudify_ims.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/functest/opnfv_tests/vnf/ims/cloudify_ims.py b/functest/opnfv_tests/vnf/ims/cloudify_ims.py
index 584d780a..c2c251ad 100644
--- a/functest/opnfv_tests/vnf/ims/cloudify_ims.py
+++ b/functest/opnfv_tests/vnf/ims/cloudify_ims.py
@@ -195,8 +195,9 @@ class ImsVnf(vnf_base.VnfOnBoardingBase):
return {'status': 'PASS', 'result': ''}
def deploy_vnf(self):
- cw = Clearwater(self.vnf.inputs, self.orchestrator.object, self.logger)
- self.vnf.object = cw
+ cw = Clearwater(self.vnf['inputs'], self.orchestrator['object'],
+ self.logger)
+ self.vnf['object'] = cw
self.logger.info("Collect flavor id for all clearwater vm")
flavor_exist, flavor_id = os_utils.get_or_create_flavor(
@@ -215,7 +216,7 @@ class ImsVnf(vnf_base.VnfOnBoardingBase):
cw.set_flavor_id(flavor_id)
# VMs image
- if 'os_image' in self.vnf.requirements.keys():
+ if 'os_image' in self.vnf['requirements'].keys():
image_id = os_utils.get_image_id(
self.glance_client, self.vnf['requirements']['os_image'])
if image_id == '':
@@ -256,7 +257,7 @@ class ImsVnf(vnf_base.VnfOnBoardingBase):
api_url = "http://" + mgr_ip + "/api/v2"
dep_outputs = requests.get(api_url + "/deployments/" +
- self.vnf.deployment_name + "/outputs")
+ self.vnf['deployment_name'] + "/outputs")
dns_ip = dep_outputs.json()['outputs']['dns_ip']
ellis_ip = dep_outputs.json()['outputs']['ellis_ip']
@@ -340,8 +341,8 @@ class ImsVnf(vnf_base.VnfOnBoardingBase):
return {'status': 'FAIL', 'result': ''}
def clean(self):
- self.vnf.object.undeploy_vnf()
- self.orchestrator.object.undeploy_manager()
+ self.vnf['object'].undeploy_vnf()
+ self.orchestrator['object'].undeploy_manager()
super(ImsVnf, self).clean()
def main(self, **kwargs):