]> Frank Brehm's Git Trees - pixelpark/create-vmware-tpl.git/commitdiff
Fixing lib/cr_vmware_tpl/handler.py
authorFrank Brehm <frank.brehm@pixelpark.com>
Mon, 22 Jun 2020 16:08:30 +0000 (18:08 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Mon, 22 Jun 2020 16:08:30 +0000 (18:08 +0200)
lib/cr_vmware_tpl/handler.py

index 75c7a14cd95b563fba348971d4e96e1b88bf40bd..e0ea6bbdbdf441e796bacc6ac713de38d85e9223 100644 (file)
@@ -42,7 +42,7 @@ from .cobbler import CobblerError, Cobbler
 
 from .xlate import XLATOR
 
-__version__ = '1.7.1'
+__version__ = '1.7.2'
 
 LOG = logging.getLogger(__name__)
 TZ = pytz.timezone('Europe/Berlin')
@@ -263,7 +263,7 @@ class CrTplHandler(BaseHandler):
             LOG.warn(_("Only executing of template rotating."))
         else:
             self.create_vm()
-            self.tpl_vm = self.vsphere.get_vm(self.tpl_vm_fqdn, as_vmw_obj=True)
+            self.tpl_vm = self.get_temp_tpl_vm()
             if self.tpl_vm:
                 LOG.debug(_("Created VM as {cls}: {vm!r}").format(
                     cls=self.tpl_vm.__class__.__name__, vm=self.tpl_vm))
@@ -359,7 +359,7 @@ class CrTplHandler(BaseHandler):
     # -------------------------------------------------------------------------
     def get_temp_tpl_vm(self):
 
-        return self.vsphere.get_vm(self.config.template_vm, as_vmw_obj=True)
+        return self.vsphere.get_vm(self.tpl_vm_fqdn, as_vmw_obj=True)
 
     # -------------------------------------------------------------------------
     def select_data_store(self):