From fdf88f32579d606cd82deadd3c89fac77b6aa472 Mon Sep 17 00:00:00 2001 From: Nate Potter Date: Wed, 17 Jan 2018 09:29:35 -0800 Subject: Add kolla internal vip to no_proxy The internal vip value is calculated at deploy time when bringing up the OpenStack VM, and isn't able to be included in the proxy values in the Vagrantfile. Because of this, we need to add it to no_proxy after it's calculated so that users and other services can access it in a proxy environment. Signed-off-by: Nathaniel Potter Issue-ID: INT-383 Change-Id: Ifed792a4f7e6f4f5a227848486e8165be4a30fc7 --- bootstrap/vagrant-onap/lib/functions | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'bootstrap/vagrant-onap/lib/functions') diff --git a/bootstrap/vagrant-onap/lib/functions b/bootstrap/vagrant-onap/lib/functions index c2c6d76a5..47966f1b2 100755 --- a/bootstrap/vagrant-onap/lib/functions +++ b/bootstrap/vagrant-onap/lib/functions @@ -382,3 +382,17 @@ EOF mount ${dev_name}1 $mount_dir echo "${dev_name}1 $mount_dir ext4 errors=remount-ro,noatime,barrier=0 0 1" >> /etc/fstab } + +# add no_proxy values to environment, used for internal IPs generated at deploy time +function add_no_proxy_value { + if [[ `grep "no_proxy" /etc/environment` ]]; then + sed -i.bak "s/^no_proxy.*$/&,$1/" /etc/environment + else + echo "no_proxy=$1" >> /etc/environment + fi + if [[ `grep "NO_PROXY" /etc/environment` ]]; then + sed -i.bak "s/^NO_PROXY.*$/&,$1/" /etc/environment + else + echo "NO_PROXY=$1" >> /etc/environment + fi +} -- cgit 1.2.3-korg