Merge "Support for separate Keystone paste.deploy configuration"
diff --git a/files/apts/n-vol b/files/apts/n-vol
deleted file mode 100644
index 5db06ea..0000000
--- a/files/apts/n-vol
+++ /dev/null
@@ -1,2 +0,0 @@
-tgt
-lvm2
diff --git a/files/rpms-suse/ldap b/files/rpms-suse/ldap
new file mode 100644
index 0000000..46d26f0
--- /dev/null
+++ b/files/rpms-suse/ldap
@@ -0,0 +1,3 @@
+openldap2
+openldap2-client
+python-ldap
diff --git a/files/rpms-suse/n-spice b/files/rpms-suse/n-spice
new file mode 100644
index 0000000..c8722b9
--- /dev/null
+++ b/files/rpms-suse/n-spice
@@ -0,0 +1 @@
+python-numpy
diff --git a/files/rpms-suse/n-vol b/files/rpms-suse/n-vol
deleted file mode 100644
index e5b4727..0000000
--- a/files/rpms-suse/n-vol
+++ /dev/null
@@ -1,2 +0,0 @@
-lvm2
-tgt
diff --git a/files/rpms-suse/nova b/files/rpms-suse/nova
index 0306716..04af7f3 100644
--- a/files/rpms-suse/nova
+++ b/files/rpms-suse/nova
@@ -3,6 +3,7 @@
dnsmasq
ebtables
gawk
+genisoimage # required for config_drive
iptables
iputils
kpartx
@@ -34,6 +35,7 @@
python-mox
python-mysql
python-netaddr
+python-numpy # needed by websockify for spice console
python-paramiko
python-python-gflags
python-sqlalchemy-migrate
diff --git a/files/rpms-suse/ryu b/files/rpms-suse/ryu
index 763fd24..90b43a4 100644
--- a/files/rpms-suse/ryu
+++ b/files/rpms-suse/ryu
@@ -2,4 +2,5 @@
python-setuptools # instead of python-distribute; dist:sle11sp2
python-Sphinx
python-gevent
+python-netifaces
python-python-gflags
diff --git a/files/rpms/n-vol b/files/rpms/n-vol
deleted file mode 100644
index df861aa..0000000
--- a/files/rpms/n-vol
+++ /dev/null
@@ -1,2 +0,0 @@
-lvm2
-scsi-target-utils
diff --git a/functions b/functions
index 8cb703c..f5032d5 100644
--- a/functions
+++ b/functions
@@ -53,8 +53,8 @@
}
-# Prints "message" and exits
-# die "message"
+# Prints line number and "message" then exits
+# die $LINENO "message"
function die() {
local exitcode=$?
if [ $exitcode == 0 ]; then
@@ -73,7 +73,7 @@
# Checks an environment variable is not set or has length 0 OR if the
# exit code is non-zero and prints "message" and exits
# NOTE: env-var is the variable name without a '$'
-# die_if_not_set env-var "message"
+# die_if_not_set $LINENO env-var "message"
function die_if_not_set() {
(
local exitcode=$?
@@ -271,6 +271,8 @@
if [[ $? -eq 0 ]]; then
os_VENDOR="openSUSE"
fi
+ elif [[ $os_VENDOR == "openSUSE project" ]]; then
+ os_VENDOR="openSUSE"
elif [[ $os_VENDOR =~ Red.*Hat ]]; then
os_VENDOR="Red Hat"
fi
@@ -553,6 +555,56 @@
fi
}
+# Get a multiple line option from an INI file
+# iniget_multiline config-file section option
+function iniget_multiline() {
+ local file=$1
+ local section=$2
+ local option=$3
+ local values
+ values=$(sed -ne "/^\[$section\]/,/^\[.*\]/ { s/^$option[ \t]*=[ \t]*//gp; }" "$file")
+ echo ${values}
+}
+
+# Set a multiple line option in an INI file
+# iniset_multiline config-file section option value1 value2 valu3 ...
+function iniset_multiline() {
+ 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
+}
+
+# Append a new option in an ini file without replacing the old value
+# iniadd config-file section option value1 value2 value3 ...
+function iniadd() {
+ local file=$1
+ local section=$2
+ local option=$3
+ shift 3
+ local values="$(iniget_multiline $file $section $option) $@"
+ iniset_multiline $file $section $option $values
+}
# is_service_enabled() checks if the service(s) specified as arguments are
# enabled by the user in ``ENABLED_SERVICES``.
diff --git a/lib/ceilometer b/lib/ceilometer
index c04371d..d90694c 100644
--- a/lib/ceilometer
+++ b/lib/ceilometer
@@ -68,7 +68,7 @@
iniset $CEILOMETER_CONF DEFAULT notification_topics 'notifications,glance_notifications'
iniset $CEILOMETER_CONF DEFAULT verbose True
- iniset $CEILOMETER_CONF DEFAULT sql_connection $BASE_SQL_CONN/nova?charset=utf8
+ iniset $CEILOMETER_CONF DEFAULT `database_connection_url nova`
# Install the policy file for the API server
cp $CEILOMETER_DIR/etc/ceilometer/policy.json $CEILOMETER_CONF_DIR
diff --git a/lib/cinder b/lib/cinder
index f487c8e..b3e1904 100644
--- a/lib/cinder
+++ b/lib/cinder
@@ -171,6 +171,7 @@
cp $CINDER_DIR/etc/cinder/cinder.conf.sample $CINDER_CONF
iniset $CINDER_CONF DEFAULT auth_strategy keystone
+ iniset $CINDER_CONF DEFAULT debug True
iniset $CINDER_CONF DEFAULT verbose True
if [ "$CINDER_MULTI_LVM_BACKEND" = "True" ]; then
iniset $CINDER_CONF DEFAULT enabled_backends lvmdriver-1,lvmdriver-2
@@ -185,9 +186,7 @@
iniset $CINDER_CONF DEFAULT volume_name_template ${VOLUME_NAME_PREFIX}%s
fi
iniset $CINDER_CONF DEFAULT iscsi_helper tgtadm
- local dburl
- database_connection_url dburl cinder
- iniset $CINDER_CONF DEFAULT sql_connection $dburl
+ iniset $CINDER_CONF DEFAULT sql_connection `database_connection_url cinder`
iniset $CINDER_CONF DEFAULT api_paste_config $CINDER_API_PASTE_INI
iniset $CINDER_CONF DEFAULT rootwrap_config "$CINDER_CONF_DIR/rootwrap.conf"
iniset $CINDER_CONF DEFAULT osapi_volume_extension cinder.api.contrib.standard_extensions
diff --git a/lib/databases/mysql b/lib/databases/mysql
index 94aedc6..ec65c36 100644
--- a/lib/databases/mysql
+++ b/lib/databases/mysql
@@ -115,9 +115,8 @@
}
function database_connection_url_mysql {
- local output=$1
- local db=$2
- eval "$output=$BASE_SQL_CONN/$db?charset=utf8"
+ local db=$1
+ echo "$BASE_SQL_CONN/$db?charset=utf8"
}
# Restore xtrace
diff --git a/lib/databases/postgresql b/lib/databases/postgresql
index 2c37f49..7d4a6c5 100644
--- a/lib/databases/postgresql
+++ b/lib/databases/postgresql
@@ -70,9 +70,8 @@
}
function database_connection_url_postgresql {
- local output=$1
- local db=$2
- eval "$output=$BASE_SQL_CONN/$db?client_encoding=utf8"
+ local db=$1
+ echo "$BASE_SQL_CONN/$db?client_encoding=utf8"
}
# Restore xtrace
diff --git a/lib/glance b/lib/glance
index a6b698f..9ec2112 100644
--- a/lib/glance
+++ b/lib/glance
@@ -81,8 +81,7 @@
cp $GLANCE_DIR/etc/glance-registry.conf $GLANCE_REGISTRY_CONF
iniset $GLANCE_REGISTRY_CONF DEFAULT debug True
inicomment $GLANCE_REGISTRY_CONF DEFAULT log_file
- local dburl
- database_connection_url dburl glance
+ local dburl=`database_connection_url glance`
iniset $GLANCE_REGISTRY_CONF DEFAULT sql_connection $dburl
iniset $GLANCE_REGISTRY_CONF DEFAULT use_syslog $SYSLOG
iniset $GLANCE_REGISTRY_CONF paste_deploy flavor keystone
diff --git a/lib/heat b/lib/heat
index 5b8b360..56d6f39 100644
--- a/lib/heat
+++ b/lib/heat
@@ -117,9 +117,7 @@
iniset $HEAT_ENGINE_CONF DEFAULT heat_metadata_server_url http://$HEAT_API_CFN_HOST:$HEAT_API_CFN_PORT
iniset $HEAT_ENGINE_CONF DEFAULT heat_waitcondition_server_url http://$HEAT_API_CFN_HOST:$HEAT_API_CFN_PORT/v1/waitcondition
iniset $HEAT_ENGINE_CONF DEFAULT heat_watch_server_url http://$HEAT_API_CW_HOST:$HEAT_API_CW_PORT
- local dburl
- database_connection_url dburl heat
- iniset $HEAT_ENGINE_CONF DEFAULT sql_connection $dburl
+ iniset $HEAT_ENGINE_CONF DEFAULT sql_connection `database_connection_url heat`
iniset $HEAT_ENGINE_CONF DEFAULT auth_encryption_key `hexdump -n 16 -v -e '/1 "%02x"' /dev/random`
iniset_rpc_backend heat $HEAT_ENGINE_CONF DEFAULT
diff --git a/lib/horizon b/lib/horizon
index 9180370..9c96b58 100644
--- a/lib/horizon
+++ b/lib/horizon
@@ -34,6 +34,24 @@
APACHE_USER=${APACHE_USER:-$USER}
APACHE_GROUP=${APACHE_GROUP:-$(id -gn $APACHE_USER)}
+# utility method of setting python option
+function _horizon_config_set() {
+ local file=$1
+ local section=$2
+ local option=$3
+ local value=$4
+
+ if grep -q "^$section" $file; then
+ line=$(sed -ne "/^$section/,/^}/ { /^ *'$option':/ p; }" $file)
+ if [ -n "$line" ]; then
+ sed -i -e "/^$section/,/^}/ s/^\( *'$option'\) *:.*$/\1: $value,/" $file
+ else
+ sed -i -e "/^$section/ a\n '$option': $value,\n" $file
+ fi
+ else
+ echo -e "\n\n$section = {\n '$option': $value,\n}" >> $file
+ fi
+}
# Entry Points
# ------------
@@ -61,6 +79,11 @@
local_settings=$HORIZON_DIR/openstack_dashboard/local/local_settings.py
cp $FILES/horizon_settings.py $local_settings
+ # enable loadbalancer dashboard in case service is enabled
+ if is_service_enabled q-lbaas; then
+ _horizon_config_set $local_settings OPENSTACK_QUANTUM_NETWORK enable_lb True
+ fi
+
# Initialize the horizon database (it stores sessions and notices shown to
# users). The user system is external (keystone).
cd $HORIZON_DIR
diff --git a/lib/keystone b/lib/keystone
index 90bc108..26c0277 100644
--- a/lib/keystone
+++ b/lib/keystone
@@ -101,8 +101,6 @@
fi
# Rewrite stock ``keystone.conf``
- local dburl
- database_connection_url dburl keystone
if is_service_enabled ldap; then
#Set all needed ldap values
@@ -133,7 +131,7 @@
iniset $KEYSTONE_CONF DEFAULT admin_token "$SERVICE_TOKEN"
iniset $KEYSTONE_CONF signing token_format "$KEYSTONE_TOKEN_FORMAT"
- iniset $KEYSTONE_CONF sql connection $dburl
+ iniset $KEYSTONE_CONF sql connection `database_connection_url keystone`
iniset $KEYSTONE_CONF ec2 driver "keystone.contrib.ec2.backends.sql.Ec2"
if [[ "$KEYSTONE_TOKEN_BACKEND" = "sql" ]]; then
diff --git a/lib/ldap b/lib/ldap
index 5cb4534..0a0d197 100644
--- a/lib/ldap
+++ b/lib/ldap
@@ -16,13 +16,11 @@
echo "os_VENDOR is $os_VENDOR"
printf "installing"
if is_ubuntu; then
- echo "os vendor is Ubuntu"
LDAP_OLCDB_NUMBER=1
LDAP_ROOTPW_COMMAND=replace
sudo DEBIAN_FRONTEND=noninteractive apt-get install slapd ldap-utils
#automatically starts LDAP on ubuntu so no need to call start_ldap
- elif is_fedora; then
- echo "os vendor is Fedora"
+ elif is_fedora || is_suse; then
LDAP_OLCDB_NUMBER=2
LDAP_ROOTPW_COMMAND=add
start_ldap
diff --git a/lib/nova b/lib/nova
index 3749790..13e20f8 100644
--- a/lib/nova
+++ b/lib/nova
@@ -377,12 +377,9 @@
iniset $NOVA_CONF DEFAULT s3_port "$S3_SERVICE_PORT"
iniset $NOVA_CONF DEFAULT osapi_compute_extension "nova.api.openstack.compute.contrib.standard_extensions"
iniset $NOVA_CONF DEFAULT my_ip "$HOST_IP"
- local dburl
- database_connection_url dburl nova
- iniset $NOVA_CONF DEFAULT sql_connection "$dburl"
+ iniset $NOVA_CONF DEFAULT sql_connection `database_connection_url nova`
if is_baremetal; then
- database_connection_url dburl nova_bm
- iniset $NOVA_CONF baremetal sql_connection $dburl
+ iniset $NOVA_CONF baremetal sql_connection `database_connection_url nova_bm`
fi
iniset $NOVA_CONF DEFAULT libvirt_type "$LIBVIRT_TYPE"
iniset $NOVA_CONF DEFAULT libvirt_cpu_mode "none"
@@ -428,8 +425,7 @@
if is_service_enabled ceilometer; then
iniset $NOVA_CONF DEFAULT instance_usage_audit "True"
iniset $NOVA_CONF DEFAULT instance_usage_audit_period "hour"
- iniset $NOVA_CONF DEFAULT notification_driver "nova.openstack.common.notifier.rpc_notifier"
- iniset $NOVA_CONF DEFAULT notification_driver "ceilometer.compute.nova_notifier"
+ iniset_multiline $NOVA_CONF DEFAULT notification_driver "nova.openstack.common.notifier.rpc_notifier" "ceilometer.compute.nova_notifier"
fi
diff --git a/lib/quantum b/lib/quantum
index eebbabf..66360d4 100644
--- a/lib/quantum
+++ b/lib/quantum
@@ -416,9 +416,7 @@
Q_PLUGIN_CONF_FILE=$Q_PLUGIN_CONF_PATH/$Q_PLUGIN_CONF_FILENAME
cp $QUANTUM_DIR/$Q_PLUGIN_CONF_FILE /$Q_PLUGIN_CONF_FILE
- database_connection_url dburl $Q_DB_NAME
- iniset /$Q_PLUGIN_CONF_FILE DATABASE sql_connection $dburl
- unset dburl
+ iniset /$Q_PLUGIN_CONF_FILE DATABASE sql_connection `database_connection_url $Q_DB_NAME`
_quantum_setup_rootwrap
}
@@ -539,6 +537,7 @@
iniset $QUANTUM_CONF DEFAULT verbose True
iniset $QUANTUM_CONF DEFAULT debug True
iniset $QUANTUM_CONF DEFAULT state_path $DATA_DIR/quantum
+ iniset $QUANTUM_CONF DEFAULT policy_file $Q_POLICY_FILE
iniset $QUANTUM_CONF DEFAULT allow_overlapping_ips $Q_ALLOW_OVERLAPPING_IP
iniset $QUANTUM_CONF DEFAULT auth_strategy $Q_AUTH_STRATEGY
diff --git a/lib/quantum_plugins/README.md b/lib/quantum_plugins/README.md
index a66d35a..5411de0 100644
--- a/lib/quantum_plugins/README.md
+++ b/lib/quantum_plugins/README.md
@@ -18,7 +18,7 @@
* ``quantum_plugin_create_nova_conf`` :
set ``NOVA_VIF_DRIVER`` and optionally set options in nova_conf
e.g.
- NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver"}
+ NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtGenericVIFDriver"}
* ``quantum_plugin_install_agent_packages`` :
install packages that is specific to plugin agent
e.g.
diff --git a/lib/quantum_plugins/agent_loadbalancer b/lib/quantum_plugins/agent_loadbalancer
index a4d6dff..87e7aaa 100644
--- a/lib/quantum_plugins/agent_loadbalancer
+++ b/lib/quantum_plugins/agent_loadbalancer
@@ -11,6 +11,9 @@
function quantum_agent_lbaas_install_agent_packages() {
if is_ubuntu || is_fedora; then
install_package haproxy
+ elif is_suse; then
+ ### FIXME: Find out if package can be pushed to Factory
+ echo "HAProxy packages can be installed from server:http project in OBS"
fi
}
diff --git a/lib/quantum_plugins/bigswitch_floodlight b/lib/quantum_plugins/bigswitch_floodlight
index 2c928be..7d3fd96 100644
--- a/lib/quantum_plugins/bigswitch_floodlight
+++ b/lib/quantum_plugins/bigswitch_floodlight
@@ -9,7 +9,7 @@
source $TOP_DIR/lib/quantum_thirdparty/bigswitch_floodlight # for third party service specific configuration values
function quantum_plugin_create_nova_conf() {
- NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver"}
+ NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtGenericVIFDriver"}
}
function quantum_plugin_install_agent_packages() {
diff --git a/lib/quantum_plugins/brocade b/lib/quantum_plugins/brocade
index c372c19..ac91143 100644
--- a/lib/quantum_plugins/brocade
+++ b/lib/quantum_plugins/brocade
@@ -10,7 +10,7 @@
}
function quantum_plugin_create_nova_conf() {
- NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.QuantumLinuxBridgeVIFDriver"}
+ NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtGenericVIFDriver"}
}
function quantum_plugin_install_agent_packages() {
diff --git a/lib/quantum_plugins/linuxbridge b/lib/quantum_plugins/linuxbridge
index 0756de4..11bc585 100644
--- a/lib/quantum_plugins/linuxbridge
+++ b/lib/quantum_plugins/linuxbridge
@@ -11,7 +11,7 @@
}
function quantum_plugin_create_nova_conf() {
- NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.QuantumLinuxBridgeVIFDriver"}
+ NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtGenericVIFDriver"}
}
function quantum_plugin_install_agent_packages() {
diff --git a/lib/quantum_plugins/openvswitch b/lib/quantum_plugins/openvswitch
index a57336e..dda1239 100644
--- a/lib/quantum_plugins/openvswitch
+++ b/lib/quantum_plugins/openvswitch
@@ -8,7 +8,7 @@
source $TOP_DIR/lib/quantum_plugins/ovs_base
function quantum_plugin_create_nova_conf() {
- NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver"}
+ NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtGenericVIFDriver"}
if [ "$VIRT_DRIVER" = 'xenserver' ]; then
iniset $NOVA_CONF DEFAULT xenapi_vif_driver nova.virt.xenapi.vif.XenAPIOpenVswitchDriver
iniset $NOVA_CONF DEFAULT xenapi_ovs_integration_bridge $FLAT_NETWORK_BRIDGE
diff --git a/lib/quantum_plugins/ovs_base b/lib/quantum_plugins/ovs_base
index 915129e..ab988d9 100644
--- a/lib/quantum_plugins/ovs_base
+++ b/lib/quantum_plugins/ovs_base
@@ -29,8 +29,8 @@
# Ensure that the service is started
restart_service openvswitch
elif is_suse; then
- ### FIXME: Find RPMs for OpenVSwitch
- echo "OpenVSwitch packages need to be located"
+ ### FIXME: Find out if package can be pushed to Factory
+ echo "OpenVSwitch packages can be installed from Cloud:OpenStack:Master in OBS"
restart_service openvswitch
fi
}
diff --git a/lib/swift b/lib/swift
index 5ba7e56..2f772fb 100644
--- a/lib/swift
+++ b/lib/swift
@@ -352,6 +352,9 @@
function start_swift() {
# (re)start rsyslog
restart_service rsyslog
+ # (re)start memcached to make sure we have a clean memcache.
+ restart_service memcached
+
# Start rsync
if is_ubuntu; then
sudo /etc/init.d/rsync restart || :
diff --git a/lib/tempest b/lib/tempest
index 9cc19ae..85e643e 100644
--- a/lib/tempest
+++ b/lib/tempest
@@ -266,10 +266,6 @@
# install_tempest() - Collect source and prepare
function install_tempest() {
git_clone $TEMPEST_REPO $TEMPEST_DIR $TEMPEST_BRANCH
-
- # Tempest doesn't satisfy its dependencies on its own, so
- # install them here instead.
- pip_install -r $TEMPEST_DIR/tools/pip-requires
}
# init_tempest() - Initialize ec2 images
diff --git a/stack.sh b/stack.sh
index 0f5401a..c39d855 100755
--- a/stack.sh
+++ b/stack.sh
@@ -524,9 +524,9 @@
# as the template to search for, appending '.*' to match the date
# we added on earlier runs.
LOGDIR=$(dirname "$LOGFILE")
- LOGNAME=$(basename "$LOGFILE")
+ LOGFILENAME=$(basename "$LOGFILE")
mkdir -p $LOGDIR
- find $LOGDIR -maxdepth 1 -name $LOGNAME.\* -mtime +$LOGDAYS -exec rm {} \;
+ find $LOGDIR -maxdepth 1 -name $LOGFILENAME.\* -mtime +$LOGDAYS -exec rm {} \;
LOGFILE=$LOGFILE.${CURRENT_LOG_TIME}
SUMFILE=$LOGFILE.${CURRENT_LOG_TIME}.summary
@@ -556,8 +556,8 @@
echo_summary "stack.sh log $LOGFILE"
# Specified logfile name always links to the most recent log
- ln -sf $LOGFILE $LOGDIR/$LOGNAME
- ln -sf $SUMFILE $LOGDIR/$LOGNAME.summary
+ ln -sf $LOGFILE $LOGDIR/$LOGFILENAME
+ ln -sf $SUMFILE $LOGDIR/$LOGFILENAME.summary
else
# Set up output redirection without log files
# Copy stdout to fd 3
diff --git a/stackrc b/stackrc
index 008bc9c..d418a0e 100644
--- a/stackrc
+++ b/stackrc
@@ -45,15 +45,15 @@
CEILOMETER_BRANCH=master
# ceilometer client library
-CEILOMETERCLIENT_REPO=${GIT_BASE}/openstack/python-ceilometerclient
+CEILOMETERCLIENT_REPO=${GIT_BASE}/openstack/python-ceilometerclient.git
CEILOMETERCLIENT_BRANCH=master
# volume service
-CINDER_REPO=${GIT_BASE}/openstack/cinder
+CINDER_REPO=${GIT_BASE}/openstack/cinder.git
CINDER_BRANCH=master
# volume client
-CINDERCLIENT_REPO=${GIT_BASE}/openstack/python-cinderclient
+CINDERCLIENT_REPO=${GIT_BASE}/openstack/python-cinderclient.git
CINDERCLIENT_BRANCH=master
# compute service
@@ -63,11 +63,11 @@
# storage service
SWIFT_REPO=${GIT_BASE}/openstack/swift.git
SWIFT_BRANCH=master
-SWIFT3_REPO=https://github.com/fujita/swift3.git
+SWIFT3_REPO=${GIT_BASE}/fujita/swift3.git
SWIFT3_BRANCH=master
# python swift client library
-SWIFTCLIENT_REPO=${GIT_BASE}/openstack/python-swiftclient
+SWIFTCLIENT_REPO=${GIT_BASE}/openstack/python-swiftclient.git
SWIFTCLIENT_BRANCH=master
# image catalog service
@@ -75,7 +75,7 @@
GLANCE_BRANCH=master
# python glance client library
-GLANCECLIENT_REPO=${GIT_BASE}/openstack/python-glanceclient
+GLANCECLIENT_REPO=${GIT_BASE}/openstack/python-glanceclient.git
GLANCECLIENT_BRANCH=master
# unified auth system (manages accounts/tokens)
@@ -83,7 +83,7 @@
KEYSTONE_BRANCH=master
# a websockets/html5 or flash powered VNC console for vm instances
-NOVNC_REPO=https://github.com/kanaka/noVNC.git
+NOVNC_REPO=${GIT_BASE}/kanaka/noVNC.git
NOVNC_BRANCH=master
# a websockets/html5 or flash powered SPICE console for vm instances
@@ -103,15 +103,15 @@
OPENSTACKCLIENT_BRANCH=master
# python keystone client library to nova that horizon uses
-KEYSTONECLIENT_REPO=${GIT_BASE}/openstack/python-keystoneclient
+KEYSTONECLIENT_REPO=${GIT_BASE}/openstack/python-keystoneclient.git
KEYSTONECLIENT_BRANCH=master
# quantum service
-QUANTUM_REPO=${GIT_BASE}/openstack/quantum
+QUANTUM_REPO=${GIT_BASE}/openstack/quantum.git
QUANTUM_BRANCH=master
# quantum client
-QUANTUMCLIENT_REPO=${GIT_BASE}/openstack/python-quantumclient
+QUANTUMCLIENT_REPO=${GIT_BASE}/openstack/python-quantumclient.git
QUANTUMCLIENT_BRANCH=master
# Tempest test suite
@@ -127,17 +127,17 @@
HEATCLIENT_BRANCH=master
# ryu service
-RYU_REPO=https://github.com/osrg/ryu.git
+RYU_REPO=${GIT_BASE}/osrg/ryu.git
RYU_BRANCH=master
# diskimage-builder
-BM_IMAGE_BUILD_REPO=https://github.com/stackforge/diskimage-builder.git
+BM_IMAGE_BUILD_REPO=${GIT_BASE}/stackforge/diskimage-builder.git
BM_IMAGE_BUILD_BRANCH=master
# bm_poseur
# Used to simulate a hardware environment for baremetal
# Only used if BM_USE_FAKE_ENV is set
-BM_POSEUR_REPO=https://github.com/tripleo/bm_poseur.git
+BM_POSEUR_REPO=${GIT_BASE}/tripleo/bm_poseur.git
BM_POSEUR_BRANCH=master
diff --git a/tests/functions.sh b/tests/functions.sh
index 4fe6443..27a6cfe 100755
--- a/tests/functions.sh
+++ b/tests/functions.sh
@@ -60,6 +60,10 @@
[ddd]
empty =
+
+[eee]
+multi = foo1
+multi = foo2
EOF
# Test with spaces
@@ -193,6 +197,34 @@
echo "inicomment failed: $VAL"
fi
+# Test multiple line iniset/iniget
+iniset_multiline test.ini eee multi bar1 bar2
+
+VAL=$(iniget_multiline test.ini eee multi)
+if [[ "$VAL" == "bar1 bar2" ]]; then
+ echo "OK: iniset_multiline"
+else
+ echo "iniset_multiline failed: $VAL"
+fi
+
+# Test iniadd with exiting values
+iniadd test.ini eee multi bar3
+VAL=$(iniget_multiline test.ini eee multi)
+if [[ "$VAL" == "bar1 bar2 bar3" ]]; then
+ echo "OK: iniadd"
+else
+ echo "iniadd failed: $VAL"
+fi
+
+# Test iniadd with non-exiting values
+iniadd test.ini eee non-multi foobar1 foobar2
+VAL=$(iniget_multiline test.ini eee non-multi)
+if [[ "$VAL" == "foobar1 foobar2" ]]; then
+ echo "OK: iniadd with non-exiting value"
+else
+ echo "iniadd with non-exsting failed: $VAL"
+fi
+
rm test.ini
# Enabling/disabling services
diff --git a/tools/xen/devstackubuntupreseed.cfg b/tools/xen/devstackubuntupreseed.cfg
index d8caaee..c559b1e 100644
--- a/tools/xen/devstackubuntupreseed.cfg
+++ b/tools/xen/devstackubuntupreseed.cfg
@@ -257,7 +257,7 @@
# The kernel image (meta) package to be installed; "none" can be used if no
# kernel is to be installed.
-#d-i base-installer/kernel/image string linux-generic
+d-i base-installer/kernel/image string linux-virtual
### Account setup
# Skip creation of a root account (normal user account will be able to
diff --git a/tools/xen/install_os_domU.sh b/tools/xen/install_os_domU.sh
index f0e057b..0c0e1e2 100755
--- a/tools/xen/install_os_domU.sh
+++ b/tools/xen/install_os_domU.sh
@@ -20,13 +20,13 @@
fi
# This directory
-TOP_DIR=$(cd $(dirname "$0") && pwd)
+THIS_DIR=$(cd $(dirname "$0") && pwd)
# Source lower level functions
-. $TOP_DIR/../../functions
+. $THIS_DIR/../../functions
# Include onexit commands
-. $TOP_DIR/scripts/on_exit.sh
+. $THIS_DIR/scripts/on_exit.sh
#
@@ -49,7 +49,7 @@
# including installing XenAPI plugins
#
-cd $TOP_DIR
+cd $THIS_DIR
if [ -f ./master ]
then
rm -rf ./master
@@ -271,7 +271,7 @@
HTTP_SERVER_LOCATION="/var/www/html"
mkdir -p $HTTP_SERVER_LOCATION
fi
- cp -f $TOP_DIR/devstackubuntupreseed.cfg $HTTP_SERVER_LOCATION
+ cp -f $THIS_DIR/devstackubuntupreseed.cfg $HTTP_SERVER_LOCATION
MIRROR=${MIRROR:-""}
if [ -n "$MIRROR" ]; then
sed -e "s,d-i mirror/http/hostname string .*,d-i mirror/http/hostname string $MIRROR," \
@@ -280,11 +280,11 @@
fi
# Update the template
- $TOP_DIR/scripts/install_ubuntu_template.sh $PRESEED_URL
+ $THIS_DIR/scripts/install_ubuntu_template.sh $PRESEED_URL
# create a new VM with the given template
# creating the correct VIFs and metadata
- $TOP_DIR/scripts/install-os-vpx.sh -t "$UBUNTU_INST_TEMPLATE_NAME" -v $VM_BR -m $MGT_BR -p $PUB_BR -l $GUEST_NAME -r $OSDOMU_MEM_MB -k "flat_network_bridge=${VM_BR}"
+ $THIS_DIR/scripts/install-os-vpx.sh -t "$UBUNTU_INST_TEMPLATE_NAME" -v $VM_BR -m $MGT_BR -p $PUB_BR -l $GUEST_NAME -r $OSDOMU_MEM_MB -k "flat_network_bridge=${VM_BR}"
# wait for install to finish
wait_for_VM_to_halt
@@ -298,7 +298,7 @@
#
# Install XenServer tools, and other such things
- $TOP_DIR/prepare_guest_template.sh "$GUEST_NAME"
+ $THIS_DIR/prepare_guest_template.sh "$GUEST_NAME"
# start the VM to run the prepare steps
xe vm-start vm="$GUEST_NAME"
@@ -320,7 +320,7 @@
#
# Inject DevStack inside VM disk
#
-$TOP_DIR/build_xva.sh "$GUEST_NAME"
+$THIS_DIR/build_xva.sh "$GUEST_NAME"
# create a snapshot before the first boot
# to allow a quick re-run with the same settings
diff --git a/tools/xen/xenrc b/tools/xen/xenrc
index 1a5a2a9..e4d8ac9 100644
--- a/tools/xen/xenrc
+++ b/tools/xen/xenrc
@@ -32,10 +32,10 @@
PUB_IP=${PUB_IP:-192.168.1.55}
# Public network
-PUB_BR=${PUB_BR:-"xenbr0"}
-PUB_DEV=${PUB_DEV:-eth0}
-PUB_VLAN=${PUB_VLAN:--1}
PUB_NETMASK=${PUB_NETMASK:-255.255.255.0}
+PUB_BR=${PUB_BR:-"xenbr0"}
+PUB_VLAN=${PUB_VLAN:--1}
+PUB_DEV=${PUB_DEV:-eth0}
# VM network params
VM_NETMASK=${VM_NETMASK:-255.255.255.0}