Files
monasca-api/devstack/lib/client.sh
Tomasz Trębski 18f1dad2d8 Integrate fully with new python-monascaclient
* shell commands completition
* usage of openstack openrc utility to source
environmental variables to use client

Extra:

* removed cassandra env and replaced it with bash code
* reworked creating bash profile
* removed devstack/files/env.sh as it is no longer needed and
everything is available through profile

Depends-On: I579f6bcd5975a32af2a255be41c9b6c4043fa1dc
Depends-On: Ifee5b88ccb632222310aafb1081ecb9c9d085150
Depends-On: I01d0f3d9814376f9358feb23494e1ca5231aedac
Depends-On: I1712a24739438e2d8331a495f18f357749a633c5
Change-Id: I35f5943ae1eadb10dc416179c575cdad62753b69
2017-07-14 12:55:09 +02:00

35 lines
1.1 KiB
Bash

#!/bin/bash
# Copyright 2017 FUJITSU LIMITED
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
_XTRACE_MON_CLIENT=$(set +o | grep xtrace)
set +o xtrace
install_monascaclient() {
git_clone $MONASCA_CLIENT_REPO $MONASCA_CLIENT_DIR $MONASCA_CLIENT_BRANCH
setup_dev_lib "python-monascaclient"
# install completion file
monasca complete > /tmp/monasca.bash_completion
sudo install -D -m 0644 -o $STACK_USER /tmp/monasca.bash_completion $MONASCA_COMPLETION_FILE
rm -rf /tmp/monasca.bash_completion
}
clean_monascaclient() {
sudo rm -rf $MONASCA_COMPLETION_FILE
}
${_XTRACE_MON_CLIENT}