from .xlate import XLATOR
-__version__ = '1.5.2'
+__version__ = '1.5.3'
LOG = logging.getLogger(__name__)
TZ = pytz.timezone('Europe/Berlin')
self.cobbler.ensure_profile()
self.cobbler.ensure_root_authkeys()
- return 0
-
self.vsphere.get_about()
self.vsphere.get_clusters()
self.cluster = self.vsphere.get_cluster_by_name(self.config.vsphere_cluster)
return 6
self.vsphere.get_networks()
-
self.vsphere.ensure_vm_folder(self.config.folder)
self.check_for_temp_tpl_vm(no_error=True)
self.select_data_store()
+ return 0
+
if self.rotate_only:
LOG.warn(_("Only executing of template rotating."))
else:
# -------------------------------------------------------------------------
def check_for_temp_tpl_vm(self, no_error=False):
- LOG.debug(_("First checking, whether {!r} exists ...").format(self.config.template_vm))
- vm = self.vsphere.get_vm(self.config.template_vm, no_error=no_error)
+ LOG.debug(_("First checking, whether {!r} exists ...").format(self.tpl_vm_fqdn))
+ vm = self.vsphere.get_vm(self.tpl_vm_fqdn, no_error=no_error)
if vm:
if self.verbose > 1:
LOG.debug(_("Temporary VM {n!r} exists, raising {e}.").format(
- n=self.config.template_vm, e='TempVmExistsError'))
+ n=self.tpl_vm_fqdn, e='TempVmExistsError'))
if self.verbose > 2:
- msg = "Info about Temporary VM {!r}:".format(self.config.template_vm)
+ msg = "Info about Temporary VM {!r}:".format(self.tpl_vm_fqdn)
msg += '\n' + pp(vm.config)
LOG.debug(msg)
- raise TempVmExistsError(self.config.template_vm)
+ raise TempVmExistsError(self.tpl_vm_fqdn)
LOG.debug(_("Temporary VM {!r} does not exists, will be created.").format(
- self.config.template_vm))
+ self.tpl_vm_fqdn))
# -------------------------------------------------------------------------
def get_temp_tpl_vm(self):