aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry ALLENO <thierry.alleno@orange.com>2018-09-17 15:10:18 +0200
committerThierry ALLENO <thierry.alleno@orange.com>2018-09-19 13:59:02 +0200
commitbe864b0de9f0f990984ad9e3c2d20b694e1b2c26 (patch)
tree7a02ffd0f2ce4939cb725b89c62e02ede0443dd4
parent9b941ea58c60827d563d266f7dedd0d95de3ca93 (diff)
Correct proxy configuration for VNF VM
The configuration of proxy for apt is missing in ubuntu images. Line Feed is missing in cloudify conf files. Change-Id: I3237b914e993c57f4fe3ed568690d2d9a41c0bdf Signed-off-by: Thierry ALLENO <thierry.alleno@orange.com>
-rw-r--r--functest/ci/add_proxy.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/functest/ci/add_proxy.sh b/functest/ci/add_proxy.sh
index d19153811..3244f246a 100644
--- a/functest/ci/add_proxy.sh
+++ b/functest/ci/add_proxy.sh
@@ -22,6 +22,13 @@ NO_PROXY=${no_proxy:-"10.0.0.0/8,172.16.0.0/12,192.168.0.0/16"}
EOF
}
+add_proxy_apt () {
+ cat << EOF >> "$1"
+Acquire::http::Proxy "${http_proxy:-http://proxy:8080}";
+Acquire::https::Proxy "${https_proxy:-http://proxy:8080}";
+EOF
+}
+
tmpdir=$(mktemp -d)
for image in $images; do
if [ ! -f "$image" ]; then
@@ -31,9 +38,14 @@ for image in $images; do
guestmount -a "${image}" -i --rw "${tmpdir}"
add_proxy "${tmpdir}/etc/environment"
if [[ ${image} == *"cloudify-manager"* ]]; then
+ echo >> "${tmpdir}/etc/sysconfig/cloudify-mgmtworker"
add_proxy "${tmpdir}/etc/sysconfig/cloudify-mgmtworker"
+ echo >> "${tmpdir}/etc/sysconfig/cloudify-restservice"
add_proxy "${tmpdir}/etc/sysconfig/cloudify-restservice"
fi
+ if [[ ${image} == "ubuntu"* ]]; then
+ add_proxy_apt "${tmpdir}/etc/apt/apt.conf"
+ fi
guestunmount "${tmpdir}"
done