Add OS_CACERT on the client_wrapper

This change is required to avoid the user pass a flag in each
request if this environment variable is available inside the
container the clients will get that to make https requests in
the remote cli

Closes-bug:1927723
Depends-On:I4221657b97592b319b3fbf54b5b8c6d325ec9aa3
Signed-off-by: Rafael Jardim <rafaeljordao.jardim@windriver.com>
Change-Id: Iddc982c4394e06c3cc14da4b33145f45b1b2f412
This commit is contained in:
Rafael Jardim 2021-05-06 17:03:44 -03:00 committed by Rafael Jordão Jardim
parent 0488b9cce7
commit c47d86b859
1 changed files with 6 additions and 1 deletions

View File

@ -37,7 +37,7 @@ read -d '' EXPORTS << EOF
OS_PASSWORD OS_PROJECT_DOMAIN_ID OS_PROJECT_ID OS_REGION_NAME
OS_USER_DOMAIN_NAME OS_PROJECT_NAME OS_IDENTITY_API_SERVICE
OS_AUTH_URL OS_USERNAME OS_INTERFACE OS_PROJECT_DOMAIN_NAME
OS_AUTH_TYPE
OS_AUTH_TYPE OS_CACERT
EOF
# We initialize the environment variable list with the OS_ENDPOINT_TYPE set
@ -50,6 +50,11 @@ EOF
# to the correct value.
COMMAND_ENV="-e OS_ENDPOINT_TYPE=publicURL"
# the REQUESTS_CA_BUNDLE is required to the fm client
if [[ ! -z "$(printenv "OS_CACERT")" ]]; then
COMMAND_ENV="$COMMAND_ENV -e REQUESTS_CA_BUNDLE=$(printenv "OS_CACERT")"
fi
for exp in $EXPORTS; do
# If variable is not defined, don't pass it over to the container
if [[ ! -z "$(printenv $exp)" ]]; then