From a201811b1a3d17d5fb14f66af65feff47527a0f6 Mon Sep 17 00:00:00 2001 From: "Martin, Chen" Date: Sat, 9 Mar 2019 08:35:02 +0800 Subject: [PATCH] [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 --- devstack/lib/stx-config | 33 +++++++++++++++++++++++++++++++++ devstack/plugin.sh | 2 ++ 2 files changed, 35 insertions(+) diff --git a/devstack/lib/stx-config b/devstack/lib/stx-config index 9bb9854ca8..21667accdf 100644 --- a/devstack/lib/stx-config +++ b/devstack/lib/stx-config @@ -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 } diff --git a/devstack/plugin.sh b/devstack/plugin.sh index f6c75a50f8..195aa9d6f6 100755 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -42,5 +42,7 @@ if is_service_enabled stx-config; then if [[ "$1" == "clean" ]]; then cleanup_sysinv + cleanup_sysinv_depends + cleanup_cgtsclient fi fi