From 428833bf9fa1fd3910517d39499329ff27444694 Mon Sep 17 00:00:00 2001 From: Manuel Buil Date: Thu, 4 Oct 2018 15:56:42 +0200 Subject: Add ODL variables to env file ODL testcases in functest require new variables: https://git.opnfv.org/functest/tree/functest/utils/env.py#n22 Otherwise the test fails because it cannot contact ODL To find those variables, we fetch the ml2_conf.ini file from the neutron container and then we parse the values. This is only run when the scenario has odl deploy-scenario:os-odl-sfc installer-type:osa Change-Id: If175bb7642e66e151b30e1ccd1b9040aa3481d8f Signed-off-by: Manuel Buil --- .../prepare-tests/tasks/process_neutron_conf.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 xci/playbooks/roles/prepare-tests/tasks/process_neutron_conf.yml (limited to 'xci/playbooks/roles/prepare-tests/tasks/process_neutron_conf.yml') diff --git a/xci/playbooks/roles/prepare-tests/tasks/process_neutron_conf.yml b/xci/playbooks/roles/prepare-tests/tasks/process_neutron_conf.yml new file mode 100644 index 00000000..45608df3 --- /dev/null +++ b/xci/playbooks/roles/prepare-tests/tasks/process_neutron_conf.yml @@ -0,0 +1,19 @@ +--- +- name: Collecting ODL variables + block: + - name: Fetch odl_password variable + shell: "cat /tmp/ml2_conf.ini | grep password | cut -d ' ' -f3" + register: odl_password + + - name: Fetch odl_username variable + shell: "cat /tmp/ml2_conf.ini | grep username | cut -d ' ' -f3" + register: odl_username + + - name: Fetch odl_port variable + shell: "cat /tmp/ml2_conf.ini | grep url | cut -d ':' -f3 | cut -d '/' -f1" + register: odl_port + + - name: Fetch odl_ip variable + shell: "cat /tmp/ml2_conf.ini | grep url | cut -d ':' -f2 | cut -d '/' -f3" + register: odl_ip + when: "'-odl-' in deploy_scenario" -- cgit 1.2.3-korg