Adding Vish domain reset in makefile
Change-Id: Idf77037a668f061c08c84faf322142c37eabeb71
diff --git a/Makefile b/Makefile
index 09059fb..f20bd84 100644
--- a/Makefile
+++ b/Makefile
@@ -60,6 +60,9 @@
VAGRANT_CWD ?= $(SCENARIOS_D)/$(SCENARIO)/
SSH_CONFIG ?= ~/.ssh/config # Vagrant modifies this, should it always?
+# Virsh config
+VIRSH_CORDDEV_DOMAIN ?= cord_corddev
+
# Ansible args, for verbosity and other runtime parameters
ANSIBLE_ARGS ?=
@@ -122,7 +125,7 @@
rm -rf $(CONFIG_CORD_PROFILE_DIR)
rm -f $(M)/cord-config $(M)/copy-config $(M)/onboard-profile $(M)/local-onboard-profile $(M)/onboard-openstack $(M)/refresh-fabric
-clean-all: vagrant-destroy clean-profile clean-genconfig
+clean-all: virsh-domain-destroy vagrant-destroy clean-profile clean-genconfig
rm -f $(ALL_MILESTONES)
clean-local: clean-profile clean-genconfig
@@ -139,6 +142,10 @@
$(VAGRANT) destroy -f $(LOGCMD)
rm -f $(M)/vagrant-up
+virsh-domain-destroy:
+ virsh destroy ${VIRSH_CORDDEV_DOMAIN} || true
+ virsh undefine ${VIRSH_CORDDEV_DOMAIN} || true
+
xos-teardown: xos-update-images
$(ANSIBLE_PB) $(PI)/teardown-playbook.yml $(LOGCMD)
rm -f $(M)/onboard-profile $(M)/local-onboard-profile