summaryrefslogtreecommitdiffstats
path: root/scripts/lib.sh
diff options
context:
space:
mode:
authorjuraj.linkes <jlinkes@cisco.com>2017-05-18 10:25:43 +0200
committerjuraj.linkes <jlinkes@cisco.com>2017-06-02 14:03:43 +0200
commitc0b072ee944330f97e7eb3b03df79bf9494e6b9a (patch)
tree3d7317eb0b71099932736f4fbd35df680996b077 /scripts/lib.sh
parent6ad0c96f1b4383c3bcd651cc246843119f4e0e61 (diff)
Added script for resource cleanup
This script can be either run from jumphost or overcloud nodes. If run from jumphost, it will clean all resources on all nodes as well as openstack resources. If run from an overcloud node, it will clean resources on that node. The script supports whitelisting and exclusion of resources to be cleaned. Change-Id: I46c937dc31a1ed4b9be1d641183c9cc3b42bbb2d Signed-off-by: juraj.linkes <jlinkes@cisco.com>
Diffstat (limited to 'scripts/lib.sh')
-rw-r--r--scripts/lib.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/scripts/lib.sh b/scripts/lib.sh
new file mode 100644
index 0000000..b825b9c
--- /dev/null
+++ b/scripts/lib.sh
@@ -0,0 +1,27 @@
+overcloud_file_name=overcloudrc # change this if needed
+odl_username=admin
+odl_password=admin
+odl_port=8081
+odl_dir=/opt/opendaylight
+hc_username=admin
+hc_password=admin
+hc_netconf_port=2831
+NODE_PATTERN=overcloud
+overcloudrc_path=/root/$overcloud_file_name
+overcloud_fds_repo_loc=/root
+overcloud_script_loc=$overcloud_fds_repo_loc/fds/scripts
+
+in_array() {
+ key=$1
+ shift
+ items=$@
+ for item in $items
+ do
+ if [ $item == $key ]
+ then
+ return 0
+ break
+ fi
+ done
+ return 1
+}