summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--aai-resources/src/main/scripts/PropertyChangeName.sh58
-rw-r--r--aai-resources/src/main/scripts/changePropertyCardinality.sh49
-rw-r--r--aai-resources/src/main/scripts/common_functions.sh20
-rw-r--r--aai-resources/src/main/scripts/dataGrooming.sh64
-rw-r--r--aai-resources/src/main/scripts/dataRestoreFromSnapshot.sh47
-rw-r--r--aai-resources/src/main/scripts/dataSnapshot.sh34
-rw-r--r--aai-resources/src/main/scripts/deobfuscatePW.sh36
-rw-r--r--aai-resources/src/main/scripts/schemaMod.sh39
-rw-r--r--aai-resources/src/main/scripts/uniquePropertyCheck.sh39
-rw-r--r--aai-resources/src/main/swm/package/nix/dist_files/opt/app/aai-resources/execTool.sh20
-rwxr-xr-xaai-resources/src/main/swm/package/nix/dist_files/opt/app/aai-resources/kill_resources.sh20
-rwxr-xr-xaai-resources/src/main/swm/package/nix/dist_files/opt/app/aai-resources/start_resources.sh20
-rwxr-xr-xaai-resources/src/main/swm/package/nix/dist_files/opt/app/aai-resources/stop_resources.sh20
13 files changed, 215 insertions, 251 deletions
diff --git a/aai-resources/src/main/scripts/PropertyChangeName.sh b/aai-resources/src/main/scripts/PropertyChangeName.sh
index 65fcc5a..8168928 100644
--- a/aai-resources/src/main/scripts/PropertyChangeName.sh
+++ b/aai-resources/src/main/scripts/PropertyChangeName.sh
@@ -3,7 +3,7 @@
# ============LICENSE_START=======================================================
# org.onap.aai
# ================================================================================
-# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -18,8 +18,6 @@
# limitations under the License.
# ============LICENSE_END=========================================================
#
-# ECOMP is a trademark and service mark of AT&T Intellectual Property.
-#
#
# This script is used to add a target property name with the same value in the database schema
@@ -42,43 +40,27 @@
# Ie. propertyNameChange service-id persona-model-id service-instance true
#
-echo
-echo `date` " Starting $0"
-
-
-userid=$( id | cut -f2 -d"(" | cut -f1 -d")" )
-if [ "${userid}" != "aaiadmin" ]; then
- echo "You must be aaiadmin to run $0. The id used $userid."
- exit 1
-fi
-
-
-if [ "$#" -ne 4 ]; then
- echo "Illegal number of parameters"
- echo "usage: $0 propertyName targetPropertyName targetNodeType skipCommit"
- exit 1
-fi
-
-. /etc/profile.d/aai.sh
-PROJECT_HOME=/opt/app/aai-resources
+echo "RETIRED: Reach out to delivery team if this needs to be execued."
+#COMMON_ENV_PATH=$( cd "$(dirname "$0")" ; pwd -P )
+#. ${COMMON_ENV_PATH}/common_functions.sh
+#start_date;
+#check_user;
-for JAR in `ls $PROJECT_HOME/extJars/*.jar`
-do
- CLASSPATH=$CLASSPATH:$JAR
-done
-for JAR in `ls $PROJECT_HOME/lib/*.jar`
-do
- CLASSPATH=$CLASSPATH:$JAR
-done
+#if [ "$#" -ne 4 ]; then
+# echo "Illegal number of parameters"
+# echo "usage: $0 propertyName targetPropertyName targetNodeType skipCommit"
+# exit 1
+#fi
-$JAVA_HOME/bin/java -classpath $CLASSPATH -Dhttps.protocols=TLSv1.1,TLSv1.2 -DAJSC_HOME=$PROJECT_HOME -Daai.home=$PROJECT_HOME \
- org.onap.aai.dbgen.PropertyNameChange $1 $2 $3 $4
-if [ "$?" -ne "0" ]; then
- echo "Problem executing propertyNameChange "
- exit 1
-fi
+#source_profile;
+#execute_spring_jar org.onap.aai.dbgen.PropertyNameChange ${PROJECT_HOME}/resources/etc/appprops/schemaMod-logback.xml "$1 $2 $3 $4"
+#if [ "$?" -ne "0" ]; then
+# echo "Problem executing propertyNameChange "
+# end_date;
+# exit 1
+#fi
-echo `date` " Done $0"
-exit 0
+#end_date;
+#exit 0
diff --git a/aai-resources/src/main/scripts/changePropertyCardinality.sh b/aai-resources/src/main/scripts/changePropertyCardinality.sh
index 483c0ea..3be0178 100644
--- a/aai-resources/src/main/scripts/changePropertyCardinality.sh
+++ b/aai-resources/src/main/scripts/changePropertyCardinality.sh
@@ -1,25 +1,24 @@
#!/bin/ksh
-#
+
+###
# ============LICENSE_START=======================================================
# org.onap.aai
# ================================================================================
-# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============LICENSE_END=========================================================
-#
-# ECOMP is a trademark and service mark of AT&T Intellectual Property.
-#
+###
#
# This script is used to change the cardinality of an existing database property.
@@ -46,16 +45,11 @@
# Ie. changePropertyCardinality.sh supplier-release-list String SET false
#
-echo
-echo `date` " Starting $0"
-
-
-userid=$( id | cut -f2 -d"(" | cut -f1 -d")" )
-if [ "${userid}" != "aaiadmin" ]; then
- echo "You must be aaiadmin to run $0. The id used $userid."
- exit 1
-fi
+COMMON_ENV_PATH=$( cd "$(dirname "$0")" ; pwd -P )
+. ${COMMON_ENV_PATH}/common_functions.sh
+start_date;
+check_user;
if [ "$#" -ne 4 ]; then
echo "Illegal number of parameters"
@@ -63,27 +57,14 @@ if [ "$#" -ne 4 ]; then
exit 1
fi
-. /etc/profile.d/aai.sh
-PROJECT_HOME=/opt/app/aai-resources
-
-for JAR in `ls $PROJECT_HOME/extJars/*.jar`
-do
- CLASSPATH=$CLASSPATH:$JAR
-done
-
-for JAR in `ls $PROJECT_HOME/lib/*.jar`
-do
- CLASSPATH=$CLASSPATH:$JAR
-done
-
+source_profile;
-$JAVA_HOME/bin/java -classpath $CLASSPATH -Dhttps.protocols=TLSv1.1,TLSv1.2 -DAJSC_HOME=$PROJECT_HOME -Daai.home=$PROJECT_HOME \
- org.onap.aai.dbgen.ChangePropertyCardinality $1 $2 $3 $4
+execute_spring_jar org.onap.aai.dbgen.ChangePropertyCardinality ${PROJECT_HOME}/resources/etc/appprops/schemaMod-logback.xml "$1 $2 $3 $4"
if [ "$?" -ne "0" ]; then
echo "Problem executing ChangePropertyCardinality "
+ end_date;
exit 1
fi
-
-echo `date` " Done $0"
+end_date;
exit 0
diff --git a/aai-resources/src/main/scripts/common_functions.sh b/aai-resources/src/main/scripts/common_functions.sh
index 4a34da8..1ad865b 100644
--- a/aai-resources/src/main/scripts/common_functions.sh
+++ b/aai-resources/src/main/scripts/common_functions.sh
@@ -1,4 +1,24 @@
#!/bin/ksh
+#
+# ============LICENSE_START=======================================================
+# org.onap.aai
+# ================================================================================
+# Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+#
+
# Common functions that can be used throughout multiple scripts
# In order to call these functions, this file needs to be sourced
diff --git a/aai-resources/src/main/scripts/dataGrooming.sh b/aai-resources/src/main/scripts/dataGrooming.sh
index 78d28a5..f1ba4bc 100644
--- a/aai-resources/src/main/scripts/dataGrooming.sh
+++ b/aai-resources/src/main/scripts/dataGrooming.sh
@@ -3,7 +3,7 @@
# ============LICENSE_START=======================================================
# org.onap.aai
# ================================================================================
-# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -18,8 +18,6 @@
# limitations under the License.
# ============LICENSE_END=========================================================
#
-# ECOMP is a trademark and service mark of AT&T Intellectual Property.
-#
#
# The script invokes the dataGrooming java class to run some tests and generate a report and
@@ -31,6 +29,8 @@
# -autoFix
# -sleepMinutes nn
# -edgesOnly
+# -skipEdges
+# -timeWindowMinutes nn
# -dontFixOrphans
# -maxFix
# -skipHostCheck
@@ -65,8 +65,12 @@
# we want to give it time to resolve itself if possible.
#
# -edgesOnly Can be used any time you want to limit this tool so it only looks at edges.
-# It runs much more quickly when it's just doing edges and sometimes all our
-# problems are with bad edges so it can be nice to focus on edges only sometimes.
+# Note - as of 1710, we have not been seeing many purely bad edges,
+# (ie. not associated with a phantom node) so this option is not used often.
+#
+# -skipEdgeChecks Use it to bypass checks for bad Edges (which are pretty rare).
+#
+# -timeWindowMinutes Use it to limit the nodes looked at to ones whose update-timestamp tells us that it was last updated less than this many minutes ago. Note this is usually used along with the skipEdgeChecks option.
#
# -dontFixOrphans Since there can sometimes be a lot of orphan nodes, and they don't
# harm processing as much as phantom-nodes or bad-edges, it is useful to be
@@ -99,37 +103,29 @@
# This parameter lets us turn that fixing ON if we want to try to fix them.
#
-echo
-echo `date` " Starting $0"
-
-
-userid=$( id | cut -f2 -d"(" | cut -f1 -d")" )
-if [ "${userid}" != "aaiadmin" ]; then
- echo "You must be aaiadmin to run $0. The id used $userid."
- exit 1
-fi
-
-
-. /etc/profile.d/aai.sh
-
-for JAR in `ls $PROJECT_HOME/extJars/*.jar`
-do
- CLASSPATH=$CLASSPATH:$JAR
-done
+COMMON_ENV_PATH=$( cd "$(dirname "$0")" ; pwd -P )
+. ${COMMON_ENV_PATH}/common_functions.sh
-for JAR in `ls $PROJECT_HOME/jetty/webapps/*/webapp/WEB-INF/lib/*.jar`
-do
- CLASSPATH=$CLASSPATH:$JAR
-done
+start_date;
+check_user;
-for JAR in `ls $PROJECT_HOME/lib/*.jar`
-do
- CLASSPATH=$CLASSPATH:$JAR
-done
+# Make sure that it's not already running
+processStat=`ps -ef|grep aaiadmin|grep -E "org.onap.aai.dbgen.DataGrooming"|grep -v grep`
+if [ "$processStat" != "" ]
+ then
+ echo "Found dataGrooming is already running: " $processStat
+ exit 1
+fi
+# Make sure that it's not already running
+processStat=`ps -ef|grep aaiadmin|grep -E "org.onap.aai.dbgen.DataGrooming"|grep -v grep`
+if [ "$processStat" != "" ]
+ then
+ echo "Found dataGrooming is already running: " $processStat
+ exit 1
+fi
-$JAVA_HOME/bin/java -classpath $CLASSPATH -Dhttps.protocols=TLSv1.1,TLSv1.2 -DAJSC_HOME=$PROJECT_HOME -Daai.home=$PROJECT_HOME \
- org.onap.aai.dbgen.DataGrooming "$@"
-
-echo `date` " Done $0"
+source_profile;
+execute_spring_jar org.onap.aai.dbgen.DataGrooming ${PROJECT_HOME}/resources/etc/appprops/dataGrooming-logback.xml "$@"
+end_date;
exit 0
diff --git a/aai-resources/src/main/scripts/dataRestoreFromSnapshot.sh b/aai-resources/src/main/scripts/dataRestoreFromSnapshot.sh
index 6ed64f9..042dd15 100644
--- a/aai-resources/src/main/scripts/dataRestoreFromSnapshot.sh
+++ b/aai-resources/src/main/scripts/dataRestoreFromSnapshot.sh
@@ -3,7 +3,7 @@
# ============LICENSE_START=======================================================
# org.onap.aai
# ================================================================================
-# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -18,8 +18,6 @@
# limitations under the License.
# ============LICENSE_END=========================================================
#
-# ECOMP is a trademark and service mark of AT&T Intellectual Property.
-#
#
# This script uses the dataSnapshot and SchemaGenerator (via GenTester) java classes to restore
@@ -30,60 +28,43 @@
# contain an xml view of the db data).
#
-echo
-echo `date` " Starting $0"
-
+COMMON_ENV_PATH=$( cd "$(dirname "$0")" ; pwd -P )
+. ${COMMON_ENV_PATH}/common_functions.sh
-userid=$( id | cut -f2 -d"(" | cut -f1 -d")" )
-if [ "${userid}" != "aaiadmin" ]; then
- echo "You must be aaiadmin to run $0. The id used $userid."
- exit 1
-fi
+start_date;
+check_user;
-
-if [ "$#" -ne 1 ]; then
+if [ "$#" -lt 1 ]; then
echo "Illegal number of parameters"
echo "usage: $0 previous_snapshot_filename"
exit 1
fi
-. /etc/profile.d/aai.sh
-
-for JAR in `ls $PROJECT_HOME/extJars/*.jar`
-do
- CLASSPATH=$CLASSPATH:$JAR
-done
-
-for JAR in `ls $PROJECT_HOME/lib/*.jar`
-do
- CLASSPATH=$CLASSPATH:$JAR
-done
+source_profile;
+export PRE_JAVA_OPTS=${PRE_JAVA_OPTS:--Xms6g -Xmx8g};
#### Step 1) clear out the database
-$JAVA_HOME/bin/java -classpath $CLASSPATH -Dhttps.protocols=TLSv1.1,TLSv1.2 -DAJSC_HOME=$PROJECT_HOME -Daai.home=$PROJECT_HOME \
- org.onap.aai.dbgen.DataSnapshot CLEAR_ENTIRE_DATABASE $1
+execute_spring_jar org.onap.aai.dbgen.DataSnapshot ${PROJECT_HOME}/resources/etc/appprops/dataSnapshot-logback.xml "CLEAR_ENTIRE_DATABASE" "$1" "$2"
if [ "$?" -ne "0" ]; then
echo "Problem clearing out database."
exit 1
fi
#### Step 2) rebuild the db-schema
-$JAVA_HOME/bin/java -classpath $CLASSPATH -Dhttps.protocols=TLSv1.1,TLSv1.2 -DAJSC_HOME=$PROJECT_HOME -Daai.home=$PROJECT_HOME \
- org.onap.aai.dbgen.GenTester GEN_DB_WITH_NO_DEFAULT_CR
+execute_spring_jar org.onap.aai.dbgen.GenTester ${PROJECT_HOME}/resources/etc/appprops/createDBSchema-logback.xml "GEN_DB_WITH_NO_DEFAULT_CR"
if [ "$?" -ne "0" ]; then
echo "Problem rebuilding the schema (SchemaGenerator)."
exit 1
fi
#### Step 3) reload the data from a snapshot file
-$JAVA_HOME/bin/java -classpath $CLASSPATH -Dhttps.protocols=TLSv1.1,TLSv1.2 -DAJSC_HOME=$PROJECT_HOME -Daai.home=$PROJECT_HOME \
- org.onap.aai.dbgen.DataSnapshot RELOAD_DATA $1
+
+execute_spring_jar org.onap.aai.dbgen.DataSnapshot ${PROJECT_HOME}/resources/etc/appprops/dataSnapshot-logback.xml "RELOAD_DATA" "$1"
if [ "$?" -ne "0" ]; then
echo "Problem reloading data into the database."
+ end_date;
exit 1
fi
-
-
-echo `date` " Done $0"
+end_date;
exit 0
diff --git a/aai-resources/src/main/scripts/dataSnapshot.sh b/aai-resources/src/main/scripts/dataSnapshot.sh
index 2db8dd0..0e54a46 100644
--- a/aai-resources/src/main/scripts/dataSnapshot.sh
+++ b/aai-resources/src/main/scripts/dataSnapshot.sh
@@ -3,7 +3,7 @@
# ============LICENSE_START=======================================================
# org.onap.aai
# ================================================================================
-# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -18,38 +18,20 @@
# limitations under the License.
# ============LICENSE_END=========================================================
#
-# ECOMP is a trademark and service mark of AT&T Intellectual Property.
-#
#
# This script invokes the dataSnapshot java class passing an option to tell it to take
# a snapshot of the database and store it as a single-line XML file.
#
-echo
-echo `date` " Starting $0"
-
-
-userid=$( id | cut -f2 -d"(" | cut -f1 -d")" )
-if [ "${userid}" != "aaiadmin" ]; then
- echo "You must be aaiadmin to run $0. The id used $userid."
- exit 1
-fi
-
-. /etc/profile.d/aai.sh
+COMMON_ENV_PATH=$( cd "$(dirname "$0")" ; pwd -P )
+. ${COMMON_ENV_PATH}/common_functions.sh
-for JAR in `ls $PROJECT_HOME/extJars/*.jar`
-do
- CLASSPATH=$CLASSPATH:$JAR
-done
+start_date;
+check_user;
-for JAR in `ls $PROJECT_HOME/lib/*.jar`
-do
- CLASSPATH=$CLASSPATH:$JAR
-done
+source_profile;
+execute_spring_jar org.onap.aai.dbgen.DataSnapshot ${PROJECT_HOME}/resources/etc/appprops/dataSnapshot-logback.xml "JUST_TAKE_SNAPSHOT"
-$JAVA_HOME/bin/java -classpath $CLASSPATH -Dhttps.protocols=TLSv1.1,TLSv1.2 -DAJSC_HOME=$PROJECT_HOME -Daai.home=$PROJECT_HOME \
- org.onap.aai.dbgen.DataSnapshot JUST_TAKE_SNAPSHOT
-
-echo `date` " Done $0"
+end_date;
exit 0
diff --git a/aai-resources/src/main/scripts/deobfuscatePW.sh b/aai-resources/src/main/scripts/deobfuscatePW.sh
index dc66465..6732b04 100644
--- a/aai-resources/src/main/scripts/deobfuscatePW.sh
+++ b/aai-resources/src/main/scripts/deobfuscatePW.sh
@@ -3,7 +3,7 @@
# ============LICENSE_START=======================================================
# org.onap.aai
# ================================================================================
-# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -18,8 +18,6 @@
# limitations under the License.
# ============LICENSE_END=========================================================
#
-# ECOMP is a trademark and service mark of AT&T Intellectual Property.
-#
#
# The script invokes the utils.JettyObfuscationConversionCommandLineUtil class to
@@ -30,30 +28,12 @@
# admin
#
-echo
-echo `date` " Starting $0"
-
-userid=$( id | cut -f2 -d"(" | cut -f1 -d")" )
-if [ "${userid}" != "aaiadmin" ]; then
- echo "You must be aaiadmin to run $0. The id used $userid."
- exit 1
-fi
-
-. /etc/profile.d/aai.sh
-PROJECT_HOME=/opt/app/aai-resources
-
-for JAR in `ls $PROJECT_HOME/extJars/*.jar`
-do
- CLASSPATH=$CLASSPATH:$JAR
-done
-
-for JAR in `ls $PROJECT_HOME/lib/*.jar`
-do
- CLASSPATH=$CLASSPATH:$JAR
-done
+COMMON_ENV_PATH=$( cd "$(dirname "$0")" ; pwd -P )
+. ${COMMON_ENV_PATH}/common_functions.sh
-$JAVA_HOME/bin/java -classpath $CLASSPATH -Dhttps.protocols=TLSv1.1,TLSv1.2 -DAJSC_HOME=$PROJECT_HOME -Daai.home=$PROJECT_HOME \
- -Dcom.att.eelf.logging.file=default-logback.xml -Dcom.att.eelf.logging.path="$PROJECT_HOME/bundleconfig/etc/appprops/" \
- org.onap.aai.util.AAIConfigCommandLinePropGetter $1
+start_date;
+check_user;
-echo `date` " Done $0"
+source_profile;
+execute_spring_jar org.onap.aai.util.AAIConfigCommandLinePropGetter ${PROJECT_HOME}/resources/etc/appprops/default-logback.xml "$1"
+end_date; \ No newline at end of file
diff --git a/aai-resources/src/main/scripts/schemaMod.sh b/aai-resources/src/main/scripts/schemaMod.sh
index 1c49c69..c2d0c83 100644
--- a/aai-resources/src/main/scripts/schemaMod.sh
+++ b/aai-resources/src/main/scripts/schemaMod.sh
@@ -3,7 +3,7 @@
# ============LICENSE_START=======================================================
# org.onap.aai
# ================================================================================
-# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -18,8 +18,6 @@
# limitations under the License.
# ============LICENSE_END=========================================================
#
-# ECOMP is a trademark and service mark of AT&T Intellectual Property.
-#
#
# This script is used to correct mistakes made in the database schema.
@@ -49,16 +47,10 @@
# Ie. schemaMod flavor-id String index true
#
-echo
-echo `date` " Starting $0"
-
-
-userid=$( id | cut -f2 -d"(" | cut -f1 -d")" )
-if [ "${userid}" != "aaiadmin" ]; then
- echo "You must be aaiadmin to run $0. The id used $userid."
- exit 1
-fi
-
+COMMON_ENV_PATH=$( cd "$(dirname "$0")" ; pwd -P )
+. ${COMMON_ENV_PATH}/common_functions.sh
+start_date;
+check_user;
if [ "$#" -ne 4 ]; then
echo "Illegal number of parameters"
@@ -66,26 +58,13 @@ if [ "$#" -ne 4 ]; then
exit 1
fi
-. /etc/profile.d/aai.sh
-PROJECT_HOME=/opt/app/aai-resources
-
-for JAR in `ls $PROJECT_HOME/extJars/*.jar`
-do
- CLASSPATH=$CLASSPATH:$JAR
-done
-
-for JAR in `ls $PROJECT_HOME/lib/*.jar`
-do
- CLASSPATH=$CLASSPATH:$JAR
-done
-
-$JAVA_HOME/bin/java -classpath $CLASSPATH -Dhttps.protocols=TLSv1.1,TLSv1.2 -DAJSC_HOME=$PROJECT_HOME -Daai.home=$PROJECT_HOME \
- org.onap.aai.dbgen.SchemaMod $1 $2 $3 $4
+source_profile;
+execute_spring_jar org.onap.aai.dbgen.SchemaMod ${PROJECT_HOME}/resources/etc/appprops/schemaMod-logback.xml "$1 $2 $3 $4"
if [ "$?" -ne "0" ]; then
echo "Problem executing schemaMod "
+ end_date;
exit 1
fi
-
-echo `date` " Done $0"
+end_date;
exit 0
diff --git a/aai-resources/src/main/scripts/uniquePropertyCheck.sh b/aai-resources/src/main/scripts/uniquePropertyCheck.sh
index 8170040..87f7aad 100644
--- a/aai-resources/src/main/scripts/uniquePropertyCheck.sh
+++ b/aai-resources/src/main/scripts/uniquePropertyCheck.sh
@@ -3,7 +3,7 @@
# ============LICENSE_START=======================================================
# org.onap.aai
# ================================================================================
-# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -18,8 +18,6 @@
# limitations under the License.
# ============LICENSE_END=========================================================
#
-# ECOMP is a trademark and service mark of AT&T Intellectual Property.
-#
#
# The script invokes UniqueProperty java class to see if the passed property is unique in the db and if
@@ -28,34 +26,19 @@
# For example: uniquePropertyCheck.sh subscriber-name
#
-echo
-echo `date` " Starting $0"
-
-userid=$( id | cut -f2 -d"(" | cut -f1 -d")" )
-if [ "${userid}" != "aaiadmin" ]; then
- echo "You must be aaiadmin to run $0. The id used $userid."
- exit 1
-fi
-
-. /etc/profile.d/aai.sh
-PROJECT_HOME=/opt/app/aai-resources
-
-for JAR in `ls $PROJECT_HOME/extJars/*.jar`
-do
- CLASSPATH=$CLASSPATH:$JAR
-done
-
-for JAR in `ls $PROJECT_HOME/lib/*.jar`
-do
- CLASSPATH=$CLASSPATH:$JAR
-done
+COMMON_ENV_PATH=$( cd "$(dirname "$0")" ; pwd -P )
+. ${COMMON_ENV_PATH}/common_functions.sh
+start_date;
+check_user;
+source_profile;
-$JAVA_HOME/bin/java -classpath $CLASSPATH -Dhttps.protocols=TLSv1.1,TLSv1.2 -DAJSC_HOME=$PROJECT_HOME -Daai.home=$PROJECT_HOME org.onap.aai.util.UniquePropertyCheck "$@"
+#execute_spring_jar org.onap.aai.util.UniquePropertyCheck ${PROJECT_HOME}/resources/etc/appprops/uniquePropertyCheck-logback.xml "$@"
+execute_spring_jar org.onap.aai.util.UniquePropertyCheck ${PROJECT_HOME}/resources/uniquePropertyCheck-logback.xml "$@"
ret_code=$?
if [ $ret_code != 0 ]; then
- echo `date` " Done $0"
+ end_date;
exit $ret_code
fi
-echo `date` " Done $0"
-exit 0
+end_date;
+exit 0 \ No newline at end of file
diff --git a/aai-resources/src/main/swm/package/nix/dist_files/opt/app/aai-resources/execTool.sh b/aai-resources/src/main/swm/package/nix/dist_files/opt/app/aai-resources/execTool.sh
index 8613410..da52a66 100644
--- a/aai-resources/src/main/swm/package/nix/dist_files/opt/app/aai-resources/execTool.sh
+++ b/aai-resources/src/main/swm/package/nix/dist_files/opt/app/aai-resources/execTool.sh
@@ -1,4 +1,24 @@
#!/bin/bash
+#
+# ============LICENSE_START=======================================================
+# org.onap.aai
+# ================================================================================
+# Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+#
+
export WORKING_DIR="$( cd "$(dirname "$0")" ; pwd -P )/"
diff --git a/aai-resources/src/main/swm/package/nix/dist_files/opt/app/aai-resources/kill_resources.sh b/aai-resources/src/main/swm/package/nix/dist_files/opt/app/aai-resources/kill_resources.sh
index d8e14e5..a278739 100755
--- a/aai-resources/src/main/swm/package/nix/dist_files/opt/app/aai-resources/kill_resources.sh
+++ b/aai-resources/src/main/swm/package/nix/dist_files/opt/app/aai-resources/kill_resources.sh
@@ -1,4 +1,24 @@
#!/bin/bash
+#
+# ============LICENSE_START=======================================================
+# org.onap.aai
+# ================================================================================
+# Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+#
+
. /etc/profile.d/aai.sh
PROJECT_HOME=/opt/app/aai-resources
diff --git a/aai-resources/src/main/swm/package/nix/dist_files/opt/app/aai-resources/start_resources.sh b/aai-resources/src/main/swm/package/nix/dist_files/opt/app/aai-resources/start_resources.sh
index e9d73ec..13f7568 100755
--- a/aai-resources/src/main/swm/package/nix/dist_files/opt/app/aai-resources/start_resources.sh
+++ b/aai-resources/src/main/swm/package/nix/dist_files/opt/app/aai-resources/start_resources.sh
@@ -1,4 +1,24 @@
#!/bin/bash
+#
+# ============LICENSE_START=======================================================
+# org.onap.aai
+# ================================================================================
+# Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+#
+
. /etc/profile.d/aai.sh
PROJECT_HOME=/opt/app/aai-resources
diff --git a/aai-resources/src/main/swm/package/nix/dist_files/opt/app/aai-resources/stop_resources.sh b/aai-resources/src/main/swm/package/nix/dist_files/opt/app/aai-resources/stop_resources.sh
index 05bd23d..24c03a3 100755
--- a/aai-resources/src/main/swm/package/nix/dist_files/opt/app/aai-resources/stop_resources.sh
+++ b/aai-resources/src/main/swm/package/nix/dist_files/opt/app/aai-resources/stop_resources.sh
@@ -1,4 +1,24 @@
#!/bin/bash
+#
+# ============LICENSE_START=======================================================
+# org.onap.aai
+# ================================================================================
+# Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+#
+
. /etc/profile.d/aai.sh
PROJECT_HOME=/opt/app/aai-resources