clients/remote_cli/config_aliases.sh
Joao Soubihe 121a2d8b6c Adding sw-manager alias to remote-cli
This adds sw-manager command alias to the list of commands that can
be run through the remote-cli.

Depends-On: https://review.opendev.org/c/starlingx/gui/+/816525
Depends-On: https://review.opendev.org/c/starlingx/root/+/816683
Closes-Bug: #1949620
Signed-off-by: Joao Soubihe <JoaoPaulo.Soubihe@windriver.com>
Change-Id: I950aba2b2b1f27ded4105a5fb2b2ce645713bbbe
2021-11-04 10:36:22 -03:00

29 lines
791 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 sw-manager"
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