From cb4d8671693d27b26de34852795782d28046117a Mon Sep 17 00:00:00 2001
From: Yifei Xue <xueyifei@huawei.com>
Date: Wed, 14 Mar 2018 09:16:41 +0800
Subject: Add SDN controller's IP in openrc file for functest

JIRA: COMPASS-590

From the time being, Functest ODL testcase calculates ODL ip thanks to Neutron IP.
It should be calculated on Installer side (releng jobs) and set via SDN_CONTROLLER_IP in Functest env instead.
https://git.opnfv.org/functest/tree/functest/opnfv_tests/sdn/odl/odl.py#n185
It ensures that Functest can rely on SDN_CONTROLLER_IP in all cases (OpenStack end users included)

Change-Id: I01c0af952dbb21592aa973daaea3845346dc833f
Signed-off-by: Yifei Xue <xueyifei@huawei.com>
---
 deploy/adapters/ansible/roles/process-openrc/tasks/main.yml | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'deploy')

diff --git a/deploy/adapters/ansible/roles/process-openrc/tasks/main.yml b/deploy/adapters/ansible/roles/process-openrc/tasks/main.yml
index aed68b88..d8de1b2d 100644
--- a/deploy/adapters/ansible/roles/process-openrc/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/process-openrc/tasks/main.yml
@@ -24,3 +24,9 @@
     dest: /opt/openrc
     regexp: "internalURL"
     replace: "publicURL"
+
+- name: add the IP of SDN controller
+  lineinfile:
+    dest: /opt/openrc
+    state: present
+    line: "export SDN_CONTROLLER_IP={{ public_vip['ip'] }}"
-- 
cgit