From: Frank Brehm Date: Mon, 22 Jun 2020 16:08:30 +0000 (+0200) Subject: Fixing lib/cr_vmware_tpl/handler.py X-Git-Tag: 2.1.2^2~9^2~31^2~8 X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=aea7da0fe58b92c4599bd360c9abf4f89fdbb496;p=pixelpark%2Fcreate-vmware-tpl.git Fixing lib/cr_vmware_tpl/handler.py --- 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):