From aea7da0fe58b92c4599bd360c9abf4f89fdbb496 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Mon, 22 Jun 2020 18:08:30 +0200 Subject: [PATCH] Fixing lib/cr_vmware_tpl/handler.py --- lib/cr_vmware_tpl/handler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/cr_vmware_tpl/handler.py b/lib/cr_vmware_tpl/handler.py index 75c7a14..e0ea6bb 100644 --- a/lib/cr_vmware_tpl/handler.py +++ b/lib/cr_vmware_tpl/handler.py @@ -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): -- 2.39.5