]> Frank Brehm's Git Trees - pixelpark/create-vmware-tpl.git/commitdiff
Emitting warning in case of aborting template creation
authorFrank Brehm <frank.brehm@pixelpark.com>
Wed, 2 May 2018 11:44:26 +0000 (13:44 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Wed, 2 May 2018 11:44:26 +0000 (13:44 +0200)
lib/cr_vmware_tpl/handler.py

index bd774bd1c314990940fc39cabd97b939fb41ab09..996ae29d79bec78371d4a2c9259cdc78109548d5 100644 (file)
@@ -220,7 +220,10 @@ class CrTplHandler(PpBaseObject):
                         "Could not find VM after creating.")
                 self.poweron_vm()
                 self.wait_for_finish_install()
-                if not self.abort:
+                if self.abort:
+                    LOG.warn("Aborting after creation of template VM.")
+                    LOG.warn("You are responsible yourself to clewaning up the VM!!!")
+                else:
                     self.post_install_tasks_ssh()
                     self.poweroff_vm()
                     self.change_mac_address()