summaryrefslogtreecommitdiffstats
path: root/asdctool
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2020-09-21 22:13:05 +0200
committerMichael Morris <michael.morris@est.tech>2021-05-12 10:27:10 +0000
commitdf353be353e1ec25ac2a0e64a9eb617dcbc87703 (patch)
treee79c636bc4f67bdd8392b24c85f2f6cb26e3c67a /asdctool
parent936781153118364e60662529dbd7217416a26148 (diff)
Use integration-java11 Dockerfile
Use onap/integration-java11:7.1.0 as a source for the images requiring JDK 11 in SDC Issue-ID: SDC-3298 Change-Id: Ifee3d2942dcb9c078f2ebb686bdabc0ecca857b3 Signed-off-by: xuegao <xue.gao@intl.att.com>
Diffstat (limited to 'asdctool')
-rw-r--r--asdctool/pom.xml1
-rw-r--r--asdctool/sdc-cassandra-init/Dockerfile7
-rw-r--r--asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/01-createCsUser.rb11
-rw-r--r--asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/02-createDoxKeyspace.rb25
-rw-r--r--asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/03-schemaCreation.rb31
-rw-r--r--asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/04-importConformance.rb17
-rw-r--r--asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/create_cassandra_user.sh.erb10
-rw-r--r--asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/create_dox_keyspace.sh.erb2
-rw-r--r--asdctool/src/main/resources/scripts/UUIDFix1707.sh6
-rw-r--r--asdctool/src/main/resources/scripts/artifactsIdValidation.sh6
-rw-r--r--asdctool/src/main/resources/scripts/baseOperation.sh4
-rw-r--r--asdctool/src/main/resources/scripts/cleanCsar.sh6
-rw-r--r--asdctool/src/main/resources/scripts/deleteAllProducts.sh6
-rw-r--r--asdctool/src/main/resources/scripts/deleteComponentTool.sh6
-rw-r--r--asdctool/src/main/resources/scripts/derivedFromAlignment.sh6
-rw-r--r--asdctool/src/main/resources/scripts/distributionStatusUpdate1707.sh6
-rw-r--r--asdctool/src/main/resources/scripts/exportGraph.sh6
-rw-r--r--asdctool/src/main/resources/scripts/exportGraphAsGraphMl.sh6
-rw-r--r--asdctool/src/main/resources/scripts/exportUsers.sh6
-rw-r--r--asdctool/src/main/resources/scripts/fix_icons.sh6
-rw-r--r--asdctool/src/main/resources/scripts/fix_issue.sh6
-rw-r--r--asdctool/src/main/resources/scripts/generateCsar.sh6
-rw-r--r--asdctool/src/main/resources/scripts/groupsAlignment.sh6
-rw-r--r--asdctool/src/main/resources/scripts/importGraph.sh6
-rw-r--r--asdctool/src/main/resources/scripts/janusGraphSchemaCreation.sh6
-rw-r--r--asdctool/src/main/resources/scripts/migration1707RelationsFix.sh6
-rw-r--r--asdctool/src/main/resources/scripts/postMigration1707Fix.sh6
-rw-r--r--asdctool/src/main/resources/scripts/schemaCreation.sh6
-rw-r--r--asdctool/src/main/resources/scripts/sdc-migration.sh6
-rw-r--r--asdctool/src/main/resources/scripts/sdcSchemaFileImport.sh6
-rw-r--r--asdctool/src/main/resources/scripts/updateIsVnf.sh6
-rw-r--r--asdctool/src/main/resources/scripts/upgradePostMigration1710.sh6
-rw-r--r--asdctool/src/main/resources/scripts/validationTool.sh6
-rw-r--r--asdctool/src/main/resources/scripts/vfModulePropertiesAdding.sh6
-rw-r--r--asdctool/src/main/resources/scripts/vfcNameAlignment.sh6
-rw-r--r--asdctool/src/main/resources/scripts/vfmoduleFix1707.sh6
-rw-r--r--asdctool/src/main/resources/scripts/vrfObjectFix.sh6
37 files changed, 124 insertions, 152 deletions
diff --git a/asdctool/pom.xml b/asdctool/pom.xml
index 623d4e6ea8..7161f89ca0 100644
--- a/asdctool/pom.xml
+++ b/asdctool/pom.xml
@@ -726,6 +726,7 @@
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
+ <verbose>${verbose}</verbose>
<apiVersion>${docker.api.version}</apiVersion>
<registry>nexus3.onap.org:10001</registry>
<authConfig>
diff --git a/asdctool/sdc-cassandra-init/Dockerfile b/asdctool/sdc-cassandra-init/Dockerfile
index e35f841984..e5321004b7 100644
--- a/asdctool/sdc-cassandra-init/Dockerfile
+++ b/asdctool/sdc-cassandra-init/Dockerfile
@@ -16,7 +16,6 @@ RUN apt-get update && apt-get install -y python-pip && \
echo '[cql]' > ~/.cassandra/cqlshrc && \
echo 'version=3.4.4' >> ~/.cassandra/cqlshrc && \
set -ex && \
- pip install cqlsh && \
apt-get install -y \
make \
gcc \
@@ -25,14 +24,12 @@ RUN apt-get update && apt-get install -y python-pip && \
libffi-dev \
libxml2-dev && \
gem install chef:13.8.5 berkshelf:6.3.1 io-console:0.4.6 etc webrick --no-document && \
- apt-get update -y && \
+ apt-get update -y && apt-get remove bash -y --allow-remove-essential && \
apt-get install -y binutils && apt-get clean && gem cleanup
-USER sdc
+USER sdc
COPY --chown=sdc:sdc chef-solo /home/sdc/chef-solo/
-
COPY --chown=sdc:sdc chef-repo/cookbooks /home/sdc/chef-solo/cookbooks/
-
COPY --chown=sdc:sdc startup.sh /home/sdc/
RUN chmod 770 /home/sdc/startup.sh
diff --git a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/01-createCsUser.rb b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/01-createCsUser.rb
index 84b0cb2b40..3c67715922 100644
--- a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/01-createCsUser.rb
+++ b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/01-createCsUser.rb
@@ -11,9 +11,8 @@ template "/tmp/create_cassandra_user.sh" do
})
end
-
-bash "create-sdc-user" do
- code <<-EOH
- cd /tmp ; /tmp/create_cassandra_user.sh
- EOH
-end
+execute "create-sdc-user" do
+ command "/tmp/create_cassandra_user.sh"
+ cwd "/tmp/"
+ action :run
+end \ No newline at end of file
diff --git a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/02-createDoxKeyspace.rb b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/02-createDoxKeyspace.rb
index 38de1e8844..5f740a8909 100644
--- a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/02-createDoxKeyspace.rb
+++ b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/02-createDoxKeyspace.rb
@@ -19,21 +19,16 @@ remote_directory '/tmp/tools' do
action :create
end
-
-bash "onboard-db-schema-creation" do
+execute "onboard-db-schema-creation" do
ignore_failure true
- code <<-EOH
- cd /tmp/tools/build/scripts
- chmod +x onboard-db-schema-creation.sh
- bash /tmp/tools/build/scripts/onboard-db-schema-creation.sh
- EOH
+ command "chmod +x onboard-db-schema-creation.sh && sh -x /tmp/tools/build/scripts/onboard-db-schema-creation.sh"
+ cwd "/tmp/tools/build/scripts"
+ action :run
end
-
-bash "create-DOX-schema" do
+
+execute "create-DOX-schema" do
ignore_failure true
- code <<-EOH
- cd /tmp
- chmod +x /tmp/create_dox_keyspace.sh
- /tmp/create_dox_keyspace.sh
- EOH
-end
+ command "chmod +x /tmp/create_dox_keyspace.sh && /tmp/create_dox_keyspace.sh"
+ cwd "/tmp"
+ action :run
+end \ No newline at end of file
diff --git a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/03-schemaCreation.rb b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/03-schemaCreation.rb
index a62550eeae..e60740fb3d 100644
--- a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/03-schemaCreation.rb
+++ b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/03-schemaCreation.rb
@@ -3,15 +3,12 @@ cookbook_file "/tmp/sdctool.tar" do
mode 0755
end
-## extract sdctool.tar
-bash "install tar" do
+execute "install tar" do
+ command "/bin/tar xf /tmp/sdctool.tar -C /tmp"
cwd "/tmp"
- code <<-EOH
- /bin/tar xf /tmp/sdctool.tar -C /tmp
- EOH
+ action :run
end
-
template "janusgraph.properties" do
sensitive true
path "/tmp/sdctool/config/janusgraph.properties"
@@ -49,19 +46,13 @@ template "/tmp/sdctool/config/configuration.yaml" do
})
end
-
-
-bash "executing-schema-creation" do
- code <<-EOH
- cd /tmp
- chmod +x /tmp/sdctool/scripts/schemaCreation.sh
- /tmp/sdctool/scripts/schemaCreation.sh /tmp/sdctool/config
- EOH
+execute "executing-schema-creation" do
+ command "chmod +x /tmp/sdctool/scripts/schemaCreation.sh && /tmp/sdctool/scripts/schemaCreation.sh /tmp/sdctool/config"
+ cwd "/tmp"
+ action :run
end
-bash "executing-janusGraphSchemaCreation.sh" do
- code <<-EOH
- chmod +x /tmp/sdctool/scripts/janusGraphSchemaCreation.sh
- /tmp/sdctool/scripts/janusGraphSchemaCreation.sh /tmp/sdctool/config
- EOH
-end
+execute "executing-janusGraphSchemaCreation.sh" do
+ command "chmod +x /tmp/sdctool/scripts/janusGraphSchemaCreation.sh && /tmp/sdctool/scripts/janusGraphSchemaCreation.sh /tmp/sdctool/config"
+ action :run
+end \ No newline at end of file
diff --git a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/04-importConformance.rb b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/04-importConformance.rb
index 0490c89668..8c2ee505be 100644
--- a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/04-importConformance.rb
+++ b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/04-importConformance.rb
@@ -2,19 +2,8 @@ working_directory = "/tmp"
cl_release=node['version'].split('.')[0..2].join('.').split('-')[0]
printf("\033[33mcl_release=[%s]\n\033[0m", cl_release)
-
-
-bash "import-Conformance" do
+execute "import-Conformance" do
+ command "conf_dir=/tmp/sdctool/config && tosca_dir=/tmp/sdctool/tosca && cl_version=`grep 'toscaConformanceLevel:' $conf_dir/configuration.yaml |awk '{print $2}'` && cd /tmp/sdctool/scripts && /bin/chmod +x sdcSchemaFileImport.sh && echo \"execute /tmp/sdctool/scripts/sdcSchemaFileImport.sh ${tosca_dir} #{cl_release} ${cl_version} ${conf_dir} onap\" && ./sdcSchemaFileImport.sh ${tosca_dir} #{cl_release} ${cl_version} ${conf_dir} onap"
cwd "#{working_directory}"
- code <<-EOH
- conf_dir=/tmp/sdctool/config
- tosca_dir=/tmp/sdctool/tosca
-
- cl_version=`grep 'toscaConformanceLevel:' $conf_dir/configuration.yaml |awk '{print $2}'`
-
- cd /tmp/sdctool/scripts
- /bin/chmod +x sdcSchemaFileImport.sh
- echo "execute /tmp/sdctool/scripts/sdcSchemaFileImport.sh ${tosca_dir} #{cl_release} ${cl_version} ${conf_dir} onap"
- ./sdcSchemaFileImport.sh ${tosca_dir} #{cl_release} ${cl_version} ${conf_dir} onap
- EOH
+ action :run
end \ No newline at end of file
diff --git a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/create_cassandra_user.sh.erb b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/create_cassandra_user.sh.erb
index 426eed83df..9fa3130542 100644
--- a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/create_cassandra_user.sh.erb
+++ b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/create_cassandra_user.sh.erb
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
CASSANDRA_IP=<%= @cassandra_ip %>
CASSANDRA_PORT=<%= @cassandra_port %>
@@ -12,17 +12,17 @@ retry_num=1
is_up=0
while [ $is_up -eq 0 -a $retry_num -le 100 ]; do
- echo "exit" | cqlsh -u cassandra -p $CS_PASSWORD $CASSANDRA_IP $CASSANDRA_PORT > /dev/null 2>&1
+ echo "exit" | cqlsh -u cassandra -p $CS_PASSWORD $CASSANDRA_IP $CASSANDRA_PORT
res1=$?
if [ $res1 -eq 0 ]; then
- echo "`date` --- cqlsh is enabled to connect."
+ echo "`date` --- cqlsh is able to connect."
is_up=1
else
- echo "`date` --- cqlsh is NOT enabled to connect yet. sleep 5"
+ echo "`date` --- cqlsh is NOT able to connect yet. sleep 5"
sleep 5
fi
- let "retry_num++"
+ retry_num=$((retry_num+1))
done
cassandra_user_exist=`echo "list users;" | cqlsh -u cassandra -p $CS_PASSWORD $CASSANDRA_IP $CASSANDRA_PORT | grep -c $SDC_USER`
diff --git a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/create_dox_keyspace.sh.erb b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/create_dox_keyspace.sh.erb
index e9d10af10e..9b20c6f15c 100644
--- a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/create_dox_keyspace.sh.erb
+++ b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/create_dox_keyspace.sh.erb
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
CASSANDRA_USER='<%= @cassandra_usr %>'
CASSANDRA_PASS='<%= @cassandra_pwd %>'
diff --git a/asdctool/src/main/resources/scripts/UUIDFix1707.sh b/asdctool/src/main/resources/scripts/UUIDFix1707.sh
index 0ceb0a0346..71cda4bccc 100644
--- a/asdctool/src/main/resources/scripts/UUIDFix1707.sh
+++ b/asdctool/src/main/resources/scripts/UUIDFix1707.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
##############################
# Distribution Status Update 1707
@@ -7,14 +7,14 @@
CURRENT_DIR=`pwd`
BASEDIR=$(dirname $0)
-if [ ${BASEDIR:0:1} = "/" ]
+if [ `echo ${BASEDIR} | cut -c1-1` = "/" ]
then
FULL_PATH=$BASEDIR
else
FULL_PATH=$CURRENT_DIR/$BASEDIR
fi
-source ${FULL_PATH}/baseOperation.sh
+. ${FULL_PATH}/baseOperation.sh
mainClass="org.openecomp.sdc.asdctool.main.ArtifactUUIDFixMenu"
diff --git a/asdctool/src/main/resources/scripts/artifactsIdValidation.sh b/asdctool/src/main/resources/scripts/artifactsIdValidation.sh
index 9064a64c6d..9c60aa76cf 100644
--- a/asdctool/src/main/resources/scripts/artifactsIdValidation.sh
+++ b/asdctool/src/main/resources/scripts/artifactsIdValidation.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
##############################
# Artifact Validator Tool #
@@ -7,14 +7,14 @@
CURRENT_DIR=`pwd`
BASEDIR=$(dirname $0)
-if [ ${BASEDIR:0:1} = "/" ]
+if [ `echo ${BASEDIR} | cut -c1-1` = "/" ]
then
FULL_PATH=$BASEDIR
else
FULL_PATH=$CURRENT_DIR/$BASEDIR
fi
-source ${FULL_PATH}/baseOperation.sh
+. ${FULL_PATH}/baseOperation.sh
mainClass="org.openecomp.sdc.asdctool.main.ArtifactValidatorTool"
diff --git a/asdctool/src/main/resources/scripts/baseOperation.sh b/asdctool/src/main/resources/scripts/baseOperation.sh
index b27b734276..ffa101e26d 100644
--- a/asdctool/src/main/resources/scripts/baseOperation.sh
+++ b/asdctool/src/main/resources/scripts/baseOperation.sh
@@ -1,9 +1,9 @@
-#!/bin/bash
+#!/bin/sh
CURRENT_DIR=`pwd`
BASEDIR=$(dirname $0)
-if [ ${BASEDIR:0:1} = "/" ]
+if [ `echo ${BASEDIR} | cut -c1-1` = "/" ]
then
FULL_PATH=$BASEDIR
else
diff --git a/asdctool/src/main/resources/scripts/cleanCsar.sh b/asdctool/src/main/resources/scripts/cleanCsar.sh
index c11cdef8f8..a5fba0a927 100644
--- a/asdctool/src/main/resources/scripts/cleanCsar.sh
+++ b/asdctool/src/main/resources/scripts/cleanCsar.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
##############################
# Data Migration
@@ -7,14 +7,14 @@
CURRENT_DIR=`pwd`
BASEDIR=$(dirname $0)
-if [ ${BASEDIR:0:1} = "/" ]
+if [ `echo ${BASEDIR} | cut -c1-1` = "/" ]
then
FULL_PATH=$BASEDIR
else
FULL_PATH=$CURRENT_DIR/$BASEDIR
fi
-source ${FULL_PATH}/baseOperation.sh
+. ${FULL_PATH}/baseOperation.sh
mainClass="org.openecomp.sdc.asdctool.main.MigrationMenu"
diff --git a/asdctool/src/main/resources/scripts/deleteAllProducts.sh b/asdctool/src/main/resources/scripts/deleteAllProducts.sh
index 474b6c8980..07dbae122b 100644
--- a/asdctool/src/main/resources/scripts/deleteAllProducts.sh
+++ b/asdctool/src/main/resources/scripts/deleteAllProducts.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
#####################################
# delete all products from JanusGraph
@@ -7,14 +7,14 @@
CURRENT_DIR=`pwd`
BASEDIR=$(dirname $0)
-if [ ${BASEDIR:0:1} = "/" ]
+if [ `echo ${BASEDIR} | cut -c1-1` = "/" ]
then
FULL_PATH=$BASEDIR
else
FULL_PATH=$CURRENT_DIR/$BASEDIR
fi
-source ${FULL_PATH}/baseOperation.sh
+. ${FULL_PATH}/baseOperation.sh
mainClass="org.openecomp.sdc.asdctool.main.RemoveUtils"
diff --git a/asdctool/src/main/resources/scripts/deleteComponentTool.sh b/asdctool/src/main/resources/scripts/deleteComponentTool.sh
index afdf8166f5..0c65d54386 100644
--- a/asdctool/src/main/resources/scripts/deleteComponentTool.sh
+++ b/asdctool/src/main/resources/scripts/deleteComponentTool.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
##############################
# Distribution Status Update 1707
@@ -7,14 +7,14 @@
CURRENT_DIR=`pwd`
BASEDIR=$(dirname $0)
-if [ ${BASEDIR:0:1} = "/" ]
+if [ `echo ${BASEDIR} | cut -c1-1` = "/" ]
then
FULL_PATH=$BASEDIR
else
FULL_PATH=$CURRENT_DIR/$BASEDIR
fi
-source ${FULL_PATH}/baseOperation.sh
+. ${FULL_PATH}/baseOperation.sh
mainClass="org.openecomp.sdc.asdctool.main.DeleteComponentTool"
diff --git a/asdctool/src/main/resources/scripts/derivedFromAlignment.sh b/asdctool/src/main/resources/scripts/derivedFromAlignment.sh
index 05025a01c0..c9ee64b6b4 100644
--- a/asdctool/src/main/resources/scripts/derivedFromAlignment.sh
+++ b/asdctool/src/main/resources/scripts/derivedFromAlignment.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
##############################
# Data Migration
@@ -7,14 +7,14 @@
CURRENT_DIR=`pwd`
BASEDIR=$(dirname $0)
-if [ ${BASEDIR:0:1} = "/" ]
+if [ `echo ${BASEDIR} | cut -c1-1` = "/" ]
then
FULL_PATH=$BASEDIR
else
FULL_PATH=$CURRENT_DIR/$BASEDIR
fi
-source ${FULL_PATH}/baseOperation.sh
+. ${FULL_PATH}/baseOperation.sh
mainClass="org.openecomp.sdc.asdctool.main.MigrationMenu"
diff --git a/asdctool/src/main/resources/scripts/distributionStatusUpdate1707.sh b/asdctool/src/main/resources/scripts/distributionStatusUpdate1707.sh
index a9d308f933..3be4a498aa 100644
--- a/asdctool/src/main/resources/scripts/distributionStatusUpdate1707.sh
+++ b/asdctool/src/main/resources/scripts/distributionStatusUpdate1707.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
##############################
# Distribution Status Update 1707
@@ -7,14 +7,14 @@
CURRENT_DIR=`pwd`
BASEDIR=$(dirname $0)
-if [ ${BASEDIR:0:1} = "/" ]
+if [ `echo ${BASEDIR} | cut -c1-1` = "/" ]
then
FULL_PATH=$BASEDIR
else
FULL_PATH=$CURRENT_DIR/$BASEDIR
fi
-source ${FULL_PATH}/baseOperation.sh
+. ${FULL_PATH}/baseOperation.sh
mainClass="org.openecomp.sdc.asdctool.main.MigrationMenu"
diff --git a/asdctool/src/main/resources/scripts/exportGraph.sh b/asdctool/src/main/resources/scripts/exportGraph.sh
index 648cb50669..41874d5bdc 100644
--- a/asdctool/src/main/resources/scripts/exportGraph.sh
+++ b/asdctool/src/main/resources/scripts/exportGraph.sh
@@ -1,16 +1,16 @@
-#!/bin/bash
+#!/bin/sh
CURRENT_DIR=`pwd`
BASEDIR=$(dirname $0)
-if [ ${BASEDIR:0:1} = "/" ]
+if [ `echo ${BASEDIR} | cut -c1-1` = "/" ]
then
FULL_PATH=$BASEDIR
else
FULL_PATH=$CURRENT_DIR/$BASEDIR
fi
-source ${FULL_PATH}/baseOperation.sh
+. ${FULL_PATH}/baseOperation.sh
mainClass="org.openecomp.sdc.asdctool.main.ExportImportMenu"
diff --git a/asdctool/src/main/resources/scripts/exportGraphAsGraphMl.sh b/asdctool/src/main/resources/scripts/exportGraphAsGraphMl.sh
index 17d660ce4e..bd8f51a40b 100644
--- a/asdctool/src/main/resources/scripts/exportGraphAsGraphMl.sh
+++ b/asdctool/src/main/resources/scripts/exportGraphAsGraphMl.sh
@@ -1,16 +1,16 @@
-#!/bin/bash
+#!/bin/sh
CURRENT_DIR=`pwd`
BASEDIR=$(dirname $0)
-if [ ${BASEDIR:0:1} = "/" ]
+if [ `echo ${BASEDIR} | cut -c1-1` = "/" ]
then
FULL_PATH=$BASEDIR
else
FULL_PATH=$CURRENT_DIR/$BASEDIR
fi
-source ${FULL_PATH}/baseOperation.sh
+. ${FULL_PATH}/baseOperation.sh
mainClass="org.openecomp.sdc.asdctool.main.ExportImportMenu"
diff --git a/asdctool/src/main/resources/scripts/exportUsers.sh b/asdctool/src/main/resources/scripts/exportUsers.sh
index fec7d5abe4..4a6d0fe8da 100644
--- a/asdctool/src/main/resources/scripts/exportUsers.sh
+++ b/asdctool/src/main/resources/scripts/exportUsers.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
##################################
# export all users from JanusGraph
@@ -7,14 +7,14 @@
CURRENT_DIR=`pwd`
BASEDIR=$(dirname $0)
-if [ ${BASEDIR:0:1} = "/" ]
+if [ `echo ${BASEDIR} | cut -c1-1` = "/" ]
then
FULL_PATH=$BASEDIR
else
FULL_PATH=$CURRENT_DIR/$BASEDIR
fi
-source ${FULL_PATH}/baseOperation.sh
+. ${FULL_PATH}/baseOperation.sh
mainClass="org.openecomp.sdc.asdctool.main.ExportImportMenu"
diff --git a/asdctool/src/main/resources/scripts/fix_icons.sh b/asdctool/src/main/resources/scripts/fix_icons.sh
index 230dea7218..dfa50aa9ec 100644
--- a/asdctool/src/main/resources/scripts/fix_icons.sh
+++ b/asdctool/src/main/resources/scripts/fix_icons.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
##############################
# Data Migration
@@ -7,14 +7,14 @@
CURRENT_DIR=`pwd`
BASEDIR=$(dirname $0)
-if [ ${BASEDIR:0:1} = "/" ]
+if [ `echo ${BASEDIR} | cut -c1-1` = "/" ]
then
FULL_PATH=$BASEDIR
else
FULL_PATH=$CURRENT_DIR/$BASEDIR
fi
-source ${FULL_PATH}/baseOperation.sh
+. ${FULL_PATH}/baseOperation.sh
mainClass="org.openecomp.sdc.asdctool.main.MigrationMenu"
diff --git a/asdctool/src/main/resources/scripts/fix_issue.sh b/asdctool/src/main/resources/scripts/fix_issue.sh
index af63ec525d..7c4d426136 100644
--- a/asdctool/src/main/resources/scripts/fix_issue.sh
+++ b/asdctool/src/main/resources/scripts/fix_issue.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
##############################
# Data Migration
@@ -7,14 +7,14 @@
CURRENT_DIR=`pwd`
BASEDIR=$(dirname $0)
-if [ ${BASEDIR:0:1} = "/" ]
+if [ `echo ${BASEDIR} | cut -c1-1` = "/" ]
then
FULL_PATH=$BASEDIR
else
FULL_PATH=$CURRENT_DIR/$BASEDIR
fi
-source ${FULL_PATH}/baseOperation.sh
+. ${FULL_PATH}/baseOperation.sh
mainClass="org.openecomp.sdc.asdctool.main.MigrationMenu"
diff --git a/asdctool/src/main/resources/scripts/generateCsar.sh b/asdctool/src/main/resources/scripts/generateCsar.sh
index c74168823c..fb01c2fb9b 100644
--- a/asdctool/src/main/resources/scripts/generateCsar.sh
+++ b/asdctool/src/main/resources/scripts/generateCsar.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
##############################
# Distribution Status Update 1707
@@ -7,14 +7,14 @@
CURRENT_DIR=`pwd`
BASEDIR=$(dirname $0)
-if [ ${BASEDIR:0:1} = "/" ]
+if [ `echo ${BASEDIR} | cut -c1-1` = "/" ]
then
FULL_PATH=$BASEDIR
else
FULL_PATH=$CURRENT_DIR/$BASEDIR
fi
-source ${FULL_PATH}/baseOperation.sh
+. ${FULL_PATH}/baseOperation.sh
mainClass="org.openecomp.sdc.asdctool.main.CsarGeneratorTool"
diff --git a/asdctool/src/main/resources/scripts/groupsAlignment.sh b/asdctool/src/main/resources/scripts/groupsAlignment.sh
index 742b246a48..7ce927aa07 100644
--- a/asdctool/src/main/resources/scripts/groupsAlignment.sh
+++ b/asdctool/src/main/resources/scripts/groupsAlignment.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
##############################
# Groups Alignment
@@ -7,14 +7,14 @@
CURRENT_DIR=`pwd`
BASEDIR=$(dirname $0)
-if [ ${BASEDIR:0:1} = "/" ]
+if [ `echo ${BASEDIR} | cut -c1-1` = "/" ]
then
FULL_PATH=$BASEDIR
else
FULL_PATH=$CURRENT_DIR/$BASEDIR
fi
-source ${FULL_PATH}/baseOperation.sh
+. ${FULL_PATH}/baseOperation.sh
mainClass="org.openecomp.sdc.asdctool.main.MigrationMenu"
diff --git a/asdctool/src/main/resources/scripts/importGraph.sh b/asdctool/src/main/resources/scripts/importGraph.sh
index ffdd2fddb0..4d4dd69ef0 100644
--- a/asdctool/src/main/resources/scripts/importGraph.sh
+++ b/asdctool/src/main/resources/scripts/importGraph.sh
@@ -1,16 +1,16 @@
-#!/bin/bash
+#!/bin/sh
CURRENT_DIR=`pwd`
BASEDIR=$(dirname $0)
-if [ ${BASEDIR:0:1} = "/" ]
+if [ `echo ${BASEDIR} | cut -c1-1` = "/" ]
then
FULL_PATH=$BASEDIR
else
FULL_PATH=$CURRENT_DIR/$BASEDIR
fi
-source ${FULL_PATH}/baseOperation.sh
+. ${FULL_PATH}/baseOperation.sh
mainClass="org.openecomp.sdc.asdctool.main.ExportImportMenu"
diff --git a/asdctool/src/main/resources/scripts/janusGraphSchemaCreation.sh b/asdctool/src/main/resources/scripts/janusGraphSchemaCreation.sh
index d4b7871f30..d964c997b2 100644
--- a/asdctool/src/main/resources/scripts/janusGraphSchemaCreation.sh
+++ b/asdctool/src/main/resources/scripts/janusGraphSchemaCreation.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
##############################
# JanusGraph Schema Creation
@@ -7,14 +7,14 @@
CURRENT_DIR=`pwd`
BASEDIR=$(dirname $0)
-if [ ${BASEDIR:0:1} = "/" ]
+if [ `echo ${BASEDIR} | cut -c1-1` = "/" ]
then
FULL_PATH=$BASEDIR
else
FULL_PATH=$CURRENT_DIR/$BASEDIR
fi
-source ${FULL_PATH}/baseOperation.sh
+. ${FULL_PATH}/baseOperation.sh
mainClass="org.openecomp.sdc.asdctool.main.DataSchemaMenu"
diff --git a/asdctool/src/main/resources/scripts/migration1707RelationsFix.sh b/asdctool/src/main/resources/scripts/migration1707RelationsFix.sh
index c930243750..0e7ce424c6 100644
--- a/asdctool/src/main/resources/scripts/migration1707RelationsFix.sh
+++ b/asdctool/src/main/resources/scripts/migration1707RelationsFix.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
##############################
# Data Migration: fix relations after migration 1707
@@ -7,14 +7,14 @@
CURRENT_DIR=`pwd`
BASEDIR=$(dirname $0)
-if [ ${BASEDIR:0:1} = "/" ]
+if [ `echo ${BASEDIR} | cut -c1-1` = "/" ]
then
FULL_PATH=$BASEDIR
else
FULL_PATH=$CURRENT_DIR/$BASEDIR
fi
-source ${FULL_PATH}/baseOperation.sh
+. ${FULL_PATH}/baseOperation.sh
mainClass="org.openecomp.sdc.asdctool.main.MigrationMenu"
diff --git a/asdctool/src/main/resources/scripts/postMigration1707Fix.sh b/asdctool/src/main/resources/scripts/postMigration1707Fix.sh
index 56a16db70a..0d25d7c476 100644
--- a/asdctool/src/main/resources/scripts/postMigration1707Fix.sh
+++ b/asdctool/src/main/resources/scripts/postMigration1707Fix.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
##############################
# Data Migration 1707
@@ -7,14 +7,14 @@
CURRENT_DIR=`pwd`
BASEDIR=$(dirname $0)
-if [ ${BASEDIR:0:1} = "/" ]
+if [ `echo ${BASEDIR} | cut -c1-1` = "/" ]
then
FULL_PATH=$BASEDIR
else
FULL_PATH=$CURRENT_DIR/$BASEDIR
fi
-source ${FULL_PATH}/baseOperation.sh
+. ${FULL_PATH}/baseOperation.sh
mainClass="org.openecomp.sdc.asdctool.main.MigrationMenu"
diff --git a/asdctool/src/main/resources/scripts/schemaCreation.sh b/asdctool/src/main/resources/scripts/schemaCreation.sh
index 657db5e6f1..fbc2251ff7 100644
--- a/asdctool/src/main/resources/scripts/schemaCreation.sh
+++ b/asdctool/src/main/resources/scripts/schemaCreation.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
##############################
# Data Migration
@@ -7,14 +7,14 @@
CURRENT_DIR=`pwd`
BASEDIR=$(dirname $0)
-if [ ${BASEDIR:0:1} = "/" ]
+if [ `echo ${BASEDIR} | cut -c1-1` = "/" ]
then
FULL_PATH=$BASEDIR
else
FULL_PATH=$CURRENT_DIR/$BASEDIR
fi
-source ${FULL_PATH}/baseOperation.sh
+. ${FULL_PATH}/baseOperation.sh
mainClass="org.openecomp.sdc.asdctool.main.DataSchemaMenu"
diff --git a/asdctool/src/main/resources/scripts/sdc-migration.sh b/asdctool/src/main/resources/scripts/sdc-migration.sh
index 15e6d6b6e1..c369800e29 100644
--- a/asdctool/src/main/resources/scripts/sdc-migration.sh
+++ b/asdctool/src/main/resources/scripts/sdc-migration.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
##############################
# Data Migration
@@ -10,14 +10,14 @@
CURRENT_DIR=`pwd`
BASEDIR=$(dirname $0)
-if [ ${BASEDIR:0:1} = "/" ]
+if [ `echo ${BASEDIR} | cut -c1-1` = "/" ]
then
FULL_PATH=$BASEDIR
else
FULL_PATH=$CURRENT_DIR/$BASEDIR
fi
-source ${FULL_PATH}/baseOperation.sh
+. ${FULL_PATH}/baseOperation.sh
mainClass="org.openecomp.sdc.asdctool.migration.main.MigrationMenu"
diff --git a/asdctool/src/main/resources/scripts/sdcSchemaFileImport.sh b/asdctool/src/main/resources/scripts/sdcSchemaFileImport.sh
index 4002e388da..afe6b65793 100644
--- a/asdctool/src/main/resources/scripts/sdcSchemaFileImport.sh
+++ b/asdctool/src/main/resources/scripts/sdcSchemaFileImport.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
##############################
# Sdc Schema File Import #
@@ -7,14 +7,14 @@
CURRENT_DIR=`pwd`
BASEDIR=$(dirname $0)
-if [ ${BASEDIR:0:1} = "/" ]
+if [ `echo ${BASEDIR} | cut -c1-1` = "/" ]
then
FULL_PATH=$BASEDIR
else
FULL_PATH=$CURRENT_DIR/$BASEDIR
fi
-source ${FULL_PATH}/baseOperation.sh
+. ${FULL_PATH}/baseOperation.sh
mainClass="org.openecomp.sdc.asdctool.main.SdcSchemaFileImport"
diff --git a/asdctool/src/main/resources/scripts/updateIsVnf.sh b/asdctool/src/main/resources/scripts/updateIsVnf.sh
index bf45fa88b5..4d15b042bb 100644
--- a/asdctool/src/main/resources/scripts/updateIsVnf.sh
+++ b/asdctool/src/main/resources/scripts/updateIsVnf.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
########################################################################
#
@@ -10,14 +10,14 @@
CURRENT_DIR=`pwd`
BASEDIR=$(dirname $0)
-if [ ${BASEDIR:0:1} = "/" ]
+if [ `echo ${BASEDIR} | cut -c1-1` = "/" ]
then
FULL_PATH=$BASEDIR
else
FULL_PATH=$CURRENT_DIR/$BASEDIR
fi
-source ${FULL_PATH}/baseOperation.sh
+. ${FULL_PATH}/baseOperation.sh
mainClass="org.openecomp.sdc.asdctool.main.UpdateIsVnfMenu"
diff --git a/asdctool/src/main/resources/scripts/upgradePostMigration1710.sh b/asdctool/src/main/resources/scripts/upgradePostMigration1710.sh
index 927d148d88..3b58fdc248 100644
--- a/asdctool/src/main/resources/scripts/upgradePostMigration1710.sh
+++ b/asdctool/src/main/resources/scripts/upgradePostMigration1710.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
##############################
# Data Migration: Upgrade Post Migration 1710
@@ -7,14 +7,14 @@
CURRENT_DIR=`pwd`
BASEDIR=$(dirname $0)
-if [ ${BASEDIR:0:1} = "/" ]
+if [ `echo ${BASEDIR} | cut -c1-1` = "/" ]
then
FULL_PATH=$BASEDIR
else
FULL_PATH=$CURRENT_DIR/$BASEDIR
fi
-source ${FULL_PATH}/baseOperation.sh
+. ${FULL_PATH}/baseOperation.sh
mainClass="org.openecomp.sdc.asdctool.migration.main.MigrationMenu"
diff --git a/asdctool/src/main/resources/scripts/validationTool.sh b/asdctool/src/main/resources/scripts/validationTool.sh
index 58cd7f3f6a..6ac0541d39 100644
--- a/asdctool/src/main/resources/scripts/validationTool.sh
+++ b/asdctool/src/main/resources/scripts/validationTool.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
##############################
# Validation Tool #
@@ -7,14 +7,14 @@
CURRENT_DIR=`pwd`
BASEDIR=$(dirname $0)
-if [ ${BASEDIR:0:1} = "/" ]
+if [ `echo ${BASEDIR} | cut -c1-1` = "/" ]
then
FULL_PATH=$BASEDIR
else
FULL_PATH=$CURRENT_DIR/$BASEDIR
fi
-source ${FULL_PATH}/baseOperation.sh
+. ${FULL_PATH}/baseOperation.sh
mainClass="org.openecomp.sdc.asdctool.main.ValidationTool"
diff --git a/asdctool/src/main/resources/scripts/vfModulePropertiesAdding.sh b/asdctool/src/main/resources/scripts/vfModulePropertiesAdding.sh
index 1ead2484db..7fd40967ba 100644
--- a/asdctool/src/main/resources/scripts/vfModulePropertiesAdding.sh
+++ b/asdctool/src/main/resources/scripts/vfModulePropertiesAdding.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
##############################
# Data Migration: Adding new properties to vfModules
@@ -7,14 +7,14 @@
CURRENT_DIR=`pwd`
BASEDIR=$(dirname $0)
-if [ ${BASEDIR:0:1} = "/" ]
+if [ `echo ${BASEDIR} | cut -c1-1` = "/" ]
then
FULL_PATH=$BASEDIR
else
FULL_PATH=$CURRENT_DIR/$BASEDIR
fi
-source ${FULL_PATH}/baseOperation.sh
+. ${FULL_PATH}/baseOperation.sh
mainClass="org.openecomp.sdc.asdctool.main.MigrationMenu"
diff --git a/asdctool/src/main/resources/scripts/vfcNameAlignment.sh b/asdctool/src/main/resources/scripts/vfcNameAlignment.sh
index 10fbb257ef..a7578ec6db 100644
--- a/asdctool/src/main/resources/scripts/vfcNameAlignment.sh
+++ b/asdctool/src/main/resources/scripts/vfcNameAlignment.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
##############################
# Data Migration
@@ -7,14 +7,14 @@
CURRENT_DIR=`pwd`
BASEDIR=$(dirname $0)
-if [ ${BASEDIR:0:1} = "/" ]
+if [ `echo ${BASEDIR} | cut -c1-1` = "/" ]
then
FULL_PATH=$BASEDIR
else
FULL_PATH=$CURRENT_DIR/$BASEDIR
fi
-source ${FULL_PATH}/baseOperation.sh
+. ${FULL_PATH}/baseOperation.sh
mainClass="org.openecomp.sdc.asdctool.main.MigrationMenu"
diff --git a/asdctool/src/main/resources/scripts/vfmoduleFix1707.sh b/asdctool/src/main/resources/scripts/vfmoduleFix1707.sh
index 48579242bf..6f08fa2175 100644
--- a/asdctool/src/main/resources/scripts/vfmoduleFix1707.sh
+++ b/asdctool/src/main/resources/scripts/vfmoduleFix1707.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
##############################
# Distribution Status Update 1707
@@ -7,14 +7,14 @@
CURRENT_DIR=`pwd`
BASEDIR=$(dirname $0)
-if [ ${BASEDIR:0:1} = "/" ]
+if [ `echo ${BASEDIR} | cut -c1-1` = "/" ]
then
FULL_PATH=$BASEDIR
else
FULL_PATH=$CURRENT_DIR/$BASEDIR
fi
-source ${FULL_PATH}/baseOperation.sh
+. ${FULL_PATH}/baseOperation.sh
mainClass="org.openecomp.sdc.asdctool.main.MigrationMenu"
diff --git a/asdctool/src/main/resources/scripts/vrfObjectFix.sh b/asdctool/src/main/resources/scripts/vrfObjectFix.sh
index 3f875fa136..a3eb067612 100644
--- a/asdctool/src/main/resources/scripts/vrfObjectFix.sh
+++ b/asdctool/src/main/resources/scripts/vrfObjectFix.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
##############################
# Data Migration
@@ -7,14 +7,14 @@
CURRENT_DIR=`pwd`
BASEDIR=$(dirname $0)
-if [ ${BASEDIR:0:1} = "/" ]
+if [ `echo ${BASEDIR} | cut -c1-1` = "/" ]
then
FULL_PATH=$BASEDIR
else
FULL_PATH=$CURRENT_DIR/$BASEDIR
fi
-source ${FULL_PATH}/baseOperation.sh
+. ${FULL_PATH}/baseOperation.sh
mainClass="org.openecomp.sdc.asdctool.main.VrfObjectFixMenu"