Merge "Don't use packaged unittest2"
diff --git a/.gitignore b/.gitignore
index 67ab722..c6900c8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,7 +14,7 @@
files/*.qcow2
files/images
files/pip-*
-files/get-pip.py
+files/get-pip.py*
local.conf
local.sh
localrc
diff --git a/README.md b/README.md
index c5e7f55..53de970 100644
--- a/README.md
+++ b/README.md
@@ -249,14 +249,17 @@
Variable Name Notes
----------------------------------------------------------------------------
Q_AGENT This specifies which agent to run with the
- ML2 Plugin (either `openvswitch` or `linuxbridge`).
+ ML2 Plugin (Typically either `openvswitch`
+ or `linuxbridge`).
+ Defaults to `openvswitch`.
Q_ML2_PLUGIN_MECHANISM_DRIVERS The ML2 MechanismDrivers to load. The default
- is none. Note, ML2 will work with the OVS
- and LinuxBridge agents by default.
+ is `openvswitch,linuxbridge`.
Q_ML2_PLUGIN_TYPE_DRIVERS The ML2 TypeDrivers to load. Defaults to
all available TypeDrivers.
- Q_ML2_PLUGIN_GRE_TYPE_OPTIONS GRE TypeDriver options. Defaults to none.
- Q_ML2_PLUGIN_VXLAN_TYPE_OPTIONS VXLAN TypeDriver options. Defaults to none.
+ Q_ML2_PLUGIN_GRE_TYPE_OPTIONS GRE TypeDriver options. Defaults to
+ `tunnel_id_ranges=1:1000'.
+ Q_ML2_PLUGIN_VXLAN_TYPE_OPTIONS VXLAN TypeDriver options. Defaults to
+ `vni_ranges=1001:2000`
Q_ML2_PLUGIN_VLAN_TYPE_OPTIONS VLAN TypeDriver options. Defaults to none.
# Heat
diff --git a/doc/source/guides/single-machine.rst b/doc/source/guides/single-machine.rst
index 70287a9..236ece9 100644
--- a/doc/source/guides/single-machine.rst
+++ b/doc/source/guides/single-machine.rst
@@ -67,7 +67,7 @@
::
- sudo apt-get install git -y || yum install -y git
+ sudo apt-get install git -y || sudo yum install -y git
git clone https://git.openstack.org/openstack-dev/devstack
cd devstack
diff --git a/doc/source/index.rst b/doc/source/index.rst
index cfde991..bac593d 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -156,7 +156,6 @@
* `lib/ceilometer <lib/ceilometer.html>`__
* `lib/ceph <lib/ceph.html>`__
* `lib/cinder <lib/cinder.html>`__
-* `lib/config <lib/config.html>`__
* `lib/database <lib/database.html>`__
* `lib/dstat <lib/dstat.html>`__
* `lib/glance <lib/glance.html>`__
@@ -188,6 +187,12 @@
* `extras.d/70-zaqar.sh <extras.d/70-zaqar.sh.html>`__
* `extras.d/80-tempest.sh <extras.d/80-tempest.sh.html>`__
+* `inc/ini-config <inc/ini-config.html>`__
+* `inc/meta-config <inc/meta-config.html>`__
+* `inc/python <inc/python.html>`__
+
+* `pkg/elasticsearch.sh <pkg/elasticsearch.sh.html>`_
+
Configuration
-------------
diff --git a/files/rpms/zaqar-server b/files/rpms/zaqar-server
index 69e8bfa..541cefa 100644
--- a/files/rpms/zaqar-server
+++ b/files/rpms/zaqar-server
@@ -1,4 +1,5 @@
selinux-policy-targeted
+mongodb
mongodb-server
pymongo
redis # NOPRIME
diff --git a/functions b/functions
index 79b2b37..9adbfe7 100644
--- a/functions
+++ b/functions
@@ -13,6 +13,7 @@
# Include the common functions
FUNC_DIR=$(cd $(dirname "${BASH_SOURCE:-$0}") && pwd)
source ${FUNC_DIR}/functions-common
+source ${FUNC_DIR}/inc/ini-config
source ${FUNC_DIR}/inc/python
# Save trace setting
diff --git a/functions-common b/functions-common
index df69cba..4739e42 100644
--- a/functions-common
+++ b/functions-common
@@ -43,197 +43,6 @@
TRACK_DEPENDS=${TRACK_DEPENDS:-False}
-# Config Functions
-# ================
-
-# Append a new option in an ini file without replacing the old value
-# iniadd config-file section option value1 value2 value3 ...
-function iniadd {
- local xtrace=$(set +o | grep xtrace)
- set +o xtrace
- local file=$1
- local section=$2
- local option=$3
- shift 3
-
- local values="$(iniget_multiline $file $section $option) $@"
- iniset_multiline $file $section $option $values
- $xtrace
-}
-
-# Comment an option in an INI file
-# inicomment config-file section option
-function inicomment {
- local xtrace=$(set +o | grep xtrace)
- set +o xtrace
- local file=$1
- local section=$2
- local option=$3
-
- sed -i -e "/^\[$section\]/,/^\[.*\]/ s|^\($option[ \t]*=.*$\)|#\1|" "$file"
- $xtrace
-}
-
-# Get an option from an INI file
-# iniget config-file section option
-function iniget {
- local xtrace=$(set +o | grep xtrace)
- set +o xtrace
- local file=$1
- local section=$2
- local option=$3
- local line
-
- line=$(sed -ne "/^\[$section\]/,/^\[.*\]/ { /^$option[ \t]*=/ p; }" "$file")
- echo ${line#*=}
- $xtrace
-}
-
-# Get a multiple line option from an INI file
-# iniget_multiline config-file section option
-function iniget_multiline {
- local xtrace=$(set +o | grep xtrace)
- set +o xtrace
- local file=$1
- local section=$2
- local option=$3
- local values
-
- values=$(sed -ne "/^\[$section\]/,/^\[.*\]/ { s/^$option[ \t]*=[ \t]*//gp; }" "$file")
- echo ${values}
- $xtrace
-}
-
-# Determinate is the given option present in the INI file
-# ini_has_option config-file section option
-function ini_has_option {
- local xtrace=$(set +o | grep xtrace)
- set +o xtrace
- local file=$1
- local section=$2
- local option=$3
- local line
-
- line=$(sed -ne "/^\[$section\]/,/^\[.*\]/ { /^$option[ \t]*=/ p; }" "$file")
- $xtrace
- [ -n "$line" ]
-}
-
-# Add another config line for a multi-line option.
-# It's normally called after iniset of the same option and assumes
-# that the section already exists.
-#
-# Note that iniset_multiline requires all the 'lines' to be supplied
-# in the argument list. Doing that will cause incorrect configuration
-# if spaces are used in the config values.
-#
-# iniadd_literal config-file section option value
-function iniadd_literal {
- local xtrace=$(set +o | grep xtrace)
- set +o xtrace
- local file=$1
- local section=$2
- local option=$3
- local value=$4
-
- [[ -z $section || -z $option ]] && return
-
- # Add it
- sed -i -e "/^\[$section\]/ a\\
-$option = $value
-" "$file"
-
- $xtrace
-}
-
-function inidelete {
- local xtrace=$(set +o | grep xtrace)
- set +o xtrace
- local file=$1
- local section=$2
- local option=$3
-
- [[ -z $section || -z $option ]] && return
-
- # Remove old values
- sed -i -e "/^\[$section\]/,/^\[.*\]/ { /^$option[ \t]*=/ d; }" "$file"
-
- $xtrace
-}
-
-# Set an option in an INI file
-# iniset config-file section option value
-function iniset {
- local xtrace=$(set +o | grep xtrace)
- set +o xtrace
- local file=$1
- local section=$2
- local option=$3
- local value=$4
-
- [[ -z $section || -z $option ]] && return
-
- if ! grep -q "^\[$section\]" "$file" 2>/dev/null; then
- # Add section at the end
- echo -e "\n[$section]" >>"$file"
- fi
- if ! ini_has_option "$file" "$section" "$option"; then
- # Add it
- sed -i -e "/^\[$section\]/ a\\
-$option = $value
-" "$file"
- else
- local sep=$(echo -ne "\x01")
- # Replace it
- sed -i -e '/^\['${section}'\]/,/^\[.*\]/ s'${sep}'^\('${option}'[ \t]*=[ \t]*\).*$'${sep}'\1'"${value}"${sep} "$file"
- fi
- $xtrace
-}
-
-# Set a multiple line option in an INI file
-# iniset_multiline config-file section option value1 value2 valu3 ...
-function iniset_multiline {
- local xtrace=$(set +o | grep xtrace)
- set +o xtrace
- local file=$1
- local section=$2
- local option=$3
-
- shift 3
- local values
- for v in $@; do
- # The later sed command inserts each new value in the line next to
- # the section identifier, which causes the values to be inserted in
- # the reverse order. Do a reverse here to keep the original order.
- values="$v ${values}"
- done
- if ! grep -q "^\[$section\]" "$file"; then
- # Add section at the end
- echo -e "\n[$section]" >>"$file"
- else
- # Remove old values
- sed -i -e "/^\[$section\]/,/^\[.*\]/ { /^$option[ \t]*=/ d; }" "$file"
- fi
- # Add new ones
- for v in $values; do
- sed -i -e "/^\[$section\]/ a\\
-$option = $v
-" "$file"
- done
- $xtrace
-}
-
-# Uncomment an option in an INI file
-# iniuncomment config-file section option
-function iniuncomment {
- local xtrace=$(set +o | grep xtrace)
- set +o xtrace
- local file=$1
- local section=$2
- local option=$3
- sed -i -e "/^\[$section\]/,/^\[.*\]/ s|[^ \t]*#[ \t]*\($option[ \t]*=.*$\)|\1|" "$file"
- $xtrace
-}
# Normalize config values to True or False
# Accepts as False: 0 no No NO false False FALSE
@@ -253,14 +62,6 @@
$xtrace
}
-function isset {
- nounset=$(set +o | grep nounset)
- set +o nounset
- [[ -n "${!1+x}" ]]
- result=$?
- $nounset
- return $result
-}
# Control Functions
# =================
diff --git a/inc/ini-config b/inc/ini-config
new file mode 100644
index 0000000..0d6d169
--- /dev/null
+++ b/inc/ini-config
@@ -0,0 +1,223 @@
+#!/bin/bash
+#
+# **inc/ini-config** - Configuration/INI functions
+#
+# Support for manipulating INI-style configuration files
+#
+# These functions have no external dependencies and no side-effects
+
+# Save trace setting
+INC_CONF_TRACE=$(set +o | grep xtrace)
+set +o xtrace
+
+
+# Config Functions
+# ================
+
+# Append a new option in an ini file without replacing the old value
+# iniadd config-file section option value1 value2 value3 ...
+function iniadd {
+ local xtrace=$(set +o | grep xtrace)
+ set +o xtrace
+ local file=$1
+ local section=$2
+ local option=$3
+ shift 3
+
+ local values="$(iniget_multiline $file $section $option) $@"
+ iniset_multiline $file $section $option $values
+ $xtrace
+}
+
+# Comment an option in an INI file
+# inicomment config-file section option
+function inicomment {
+ local xtrace=$(set +o | grep xtrace)
+ set +o xtrace
+ local file=$1
+ local section=$2
+ local option=$3
+
+ sed -i -e "/^\[$section\]/,/^\[.*\]/ s|^\($option[ \t]*=.*$\)|#\1|" "$file"
+ $xtrace
+}
+
+# Get an option from an INI file
+# iniget config-file section option
+function iniget {
+ local xtrace=$(set +o | grep xtrace)
+ set +o xtrace
+ local file=$1
+ local section=$2
+ local option=$3
+ local line
+
+ line=$(sed -ne "/^\[$section\]/,/^\[.*\]/ { /^$option[ \t]*=/ p; }" "$file")
+ echo ${line#*=}
+ $xtrace
+}
+
+# Get a multiple line option from an INI file
+# iniget_multiline config-file section option
+function iniget_multiline {
+ local xtrace=$(set +o | grep xtrace)
+ set +o xtrace
+ local file=$1
+ local section=$2
+ local option=$3
+ local values
+
+ values=$(sed -ne "/^\[$section\]/,/^\[.*\]/ { s/^$option[ \t]*=[ \t]*//gp; }" "$file")
+ echo ${values}
+ $xtrace
+}
+
+# Determinate is the given option present in the INI file
+# ini_has_option config-file section option
+function ini_has_option {
+ local xtrace=$(set +o | grep xtrace)
+ set +o xtrace
+ local file=$1
+ local section=$2
+ local option=$3
+ local line
+
+ line=$(sed -ne "/^\[$section\]/,/^\[.*\]/ { /^$option[ \t]*=/ p; }" "$file")
+ $xtrace
+ [ -n "$line" ]
+}
+
+# Add another config line for a multi-line option.
+# It's normally called after iniset of the same option and assumes
+# that the section already exists.
+#
+# Note that iniset_multiline requires all the 'lines' to be supplied
+# in the argument list. Doing that will cause incorrect configuration
+# if spaces are used in the config values.
+#
+# iniadd_literal config-file section option value
+function iniadd_literal {
+ local xtrace=$(set +o | grep xtrace)
+ set +o xtrace
+ local file=$1
+ local section=$2
+ local option=$3
+ local value=$4
+
+ [[ -z $section || -z $option ]] && return
+
+ # Add it
+ sed -i -e "/^\[$section\]/ a\\
+$option = $value
+" "$file"
+
+ $xtrace
+}
+
+# Remove an option from an INI file
+# inidelete config-file section option
+function inidelete {
+ local xtrace=$(set +o | grep xtrace)
+ set +o xtrace
+ local file=$1
+ local section=$2
+ local option=$3
+
+ [[ -z $section || -z $option ]] && return
+
+ # Remove old values
+ sed -i -e "/^\[$section\]/,/^\[.*\]/ { /^$option[ \t]*=/ d; }" "$file"
+
+ $xtrace
+}
+
+# Set an option in an INI file
+# iniset config-file section option value
+function iniset {
+ local xtrace=$(set +o | grep xtrace)
+ set +o xtrace
+ local file=$1
+ local section=$2
+ local option=$3
+ local value=$4
+
+ [[ -z $section || -z $option ]] && return
+
+ if ! grep -q "^\[$section\]" "$file" 2>/dev/null; then
+ # Add section at the end
+ echo -e "\n[$section]" >>"$file"
+ fi
+ if ! ini_has_option "$file" "$section" "$option"; then
+ # Add it
+ sed -i -e "/^\[$section\]/ a\\
+$option = $value
+" "$file"
+ else
+ local sep=$(echo -ne "\x01")
+ # Replace it
+ sed -i -e '/^\['${section}'\]/,/^\[.*\]/ s'${sep}'^\('${option}'[ \t]*=[ \t]*\).*$'${sep}'\1'"${value}"${sep} "$file"
+ fi
+ $xtrace
+}
+
+# Set a multiple line option in an INI file
+# iniset_multiline config-file section option value1 value2 valu3 ...
+function iniset_multiline {
+ local xtrace=$(set +o | grep xtrace)
+ set +o xtrace
+ local file=$1
+ local section=$2
+ local option=$3
+
+ shift 3
+ local values
+ for v in $@; do
+ # The later sed command inserts each new value in the line next to
+ # the section identifier, which causes the values to be inserted in
+ # the reverse order. Do a reverse here to keep the original order.
+ values="$v ${values}"
+ done
+ if ! grep -q "^\[$section\]" "$file"; then
+ # Add section at the end
+ echo -e "\n[$section]" >>"$file"
+ else
+ # Remove old values
+ sed -i -e "/^\[$section\]/,/^\[.*\]/ { /^$option[ \t]*=/ d; }" "$file"
+ fi
+ # Add new ones
+ for v in $values; do
+ sed -i -e "/^\[$section\]/ a\\
+$option = $v
+" "$file"
+ done
+ $xtrace
+}
+
+# Uncomment an option in an INI file
+# iniuncomment config-file section option
+function iniuncomment {
+ local xtrace=$(set +o | grep xtrace)
+ set +o xtrace
+ local file=$1
+ local section=$2
+ local option=$3
+ sed -i -e "/^\[$section\]/,/^\[.*\]/ s|[^ \t]*#[ \t]*\($option[ \t]*=.*$\)|\1|" "$file"
+ $xtrace
+}
+
+function isset {
+ nounset=$(set +o | grep nounset)
+ set +o nounset
+ [[ -n "${!1+x}" ]]
+ result=$?
+ $nounset
+ return $result
+}
+
+
+# Restore xtrace
+$INC_CONF_TRACE
+
+# Local variables:
+# mode: shell-script
+# End:
diff --git a/lib/config b/inc/meta-config
similarity index 96%
rename from lib/config
rename to inc/meta-config
index 31c6fa6..c8789bf 100644
--- a/lib/config
+++ b/inc/meta-config
@@ -1,7 +1,9 @@
#!/bin/bash
#
-# lib/config - Configuration file manipulation functions
-
+# **lib/meta-config** - Configuration file manipulation functions
+#
+# Support for DevStack's local.conf meta-config sections
+#
# These functions have no external dependencies and the following side-effects:
#
# CONFIG_AWK_CMD is defined, default is ``awk``
@@ -18,7 +20,7 @@
# file-name is the destination of the config file
# Save trace setting
-C_XTRACE=$(set +o | grep xtrace)
+INC_META_XTRACE=$(set +o | grep xtrace)
set +o xtrace
@@ -176,7 +178,7 @@
# Restore xtrace
-$C_XTRACE
+$INC_META_XTRACE
# Local variables:
# mode: shell-script
diff --git a/lib/cinder b/lib/cinder
index 0d157dd..880af1f 100644
--- a/lib/cinder
+++ b/lib/cinder
@@ -228,7 +228,6 @@
iniset $CINDER_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
iniset $CINDER_CONF DEFAULT verbose True
- iniset $CINDER_CONF DEFAULT my_ip "$CINDER_SERVICE_HOST"
iniset $CINDER_CONF DEFAULT iscsi_helper tgtadm
iniset $CINDER_CONF DEFAULT sql_connection `database_connection_url cinder`
iniset $CINDER_CONF DEFAULT api_paste_config $CINDER_API_PASTE_INI
@@ -242,6 +241,8 @@
# supported.
iniset $CINDER_CONF DEFAULT enable_v1_api true
+ iniset $CINDER_CONF DEFAULT os_region_name "$REGION_NAME"
+
if is_service_enabled c-vol && [[ -n "$CINDER_ENABLED_BACKENDS" ]]; then
local enabled_backends=""
local default_name=""
diff --git a/lib/neutron b/lib/neutron
index a7aabc5..e41abaf 100755
--- a/lib/neutron
+++ b/lib/neutron
@@ -871,7 +871,7 @@
fi
if is_ssl_enabled_service "nova"; then
- iniset $NEUTRON_CONF DEFAULT nova_ca_certificates_file "$SSL_BUNDLE_FILE"
+ iniset $NEUTRON_CONF nova cafile $SSL_BUNDLE_FILE
fi
if is_ssl_enabled_service "neutron"; then
@@ -1045,13 +1045,15 @@
# Configuration for neutron notifations to nova.
iniset $NEUTRON_CONF DEFAULT notify_nova_on_port_status_changes $Q_NOTIFY_NOVA_PORT_STATUS_CHANGES
iniset $NEUTRON_CONF DEFAULT notify_nova_on_port_data_changes $Q_NOTIFY_NOVA_PORT_DATA_CHANGES
- iniset $NEUTRON_CONF DEFAULT nova_url "$NOVA_SERVICE_PROTOCOL://$NOVA_SERVICE_HOST:$NOVA_SERVICE_PORT/v2"
- iniset $NEUTRON_CONF DEFAULT nova_region_name $REGION_NAME
- iniset $NEUTRON_CONF DEFAULT nova_admin_username nova
- iniset $NEUTRON_CONF DEFAULT nova_admin_password $SERVICE_PASSWORD
- ADMIN_TENANT_ID=$(openstack project list | awk "/ service / { print \$2 }")
- iniset $NEUTRON_CONF DEFAULT nova_admin_tenant_id $ADMIN_TENANT_ID
- iniset $NEUTRON_CONF DEFAULT nova_admin_auth_url "$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_AUTH_PORT/v2.0"
+
+ iniset $NEUTRON_CONF nova auth_plugin password
+ iniset $NEUTRON_CONF nova auth_url $KEYSTONE_AUTH_URI
+ iniset $NEUTRON_CONF nova username nova
+ iniset $NEUTRON_CONF nova password $SERVICE_PASSWORD
+ iniset $NEUTRON_CONF nova user_domain_id default
+ iniset $NEUTRON_CONF nova project_name $SERVICE_TENANT_NAME
+ iniset $NEUTRON_CONF nova project_domain_id default
+ iniset $NEUTRON_CONF nova region_name $REGION_NAME
# Configure plugin
neutron_plugin_configure_service
diff --git a/lib/nova b/lib/nova
index e9e78c7..199daee 100644
--- a/lib/nova
+++ b/lib/nova
@@ -544,6 +544,8 @@
iniset $NOVA_CONF DEFAULT ec2_workers "$API_WORKERS"
iniset $NOVA_CONF DEFAULT metadata_workers "$API_WORKERS"
+ iniset $NOVA_CONF cinder os_region_name "$REGION_NAME"
+
if [[ "$NOVA_BACKEND" == "LVM" ]]; then
iniset $NOVA_CONF libvirt images_type "lvm"
iniset $NOVA_CONF libvirt images_volume_group $DEFAULT_VOLUME_GROUP_NAME
diff --git a/lib/swift b/lib/swift
index 8a96615..4a63500 100644
--- a/lib/swift
+++ b/lib/swift
@@ -441,16 +441,15 @@
if is_service_enabled swift3; then
cat <<EOF >>${SWIFT_CONFIG_PROXY_SERVER}
-# NOTE(chmou): s3token middleware is not updated yet to use only
-# username and password.
[filter:s3token]
paste.filter_factory = keystoneclient.middleware.s3_token:filter_factory
auth_port = ${KEYSTONE_AUTH_PORT}
auth_host = ${KEYSTONE_AUTH_HOST}
auth_protocol = ${KEYSTONE_AUTH_PROTOCOL}
cafile = ${SSL_BUNDLE_FILE}
-auth_token = ${SERVICE_TOKEN}
-admin_token = ${SERVICE_TOKEN}
+admin_user = swift
+admin_tenant_name = ${SERVICE_TENANT_NAME}
+admin_password = ${SERVICE_PASSWORD}
[filter:swift3]
use = egg:swift3#swift3
diff --git a/lib/zaqar b/lib/zaqar
index c9321b9..79b4c5a 100644
--- a/lib/zaqar
+++ b/lib/zaqar
@@ -37,8 +37,6 @@
ZAQARCLIENT_DIR=$DEST/python-zaqarclient
ZAQAR_CONF_DIR=/etc/zaqar
ZAQAR_CONF=$ZAQAR_CONF_DIR/zaqar.conf
-ZAQAR_API_LOG_DIR=/var/log/zaqar
-ZAQAR_API_LOG_FILE=$ZAQAR_API_LOG_DIR/queues.log
ZAQAR_AUTH_CACHE_DIR=${ZAQAR_AUTH_CACHE_DIR:-/var/cache/zaqar}
# Support potential entry-points console scripts
@@ -110,14 +108,10 @@
[ ! -d $ZAQAR_CONF_DIR ] && sudo mkdir -m 755 -p $ZAQAR_CONF_DIR
sudo chown $USER $ZAQAR_CONF_DIR
- [ ! -d $ZAQAR_API_LOG_DIR ] && sudo mkdir -m 755 -p $ZAQAR_API_LOG_DIR
- sudo chown $USER $ZAQAR_API_LOG_DIR
-
iniset $ZAQAR_CONF DEFAULT debug True
iniset $ZAQAR_CONF DEFAULT verbose True
iniset $ZAQAR_CONF DEFAULT admin_mode True
iniset $ZAQAR_CONF DEFAULT use_syslog $SYSLOG
- iniset $ZAQAR_CONF DEFAULT log_file $ZAQAR_API_LOG_FILE
iniset $ZAQAR_CONF 'drivers:transport:wsgi' bind $ZAQAR_SERVICE_HOST
configure_auth_token_middleware $ZAQAR_CONF zaqar $ZAQAR_AUTH_CACHE_DIR
diff --git a/stack.sh b/stack.sh
index bf9fc01..2060f2d 100755
--- a/stack.sh
+++ b/stack.sh
@@ -92,7 +92,7 @@
source $TOP_DIR/functions
# Import config functions
-source $TOP_DIR/lib/config
+source $TOP_DIR/inc/meta-config
# Import 'public' stack.sh functions
source $TOP_DIR/lib/stack
diff --git a/tests/test_ini.sh b/tests/test_ini_config.sh
similarity index 98%
rename from tests/test_ini.sh
rename to tests/test_ini_config.sh
index 106cc95..4a0ae33 100755
--- a/tests/test_ini.sh
+++ b/tests/test_ini_config.sh
@@ -4,8 +4,8 @@
TOP=$(cd $(dirname "$0")/.. && pwd)
-# Import common functions
-source $TOP/functions
+# Import config functions
+source $TOP/inc/ini-config
echo "Testing INI functions"
diff --git a/tests/test_config.sh b/tests/test_meta_config.sh
similarity index 98%
rename from tests/test_config.sh
rename to tests/test_meta_config.sh
index 3252104..9d65280 100755
--- a/tests/test_config.sh
+++ b/tests/test_meta_config.sh
@@ -4,11 +4,9 @@
TOP=$(cd $(dirname "$0")/.. && pwd)
-# Import common functions
-source $TOP/functions
-
# Import config functions
-source $TOP/lib/config
+source $TOP/inc/ini-config
+source $TOP/inc/meta-config
# check_result() tests and reports the result values
# check_result "actual" "expected"
diff --git a/tools/build_docs.sh b/tools/build_docs.sh
index 929d1e0..2aa0a0a 100755
--- a/tools/build_docs.sh
+++ b/tools/build_docs.sh
@@ -81,7 +81,7 @@
mkdir -p $FQ_HTML_BUILD/`dirname $f`;
$SHOCCO $f > $FQ_HTML_BUILD/$f.html
done
-for f in $(find functions functions-common lib samples -type f -name \*); do
+for f in $(find functions functions-common inc lib pkg samples -type f -name \*); do
echo $f
FILES+="$f "
mkdir -p $FQ_HTML_BUILD/`dirname $f`;
diff --git a/tools/install_pip.sh b/tools/install_pip.sh
index 73d0947..b7b40c7 100755
--- a/tools/install_pip.sh
+++ b/tools/install_pip.sh
@@ -42,9 +42,21 @@
function install_get_pip {
- if [[ ! -r $LOCAL_PIP ]]; then
- curl --retry 6 --retry-delay 5 -o $LOCAL_PIP $PIP_GET_PIP_URL || \
+ # the openstack gate and others put a cached version of get-pip.py
+ # for this to find, explicitly to avoid download issues.
+ #
+ # However, if devstack *did* download the file, we want to check
+ # for updates; people can leave thier stacks around for a long
+ # time and in the mean-time pip might get upgraded.
+ #
+ # Thus we use curl's "-z" feature to always check the modified
+ # since and only download if a new version is out -- but only if
+ # it seems we downloaded the file originally.
+ if [[ ! -r $LOCAL_PIP || -r $LOCAL_PIP.downloaded ]]; then
+ curl --retry 6 --retry-delay 5 \
+ -z $LOCAL_PIP -o $LOCAL_PIP $PIP_GET_PIP_URL || \
die $LINENO "Download of get-pip.py failed"
+ touch $LOCAL_PIP.downloaded
fi
sudo -H -E python $LOCAL_PIP
}
diff --git a/tox.ini b/tox.ini
index a958ae7..bc84928 100644
--- a/tox.ini
+++ b/tox.ini
@@ -20,6 +20,7 @@
-name \*.sh -or \
-name \*rc -or \
-name functions\* -or \
+ -wholename \*/inc/\* \ # /inc files and
-wholename \*/lib/\* \ # /lib files are shell, but
\) \ # have no extension
-print0 | xargs -0 bashate -v"