cat << EOF
common-functions environment:
MAVENCONF: ${MAVENCONF}
+ACTUALFEATURES: ${ACTUALFEATURES}
FEATURESCONF: ${FEATURESCONF}
CUSTOMPROP: ${CUSTOMPROP}
LOGCONF: ${LOGCONF}
fi
} # function configure_karaf_log_for_apex()
+function configure_odl_features_for_apex() {
+
+ # if the environment variable $ACTUALFEATURES is not null, then rewrite
+ # the puppet config file with the features given in that variable, otherwise
+ # this function is a noop
+
+ local -r controller_ip=$1
+ local -r config_file=/etc/puppet/hieradata/service_configs.json
+
+cat > /tmp/set_odl_features.sh << EOF
+sudo jq '.["opendaylight::extra_features"] |= []' $config_file > tmp.json && mv tmp.json $config_file
+for feature in $(echo $ACTUALFEATURES | sed "s/,/ /g"); do
+ sudo jq --arg jq_arg \$feature '.["opendaylight::extra_features"] |= . + [\$jq_arg]' $config_file > tmp && mv tmp $config_file;
+done
+echo "Modified puppet-opendaylight service_configs.json..."
+cat $config_file
+EOF
+
+ echo "Feature configuration script..."
+ cat /tmp/set_odl_features.sh
+
+ if [ -n "${ACTUALFEATURES}" ]; then
+ scp /tmp/set_odl_features.sh $controller_ip:/tmp/set_odl_features.sh
+ ssh $controller_ip "sudo bash /tmp/set_odl_features.sh"
+ fi
+
+} # function configure_odl_features_for_apex()
+
function get_os_deploy() {
local -r num_systems=${1:-$NUM_OPENSTACK_SYSTEM}
case ${num_systems} in