blob: 61388a1e09a8e05f7c6c30a37dc59383728705a1 [file] [log] [blame]
Michael Lando4d97d5f2017-06-17 22:40:44 +03001#!/bin/bash
2
shrek2000c8a540b2017-09-11 15:45:37 +03003###########################################################################################################
4# script name - zusammenMainTool.sh
5# run script - ./zusammenMainTool.sh
6# 1. Export all - ./zusammenMainTool.sh -c EXPORT
7# 2. Export one item ./zusammenMainTool.sh -c EXPORT -i ${elementId}
8# 3. Import one item - ./zusammenMainTool.sh -c IMPORT -f ${fileName} -i ${elementId}
9# 4. Import all - ./zusammenMainTool.sh -c IMPORT -f ${fileName}
10# 5. Reset old version - ./zusammenMainTool.sh -c RESET_OLD_VERSION
ayalaben914f3a52017-11-16 09:21:41 +020011# 6. Heal all - ./zusammenMainTool.sh -c HEAL_ALL -t ${thread number}
shrek2000c8a540b2017-09-11 15:45:37 +030012#
13##########################################################################################################
14
avigaffa00e935f2017-09-10 08:58:51 +030015OSTYPE=`uname -a | grep -iq ubuntu; echo $?`
16echo "${OSTYPE}"
Michael Lando4d97d5f2017-06-17 22:40:44 +030017
shrek2000c8a540b2017-09-11 15:45:37 +030018if [ ${OSTYPE} -eq 0 ]
avigaffa00e935f2017-09-10 08:58:51 +030019then
20 CONF_FILE_LOCATION="/opt/app/jetty/base/be/config/catalog-be/configuration.yaml"
21else
shrek2000c8a540b2017-09-11 15:45:37 +030022 CONF_FILE_LOCATION="/apps/jetty/base/be/config/catalog-be/configuration.yaml"
avigaffa00e935f2017-09-10 08:58:51 +030023fi
24echo "Configuration file location: ${CONF_FILE_LOCATION}"
Michael Lando4d97d5f2017-06-17 22:40:44 +030025
ayalaben914f3a52017-11-16 09:21:41 +020026java -Dconfig.home=/opt/app/jetty/base/be/config -Dlog.home=/apps/jetty/base/be/logs -Dconfiguration.yaml=${CONF_FILE_LOCATION} -classpath openecomp-zusammen-tools-1.2.0-SNAPSHOT.jar:lib/* org.openecomp.core.tools.main.ZusammenMainTool $1 $2 $3 $4 $5 $6
shrek2000c8a540b2017-09-11 15:45:37 +030027STATUS="${?}" echo "${STATUS}"