[devstack] cleanup in stx-config

add cleanup_sysinv_depends, cleanup_cgtsclient function
add cleanup item in cleanup_sysinv

Task: 29243
Story: 2003126

Change-Id: I1b70a9fa20c67ff53268e0f47b0c38569c0df7b8
Signed-off-by: Martin, Chen <haochuan.z.chen@intel.com>
This commit is contained in:
Martin, Chen 2019-03-09 08:35:02 +08:00
parent 564d6ff92a
commit a201811b1a
2 changed files with 35 additions and 0 deletions

View File

@ -54,9 +54,42 @@ PYTHON_SITE_DIR=$(python -c "from distutils.sysconfig import get_python_lib; pri
# Functions
# ---------
function cleanup_cgtsclient {
pip_uninstall cgtsclient
}
function cleanup_configutilities {
pip_uninstall configutilities
}
function cleanup_controllerconfig {
pip_uninstall controllerconfig
sudo rm -f /etc/bash_completion.d/system.bash_completion
}
function cleanup_sysinv_depends {
cleanup_configutilities
cleanup_controllerconfig
}
function cleanup_sysinv {
stop_sysinv
pip_uninstall sysinv
sudo rm -f $SYSINV_ETC_GOENABLEDD/sysinv_goenabled_check.sh
sudo rm -f $SYSINV_CONF_DIR/policy.json
sudo rm -f $SYSINV_CONF_DIR/profileSchema.xsd
sudo rm -f $SYSINV_ETC_MOTDD/10-system
sudo rm -f $SYSINV_CONF_DIR/upgrades/delete_load.sh
sudo rm -f /usr/lib/ocf/resource.d/platform/sysinv-api
sudo rm -f /usr/lib/ocf/resource.d/platform/sysinv-conductor
sudo rm -f /usr/lib/systemd/system/sysinv-api.service
sudo rm -f /usr/lib/systemd/system/sysinv-conductor.service
sudo rm -f $SYSINV_BIN_DIR/partition_info.sh
sudo rm -f $SYSINV_BIN_DIR/manage-partitions
sudo rm -f $SYSINV_BIN_DIR/query_pci_id
sudo rm -rf $SYSINV_AUTHO_CACHE_DIR $SYSINV_CONF_DIR
}

View File

@ -42,5 +42,7 @@ if is_service_enabled stx-config; then
if [[ "$1" == "clean" ]]; then
cleanup_sysinv
cleanup_sysinv_depends
cleanup_cgtsclient
fi
fi