diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2016-04-25 09:27:21 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2016-04-25 14:22:34 +0200 |
commit | 423db209c5efe182fd1b82c2eec0df7c38dc7c8d (patch) | |
tree | b4eabba2f645b0e1b2879d99bf377f18465de24a /testcases/vIMS/CI | |
parent | f1c352869e0114a54830d46ea3407006096138e6 (diff) |
Remove backslashs for line continuation
JIRA: FUNCTEST-213
Change-Id: Ia50521cf8fcf60a847aa44fe0ea59b6e64830e92
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'testcases/vIMS/CI')
-rw-r--r-- | testcases/vIMS/CI/orchestrator.py | 32 | ||||
-rw-r--r-- | testcases/vIMS/CI/vIMS.py | 25 |
2 files changed, 28 insertions, 29 deletions
diff --git a/testcases/vIMS/CI/orchestrator.py b/testcases/vIMS/CI/orchestrator.py index 7dbbda71..c61f654c 100644 --- a/testcases/vIMS/CI/orchestrator.py +++ b/testcases/vIMS/CI/orchestrator.py @@ -101,16 +101,16 @@ class orchestrator: if self.logger: self.logger.info("Launching the cloudify-manager deployment") script = "set -e; " - script += "source " + self.testcase_dir + \ - "venv_cloudify/bin/activate; " + script += ("source " + self.testcase_dir + + "venv_cloudify/bin/activate; ") script += "cd " + self.testcase_dir + "; " script += "cfy init -r; " script += "cd cloudify-manager-blueprint; " - script += "cfy local create-requirements -o requirements.txt " + \ - "-p openstack-manager-blueprint.yaml; " + script += ("cfy local create-requirements -o requirements.txt " + + "-p openstack-manager-blueprint.yaml; ") script += "pip install -r requirements.txt; " - script += "timeout 1800 cfy bootstrap --install-plugins " + \ - "-p openstack-manager-blueprint.yaml -i inputs.yaml; " + script += ("timeout 1800 cfy bootstrap --install-plugins " + + "-p openstack-manager-blueprint.yaml -i inputs.yaml; ") cmd = "/bin/bash -c '" + script + "'" error = execute_command(cmd, self.logger) if error: @@ -166,14 +166,14 @@ class orchestrator: if self.logger: self.logger.info("Launching the {0} deployment".format(bp_name)) script = "source " + self.testcase_dir + "venv_cloudify/bin/activate; " - script += "cd " + self.testcase_dir + \ - blueprint['destination_folder'] + "; " - script += "cfy blueprints upload -b " + \ - bp_name + " -p openstack-blueprint.yaml; " - script += "cfy deployments create -b " + bp_name + \ - " -d " + dep_name + " --inputs inputs.yaml; " - script += "cfy executions start -w install -d " \ - + dep_name + " --timeout 1800; " + script += ("cd " + self.testcase_dir + + blueprint['destination_folder'] + "; ") + script += ("cfy blueprints upload -b " + + bp_name + " -p openstack-blueprint.yaml; ") + script += ("cfy deployments create -b " + bp_name + + " -d " + dep_name + " --inputs inputs.yaml; ") + script += ("cfy executions start -w install -d " + + dep_name + " --timeout 1800; ") cmd = "/bin/bash -c '" + script + "'" error = execute_command(cmd, self.logger) @@ -187,8 +187,8 @@ class orchestrator: self.logger.info("Launching the {0} undeployment".format(dep_name)) script = "source " + self.testcase_dir + "venv_cloudify/bin/activate; " script += "cd " + self.testcase_dir + "; " - script += "cfy executions start -w uninstall -d " + dep_name \ - + " --timeout 1800 ; " + script += ("cfy executions start -w uninstall -d " + dep_name + + " --timeout 1800 ; ") script += "cfy deployments delete -d " + dep_name + "; " cmd = "/bin/bash -c '" + script + "'" diff --git a/testcases/vIMS/CI/vIMS.py b/testcases/vIMS/CI/vIMS.py index 55501583..6f99d593 100644 --- a/testcases/vIMS/CI/vIMS.py +++ b/testcases/vIMS/CI/vIMS.py @@ -69,8 +69,8 @@ with open("/home/opnfv/functest/conf/config_functest.yaml") as f: f.close() # Cloudify parameters -VIMS_DIR = REPO_PATH + \ - functest_yaml.get("general").get("directories").get("dir_vIMS") +VIMS_DIR = (REPO_PATH + + functest_yaml.get("general").get("directories").get("dir_vIMS")) VIMS_DATA_DIR = functest_yaml.get("general").get( "directories").get("dir_vIMS_data") + "/" VIMS_TEST_DIR = functest_yaml.get("general").get( @@ -219,12 +219,12 @@ def test_clearwater(): resolvconf += "\nnameserver " + ns if dns_ip != "": - script = 'echo -e "nameserver ' + dns_ip + resolvconf + \ - '" > /etc/resolv.conf; ' + script = ('echo -e "nameserver ' + dns_ip + resolvconf + + '" > /etc/resolv.conf; ') script += 'source /etc/profile.d/rvm.sh; ' script += 'cd ' + VIMS_TEST_DIR + '; ' - script += 'rake test[' + \ - CW_INPUTS["public_domain"] + '] SIGNUP_CODE="secret"' + script += ('rake test[' + CW_INPUTS["public_domain"] + + '] SIGNUP_CODE="secret"') cmd = "/bin/bash -c '" + script + "'" output_file = "output.txt" @@ -329,9 +329,8 @@ def main(): }) logger.info("Upload some OS images if it doesn't exist") - glance_endpoint = keystone.\ - service_catalog.url_for(service_type='image', - endpoint_type='publicURL') + glance_endpoint = keystone.service_catalog.url_for( + service_type='image', endpoint_type='publicURL') glance = glclient.Client(1, glance_endpoint, token=keystone.auth_token) for img in IMAGES.keys(): @@ -397,8 +396,8 @@ def main(): logger.error( "Failed to find %s flavor. " "Try with ram range default requirement !" % flavor_name) - flavor_id = openstack_utils.\ - get_flavor_id_by_ram_range(nova, 4000, 8196) + flavor_id = openstack_utils.get_flavor_id_by_ram_range( + nova, 4000, 8196) if flavor_id == '': step_failure("orchestrator", @@ -474,8 +473,8 @@ def main(): logger.error( "Failed to find %s flavor. Try with ram range " "default requirement !" % flavor_name) - flavor_id = openstack_utils.\ - get_flavor_id_by_ram_range(nova, 4000, 8196) + flavor_id = openstack_utils.get_flavor_id_by_ram_range( + nova, 4000, 8196) if flavor_id == '': step_failure( |