aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-onap/lib/functions
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2018-01-20 03:04:40 +0000
committerGerrit Code Review <gerrit@onap.org>2018-01-20 03:04:40 +0000
commit8fa101a3dd2edf8e432b9447a886cfb583100fb0 (patch)
tree914ca872a6337fcbaff07ca1d2d437ffda0aa012 /bootstrap/vagrant-onap/lib/functions
parent16038805de5da569592d3c951b3ca64973b0108a (diff)
parentfdf88f32579d606cd82deadd3c89fac77b6aa472 (diff)
Merge "Add kolla internal vip to no_proxy"
Diffstat (limited to 'bootstrap/vagrant-onap/lib/functions')
-rwxr-xr-xbootstrap/vagrant-onap/lib/functions14
1 files changed, 14 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
+}