
With openstackclients moving to a container, issuing openstack command to the application side would become difficult due to log "kubectl" commands and the random nature of pod names. This commit introduces a wrapper for the containerized client that automatically passes the desired command to the pod. This commit also introduces a wrapper for copying files dirrectly to clients container for commands that need filesystem access (for example creating images with "openstack image create"). We also alias the default openstack command to the containerized client. The platform openstack command is aliased to "platform-openstack". Change-Id: I7b204bb05381d38f4f25066561e001bb8247943b Signed-off-by: Stefan Dinescu <stefan.dinescu@windriver.com> Story: 2005312 Task: 30603 Depends-on: I58a5d511cf54dacc018bfb88848899b92a774087
12 lines
453 B
Bash
12 lines
453 B
Bash
#
|
|
# Copyright (c) 2019 Wind River Systems, Inc.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
if [ -n "$BASH_VERSION" -o -n "$KSH_VERSION" -o -n "$ZSH_VERSION" ]; then
|
|
alias openstack >/dev/null 2>&1 || alias openstack='/usr/local/bin/openstack-pod-exec.sh openstack'
|
|
alias nova >/dev/null 2>&1 || alias nova='/usr/local/bin/openstack-pod-exec.sh nova'
|
|
alias platform-openstack >/dev/null 2>&1 || alias platform-openstack=/usr/bin/openstack
|
|
fi
|