Skip to content

Commit

Permalink
automatic sidecar
Browse files Browse the repository at this point in the history
  • Loading branch information
rajeshm7910 committed Aug 14, 2018
1 parent c3d8ee4 commit 897a287
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,16 @@ do
if [ "$adminEmail" != "" ] && [ "$adminPasswd" != "" ]; then
isTokenAuth="n"
else
read -p "${blue}Authenticate with OAuth Token (\"n\",\"Y\") [N/y]:${reset}" isTokenAuth
read -p "${blue}Authenticate with OAuth Token [N/y]:${reset}" isTokenAuth
if [[ "$isTokenAuth" = "" ]]; then
isTokenAuth="n"
fi
fi
done

isTokenAuth=$(echo "$isTokenAuth" | tr '[:upper:]' '[:lower:]')


if [[ "$isTokenAuth" = "y" ]]; then
while [ "$oauthToken" = "" ]
do
Expand Down Expand Up @@ -156,12 +159,15 @@ done

while [ "$isPrivate" = "" ]
do
read -p "${blue}Is this Private Cloud (\"n\",\"y\") [N/y]:${reset}" isPrivate
read -p "${blue}Is this Private Cloud [N/y]:${reset}" isPrivate
if [[ "$isPrivate" = "" ]]; then
isPrivate="n"
fi
done


isPrivate=$(echo "$isPrivate" | tr '[:upper:]' '[:lower:]')

if [ "${isPrivate}" == "y" ]; then
while [[ "$mgmt_url" = "" ]]
do
Expand All @@ -170,7 +176,7 @@ if [ "${isPrivate}" == "y" ]; then

while [[ "$api_base_path" = "" ]]
do
read -p "${blue}Apigee API Endpoint Url:${reset}" api_base_path
read -p "${blue}Runtime URL for your private cloud instance.:${reset}" api_base_path
done
else
mgmt_url="https://api.enterprise.apigee.com"
Expand Down Expand Up @@ -237,6 +243,7 @@ if [ "${generate_key}" == "y" ]; then
while [ "${agree_to_decorate}" != "y" ]
do
read -p "Do you agree to proceed(\"n\",\"y\") [N/y]:" agree_to_decorate
agree_to_decorate=$(echo "$agree_to_decorate" | tr '[:upper:]' '[:lower:]')
if [[ "${agree_to_decorate}" = "n" ]]; then
exit 0;
fi
Expand Down

0 comments on commit 897a287

Please sign in to comment.