fi
# Add custom logging levels
- # CONTROLLERDEBUGMAP is expected to be a key:value map of space separated values like "module:level module2:level2"
- # where module is abbreviated and does not include "org.opendaylight."
+ # CONTROLLERDEBUGMAP is expected to be a key:value map of space separated
+ # values like "module:level module2:level2" where module is abbreviated and
+ # does not include "org.opendaylight."
unset IFS
echo "controllerdebugmap: ${controllerdebugmap}"
if [ -n "${controllerdebugmap}" ]; then
cat ${LOGCONF}
} # function configure_karaf_log()
+function configure_karaf_log_for_apex() {
+ # TODO: add the extra steps to this function to do any extra work
+ # in this apex environment like we do in our standard environment.
+ # EX: log size, rollover, etc.
+
+ # Modify ODL Log Levels, if needed, for new distribution. This will modify
+ # the control nodes hiera data which will be used during the puppet deploy
+ # CONTROLLERDEBUGMAP is expected to be a key:value map of space separated
+ # values like "module:level module2:level2" where module is abbreviated and
+ # does not include "org.opendaylight."
+
+ local -r controller_ip=$1
+
+ unset IFS
+ # shellcheck disable=SC2153
+ echo "CONTROLLERDEBUGMAP: ${CONTROLLERDEBUGMAP}"
+ if [ -n "${CONTROLLERDEBUGMAP}" ]; then
+ logging_config='\"opendaylight::log_levels\": {'
+ for kv in ${CONTROLLERDEBUGMAP}; do
+ module="${kv%%:*}"
+ level="${kv#*:}"
+ echo "module: $module, level: $level"
+ # shellcheck disable=SC2157
+ if [ -n "${module}" ] && [ -n "${level}" ]; then
+ orgmodule="org.opendaylight.${module}"
+ logging_config="${logging_config} \\\"${orgmodule}\\\": \\\"${level}\\\","
+ fi
+ done
+ # replace the trailing comma with a closing brace followed by trailing comma
+ logging_config=${logging_config%,}" },"
+ echo $logging_config
+
+ # fine a sane line number to inject the custom logging json
+ lineno=$(ssh $OPENSTACK_CONTROL_NODE_1_IP "sudo grep -Fn 'opendaylight::log_mechanism' /etc/puppet/hieradata/service_configs.json" | awk -F: '{print $1}')
+ ssh $controller_ip "sudo sed -i \"${lineno}i ${logging_config}\" /etc/puppet/hieradata/service_configs.json"
+ ssh $controller_ip "sudo cat /etc/puppet/hieradata/service_configs.json"
+ fi
+} # function configure_karaf_log_for_apex()
+
function get_os_deploy() {
local -r num_systems=${1:-$NUM_OPENSTACK_SYSTEM}
case ${num_systems} in
export OPENSTACK_TOPO
}
+function get_test_suites() {
+
+ #let the caller pick the name of the variable we will assign the suites to
+ local __suite_list=$1
+
+ echo "Locating test plan to use..."
+ testplan_filepath="${WORKSPACE}/test/csit/testplans/${STREAMTESTPLAN}"
+ if [ ! -f "${testplan_filepath}" ]; then
+ testplan_filepath="${WORKSPACE}/test/csit/testplans/${TESTPLAN}"
+ fi
+
+ echo "Changing the testplan path..."
+ cat "${testplan_filepath}" | sed "s:integration:${WORKSPACE}:" > testplan.txt
+ cat testplan.txt
+
+ # Use the testplan if specific SUITES are not defined.
+ if [ -z "${SUITES}" ]; then
+ suite_list=`egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' testplan.txt | tr '\012' ' '`
+ else
+ suite_list=""
+ workpath="${WORKSPACE}/test/csit/suites"
+ for suite in ${SUITES}; do
+ fullsuite="${workpath}/${suite}"
+ if [ -z "${suite_list}" ]; then
+ suite_list+=${fullsuite}
+ else
+ suite_list+=" "${fullsuite}
+ fi
+ done
+ fi
+
+ eval $__suite_list="'$suite_list'"
+}
+
function run_plan() {
local -r type=$1