Merge "Make declared variables global"
This commit is contained in:
commit
6523d6e097
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
# ensure we don't re-source this in the same environment
|
# ensure we don't re-source this in the same environment
|
||||||
[[ -z "$_DEVSTACK_FUNCTIONS" ]] || return 0
|
[[ -z "$_DEVSTACK_FUNCTIONS" ]] || return 0
|
||||||
declare -r _DEVSTACK_FUNCTIONS=1
|
declare -r -g _DEVSTACK_FUNCTIONS=1
|
||||||
|
|
||||||
# Include the common functions
|
# Include the common functions
|
||||||
FUNC_DIR=$(cd $(dirname "${BASH_SOURCE:-$0}") && pwd)
|
FUNC_DIR=$(cd $(dirname "${BASH_SOURCE:-$0}") && pwd)
|
||||||
|
@ -37,12 +37,12 @@ set +o xtrace
|
|||||||
|
|
||||||
# ensure we don't re-source this in the same environment
|
# ensure we don't re-source this in the same environment
|
||||||
[[ -z "$_DEVSTACK_FUNCTIONS_COMMON" ]] || return 0
|
[[ -z "$_DEVSTACK_FUNCTIONS_COMMON" ]] || return 0
|
||||||
declare -r _DEVSTACK_FUNCTIONS_COMMON=1
|
declare -r -g _DEVSTACK_FUNCTIONS_COMMON=1
|
||||||
|
|
||||||
# Global Config Variables
|
# Global Config Variables
|
||||||
declare -A GITREPO
|
declare -A -g GITREPO
|
||||||
declare -A GITBRANCH
|
declare -A -g GITBRANCH
|
||||||
declare -A GITDIR
|
declare -A -g GITDIR
|
||||||
|
|
||||||
TRACK_DEPENDS=${TRACK_DEPENDS:-False}
|
TRACK_DEPENDS=${TRACK_DEPENDS:-False}
|
||||||
|
|
||||||
@ -306,7 +306,7 @@ function warn {
|
|||||||
# ``os_PACKAGE`` - package type: ``deb`` or ``rpm``
|
# ``os_PACKAGE`` - package type: ``deb`` or ``rpm``
|
||||||
# ``os_CODENAME`` - vendor's codename for release: ``xenial``
|
# ``os_CODENAME`` - vendor's codename for release: ``xenial``
|
||||||
|
|
||||||
declare os_VENDOR os_RELEASE os_PACKAGE os_CODENAME
|
declare -g os_VENDOR os_RELEASE os_PACKAGE os_CODENAME
|
||||||
|
|
||||||
# Make a *best effort* attempt to install lsb_release packages for the
|
# Make a *best effort* attempt to install lsb_release packages for the
|
||||||
# user if not available. Note can't use generic install_package*
|
# user if not available. Note can't use generic install_package*
|
||||||
@ -361,7 +361,7 @@ function GetOSVersion {
|
|||||||
|
|
||||||
# Translate the OS version values into common nomenclature
|
# Translate the OS version values into common nomenclature
|
||||||
# Sets global ``DISTRO`` from the ``os_*`` values
|
# Sets global ``DISTRO`` from the ``os_*`` values
|
||||||
declare DISTRO
|
declare -g DISTRO
|
||||||
|
|
||||||
function GetDistro {
|
function GetDistro {
|
||||||
GetOSVersion
|
GetOSVersion
|
||||||
@ -2376,9 +2376,9 @@ function sudo_with_proxies {
|
|||||||
# Resolution is only in whole seconds, so should be used for long
|
# Resolution is only in whole seconds, so should be used for long
|
||||||
# running activities.
|
# running activities.
|
||||||
|
|
||||||
declare -A _TIME_TOTAL
|
declare -A -g _TIME_TOTAL
|
||||||
declare -A _TIME_START
|
declare -A -g _TIME_START
|
||||||
declare -r _TIME_BEGIN=$(date +%s)
|
declare -r -g _TIME_BEGIN=$(date +%s)
|
||||||
|
|
||||||
# time_start $name
|
# time_start $name
|
||||||
#
|
#
|
||||||
|
@ -19,7 +19,7 @@ set +o xtrace
|
|||||||
|
|
||||||
# PROJECT_VENV contains the name of the virtual environment for each
|
# PROJECT_VENV contains the name of the virtual environment for each
|
||||||
# project. A null value installs to the system Python directories.
|
# project. A null value installs to the system Python directories.
|
||||||
declare -A PROJECT_VENV
|
declare -A -g PROJECT_VENV
|
||||||
|
|
||||||
|
|
||||||
# Python Functions
|
# Python Functions
|
||||||
|
@ -75,7 +75,7 @@ NEUTRON_ROOTWRAP_CONF_FILE=$NEUTRON_CONF_DIR/rootwrap.conf
|
|||||||
NEUTRON_ROOTWRAP_DAEMON_CMD="sudo $NEUTRON_ROOTWRAP-daemon $NEUTRON_ROOTWRAP_CONF_FILE"
|
NEUTRON_ROOTWRAP_DAEMON_CMD="sudo $NEUTRON_ROOTWRAP-daemon $NEUTRON_ROOTWRAP_CONF_FILE"
|
||||||
|
|
||||||
# Additional neutron api config files
|
# Additional neutron api config files
|
||||||
declare -a _NEUTRON_SERVER_EXTRA_CONF_FILES_ABS
|
declare -a -g _NEUTRON_SERVER_EXTRA_CONF_FILES_ABS
|
||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
# ---------
|
# ---------
|
||||||
|
@ -141,10 +141,10 @@ _Q_PLUGIN_EXTRA_CONF_PATH=/etc/neutron
|
|||||||
# These config files are relative to ``/etc/neutron``. The above
|
# These config files are relative to ``/etc/neutron``. The above
|
||||||
# example would specify ``--config-file /etc/neutron/file1`` for
|
# example would specify ``--config-file /etc/neutron/file1`` for
|
||||||
# neutron server.
|
# neutron server.
|
||||||
declare -a Q_PLUGIN_EXTRA_CONF_FILES
|
declare -a -g Q_PLUGIN_EXTRA_CONF_FILES
|
||||||
|
|
||||||
# same as Q_PLUGIN_EXTRA_CONF_FILES, but with absolute path.
|
# same as Q_PLUGIN_EXTRA_CONF_FILES, but with absolute path.
|
||||||
declare -a _Q_PLUGIN_EXTRA_CONF_FILES_ABS
|
declare -a -g _Q_PLUGIN_EXTRA_CONF_FILES_ABS
|
||||||
|
|
||||||
|
|
||||||
Q_RR_CONF_FILE=$NEUTRON_CONF_DIR/rootwrap.conf
|
Q_RR_CONF_FILE=$NEUTRON_CONF_DIR/rootwrap.conf
|
||||||
|
2
stackrc
2
stackrc
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
# ensure we don't re-source this in the same environment
|
# ensure we don't re-source this in the same environment
|
||||||
[[ -z "$_DEVSTACK_STACKRC" ]] || return 0
|
[[ -z "$_DEVSTACK_STACKRC" ]] || return 0
|
||||||
declare -r _DEVSTACK_STACKRC=1
|
declare -r -g _DEVSTACK_STACKRC=1
|
||||||
|
|
||||||
# Find the other rc files
|
# Find the other rc files
|
||||||
RC_DIR=$(cd $(dirname "${BASH_SOURCE:-$0}") && pwd)
|
RC_DIR=$(cd $(dirname "${BASH_SOURCE:-$0}") && pwd)
|
||||||
|
Loading…
Reference in New Issue
Block a user