diff options
author | Marco Platania <platania@research.att.com> | 2018-08-13 15:42:38 -0400 |
---|---|---|
committer | Marco Platania <platania@research.att.com> | 2018-08-13 15:42:38 -0400 |
commit | 254597707b2573118680c569c1c748d3cca2af74 (patch) | |
tree | ac26aa4a4bfc2b93377f916b92cf37dc38bd1fef /heat/ONAP/cloud-config | |
parent | abaa8ecf29b2b93f25d8cd369ba0f333f367de04 (diff) |
Update proxy section in setting.xml
- Add <proxy>...</proxy> only if https proxy is specified
- Tested successfully in windriver (SB07)
- Solves part of the AAF installation issues
Change-Id: I9f6dd8a7a9173b541b9872293d0c6ad705506dc3
Issue-ID: AAF-420
Signed-off-by: Marco Platania <platania@research.att.com>
Diffstat (limited to 'heat/ONAP/cloud-config')
-rw-r--r-- | heat/ONAP/cloud-config/aaf_install.sh | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/heat/ONAP/cloud-config/aaf_install.sh b/heat/ONAP/cloud-config/aaf_install.sh index 2d6657ec..61f23daa 100644 --- a/heat/ONAP/cloud-config/aaf_install.sh +++ b/heat/ONAP/cloud-config/aaf_install.sh @@ -115,6 +115,13 @@ under the License. --> </pluginGroups> +EOF + +if [[ $(cat /opt/config/https_proxy.txt) != "no_proxy" ]]; then + HTTPS_PROXY_HOST=$(cat /opt/config/https_proxy.txt | cut -d ':' -f1) + HTTPS_PROXY_PORT=$(cat /opt/config/https_proxy.txt | cut -d ':' -f2) + + cat >> settings.xml << EOF <!-- proxies | This is a list of proxies which can be used on this machine to connect to the network. | Unless otherwise specified (by system property or command-line switch), the first proxy @@ -127,8 +134,8 @@ under the License. <protocol>http</protocol> <username>proxyuser</username> <password>proxypass</password> - <host>$(cat /opt/config/http_proxy.txt | cut -d ':' -f1)</host> - <port>$(cat /opt/config/http_proxy.txt | cut -d ':' -f2)</port> + <host>$HTTPS_PROXY_HOST</host> + <port>$HTTPS_PROXY_PORT</port> <nonProxyHosts>local.net|some.host.com</nonProxyHosts> </proxy> <proxy> @@ -137,12 +144,16 @@ under the License. <protocol>https</protocol> <username>proxyuser</username> <password>proxypass</password> - <host>$(cat /opt/config/https_proxy.txt | cut -d ':' -f1)</host> - <port>$(cat /opt/config/https_proxy.txt | cut -d ':' -f2)</port> + <host>$HTTPS_PROXY_HOST</host> + <port>$HTTPS_PROXY_PORT</port> <nonProxyHosts>local.net|some.host.com</nonProxyHosts> </proxy> </proxies> +EOF +fi + +cat >> settings.xml << EOF <!-- servers | This is a list of authentication profiles, keyed by the server-id used within the system. |