From: Jamo Luhrsen Date: Tue, 17 Apr 2018 23:15:38 +0000 (-0700) Subject: Convert os_plugins from csv to ssv X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=26df70c06e58d23687ea16c92fc5d4220750ad5b;p=releng%2Fbuilder.git Convert os_plugins from csv to ssv 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 --- diff --git a/jjb/integration/common-functions.sh b/jjb/integration/common-functions.sh index 605cd8f0a..836100b77 100644 --- a/jjb/integration/common-functions.sh +++ b/jjb/integration/common-functions.sh @@ -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 diff --git a/jjb/integration/integration-deploy-openstack-run-test.sh b/jjb/integration/integration-deploy-openstack-run-test.sh index 6a0e9463b..7b5f690be 100644 --- a/jjb/integration/integration-deploy-openstack-run-test.sh +++ b/jjb/integration/integration-deploy-openstack-run-test.sh @@ -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})