+configure_app() {
+ # if previous configuration exists put back original template file
+ for file in ../$2/*.yaml; do
+ if [ -e "$file-template" ]; then
+ mv "$file-template" "${file%}"
+ fi
+ done
+
+ # replace the default 'onap' namespace qualification of K8s hostnames within
+ # the config files
+ # note: this will create a '-template' file within the component's directory
+ # this is not ideal and should be addressed (along with the replacement
+ # of sed commands for configuration) by the future configuration
+ # user stories (ie. OOM-51 to OOM-53)
+ find ../$2 -type f -exec sed -i -template "s/onap-/$1-/g" {} \;
+
+ # replace the default '/dockerdata-nfs/onapdemo' volume mount paths
+ find ../$2 -iname "*.yaml" -type f -exec sed -i -e 's/dockerdata-nfs\/[a-zA-Z0-9\\-]*\//dockerdata-nfs\/'"$1"'\//g' {} \;
+ rm -f ../$2/*.yaml-e
+}
+
+