Fix to use . to source script files

Adhering to coding conventions. Refer to ``Code conventions`` at
https://docs.openstack.org/contributor-guide/ for details.
When you have to source a script file, for example, a credentials file
to gain access to user-only or admin-only CLI commands, use . instead of source.
https://docs.openstack.org/contributor-guide/writing-style/code-conventions.html

Change-Id: I267e2282345b5cb97eba8d0c844417354ec24f4c
This commit is contained in:
rajat29 2017-09-05 12:40:49 +05:30
parent 5d8856e1b1
commit ab6a2557d4
8 changed files with 13 additions and 13 deletions

View File

@ -427,13 +427,13 @@ function tacker_register_default_vim {
$TOP_DIR/tools/create_userrc.sh -P -u $DEFAULT_VIM_USER -C $DEFAULT_VIM_PROJECT_NAME -p $DEFAULT_VIM_PASSWORD
echo "Switch environment openrc:"
echo $(cat $TOP_DIR/accrc/$DEFAULT_VIM_PROJECT_NAME/$DEFAULT_VIM_USER)
source $TOP_DIR/accrc/$DEFAULT_VIM_PROJECT_NAME/$DEFAULT_VIM_USER
. $TOP_DIR/accrc/$DEFAULT_VIM_PROJECT_NAME/$DEFAULT_VIM_USER
default_vim_id=$(tacker vim-register --is-default --description "Default VIM" --config-file $VIM_CONFIG_FILE $DEFAULT_VIM_NAME -c id | grep id | awk '{print $4}')
echo "Default VIM registration done as $default_vim_id at $KEYSTONE_SERVICE_URI."
echo "Switch back to old environment openrc:"
echo $(cat $TOP_DIR/accrc/$old_project/$old_user)
source $TOP_DIR/accrc/$old_project/$old_user
. $TOP_DIR/accrc/$old_project/$old_user
echo "Update tacker/tests/etc/samples/local-vim.yaml for functional testing"
functional_vim_file="$TACKER_DIR/tacker/tests/etc/samples/local-vim.yaml"

View File

@ -13,10 +13,10 @@
TOP_DIR=$(cd $(dirname "$0") && pwd)
# Import common functions
source $TOP_DIR/functions
. $TOP_DIR/functions
# Use openrc + stackrc + localrc for settings
source $TOP_DIR/stackrc
. $TOP_DIR/stackrc
# Destination path for installation ``DEST``
DEST=${DEST:-/opt/stack}
@ -38,7 +38,7 @@ if is_service_enabled mysql; then
exit_distro_not_supported "mysql configuration"
fi
sudo bash -c "source $TOP_DIR/functions && \
sudo bash -c ". $TOP_DIR/functions && \
iniset $my_conf mysqld max_connections 1024 && \
iniset $my_conf mysqld query_cache_type OFF && \
iniset $my_conf mysqld query_cache_size 0"

View File

@ -5,7 +5,7 @@ XTRACE=$(set +o | grep xtrace)
set -o xtrace
echo_summary "tacker's plugin.sh was called..."
source $DEST/tacker/devstack/lib/tacker
. $DEST/tacker/devstack/lib/tacker
(set -o posix; set)
# check for service enabled

View File

@ -41,7 +41,7 @@ Create a vim and verify it works:
.. code-block:: bash
$ source openrc-admin.sh
$ . openrc-admin.sh
$ openstack project create test
$ openstack user create --password a test
$ openstack role add --project test --user test admin

View File

@ -53,14 +53,14 @@ function generate_testr_results {
fi
}
source ${TACKER_DIR}/tacker/tests/contrib/post_test_hook_lib.sh
. ${TACKER_DIR}/tacker/tests/contrib/post_test_hook_lib.sh
if [[ "$venv" == dsvm-functional* ]]
then
owner=stack
sudo_env=
log_dir="/tmp/${venv}-logs"
source $DEVSTACK_DIR/openrc admin admin
. $DEVSTACK_DIR/openrc admin admin
fixup_quota
add_key
add_secgrp

View File

@ -40,7 +40,7 @@ def print_help():
To activate the Tacker virtualenv for the extent of your current shell
session you can run:
$ source .venv/bin/activate
$ . .venv/bin/activate
Or, if you prefer, you can run commands in the virtualenv on a case by case
basis by running:

View File

@ -12,8 +12,8 @@ if [ ! -f ${DEVSTACK_DIR}/openrc ]; then
exit 1
fi
source $DEVSTACK_DIR/openrc admin admin
source ${TACKER_DIR}/tacker/tests/contrib/post_test_hook_lib.sh
. $DEVSTACK_DIR/openrc admin admin
. ${TACKER_DIR}/tacker/tests/contrib/post_test_hook_lib.sh
fixup_quota
add_key_if_not_exist

View File

@ -17,4 +17,4 @@
TOOLS=`dirname $0`
VENV=$TOOLS/../.venv
source $VENV/bin/activate && "$@"
. $VENV/bin/activate && "$@"