From acc3ce02997219825091a2e4ed7fd493f2d440b2 Mon Sep 17 00:00:00 2001 From: Varun Gudisena Date: Thu, 31 Aug 2017 10:56:56 -0500 Subject: Revert package name changes Reverted package name changes to avoid any potential issues. Renamed maven group id only. Issue-id: DMAAP-74 Change-Id: I4ca4537d48e5723b2939148e5bd83645ee20dd30 Signed-off-by: Varun Gudisena --- src/main/swm/common/common.env | 19 ++ src/main/swm/common/deinstall.env | 15 + src/main/swm/common/deinstall_postproc.sh | 26 ++ src/main/swm/common/deinstall_preproc.sh | 45 +++ src/main/swm/common/install.env | 37 +++ src/main/swm/common/install_postproc.sh | 191 +++++++++++ src/main/swm/common/install_preproc.sh | 46 +++ src/main/swm/common/utils/findreplace.sh | 94 ++++++ src/main/swm/deinstall/postproc/post_proc | 4 + src/main/swm/deinstall/preproc/pre_proc | 4 + src/main/swm/descriptor.xml | 386 +++++++++++++++++++++++ src/main/swm/fallback/postproc/post_proc | 4 + src/main/swm/fallback/preproc/install_preproc.sh | 26 ++ src/main/swm/fallback/preproc/pre_proc | 4 + src/main/swm/initinst/postproc/post_proc | 25 ++ src/main/swm/initinst/preproc/pre_proc | 4 + src/main/swm/install/postproc/post_proc | 4 + src/main/swm/install/preproc/pre_proc | 4 + src/main/swm/notes.txt | 8 + 19 files changed, 946 insertions(+) create mode 100644 src/main/swm/common/common.env create mode 100644 src/main/swm/common/deinstall.env create mode 100644 src/main/swm/common/deinstall_postproc.sh create mode 100644 src/main/swm/common/deinstall_preproc.sh create mode 100644 src/main/swm/common/install.env create mode 100644 src/main/swm/common/install_postproc.sh create mode 100644 src/main/swm/common/install_preproc.sh create mode 100644 src/main/swm/common/utils/findreplace.sh create mode 100644 src/main/swm/deinstall/postproc/post_proc create mode 100644 src/main/swm/deinstall/preproc/pre_proc create mode 100644 src/main/swm/descriptor.xml create mode 100644 src/main/swm/fallback/postproc/post_proc create mode 100644 src/main/swm/fallback/preproc/install_preproc.sh create mode 100644 src/main/swm/fallback/preproc/pre_proc create mode 100644 src/main/swm/initinst/postproc/post_proc create mode 100644 src/main/swm/initinst/preproc/pre_proc create mode 100644 src/main/swm/install/postproc/post_proc create mode 100644 src/main/swm/install/preproc/pre_proc create mode 100644 src/main/swm/notes.txt (limited to 'src/main/swm') diff --git a/src/main/swm/common/common.env b/src/main/swm/common/common.env new file mode 100644 index 0000000..b6ae68a --- /dev/null +++ b/src/main/swm/common/common.env @@ -0,0 +1,19 @@ + +# This file is used to source variables from the generated archetype +# Because the *proc.sh scripts may contain variables that conflict with +# Maven variables, we exclude those scripts and only replace values here +ROOT_DIR=${INSTALL_ROOT}${distFilesRoot}; export ROOT_DIR +LRMCLI=${INSTALL_ROOT}/opt/app/aft/scldlrm/bin/lrmcli +PATH=$PATH:`dirname $0`/utils; export PATH + + +# Fail - used to quickly exit with a rc and error message +fail() { + rc=$1 + shift; + echo "PROC_USER_MSG: [$rc]: $@" >&2 + exit ${rc} +} + + + diff --git a/src/main/swm/common/deinstall.env b/src/main/swm/common/deinstall.env new file mode 100644 index 0000000..9a54c67 --- /dev/null +++ b/src/main/swm/common/deinstall.env @@ -0,0 +1,15 @@ + +# This file is used to set the environment which the install_*.sh files +# will use when executing. Only set variables that must be derived at +# installation time here. For variables that should be set by the installer +# in SWM, add VariableDescriptor elements to the descriptor.xml. Place +# logical steps in the install_preproc.sh or install_postproc.sh. + +. `dirname $0`/common.env + +# CHECK FOR ABSOLUTELY REQUIRED VARIABLES HERE +#derive version components for lrm.xml +MAJOR_VERSION=`echo ${AFTSWM_ACTION_NEW_VERSION} | awk -F'.' '{print $1}'`; export MAJOR_VERSION +MINOR_VERSION=`echo ${AFTSWM_ACTION_NEW_VERSION} | awk -F'.' '{print $2}'`; export MINOR_VERSION +PATCH_VERSION=`echo ${AFTSWM_ACTION_NEW_VERSION} | awk -F'.' '{print $3}'`; export PATCH_VERSION + diff --git a/src/main/swm/common/deinstall_postproc.sh b/src/main/swm/common/deinstall_postproc.sh new file mode 100644 index 0000000..b761056 --- /dev/null +++ b/src/main/swm/common/deinstall_postproc.sh @@ -0,0 +1,26 @@ +#!/bin/sh +#******************************************************************************* +# ============LICENSE_START======================================================= +# org.onap.dmaap +# ================================================================================ +# Copyright © 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 +# +# 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. +# +#******************************************************************************* + +. `dirname $0`/deinstall.env +rm -rf ${ROOT_DIR} +exit 0 diff --git a/src/main/swm/common/deinstall_preproc.sh b/src/main/swm/common/deinstall_preproc.sh new file mode 100644 index 0000000..9ee8c93 --- /dev/null +++ b/src/main/swm/common/deinstall_preproc.sh @@ -0,0 +1,45 @@ +#!/bin/sh +#******************************************************************************* +# ============LICENSE_START======================================================= +# org.onap.dmaap +# ================================================================================ +# Copyright © 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 +# +# 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. +# +#******************************************************************************* + +. `dirname $0`/deinstall.env + +LRMCLI=${INSTALL_ROOT}/opt/app/aft/scldlrm/bin/lrmcli +PATH=$PATH:`dirname $0`/utils; export PATH + +runningCount=`${LRMCLI} -running | grep -w ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} | wc -l` || fail 300 "Unable to determine how many instances are running prior to notifying LRM of the upgrade" + +if [ "${runningCount}" -eq 0 ]; then + +${LRMCLI} -delete -name ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} -version ${AFTSWM_ACTION_NEW_VERSION} -routeoffer ${AFT_SERVICE_ENV} || exit 101 + + else + ${LRMCLI} -shutdown -name ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} -version ${AFTSWM_ACTION_NEW_VERSION} -routeoffer ${AFT_SERVICE_ENV} -ttw ${RESOURCE_MANAGER_WAIT_TIME_IN_SECONDS} || exit 100 + ${LRMCLI} -delete -name ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} -version ${AFTSWM_ACTION_NEW_VERSION} -routeoffer ${AFT_SERVICE_ENV} || exit 101 + +fi + +rm -rf ${INSTALL_ROOT}/${ROOT_DIR}/logs || { + echo "WARNING: Unable to purge logs directory during deinstall" +} + +exit 0 diff --git a/src/main/swm/common/install.env b/src/main/swm/common/install.env new file mode 100644 index 0000000..c98a29a --- /dev/null +++ b/src/main/swm/common/install.env @@ -0,0 +1,37 @@ + +# This file is used to set the environment which the install_*.sh files +# will use when executing. Only set variables that must be derived at +# installation time here. For variables that should be set by the installer +# in SWM, add VariableDescriptor elements to the descriptor.xml. Place +# logical steps in the install_preproc.sh or install_postproc.sh. + +. `dirname $0`/common.env + +# CHECK FOR ABSOLUTELY REQUIRED VARIABLES HERE +test -z "${SCLD_ENV}" && fail 1 "SCLD_ENV required" +test -z "${LATITUDE}" && fail 2 "LATITUDE required" +test -z "${LONGITUDE}" && fail 3 "LONGITUDE required" +test -z "${AFT_ENVIRONMENT}" && fail 4 "AFT_ENVIRONMENT required" + +#derive version components for lrm.xml +MAJOR_VERSION=`echo ${AFTSWM_ACTION_NEW_VERSION} | awk -F'.' '{print $1}'`; export MAJOR_VERSION +MINOR_VERSION=`echo ${AFTSWM_ACTION_NEW_VERSION} | awk -F'.' '{print $2}'`; export MINOR_VERSION +PATCH_VERSION=`echo ${AFTSWM_ACTION_NEW_VERSION} | awk -F'.' '{print $3}'`; export PATCH_VERSION + +# special handling for introscope... +if [ ! -z "${INTROSCOPE_LIB}" ]; then + if [ -z "${INTROSCOPE_AGENTPROFILE}" ]; then + fail 100 "INTROSCOPE_AGENTPROFILE must be set" + fi + + if [ -f ${INTROSCOPE_LIB}/Agent.jar ] && [ -f ${INTROSCOPE_AGENTPROFILE} ]; then + if [ -f ${TEMPLATE_RSRC_XML} ]; then + INTROSCOPE_VARS="-javaagent:${INTROSCOPE_LIB}/Agent.jar -noverify -Dcom.wily.introscope.agentProfile=${INTROSCOPE_AGENTPROFILE} -Dintroscope.agent.agentName=${AFTSWM_ACTION_ARTIFACT_NAME}" + export INTROSCOPE_VARS + fi + else + INTROSCOPE_VARS=""; export INTROSCOPE_VARS + fi +else + INTROSCOPE_VARS=""; export INTROSCOPE_VARS +fi diff --git a/src/main/swm/common/install_postproc.sh b/src/main/swm/common/install_postproc.sh new file mode 100644 index 0000000..cdad299 --- /dev/null +++ b/src/main/swm/common/install_postproc.sh @@ -0,0 +1,191 @@ +#!/bin/sh +#******************************************************************************* +# ============LICENSE_START======================================================= +# org.onap.dmaap +# ================================================================================ +# Copyright © 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 +# +# 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. +# +#******************************************************************************* + +if [ -f "/tmp/exitdmaapMRpostproc" ]; then +echo "file /tmp/exitdmaapMRpostproc found .exiting..........." +exit 0; +fi +. `dirname $0`/install.env + +mkdir -p ${ROOT_DIR}/conf || fail 100 "Error on creating the conf directory." +mkdir -p ${ROOT_DIR}/docs || fail 100 "Error on creating the docs directory." +mkdir -p ${ROOT_DIR}/lib || fail 100 "Error on creating the lib directory." +mkdir -p ${ROOT_DIR}/log || fail 100 "Error on creating the logs directory." + +############################################################################## +# REMOVING THE DATA DIRECTORY +# The following if statement is checking to see if a new version is being installed +# on top of another version. If a new version is installed on top of the current +# version WITHOUT a proper deinstall, this will remove the data directory which +# is necessary to cleanup old AJSC route metadata. If CSTEM chooses to re-run +# the install_postproc.sh to update swm node variables, this if statement will NOT +# remove the data directory which is necessary for the SAME version to utilize the +# correct data directory route metadata. +############################################################################## +if [ "${AFTSWM_ACTION_NEW_VERSION}" != "${AFTSWM_ACTION_PREVIOUS_VERSION}" ] +then +rm -rf ${ROOT_DIR}/data +fi + +# Cleaning the jetty directory which contains the AJSC exploded war as well as +# any other apps running under jetty directory +rm -rf ${ROOT_DIR}/jetty + +# A simple override for the SOA Cloud platform value. Normally this is not +# needed outside of SOA Cloud development sandboxes +# this is used in the template.lrm.xml file during startup of the service +if [ ! -z "${SCLD_PLATFORM}" ]; then + SCLD_OPTIONAL_PLATFORM_FLAG="-Dplatform=${SCLD_PLATFORM}"; export SCLD_OPTIONAL_PLATFORM_FLAG +fi + +############################################################################## +# PROCESS TEMPLATE FILES FROM ENVIRONMENT +# pattern: looks for all files starting with "template.", processes them using the +# current environment, then renames them by removing the "template." in the same +# directory +############################################################################## +utilpath=`dirname $0`/utils +for tfile in `ls ${ROOT_DIR}/bundleconfig/etc/sysprops/template.* ${ROOT_DIR}/bundleconfig/etc/appprops/template.* ${ROOT_DIR}/bin/template.* ${ROOT_DIR}/etc/template.* 2>/dev/null`; do + dfile=`echo ${tfile} | sed -e 's@/template\.@/@g'` + sh ${utilpath}/findreplace.sh ${tfile} ${dfile} || exit 200 +done + +runningCount=`${LRMCLI} -running | grep -w ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} | wc -l` || fail 300 "Unable to determine how many instances are running prior to notifying LRM of the upgrade" + +############################################################################## +# DEPLOY CONTAINER TO LRM +############################################################################## + +if [ -z "${RESOURCE_MANAGER_WAIT_TIME_IN_SECONDS}" ] +then + RESOURCE_MANAGER_WAIT_TIME_IN_SECONDS=180 + export RESOURCE_MANAGER_WAIT_TIME_IN_SECONDS +fi + + + +DTE_TME_STAMP=`date +%Y%m%d_%H%M%S` + +LRM_ADD_LOG=/tmp/${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME}_ADD_${DTE_TME_STAMP}.out + echo "Adding resource to lrm" + echo "${LRMCLI} -add -file ${ROOT_DIR}/etc/lrm.xml -ttw ${RESOURCE_MANAGER_WAIT_TIME_IN_SECONDS}" + ${LRMCLI} -add -file ${ROOT_DIR}/etc/lrm.xml -ttw ${RESOURCE_MANAGER_WAIT_TIME_IN_SECONDS} > ${LRM_ADD_LOG} + LRM_ADD_RC=$? + echo "LRMCLI ADD RC : ${LRM_ADD_RC}" + if [ "${LRM_ADD_RC}" -ne "0" ]; then + + RSRC_EXIST=`cat ${LRM_ADD_LOG} | grep SCLD-LRM-1024` # resource is already added + if [ "${RSRC_EXIST:-}x" = "x" ]; then + echo "LRM add for Resource ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} failed..." + cat ${LRM_ADD_LOG} + rm -f ${LRM_ADD_LOG} + exit 1 + fi + echo "LRM Resource for ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} already exists. Proceeding with either addOrUpgrade or modify" + echo "Get the number of configured ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} instance" + versionCtr=`${LRMCLI} -configured | grep ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} | awk {'print $3'} | wc -l` + if [ ${versionCtr} -eq 1 ]; then + echo "Updating lrm resource" + echo "${LRMCLI} -addOrUpgrade -file ${ROOT_DIR}/etc/lrm.xml -ttw ${RESOURCE_MANAGER_WAIT_TIME_IN_SECONDS}" + ${LRMCLI} -addOrUpgrade -file ${ROOT_DIR}/etc/lrm.xml -ttw ${RESOURCE_MANAGER_WAIT_TIME_IN_SECONDS} || abort "lrmcli addOrUpgrade failed" + else + echo "Modifying lrm resource" + echo "${LRMCLI} -modify -file ${ROOT_DIR}/etc/lrm.xml" + ${LRMCLI} -modify -file ${ROOT_DIR}/etc/lrm.xml || abort "lrmcli modify failed" + fi + fi + + echo "LRMCLI execution on ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} executed succesfully!" + +ls ${ROOT_DIR}/bundleconfig/etc/appprops/MsgRtrApi.properties + +if [ ! -z $CONFIG_ZK_SERVERS ]; then +sed -i '/config.zk.servers=/c\config.zk.servers='$CONFIG_ZK_SERVERS ${ROOT_DIR}/bundleconfig/etc/appprops/MsgRtrApi.properties +fi + +if [ ! -z $TRANSID_REQD ]; then +sed -i '/transidUEBtopicreqd=/c\transidUEBtopicreqd='$TRANSID_REQD ${ROOT_DIR}/bundleconfig/etc/appprops/MsgRtrApi.properties +fi + +if [ ! -z $MR_TOPICFACTOTRYCLASS ]; then +sed -i '/msgRtr.topicfactory.aaf=/c\msgRtr.topicfactory.aaf='$MR_TOPICFACTOTRYCLASS ${ROOT_DIR}/bundleconfig/etc/appprops/MsgRtrApi.properties +fi + +if [ ! -z $MR_NAMESPACE ]; then +sed -i '/msgRtr.namespace.aaf=/c\msgRtr.namespace.aaf='$MR_NAMESPACE ${ROOT_DIR}/bundleconfig/etc/appprops/MsgRtrApi.properties +fi + + +if [ ! -z $CADI_KEYFILE ]; then +sed -i '/cadi_keyfile=/c\cadi_keyfile='$CADI_KEYFILE ${ROOT_DIR}/etc/cadi.properties +fi + +if [ ! -z $AAF_URL ]; then +sed -i '/aaf_url=/c\aaf_url='$AAF_URL ${ROOT_DIR}/etc/cadi.properties +fi + +if [ ! -z $AAF_ID ]; then +sed -i '/aaf_id=/c\aaf_id='$AAF_ID ${ROOT_DIR}/etc/cadi.properties +fi + +if [ ! -z $AAF_PWD ]; then +sed -i '/aaf_password=/c\aaf_password='$AAF_PWD ${ROOT_DIR}/etc/cadi.properties +fi + +if [ ! -z $MR_LOGLOC ]; then +sed -i '/' ${ROOT_DIR}/bundleconfig/etc/logback.xml +fi + +if [ ! -z $MR_KSPATH ]; then +sed -i '//c\'$MR_KSPATH'' ${ROOT_DIR}/etc/ajsc-jetty.xml +fi + +if [ ! -z $MR_KSPWD ]; then +sed -i '//c\'$MR_KSPWD'' ${ROOT_DIR}/etc/ajsc-jetty.xml +fi + + +if [ ! -z $MR_KMPWD ]; then +sed -i '//c\'$MR_KMPWD'' ${ROOT_DIR}/etc/ajsc-jetty.xml +fi + + + +if [ "${runningCount}" -eq 0 ]; then + if [ "${LRM_START_SVC}" = "true" ]; then + echo "${LRMCLI} -start -name ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} -version ${AFTSWM_ACTION_NEW_VERSION} -routeoffer ${AFT_SERVICE_ENV} | egrep SUCCESS\|SCLD-LRM-1041" + ${LRMCLI} -start -name ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} -version ${AFTSWM_ACTION_NEW_VERSION} -routeoffer ${AFT_SERVICE_ENV} | egrep SUCCESS\|SCLD-LRM-1041 + if [ $? -ne 0 ]; then + fail 500 "Start of ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} with routeOffer ${AFT_SERVICE_ENV} failed" + fi + echo "${LRMCLI} -running | grep -w ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME}" + ${LRMCLI} -running | grep -w ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} + else + echo "PROC_USER_MSG: LRM_START_SVC is set to false and no running instances were found prior to upgrading so ending install with no running service instances." + fi +else + ${LRMCLI} -running | grep -w ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} +fi + + +exit 0 diff --git a/src/main/swm/common/install_preproc.sh b/src/main/swm/common/install_preproc.sh new file mode 100644 index 0000000..461c74d --- /dev/null +++ b/src/main/swm/common/install_preproc.sh @@ -0,0 +1,46 @@ +#!/bin/sh +#******************************************************************************* +# ============LICENSE_START======================================================= +# org.onap.dmaap +# ================================================================================ +# Copyright © 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 +# +# 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. +# +#******************************************************************************* + +. `dirname $0`/deinstall.env + +LRMCLI=${INSTALL_ROOT}/opt/app/aft/scldlrm/bin/lrmcli +PATH=$PATH:`dirname $0`/utils; export PATH +if [ -d $LRMCLI ]; then +runningCount=`${LRMCLI} -running | grep -w ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_PREVIOUS_VERSION} | wc -l` || fail 300 "Unable to determine how many instances are running prior to notifying LRM of the upgrade" + +if [ "${runningCount}" -eq 0 ]; then + +${LRMCLI} -delete -name ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} -version ${AFTSWM_ACTION_PREVIOUS_VERSION} -routeoffer ${AFT_SERVICE_ENV} || exit 101 + + else + ${LRMCLI} -shutdown -name ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} -version ${AFTSWM_ACTION_PREVIOUS_VERSION} -routeoffer ${AFT_SERVICE_ENV} -ttw ${RESOURCE_MANAGER_WAIT_TIME_IN_SECONDS} || exit 100 + ${LRMCLI} -delete -name ${SOA_CLOUD_NAMESPACE}.${AFTSWM_ACTION_ARTIFACT_NAME} -version ${AFTSWM_ACTION_PREVIOUS_VERSION} -routeoffer ${AFT_SERVICE_ENV} || exit 101 + +fi + +rm -rf ${INSTALL_ROOT}/${ROOT_DIR}/logs || { + echo "WARNING: Unable to purge logs directory during deinstall" +} +fi + +exit 0 diff --git a/src/main/swm/common/utils/findreplace.sh b/src/main/swm/common/utils/findreplace.sh new file mode 100644 index 0000000..efd8a77 --- /dev/null +++ b/src/main/swm/common/utils/findreplace.sh @@ -0,0 +1,94 @@ +#!/bin/sh +#******************************************************************************* +# ============LICENSE_START======================================================= +# org.onap.dmaap +# ================================================================================ +# Copyright © 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 +# +# 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. +# +#******************************************************************************* +# Copyright 2011 AT&T Intellectual Properties +############################################################################## +# findreplace.sh