clients/remote_cli/config_aliases.sh
Teresa Ho 0ca280c7a2 Add oidc-auth to the remote CLI
Add oidc-auth to the aliases in the remote CLI.

Story: 2006711
Task: 38919
Depends-On: https://review.opendev.org/#/c/710991/

Change-Id: I66388d801208fb643e67f09800888cf839715382
Signed-off-by: Teresa Ho <teresa.ho@windriver.com>
2020-03-03 07:39:43 -05:00

29 lines
780 B
Bash

#!/bin/bash
#
# Copyright (c) 2019 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# The script may be called from locations other
# than its own folder, so build the full path to
# the script.
if [[ $BASH_SOURCE = '/'* ]]; then
PATH_TO_SCRIPT="$(dirname $BASH_SOURCE)"
else
PATH_TO_SCRIPT="$(pwd)/$(dirname $BASH_SOURCE)"
fi
if [[ "$CONFIG_TYPE" = "platform" ]]; then
SERVICES="system fm openstack dcmanager kubectl helm oidc-auth"
alias "platform_shell"="${PATH_TO_SCRIPT}/client_wrapper.sh /bin/bash"
else
SERVICES="openstack nova cinder glance heat"
alias "application_shell"="${PATH_TO_SCRIPT}/client_wrapper.sh /bin/bash"
fi
for service in $SERVICES; do
alias "$service"="${PATH_TO_SCRIPT}/client_wrapper.sh $service"
done