Merge "[AAI] Make aai log level configurable"
[oom.git] / kubernetes / so / components / so-mariadb / resources / config / docker-entrypoint-initdb.d / 98-create-so-user.sh
index 05b1ff7..bf8ae78 100755 (executable)
@@ -1,8 +1,10 @@
 #!/bin/sh
+{{/*
 #
 # ============LICENSE_START==========================================
 # ===================================================================
 # Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# Modifications Copyright (C) 2022/23 Nordix Foundation
 # ===================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # ECOMP and OpenECOMP are trademarks
 # and service marks of AT&T Intellectual Property.
 #
+*/}}
 
 echo "Creating so user . . ." 1>/tmp/mariadb-so-user.log 2>&1
 
 prepare_password()
 {
-       echo "$1" | sed -e "s/'/\\\\'/g; s/\"/\\\\\"/g"
+    echo "$1" | sed -e "s/'/\\\\'/g; s/\"/\\\\\"/g"
 }
 
 DB_PASSWORD=`prepare_password $DB_PASSWORD`
@@ -38,6 +41,7 @@ GRANT SELECT, INSERT, UPDATE, DELETE, EXECUTE, SHOW VIEW ON requestdb.* TO '${DB
 GRANT SELECT, INSERT, UPDATE, DELETE, EXECUTE, SHOW VIEW ON catalogdb.* TO '${DB_USER}'@'%';
 GRANT SELECT, INSERT, UPDATE, DELETE, EXECUTE, SHOW VIEW ON camundabpmn.* TO '${DB_USER}'@'%';
 GRANT SELECT, INSERT, UPDATE, DELETE, EXECUTE, SHOW VIEW ON nfvo.* TO '${DB_USER}'@'%';
+GRANT SELECT, INSERT, UPDATE, DELETE, EXECUTE, SHOW VIEW ON cnfm.* TO '${DB_USER}'@'%';
 FLUSH PRIVILEGES;
 EOF