from .xlate import XLATOR
-__version__ = '1.5.4'
+__version__ = '1.5.5'
LOG = logging.getLogger(__name__)
TZ = pytz.timezone('Europe/Berlin')
self.create_vm()
self.tpl_vm = self.vsphere.get_vm(self.tpl_vm_fqdn, as_vmw_obj=True)
if self.tpl_vm:
- LOG.debug(_("Created VM as {cls}: {vm!r}").format(
- cls=self.tpl_vm.__class__.__name__, vm=self.tpl_vm))
- for device in self.tpl_vm.config.hardware.device:
- if isinstance(device, vim.vm.device.VirtualEthernetCard):
- self.tpl_macaddress = device.macAddress
- LOG.debug(_("Found Ethernet card as {}.").format(
+ LOG.debug(_("Created VM as {cls}: {vm!r}").format(
+ cls=self.tpl_vm.__class__.__name__, vm=self.tpl_vm))
+ for device in self.tpl_vm.config.hardware.device:
+ if isinstance(device, vim.vm.device.VirtualEthernetCard):
+ self.tpl_macaddress = device.macAddress
+ LOG.debug(_("Found Ethernet card as {}.").format(
device.__class__.__name__))
- if self.verbose > 2:
+ if self.verbose > 2:
LOG.debug(_("Found Ethernet card:") + "\n{}".format(device))
+ break
if not self.tpl_macaddress:
msg = _("Did not found MAC address of ethernet card.")
raise HandlerError(msg)