summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhijiang Hu <hu.zhijiang@zte.com.cn>2018-07-16 10:54:58 +0800
committerZhijiang Hu <hu.zhijiang@zte.com.cn>2018-07-16 10:54:58 +0800
commit4536b5bf0e6fb149e81a3513adc61a0463602143 (patch)
tree65d1c5067e25537d9b7361c31442648fbf8d114d
parentafb9b05fc088fdb60168a2dd25dda90b5d3ab2d3 (diff)
Export more SDN related env vars for Functest
Jira: DAISY-80 Change-Id: Iac3a60570fedef823a8e382d9a04f802ed86e37f Signed-off-by: Zhijiang Hu <hu.zhijiang@zte.com.cn>
-rw-r--r--deploy/post/execute.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/deploy/post/execute.py b/deploy/post/execute.py
index 6acbe637..7b0293a2 100644
--- a/deploy/post/execute.py
+++ b/deploy/post/execute.py
@@ -21,10 +21,20 @@ def _config_kolla_admin_openrc(kolla_config_path):
with open('%s/globals.yml' % kolla_config_path, 'r') as f:
kolla_config = yaml.safe_load(f.read())
if kolla_config.get('enable_opendaylight', None) == 'yes':
- sdn_controller_ip = kolla_config.get('kolla_internal_vip_address')
openrc_file = file('%s/admin-openrc.sh' % kolla_config_path, 'a')
- sdn_ctl_ip = 'export SDN_CONTROLLER_IP=' + sdn_controller_ip + '\n'
- openrc_file.write(sdn_ctl_ip)
+
+ v = kolla_config.get('kolla_internal_vip_address')
+ line = 'export SDN_CONTROLLER_IP=' + v + '\n'
+ openrc_file.write(line)
+
+ v = kolla_config.get('opendaylight_haproxy_restconf_port_backup')
+ line = 'export SDN_CONTROLLER_WEBPORT=' + v + '\n'
+ openrc_file.write(line)
+
+ v = kolla_config.get('opendaylight_haproxy_restconf_port')
+ line = 'export SDN_CONTROLLER_RESTCONFPORT=' + v + '\n'
+ openrc_file.write(line)
+
openrc_file.close()