summaryrefslogtreecommitdiff
path: root/devstack/tools/ironic/scripts/cleanup-node.sh
diff options
context:
space:
mode:
authorLucas Alvares Gomes <lucasagomes@gmail.com>2016-02-15 12:33:19 +0000
committerLucas Alvares Gomes <lucasagomes@gmail.com>2016-02-18 19:27:04 +0000
commit7ffa1d58ce9fd9e32cdab142a1f12feae38c3097 (patch)
tree9669a61ff4afe7fe1e11ca702ccc82083487fcab /devstack/tools/ironic/scripts/cleanup-node.sh
parenta70b5365d34746d0e5f5d6f932829625d73c17cf (diff)
downloadironic-7ffa1d58ce9fd9e32cdab142a1f12feae38c3097.tar.gz
DevStack: Add support for deploying nodes with pxe_ipmitool
This patch is adding support for deploying nodes with the pxe_ipmitool driver and VMs. The patch adds a dependency on the "virtualbmc" utility which is responsible for creating a virtual/fake BMC that handles the IPMI commands (using pyghmi.bmc) and convert it to calls to the python-libvirt library. The function "is_ironic_hardware" was converted into a variable called "IRONIC_IS_HARDWARE" which can be set to True/False to indicate whether DevStack is being setup for baremetal or VMs. Partial-Bug: #1544642 Change-Id: I5edc51c7fc8b6f0bb7fe4ca129596709a32eb93e
Diffstat (limited to 'devstack/tools/ironic/scripts/cleanup-node.sh')
-rwxr-xr-xdevstack/tools/ironic/scripts/cleanup-node.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/devstack/tools/ironic/scripts/cleanup-node.sh b/devstack/tools/ironic/scripts/cleanup-node.sh
index e10c04bbc..2dcce08c0 100755
--- a/devstack/tools/ironic/scripts/cleanup-node.sh
+++ b/devstack/tools/ironic/scripts/cleanup-node.sh
@@ -19,6 +19,11 @@ VOL_NAME="$NAME.qcow2"
virsh list | grep -q $NAME && virsh destroy $NAME
virsh list --inactive | grep -q $NAME && virsh undefine $NAME
+# Delete the Virtual BMC
+if [[ $(type -P vbmc) != "" ]]; then
+ vbmc list | grep -a $NAME && vbmc delete $NAME
+fi
+
if virsh pool-list | grep -q $LIBVIRT_STORAGE_POOL ; then
virsh vol-list $LIBVIRT_STORAGE_POOL | grep -q $VOL_NAME &&
virsh vol-delete $VOL_NAME --pool $LIBVIRT_STORAGE_POOL