aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorboucherv <valentin.boucher@orange.com>2017-02-17 09:56:02 +0100
committerboucherv <valentin.boucher@orange.com>2017-02-17 09:56:02 +0100
commit3a3968850a0c37ef0734919b03c6bcdc309b3628 (patch)
tree116a005f407645683b9f6d59d75073b592b797ab
parent0b5f01779a50b36d775a5ed8fed53106d04c450c (diff)
Fix flavor config and error log
JIRA: FUNCTEST-734 Change-Id: Ic124cfa68e1ba50c9dc098c14b17ed694eefb7cc Signed-off-by: boucherv <valentin.boucher@orange.com>
-rw-r--r--functest/opnfv_tests/vnf/ims/cloudify_ims.py22
-rw-r--r--functest/opnfv_tests/vnf/ims/cloudify_ims.yaml4
-rw-r--r--functest/opnfv_tests/vnf/ims/orchestrator_cloudify.py7
3 files changed, 20 insertions, 13 deletions
diff --git a/functest/opnfv_tests/vnf/ims/cloudify_ims.py b/functest/opnfv_tests/vnf/ims/cloudify_ims.py
index e354563e0..584d780a5 100644
--- a/functest/opnfv_tests/vnf/ims/cloudify_ims.py
+++ b/functest/opnfv_tests/vnf/ims/cloudify_ims.py
@@ -130,8 +130,8 @@ class ImsVnf(vnf_base.VnfOnBoardingBase):
flavor_exist, flavor_id = os_utils.get_or_create_flavor(
"m1.large",
self.orchestrator['requirements']['ram_min'],
- '1',
- '1',
+ '50',
+ '2',
public=True)
self.logger.debug("Flavor id: %s" % flavor_id)
@@ -187,8 +187,12 @@ class ImsVnf(vnf_base.VnfOnBoardingBase):
self.orchestrator['blueprint']['url'],
self.orchestrator['blueprint']['branch'])
- cfy.deploy_manager()
- return {'status': 'PASS', 'result': ''}
+ error = cfy.deploy_manager()
+ if error:
+ self.logger.error(error)
+ return {'status': 'FAIL', 'result': error}
+ else:
+ return {'status': 'PASS', 'result': ''}
def deploy_vnf(self):
cw = Clearwater(self.vnf.inputs, self.orchestrator.object, self.logger)
@@ -198,7 +202,7 @@ class ImsVnf(vnf_base.VnfOnBoardingBase):
flavor_exist, flavor_id = os_utils.get_or_create_flavor(
"m1.small",
self.vnf['requirements']['ram_min'],
- '1',
+ '20',
'1',
public=True)
self.logger.debug("Flavor id: %s" % flavor_id)
@@ -229,8 +233,12 @@ class ImsVnf(vnf_base.VnfOnBoardingBase):
cw.set_external_network_name(ext_net)
- cw.deploy_vnf()
- return {'status': 'PASS', 'result': ''}
+ error = cw.deploy_vnf()
+ if error:
+ self.logger.error(error)
+ return {'status': 'FAIL', 'result': error}
+ else:
+ return {'status': 'PASS', 'result': ''}
def test_vnf(self):
script = "source {0}venv_cloudify/bin/activate; "
diff --git a/functest/opnfv_tests/vnf/ims/cloudify_ims.yaml b/functest/opnfv_tests/vnf/ims/cloudify_ims.yaml
index c59180876..775685fa4 100644
--- a/functest/opnfv_tests/vnf/ims/cloudify_ims.yaml
+++ b/functest/opnfv_tests/vnf/ims/cloudify_ims.yaml
@@ -6,7 +6,7 @@ cloudify:
url: https://github.com/boucherv-orange/cloudify-manager-blueprints.git
branch: '3.3.1-build'
requirements:
- ram_min: 3000
+ ram_min: 4000
os_image: centos_7
inputs:
keystone_username: ""
@@ -29,7 +29,7 @@ clearwater:
branch: stable
deployment_name: clearwater-opnfv
requirements:
- ram_min: 1700
+ ram_min: 2000
os_image: ubuntu_14.04
inputs:
image_id: ''
diff --git a/functest/opnfv_tests/vnf/ims/orchestrator_cloudify.py b/functest/opnfv_tests/vnf/ims/orchestrator_cloudify.py
index f3838f871..775b71c8a 100644
--- a/functest/opnfv_tests/vnf/ims/orchestrator_cloudify.py
+++ b/functest/opnfv_tests/vnf/ims/orchestrator_cloudify.py
@@ -114,6 +114,7 @@ class Orchestrator:
cmd = "/bin/bash -c '" + script + "'"
error = execute_command(cmd, self.logger)
if error:
+ self.logger.error("Failed to deploy cloudify-manager")
return error
self.logger.info("Cloudify-manager server is UP !")
@@ -171,6 +172,7 @@ class Orchestrator:
cmd = "/bin/bash -c '" + script + "'"
error = execute_command(cmd, self.logger, 2000)
if error:
+ self.logger.error("Failed to deploy blueprint")
return error
self.logger.info("The deployment of {0} is ended".format(dep_name))
@@ -228,7 +230,4 @@ def execute_command(cmd, logger, timeout=1800):
logger.error("Error when executing command %s" % cmd)
f = open(output_file, 'r')
lines = f.readlines()
- result = lines[len(lines) - 3]
- result += lines[len(lines) - 2]
- result += lines[len(lines) - 1]
- return result
+ return lines[-5:]