summaryrefslogtreecommitdiffstats
path: root/aai-resources/src/main/scripts
diff options
context:
space:
mode:
authorLaMont, William (wl2432) <wl2432@att.com>2020-06-26 17:24:51 -0400
committerLaMont, William (wl2432) <wl2432@att.com>2020-06-26 17:25:39 -0400
commit9666d712661e58fa4918f9c49d03fde6f4434e07 (patch)
tree575ea35b8ae09ec5a07acf5af212fe4fa91f94f3 /aai-resources/src/main/scripts
parent486d7f22a047b1465abc5a1365560ebf44c0e589 (diff)
support for v20
Issue-ID: AAI-2965 Change-Id: I87737d2cfcf6b499af6083c2355042d66278e73c Signed-off-by: LaMont, William (wl2432) <wl2432@att.com>
Diffstat (limited to 'aai-resources/src/main/scripts')
-rw-r--r--aai-resources/src/main/scripts/bulkprocess.sh14
-rw-r--r--aai-resources/src/main/scripts/common_functions.sh1
-rw-r--r--aai-resources/src/main/scripts/deleteTool.sh2
-rw-r--r--aai-resources/src/main/scripts/getTool.sh2
-rw-r--r--aai-resources/src/main/scripts/install/addManualData.sh1
-rw-r--r--aai-resources/src/main/scripts/putTool.sh2
-rw-r--r--aai-resources/src/main/scripts/rshipTool.sh2
-rw-r--r--aai-resources/src/main/scripts/updateTool.sh2
-rw-r--r--aai-resources/src/main/scripts/vmExportCloudRegions.sh2
-rw-r--r--aai-resources/src/main/scripts/vmUpdateExport.sh5
-rw-r--r--aai-resources/src/main/scripts/vmValidateCloudRegions.sh2
11 files changed, 18 insertions, 17 deletions
diff --git a/aai-resources/src/main/scripts/bulkprocess.sh b/aai-resources/src/main/scripts/bulkprocess.sh
index c4bca27..7366bf2 100644
--- a/aai-resources/src/main/scripts/bulkprocess.sh
+++ b/aai-resources/src/main/scripts/bulkprocess.sh
@@ -29,12 +29,16 @@
inputFolder=$1
if [ -z "$1" ]; then
echo "Input folder string is empty."
- exit 1
+ exit 1
fi
-if [ ! -d "/opt/bulkprocess_load/$1" ]; then
- echo "Input folder could not be found."
- exit 1
+if [ ! -d "$inputFolder" ]; then
+ if [ ! -d "/opt/bulkprocess_load/$1" ]; then
+ echo "Input folder could not be found."
+ exit 1
+ else
+ inputFolder="/opt/bulkprocess_load/$1"
+ fi
fi
XFROMAPPID=$2
@@ -50,7 +54,7 @@ esac
XTRANSID=$3
-for input_file in $(ls -v /opt/bulkprocess_load/${inputFolder}/*);
+for input_file in $(ls -v ${inputFolder}/*);
do
output_file=$(basename $input_file | sed 's/.json//g');
/opt/app/aai-resources/scripts/putTool.sh /bulkprocess ${input_file} -display $XFROMAPPID $XTRANSID > /tmp/${output_file}.$(date +"%Y%m%d%H%M%S").results.json;
diff --git a/aai-resources/src/main/scripts/common_functions.sh b/aai-resources/src/main/scripts/common_functions.sh
index 14358d9..d5bebac 100644
--- a/aai-resources/src/main/scripts/common_functions.sh
+++ b/aai-resources/src/main/scripts/common_functions.sh
@@ -36,7 +36,6 @@ check_user(){
# Sources the profile and sets the project home
source_profile(){
- . /etc/profile.d/aai.sh
PROJECT_HOME=/opt/app/aai-resources
}
diff --git a/aai-resources/src/main/scripts/deleteTool.sh b/aai-resources/src/main/scripts/deleteTool.sh
index 3d7f923..c2dc05c 100644
--- a/aai-resources/src/main/scripts/deleteTool.sh
+++ b/aai-resources/src/main/scripts/deleteTool.sh
@@ -63,7 +63,7 @@ if [ "${userid}" != "aaiadmin" ]; then
exit 1
fi
-. /etc/profile.d/aai.sh
+
PROJECT_HOME=/opt/app/aai-resources
prop_file=$PROJECT_HOME/resources/etc/appprops/aaiconfig.properties
log_dir=$PROJECT_HOME/logs/misc
diff --git a/aai-resources/src/main/scripts/getTool.sh b/aai-resources/src/main/scripts/getTool.sh
index e2ca220..8ff502b 100644
--- a/aai-resources/src/main/scripts/getTool.sh
+++ b/aai-resources/src/main/scripts/getTool.sh
@@ -58,7 +58,7 @@ if [ "${userid}" != "aaiadmin" ]; then
exit 1
fi
-. /etc/profile.d/aai.sh
+
PROJECT_HOME=/opt/app/aai-resources
prop_file=$PROJECT_HOME/resources/etc/appprops/aaiconfig.properties
log_dir=$PROJECT_HOME/logs/misc
diff --git a/aai-resources/src/main/scripts/install/addManualData.sh b/aai-resources/src/main/scripts/install/addManualData.sh
index bd7f7bd..645f7c8 100644
--- a/aai-resources/src/main/scripts/install/addManualData.sh
+++ b/aai-resources/src/main/scripts/install/addManualData.sh
@@ -43,7 +43,6 @@ contains() {
fi
}
-. /etc/profile.d/aai.sh
PROJECT_HOME=/opt/app/aai-resources
PROGNAME=$(basename $0)
diff --git a/aai-resources/src/main/scripts/putTool.sh b/aai-resources/src/main/scripts/putTool.sh
index 4e55b0c..bc84010 100644
--- a/aai-resources/src/main/scripts/putTool.sh
+++ b/aai-resources/src/main/scripts/putTool.sh
@@ -90,7 +90,7 @@ if [ "${userid}" != "aaiadmin" ]; then
exit 1
fi
-. /etc/profile.d/aai.sh
+
PROJECT_HOME=/opt/app/aai-resources
prop_file=$PROJECT_HOME/resources/etc/appprops/aaiconfig.properties
log_dir=$PROJECT_HOME/logs/misc
diff --git a/aai-resources/src/main/scripts/rshipTool.sh b/aai-resources/src/main/scripts/rshipTool.sh
index 3952d44..3ee1c04 100644
--- a/aai-resources/src/main/scripts/rshipTool.sh
+++ b/aai-resources/src/main/scripts/rshipTool.sh
@@ -111,7 +111,7 @@ if [ "${userid}" != "aaiadmin" ]; then
exit 1
fi
-. /etc/profile.d/aai.sh
+
PROJECT_HOME=/opt/app/aai-resources
prop_file=$PROJECT_HOME/resources/etc/appprops/aaiconfig.properties
log_dir=$PROJECT_HOME/logs/misc
diff --git a/aai-resources/src/main/scripts/updateTool.sh b/aai-resources/src/main/scripts/updateTool.sh
index ce0a8f6..347640e 100644
--- a/aai-resources/src/main/scripts/updateTool.sh
+++ b/aai-resources/src/main/scripts/updateTool.sh
@@ -94,7 +94,7 @@ if [ "${userid}" != "aaiadmin" ]; then
exit 1
fi
-. /etc/profile.d/aai.sh
+
PROJECT_HOME=/opt/app/aai-resources
prop_file=$PROJECT_HOME/resources/etc/appprops/aaiconfig.properties
log_dir=$PROJECT_HOME/logs/misc
diff --git a/aai-resources/src/main/scripts/vmExportCloudRegions.sh b/aai-resources/src/main/scripts/vmExportCloudRegions.sh
index 95ec969..a8d14e3 100644
--- a/aai-resources/src/main/scripts/vmExportCloudRegions.sh
+++ b/aai-resources/src/main/scripts/vmExportCloudRegions.sh
@@ -337,7 +337,7 @@ addValidateVserver() {
COMMON_ENV_PATH=$( cd "$(dirname "$0")" ; pwd -P )
. ${COMMON_ENV_PATH}/common_functions.sh
-. /etc/profile.d/aai.sh
+
PROJECT_HOME=/opt/app/aai-resources
PROGNAME=$(basename $0)
diff --git a/aai-resources/src/main/scripts/vmUpdateExport.sh b/aai-resources/src/main/scripts/vmUpdateExport.sh
index f492d2c..6bd4ca9 100644
--- a/aai-resources/src/main/scripts/vmUpdateExport.sh
+++ b/aai-resources/src/main/scripts/vmUpdateExport.sh
@@ -21,8 +21,7 @@
###
#
-# vmUpdateExport.sh -- This tool updates the files generated in A&AI to
-# match what is expected in narad
+# vmUpdateExport.sh -- This tool updates the files generated in A&AI
# The script takes no arguments
addTemplates() {
@@ -33,7 +32,7 @@ addTemplates() {
COMMON_ENV_PATH=$( cd "$(dirname "$0")" ; pwd -P )
. ${COMMON_ENV_PATH}/common_functions.sh
-. /etc/profile.d/aai.sh
+
PROJECT_HOME=/opt/app/aai-resources
PROGNAME=$(basename $0)
diff --git a/aai-resources/src/main/scripts/vmValidateCloudRegions.sh b/aai-resources/src/main/scripts/vmValidateCloudRegions.sh
index a8189e3..b7e30ee 100644
--- a/aai-resources/src/main/scripts/vmValidateCloudRegions.sh
+++ b/aai-resources/src/main/scripts/vmValidateCloudRegions.sh
@@ -56,7 +56,7 @@ renamefiles() {
}
-. /etc/profile.d/aai.sh
+
PROJECT_HOME=/opt/app/aai-resources
PROGNAME=$(basename $0)