Convert os_plugins from csv to ssv 29/71129/2
authorJamo Luhrsen <jluhrsen@redhat.com>
Tue, 17 Apr 2018 23:15:38 +0000 (16:15 -0700)
committerJamo Luhrsen <jluhrsen@redhat.com>
Mon, 23 Apr 2018 20:33:01 +0000 (13:33 -0700)
seems our deploy scripts are looping over the list
of openstack plugins that are enabled in each job.
in one place if one of the plugins was networking-sfc,
it would install a special CLI package so those
commands would be available and work. It looks like
the looping logic was expecting space separated,
but we are passing in comma separated lists. this
should fix that.

Change-Id: I0957b7f01a54948865aa942b4ecc6c40f69a5a07
Signed-off-by: Jamo Luhrsen <jluhrsen@redhat.com>
jjb/integration/common-functions.sh
jjb/integration/integration-deploy-openstack-run-test.sh

index 605cd8f0ac9ac8a49a8d2f16d6053681efd28c02..836100b774e7c1fa3f266b4b4daa86caabe3f866 100644 (file)
@@ -115,3 +115,13 @@ function configure_karaf_log() {
     echo "cat ${LOGCONF}"
     cat ${LOGCONF}
 } # function configure_karaf_log()
+
+# convert commas in csv strings to spaces (ssv)
+function csv2ssv() {
+    local csv=$1
+    if [ -n "${csv}" ]; then
+        ssv=$(echo ${csv} | sed 's/,/ /g' | sed 's/\ \ */\ /g')
+    fi
+
+    echo "${ssv}"
+} # csv2ssv
index 6a0e9463b27b86896206a96c6ab23ef82f3e7709..7b5f690be96621b6835d104e8a8ce824167bad3c 100644 (file)
@@ -4,6 +4,8 @@
 # script.
 # shellcheck source=${ROBOT_VENV}/bin/activate disable=SC1091
 source ${ROBOT_VENV}/bin/activate
+source /tmp/common-functions.sh ${BUNDLEFOLDER}
+
 PYTHON="${ROBOT_VENV}/bin/python"
 SSH="ssh -t -t"
 ADMIN_PASSWORD="admin"
@@ -111,7 +113,9 @@ function create_etc_hosts() {
 # openstack release
 function install_openstack_clients_in_robot_vm() {
     packages=("python-novaclient" "python-neutronclient" "python-openstackclient")
-    for plugin_name in ${ENABLE_OS_PLUGINS}; do
+    local os_plugins
+    os_plugins=$(csv2ssv "${ENABLE_OS_PLUGINS}")
+    for plugin_name in $os_plugins; do
         if [ "$plugin_name" == "networking-sfc" ]; then
             packages+=("networking-sfc")
         fi
@@ -136,16 +140,6 @@ function install_openstack_clients_in_robot_vm() {
     fi
 }
 
-# convert commas in csv strings to spaces (ssv)
-function csv2ssv() {
-    local csv=$1
-    if [ -n "${csv}" ]; then
-        ssv=$(echo ${csv} | sed 's/,/ /g' | sed 's/\ \ */\ /g')
-    fi
-
-    echo "${ssv}"
-} # csv2ssv
-
 function is_openstack_feature_enabled() {
     local feature=$1
     for enabled_feature in $(csv2ssv ${ENABLE_OS_SERVICES})