summaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-onap/lib
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap/vagrant-onap/lib')
-rwxr-xr-xbootstrap/vagrant-onap/lib/functions14
-rwxr-xr-xbootstrap/vagrant-onap/lib/openstack4
2 files changed, 18 insertions, 0 deletions
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
+}
diff --git a/bootstrap/vagrant-onap/lib/openstack b/bootstrap/vagrant-onap/lib/openstack
index 205d7ae80..5e5189086 100755
--- a/bootstrap/vagrant-onap/lib/openstack
+++ b/bootstrap/vagrant-onap/lib/openstack
@@ -32,6 +32,10 @@ function configure_deploy {
ip_address=$(ip route get $network_id | awk '{ print $6; exit }')
internal_vip_address=$(get_next_ip $ip_address)
+ if [[ `env | grep -i "proxy"` ]]; then
+ add_no_proxy_value $internal_vip_address
+ fi
+
mkdir -p $kolla_config
cp /var/onap/files/globals.yml $kolla_globals
cp /var/onap/files/passwords.yml $kolla_passwords