#!/bin/env python3
# -*- coding: utf-8 -*-
-__version__ = '1.0.0'
+__version__ = '1.1.0'
# vim: ts=4 et list
from .config import CrTplConfiguration
-__version__ = '1.2.1'
+from .xlate import XLATOR
+
+__version__ = '1.3.0'
LOG = logging.getLogger(__name__)
TZ = pytz.timezone('Europe/Berlin')
+_ = XLATOR.gettext
+ngettext = XLATOR.ngettext
+
# =============================================================================
class TempVmExistsError(ExpectedHandlerError):
# -------------------------------------------------------------------------
def __str__(self):
- msg = "The temporary VM {!r} is already existing, cannot continue.".format(self.vm_name)
+ msg = _("The temporary VM {!r} is already existing, cannot continue.").format(self.vm_name)
return msg
"""Executing the underlying action."""
if not self.initialized:
- raise HandlerError("{}-object not initialized.".format(self.__class__.__name__))
+ raise HandlerError(_("{}-object not initialized.").format(self.__class__.__name__))
if not isinstance(self.config, CrTplConfiguration):
- raise HandlerError((
- "self.config is not a CrTplConfiguration-instance, but a "
- "{}-instance instead.").format(self.config.__class__.__name__))
+ msg = _("{w} is not an instance of {c}, but an instance of {i} instead.").format(
+ w='self.config', c='CrTplConfiguration', i=self.config.__class__.__name__)
+ raise HandlerError(msg)
retval = 0
try:
retval = self.run()
except VSphereExpectedError as e:
- msg = "Got a {n}: {e}".format(n=e.__class__.__name__, e=e)
+ msg = _("Got a {n}: {e}").format(n=e.__class__.__name__, e=e)
LOG.error(msg)
retval = 9
finally:
# Aufräumen ...
self.cluster = None
- LOG.debug("Closing ...")
+ LOG.debug(_("Closing ..."))
self.vsphere.disconnect()
self.vsphere = None
# -------------------------------------------------------------------------
def run(self):
- LOG.debug("Starting handling ...")
+ LOG.debug(_("Starting handling ..."))
self.vsphere.get_about()
self.vsphere.get_clusters()
self.cluster = self.vsphere.get_cluster_by_name(self.config.vsphere_cluster)
if self.cluster:
- LOG.debug("Found VSphere cluster {!r}.".format(self.cluster.name))
+ LOG.debug(_("Found VSphere cluster {!r}.").format(self.cluster.name))
else:
- LOG.error("Could not find VSphere cluster {!r}.".format(self.config.vsphere_cluster))
+ LOG.error(_("Could not find VSphere cluster {!r}.").format(
+ self.config.vsphere_cluster))
return 6
if self.config.network not in self.cluster.networks:
- LOG.error("Network {n!r} not available in cluster {c!r}.".format(
+ LOG.error(_("Network {n!r} not available in cluster {c!r}.").format(
n=self.config.network, c=self.cluster.name))
return 6
self.select_data_store()
if self.rotate_only:
- LOG.warn("Only executing of template rotating.")
+ LOG.warn(_("Only executing of template rotating."))
else:
self.create_vm()
self.tpl_vm = self.vsphere.get_vm(self.config.template_vm, as_vmw_obj=True)
if not self.tpl_vm:
if self.simulate:
- LOG.warn("Simulation mode - VM not created in real.")
+ LOG.warn(_("Simulation mode - VM not created in real."))
else:
- raise HandlerError("Could not find VM after creating.")
+ raise HandlerError(_("Could not find VM after creating."))
self.vsphere.poweron_vm(self.tpl_vm, max_wait=self.config.max_wait_for_poweron_vm)
self.ts_start_install = time.time()
self.get_postinstall_error()
if self.abort:
- LOG.warn("Aborting after creation of template VM.")
- LOG.warn("You are responsible yourself to cleaning up the VM!!!")
+ LOG.warn(_("Aborting after creation of template VM."))
+ LOG.warn(_("You are responsible yourself to cleaning up the VM!!!"))
else:
self.post_install_tasks_ssh()
if self.postinstall_errors:
# -------------------------------------------------------------------------
def check_for_temp_tpl_vm(self, no_error=False):
- LOG.debug("First checking, whether {!r} exists ...".format(self.config.template_vm))
+ 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)
if vm:
if self.verbose > 1:
- LOG.debug("Temporary VM {!r} exists, raising TempVmExistsError.".format(
- self.config.template_vm))
+ LOG.debug(_("Temporary VM {n!r} exists, raising {e}.").format(
+ n=self.config.template_vm, e='TempVmExistsError'))
if self.verbose > 2:
- LOG.debug("Info about Temporary VM {n!r}:\n{o}".format(
- n=self.config.template_vm, o=pp(vm.config)))
+ msg = "Info about Temporary VM {!r}:".format(self.config.template_vm)
+ msg += '\n' + pp(vm.config)
+ LOG.debug(msg)
raise TempVmExistsError(self.config.template_vm)
- LOG.debug("Temporary VM {!r} does not exists, will be created.".format(
+ LOG.debug(_("Temporary VM {!r} does not exists, will be created.").format(
self.config.template_vm))
# -------------------------------------------------------------------------
# -------------------------------------------------------------------------
def select_data_store(self):
- LOG.debug((
+ LOG.debug(_(
"Selecting a SAN based datastore with at least {:0.1f} GiB available "
"space.").format(self.config.data_size_gb))
for ds in self.vsphere.datastores.values():
if not ds.accessible:
if self.verbose > 1:
- LOG.debug("Cannot use datastore {n!r} - not accessible.".format(n=ds.name))
+ LOG.debug(_("Cannot use datastore {n!r} - not accessible.").format(n=ds.name))
continue
if ds.name not in self.cluster.datastores:
if self.verbose > 1:
- LOG.debug("Cannot use datastore {n!r}, not in cluster {c!r}.".format(
+ LOG.debug(_("Cannot use datastore {n!r}, not in cluster {c!r}.").format(
n=ds.name, c=self.cluster.name))
continue
if self.verbose > 3:
- LOG.debug("Checking datastore:\n{}".format(pp(ds.as_dict())))
+ LOG.debug(_("Checking datastore:") + '\n' + pp(ds.as_dict()))
if ds.storage_type not in ('SAS', 'SSD', 'SATA'):
if self.verbose > 1:
- LOG.debug("Cannot use datastore {n!r}, is of type {t!r}.".format(
+ LOG.debug(_("Cannot use datastore {n!r}, is of type {t!r}.").format(
n=ds.name, t=ds.storage_type))
continue
if ds.free_space_gb <= self.config.data_size_gb:
if self.verbose > 1:
- LOG.debug((
+ LOG.debug(_(
"Cannot use datastore {n!r}, free space "
"{free:0.1f} GiB is less than {min:0.1f} GiB.").format(
n=ds.name, free=ds.free_space_gb, min=self.config.data_size_gb))
usable_ds.append(ds)
- LOG.debug("Found {} usable datastores.".format(len(usable_ds)))
+ LOG.debug(_("Found {} usable datastores.").format(len(usable_ds)))
if len(usable_ds) < 1:
- msg = "Did not found an usable datastore."
+ msg = _("Did not found an usable datastore.")
raise ExpectedHandlerError(msg)
for st_type in ('SATA', 'SAS', 'SSD'):
continue
self.tpl_data_store = random.choice(ds_list)
- LOG.info("Using datastore {!r} for volume of temporary VM to create.".format(
+ LOG.info(_("Using datastore {!r} for volume of temporary VM to create.").format(
self.tpl_data_store.name))
break
tpl_vm_folder = self.vsphere.get_vm_folder(self.config.folder)
if self.verbose > 1:
- LOG.debug("VM-Folder object for template VM: {c} - {n!r}\n{t}".format(
- c=tpl_vm_folder, n=tpl_vm_folder.name, t=pp(tpl_vm_folder.childType)))
+ msg = _("VM-Folder object for template VM: {c} - {n!r}").format(
+ c=tpl_vm_folder, n=tpl_vm_folder.name)
+ msg += '\n' + pp(tpl_vm_folder.childType)
+ LOG.debug(msg)
self.vsphere.create_vm(
name=self.config.template_vm, vm_folder=tpl_vm_folder, vm_config_spec=vm_spec,
# -------------------------------------------------------------------------
def wait_for_finish_install(self):
- LOG.info("Waiting for finishing installation ...")
+ LOG.info(_("Waiting for finishing installation ..."))
- LOG.debug("Waiting initially for {} seconds:".format(self.initial_sleep))
+ LOG.debug(_("Waiting initially for {} seconds:").format(self.initial_sleep))
print(' ==> ', end='', flush=True)
cur_time = time.time()
cur_duration = cur_time - self.ts_start_install
print('', flush=True)
- LOG.debug("Waiting for SSH available ...")
+ LOG.debug(_("Waiting for SSH available ..."))
addr_infos = socket.getaddrinfo(
self.config.template_vm, 22, socket.AF_INET, socket.SOCK_STREAM)
if self.verbose > 1:
- LOG.debug("Got following address_infos for {h!r}, IPv4 TCP port 22:\n{ai}".format(
- h=self.config.template_vm, ai=pp(addr_infos)))
+ msg = _("Got following address_infos for {h!r}, IPv4 TCP port {p}:").format(
+ h=self.config.template_vm, p=22)
+ msg += '\n' + pp(addr_infos)
+ LOG.debug(msg)
if not addr_infos:
- raise HandlerError("Did not get address infos for {!r}, IPv4 TCP port 22.".format(
- self.config.template_vm))
+ raise HandlerError(_("Did not get address infos for {h!r}, IPv4 TCP port {p}.").format(
+ h=self.config.template_vm, p=22))
addr_info = random.choice(addr_infos)
- LOG.debug("Using address info: {}".format(pp(addr_info)))
+ LOG.debug(_("Using address info: {}").format(pp(addr_info)))
family, socktype, proto, canonname, sockaddr = addr_info
if self.verbose <= 3:
last_dot = cur_time
if self.verbose > 3:
- LOG.debug("Trying to connect to {a} via TCP port {p} ...".format(
+ LOG.debug(_("Trying to connect to {a} via TCP port {p} ...").format(
a=sockaddr[0], p=sockaddr[1]))
try:
sock = socket.socket(family, socktype, proto)
except socket.error as e:
sock = None
- LOG.warn("Error creating socket: {}".format(e))
+ LOG.warn(_("Error creating socket: {}").format(e))
continue
try:
sock.close()
sock = None
if self.verbose > 3:
- LOG.debug("Could not connect: {}".format(e))
+ LOG.debug(_("Could not connect: {}").format(e))
continue
if self.verbose <= 3:
print('', flush=True)
- LOG.info("Connected to {a} via TCP port {p} ...".format(
+ LOG.info(_("Connected to {a} via TCP port {p}.").format(
a=sockaddr[0], p=sockaddr[1]))
data = sock.recv(4096)
if data:
msg = to_str(data).strip()
- LOG.info("Got banner: {}".format(msg))
+ LOG.info(_("Got SSHD banner: {}").format(msg))
sock.close()
sock = None
ssh_available = True
minutes = int(int(duration) / 60)
seconds = duration - float(minutes * 60)
- LOG.info("Needed {m} minutes and {s:0.1f} seconds.".format(
+ LOG.info(_("Needed {m} minutes and {s:0.1f} seconds.").format(
m=minutes, s=seconds))
if not ssh_available:
raise ExpectedHandlerError(
- "SSH not available after {:0.1f} seconds, giving up.".format(duration))
+ _("SSH not available after {:0.1f} seconds, giving up.").format(duration))
# -------------------------------------------------------------------------
def get_postinstall_error(self):
- LOG.info("Trying to get possible post-installation errors ...")
+ LOG.info(_("Trying to get possible post-installation errors ..."))
ssh = None
cmd = textwrap.dedent("""\
try:
- LOG.debug("Initializing paramiko SSHClient")
+ LOG.debug(_("Initializing {} ...").format('paramiko SSHClient'))
ssh = paramiko.SSHClient()
- LOG.debug("Loading SSH system host keys.")
+ LOG.debug(_("Loading SSH system host keys."))
ssh.load_system_host_keys()
- LOG.debug("Setting SSH missing host key policy to AutoAddPolicy.")
+ LOG.debug(_("Setting SSH missing host key policy to {}.").format('AutoAddPolicy'))
ssh.set_missing_host_key_policy(paramiko.client.AutoAddPolicy())
- LOG.debug("Connecting to {h!r}, port {p} as {u!r} per SSH ...".format(
+ LOG.debug(_("Connecting to {h!r}, port {p} as {u!r} per SSH ...").format(
h=self.config.template_vm, p=self.ssh_port, u=self.ssh_user))
ssh.connect(
self.config.template_vm, port=self.ssh_port, timeout=self.ssh_timeout,
username=self.ssh_user, key_filename=self.private_ssh_key)
- LOG.debug("Trying to read /root/postinst-error.txt ...")
+ LOG.debug(_("Trying to read {!r} ...").format('/root/postinst-error.txt'))
if self.verbose > 1:
- LOG.debug("Commands to execute:\n{}".format(cmd))
+ LOG.debug(_("Commands to execute:") + '\n' + cmd)
stdin, stdout, stderr = ssh.exec_command(
cmd, timeout=self.ssh_timeout)
output = to_str(stdout.read()).strip()
err = to_str(stderr.read()).strip()
- LOG.debug("Output on STDERR:\n{}".format(err))
+ LOG.debug(_("Output on {}:").format('STDERR') + '\n' + str(err))
if output:
self.postinstall_errors = output
- LOG.error("Got postinstall errors:\n{}".format(output))
+ LOG.error(_("Got postinstall errors:") + '\n' + output)
else:
- LOG.info("No postinstall errors found.")
+ LOG.info(_("No postinstall errors found."))
finally:
if ssh:
if self.verbose > 2:
- LOG.debug("Closing SSH connection.")
+ LOG.debug(_("Closing SSH connection."))
ssh.close()
if self.postinstall_errors:
- LOG.warn("Template VM {!r} has to be removed.".format(self.config.template_vm))
+ LOG.warn(_("Template VM {!r} has to be removed.").format(self.config.template_vm))
# -------------------------------------------------------------------------
def post_install_tasks_ssh(self):
- LOG.info("Executing tasks per SSH after installation ...")
+ LOG.info(_("Executing tasks per SSH after installation ..."))
ssh = None
try:
- LOG.debug("Initializing paramiko SSHClient")
+ LOG.debug(_("Initializing {} ...").format('paramiko SSHClient'))
ssh = paramiko.SSHClient()
- LOG.debug("Loading SSH system host keys.")
+ LOG.debug(_("Loading SSH system host keys."))
ssh.load_system_host_keys()
- LOG.debug("Setting SSH missing host key policy to AutoAddPolicy.")
+ LOG.debug(_("Setting SSH missing host key policy to {}.").format('AutoAddPolicy'))
ssh.set_missing_host_key_policy(paramiko.client.AutoAddPolicy())
- LOG.debug("Connecting to {h!r}, port {p} as {u!r} per SSH ...".format(
+ LOG.debug(_("Connecting to {h!r}, port {p} as {u!r} per SSH ...").format(
h=self.config.template_vm, p=self.ssh_port, u=self.ssh_user))
ssh.connect(
self.config.template_vm, port=self.ssh_port, timeout=self.ssh_timeout,
username=self.ssh_user, key_filename=self.private_ssh_key)
- LOG.debug("Executing postinstall tasks ...")
+ LOG.debug(_("Executing postinstall tasks ..."))
if self.verbose > 1:
- LOG.debug("Commands to execute:\n{}".format(cmd))
+ LOG.debug(_("Commands to execute:") + '\n' + cmd)
stdin, stdout, stderr = ssh.exec_command(
cmd, timeout=self.ssh_timeout)
- LOG.debug("Output on STDOUT:\n{}".format(to_str(stdout.read())))
- LOG.debug("Output on STDERR:\n{}".format(to_str(stderr.read())))
+ LOG.debug(_("Output on {}:").format('STDOUT') + '\n' + to_str(stdout.read()))
+ LOG.debug(_("Output on {}:").format('STDERR') + '\n' + to_str(stderr.read()))
finally:
if ssh:
if self.verbose > 2:
- LOG.debug("Closing SSH connection.")
+ LOG.debug(_("Closing SSH connection."))
ssh.close()
# -------------------------------------------------------------------------
wait_for_shutdown = 15
- LOG.info("Waiting for {} seconds before shutting down:".format(wait_for_shutdown))
+ LOG.info(_("Waiting for {} seconds before shutting down:").format(wait_for_shutdown))
print(' ==> ', end='', flush=True)
start_waiting = time.time()
cur_duration = cur_time - start_waiting
print('', flush=True)
- LOG.info("Last actions before powering off VM {!r} ...".format(self.config.template_vm))
+ LOG.info(_("Last actions before powering off VM {!r} ...").format(self.config.template_vm))
ssh = None
vm = self.get_temp_tpl_vm()
power_state = vm.runtime.powerState
- LOG.debug("Current state of template VM is {!r}".format(power_state))
+ LOG.debug(_("Current state of template VM is {!r}").format(power_state))
if power_state.strip().lower() == "poweredoff":
- LOG.info("Template VM is already shut off.")
+ LOG.info(_("Template VM is already shut off."))
return
if power_state.strip().lower() != "poweredon":
raise ExpectedHandlerError(
- "Cannot shut down VM {h!r}, is currently in state {s!r}.".format(
+ _("Cannot shut down VM {h!r}, is currently in state {s!r}.").format(
h=self.config.template_vm, s=power_state))
- LOG.info("Powering off VM {!r} per SSH ...".format(self.config.template_vm))
+ LOG.info(_("Powering off VM {!r} per SSH ...").format(self.config.template_vm))
try:
- LOG.debug("Initializing paramiko SSHClient")
+ LOG.debug(_("Initializing {} ...").format('paramiko SSHClient'))
ssh = paramiko.SSHClient()
- LOG.debug("Loading SSH system host keys.")
+ LOG.debug(_("Loading SSH system host keys."))
ssh.load_system_host_keys()
- LOG.debug("Setting SSH missing host key policy to AutoAddPolicy.")
+ LOG.debug(_("Setting SSH missing host key policy to {}.").format('AutoAddPolicy'))
ssh.set_missing_host_key_policy(paramiko.client.AutoAddPolicy())
- LOG.debug("Connecting to {h!r}, port {p} as {u!r} per SSH ...".format(
+ LOG.debug(_("Connecting to {h!r}, port {p} as {u!r} per SSH ...").format(
h=self.config.template_vm, p=self.ssh_port, u=self.ssh_user))
ssh.connect(
self.config.template_vm, port=self.ssh_port, timeout=self.ssh_timeout,
username=self.ssh_user, key_filename=self.private_ssh_key)
- LOG.debug("Executing poweroff ...")
+ LOG.debug(_("Executing {} ...").format('poweroff'))
if self.verbose > 1:
- LOG.debug("Commands to execute:\n{}".format(cmd))
+ LOG.debug(_("Commands to execute:") + '\n' + cmd)
stdin, stdout, stderr = ssh.exec_command(
cmd, timeout=self.ssh_timeout)
- LOG.debug("Output on STDOUT:\n{}".format(to_str(stdout.read())))
- LOG.debug("Output on STDERR:\n{}".format(to_str(stderr.read())))
+ LOG.debug(_("Output on {}:").format('STDOUT') + '\n' + to_str(stdout.read()))
+ LOG.debug(_("Output on {}:").format('STDERR') + '\n' + to_str(stderr.read()))
finally:
if ssh:
if self.verbose > 2:
- LOG.debug("Closing SSH connection.")
+ LOG.debug(_("Closing SSH connection."))
ssh.close()
cur_diff = 0
last_dot = cur_time
i = 0
- LOG.debug("Waiting for successful shut down of VM ...")
+ LOG.debug(_("Waiting for successful shut down of VM ..."))
if self.verbose <= 3:
print(' ==> ', end='', flush=True)
if self.verbose > 3:
- LOG.debug("Current state of template VM is {!r}".format(power_state))
+ LOG.debug(_("Current state of template VM is {!r}").format(power_state))
while power_state.strip().lower() != "poweredoff":
vm = self.get_temp_tpl_vm()
power_state = vm.runtime.powerState
if self.verbose > 3:
- LOG.debug("Still waiting for completing shutdown, current state is {!r}.".format(
+ LOG.debug(_(
+ "Still waiting for completing shutdown, current state is {!r}.").format(
power_state))
if power_state.strip().lower() == "poweredoff":
print('', flush=True)
- LOG.info("Template VM {h!r} was shutting down in {t:0.1f} seconds.".format(
+ LOG.info(_(
+ "Template VM {h!r} was shutting down in {t:0.1f} seconds.").format(
h=self.config.template_vm, t=cur_diff))
return
if cur_diff >= self.config.max_wait_for_shutdown_vm:
break
print('', flush=True)
- raise ExpectedHandlerError(
- "VM {h!r} was not shut down after {t:0.1f} seconds, current state is {s!r}.".format(
+ raise ExpectedHandlerError(_(
+ "VM {h!r} was not shut down after {t:0.1f} seconds, current state is {s!r}.").format(
h=self.config.template_vm, t=cur_diff, s=power_state))
# -------------------------------------------------------------------------
def change_mac_address(self):
- LOG.info("Setting a new, randomized MAC address for template VM ...")
+ LOG.info(_("Setting a new, randomized MAC address for template VM ..."))
last_tuple1 = random.randint(1, 254)
last_tuple2 = random.randint(1, 254)
new_mac = self.config.mac_address_template.format(last_tuple1, last_tuple2)
- LOG.debug("New MAC address: {!r}.".format(new_mac))
+ LOG.debug(_("New MAC address: {!r}.").format(new_mac))
vm = self.get_temp_tpl_vm()
self.vsphere.set_mac_of_nic(vm, new_mac, nic_nr=0)
# -------------------------------------------------------------------------
def rotate_templates(self):
- LOG.info("Searching for existing templates and rotate them ...")
+ LOG.info(_("Searching for existing templates and rotate them ..."))
re_is_numeric = re.compile(r'^\s*(\d+)\s*$')
pattern_tpl = r'^' + re.escape(self.config.template_name)
templates = self.vsphere.get_vms(re_tpl, is_template=True, as_vmw_obj=True)
if not templates:
- LOG.info("Did not found any existing templates.")
+ LOG.info(_("Did not found any existing templates."))
return
- LOG.debug("Found {} existing templates.".format(len(templates)))
+ msg = ngettext(
+ "Found one existing template." "Found {} existing templates.",
+ len(templates)).format(len(templates))
+ LOG.debug(msg)
templates_ts = {}
templates_sorted = []
if val_map['created'] and re_is_numeric.match(val_map['created']):
created = float(val_map['created'])
ts_created = datetime.datetime.fromtimestamp(created, tz=TZ)
- LOG.debug("Found template {n!r}, created: {ts}.".format(
+ LOG.debug(_("Found template {n!r}, created: {ts}.").format(
n=tpl_name, ts=ts_created.isoformat(' ')))
if self.verbose > 2:
LOG.debug("Template Summary Config:\n{}".format(template.summary.config))
for tpl_name in sorted(templates_ts.keys(), key=lambda tpl: templates_ts[tpl]):
templates_sorted.append(tpl_name)
- LOG.debug("Templates sorted by creation date:\n{}".format(
- pp(templates_sorted)))
+ LOG.debug(_("Templates sorted by creation date:") + '\n' + pp(templates_sorted))
templates_sorted.reverse()
templates_to_remove = []
i = 0
templates_to_remove.append(tpl_name)
i += 1
templates_to_remove.reverse()
- LOG.debug("Templates to remove:\n{}".format(pp(templates_to_remove)))
+ if templates_to_remove:
+ LOG.debug(_("Templates to remove:") + '\n' + pp(templates_to_remove))
+ else:
+ LOG.debug(_("There are no templates to remove."))
for template in templates:
tpl_name = template.summary.config.name
if tpl_name in templates_to_remove:
- LOG.info("Removing template {!r} ...".format(tpl_name))
+ LOG.info(_("Removing template {!r} ...").format(tpl_name))
self.vsphere.purge_vm(template)
- LOG.debug("Successful removed template {!r}.".format(tpl_name))
+ LOG.debug(_("Successful removed template {!r}.").format(tpl_name))
continue
if tpl_name.strip().lower() == self.config.template_name.strip().lower():
created = templates_ts[tpl_name]
tname = new_name.strip().lower()
i += 1
new_template_names[tname] = 1
- LOG.info("Renaming template {o!r} => {n!r} ...".format(o=tpl_name, n=new_name))
+ LOG.info(_("Renaming template {o!r} => {n!r} ...").format(o=tpl_name, n=new_name))
task = template.Rename_Task(new_name)
self.vsphere.wait_for_tasks([task])
- LOG.debug("Successful renamed template into {!r}.".format(new_name))
+ LOG.debug(_("Successful renamed template into {!r}.").format(new_name))
else:
tname = tpl_name.strip().lower()
new_template_names[tname] = 1
# -------------------------------------------------------------------------
def rename_and_change_vm(self):
- LOG.info("Renaming VM {o!r} => {n!r} ...".format(
+ LOG.info(_("Renaming VM {o!r} => {n!r} ...").format(
o=self.config.template_vm, n=self.config.template_name))
vm = self.get_temp_tpl_vm()
task = vm.Rename_Task(self.config.template_name)
self.vsphere.wait_for_tasks([task])
- LOG.debug("Successful renamed VM into {!r}.".format(self.config.template_name))
+ LOG.debug(_("Successful renamed VM into {!r}.").format(self.config.template_name))
- LOG.info("Changing VM {!r} into a VMWare template ...".format(self.config.template_name))
+ LOG.info(_("Changing VM {!r} into a VMWare template ...").format(self.config.template_name))
vm.MarkAsTemplate()
- LOG.debug("Object {!r} is now a VMWare template.".format(self.config.template_name))
+ LOG.debug(_("Object {!r} is now a VMWare template.").format(self.config.template_name))
# =============================================================================
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: create_vm_template 1.0.0\n"
+"Project-Id-Version: create_vm_template 1.1.0\n"
"Report-Msgid-Bugs-To: frank.brehm@pixelpark.com\n"
-"POT-Creation-Date: 2019-02-08 10:47+0100\n"
+"POT-Creation-Date: 2019-02-08 16:09+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <frank.brehm@pixelpark.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "Setting timeout {p!r} to {v:0.1f} seconds."
msgstr ""
+#: lib/cr_vmware_tpl/handler.py:62
+msgid "The temporary VM {!r} is already existing, cannot continue."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:124
+msgid "{}-object not initialized."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:127
+msgid "{w} is not an instance of {c}, but an instance of {i} instead."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:144
+msgid "Got a {n}: {e}"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:151
+msgid "Closing ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:160
+msgid "Starting handling ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:166
+msgid "Found VSphere cluster {!r}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:168
+msgid "Could not find VSphere cluster {!r}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:173
+msgid "Network {n!r} not available in cluster {c!r}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:184
+msgid "Only executing of template rotating."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:190
+msgid "Simulation mode - VM not created in real."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:192
+msgid "Could not find VM after creating."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:200
+msgid "Aborting after creation of template VM."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:201
+msgid "You are responsible yourself to cleaning up the VM!!!"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:221
+msgid "First checking, whether {!r} exists ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:226
+msgid "Temporary VM {n!r} exists, raising {e}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:234
+msgid "Temporary VM {!r} does not exists, will be created."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:245
+msgid "Selecting a SAN based datastore with at least {:0.1f} GiB available space."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:255
+msgid "Cannot use datastore {n!r} - not accessible."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:259
+msgid "Cannot use datastore {n!r}, not in cluster {c!r}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:263
+msgid "Checking datastore:"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:266
+msgid "Cannot use datastore {n!r}, is of type {t!r}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:271
+msgid "Cannot use datastore {n!r}, free space {free:0.1f} GiB is less than {min:0.1f} GiB."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:279
+msgid "Found {} usable datastores."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:281
+msgid "Did not found an usable datastore."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:294
+msgid "Using datastore {!r} for volume of temporary VM to create."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:317
+msgid "VM-Folder object for template VM: {c} - {n!r}"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:329
+msgid "Waiting for finishing installation ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:331
+msgid "Waiting initially for {} seconds:"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:347
+msgid "Waiting for SSH available ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:352
+msgid "Got following address_infos for {h!r}, IPv4 TCP port {p}:"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:357
+msgid "Did not get address infos for {h!r}, IPv4 TCP port {p}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:361
+msgid "Using address info: {}"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:392
+msgid "Trying to connect to {a} via TCP port {p} ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:399
+msgid "Error creating socket: {}"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:408
+msgid "Could not connect: {}"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:414
+msgid "Connected to {a} via TCP port {p}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:419
+msgid "Got SSHD banner: {}"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:430
+msgid "Needed {m} minutes and {s:0.1f} seconds."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:435
+msgid "SSH not available after {:0.1f} seconds, giving up."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:440
+msgid "Trying to get possible post-installation errors ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:451 lib/cr_vmware_tpl/handler.py:548 lib/cr_vmware_tpl/handler.py:650
+msgid "Initializing {} ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:453 lib/cr_vmware_tpl/handler.py:550 lib/cr_vmware_tpl/handler.py:652
+msgid "Loading SSH system host keys."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:455 lib/cr_vmware_tpl/handler.py:552 lib/cr_vmware_tpl/handler.py:654
+msgid "Setting SSH missing host key policy to {}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:458 lib/cr_vmware_tpl/handler.py:555 lib/cr_vmware_tpl/handler.py:657
+msgid "Connecting to {h!r}, port {p} as {u!r} per SSH ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:464
+msgid "Trying to read {!r} ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:466 lib/cr_vmware_tpl/handler.py:563 lib/cr_vmware_tpl/handler.py:665
+msgid "Commands to execute:"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:474 lib/cr_vmware_tpl/handler.py:568 lib/cr_vmware_tpl/handler.py:569
+#: lib/cr_vmware_tpl/handler.py:670 lib/cr_vmware_tpl/handler.py:671
+msgid "Output on {}:"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:478
+msgid "Got postinstall errors:"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:480
+msgid "No postinstall errors found."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:485 lib/cr_vmware_tpl/handler.py:574 lib/cr_vmware_tpl/handler.py:676
+msgid "Closing SSH connection."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:489
+msgid "Template VM {!r} has to be removed."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:494
+msgid "Executing tasks per SSH after installation ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:561
+msgid "Executing postinstall tasks ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:582
+msgid "Waiting for {} seconds before shutting down:"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:603
+msgid "Last actions before powering off VM {!r} ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:636 lib/cr_vmware_tpl/handler.py:689
+msgid "Current state of template VM is {!r}"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:638
+msgid "Template VM is already shut off."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:643
+msgid "Cannot shut down VM {h!r}, is currently in state {s!r}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:646
+msgid "Powering off VM {!r} per SSH ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:663
+msgid "Executing {} ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:685
+msgid "Waiting for successful shut down of VM ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:713
+msgid "Still waiting for completing shutdown, current state is {!r}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:718
+msgid "Template VM {h!r} was shutting down in {t:0.1f} seconds."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:726
+msgid "VM {h!r} was not shut down after {t:0.1f} seconds, current state is {s!r}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:733
+msgid "Setting a new, randomized MAC address for template VM ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:738
+msgid "New MAC address: {!r}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:746
+msgid "Searching for existing templates and rotate them ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:754
+msgid "Did not found any existing templates."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:777
+msgid "Found template {n!r}, created: {ts}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:788
+msgid "Templates sorted by creation date:"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:798
+msgid "Templates to remove:"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:800
+msgid "There are no templates to remove."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:805
+msgid "Removing template {!r} ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:807
+msgid "Successful removed template {!r}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:821
+msgid "Renaming template {o!r} => {n!r} ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:824
+msgid "Successful renamed template into {!r}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:832
+msgid "Renaming VM {o!r} => {n!r} ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:838
+msgid "Successful renamed VM into {!r}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:840
+msgid "Changing VM {!r} into a VMWare template ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:842
+msgid "Object {!r} is now a VMWare template."
+msgstr ""
+
#: lib/cr_vmware_tpl/xlate.py:54
msgid "Module directory: {!r}"
msgstr ""
#
msgid ""
msgstr ""
-"Project-Id-Version: create_vm_template 1.0.0\n"
+"Project-Id-Version: create_vm_template 1.1.0\n"
"Report-Msgid-Bugs-To: frank.brehm@pixelpark.com\n"
-"POT-Creation-Date: 2019-02-08 10:47+0100\n"
-"PO-Revision-Date: 2019-02-08 10:50+0100\n"
+"POT-Creation-Date: 2019-02-08 16:09+0100\n"
+"PO-Revision-Date: 2019-02-08 16:10+0100\n"
"Last-Translator: Frank Brehm <frank.brehm@pixelpark.com>\n"
"Language: de_DE\n"
"Language-Team: de_DE <LL@li.org>\n"
msgid "Setting timeout {p!r} to {v:0.1f} seconds."
msgstr "Setze Timeout {p!r} auf {v:0.1f} Sekunden."
+#: lib/cr_vmware_tpl/handler.py:62
+msgid "The temporary VM {!r} is already existing, cannot continue."
+msgstr "Die temporäre VM {!r} existiert bereits, fortsetzen unmöglich."
+
+#: lib/cr_vmware_tpl/handler.py:124
+msgid "{}-object not initialized."
+msgstr "Das {}-Objekt ist nicht initialisiert."
+
+#: lib/cr_vmware_tpl/handler.py:127
+msgid "{w} is not an instance of {c}, but an instance of {i} instead."
+msgstr "{w} ist keine Instanz von {c}, sondern statt dessen eine Instanz von {i}."
+
+#: lib/cr_vmware_tpl/handler.py:144
+msgid "Got a {n}: {e}"
+msgstr "Erhielt ein {n}: {e}"
+
+#: lib/cr_vmware_tpl/handler.py:151
+msgid "Closing ..."
+msgstr "Schließe …"
+
+#: lib/cr_vmware_tpl/handler.py:160
+msgid "Starting handling ..."
+msgstr "Starte Abhandlung …"
+
+#: lib/cr_vmware_tpl/handler.py:166
+msgid "Found VSphere cluster {!r}."
+msgstr "Fand VSphere-Cluster {!r}."
+
+#: lib/cr_vmware_tpl/handler.py:168
+msgid "Could not find VSphere cluster {!r}."
+msgstr "Konnte VSphere-Cluster {!r} nicht finden."
+
+#: lib/cr_vmware_tpl/handler.py:173
+msgid "Network {n!r} not available in cluster {c!r}."
+msgstr "Das Netzwerk {n!r} ist in Cluster {c!r} nicht verfügbar."
+
+#: lib/cr_vmware_tpl/handler.py:184
+msgid "Only executing of template rotating."
+msgstr "Führe nor Rotation der Vorlagen aus."
+
+#: lib/cr_vmware_tpl/handler.py:190
+msgid "Simulation mode - VM not created in real."
+msgstr "Simulationsmodus - die VM wird in in Realität nicht erstellt."
+
+#: lib/cr_vmware_tpl/handler.py:192
+msgid "Could not find VM after creating."
+msgstr "Konnte VM nach Erstellung nicht finden."
+
+#: lib/cr_vmware_tpl/handler.py:200
+msgid "Aborting after creation of template VM."
+msgstr "Abbruch nach Erstellung der Vorlagen-VM."
+
+#: lib/cr_vmware_tpl/handler.py:201
+msgid "You are responsible yourself to cleaning up the VM!!!"
+msgstr "Du bist selbst für das Wegräumen der VM verantwortlich!!"
+
+#: lib/cr_vmware_tpl/handler.py:221
+msgid "First checking, whether {!r} exists ..."
+msgstr "Überprüfe zuerst, ob {!r} existiert …"
+
+#: lib/cr_vmware_tpl/handler.py:226
+msgid "Temporary VM {n!r} exists, raising {e}."
+msgstr "Die temporäre VM {n!r} existiert bereits, löse {e} aus."
+
+#: lib/cr_vmware_tpl/handler.py:234
+msgid "Temporary VM {!r} does not exists, will be created."
+msgstr "Die temporäre VM {n!r} existiert noch nicht, sie wird erstellt."
+
+#: lib/cr_vmware_tpl/handler.py:245
+msgid "Selecting a SAN based datastore with at least {:0.1f} GiB available space."
+msgstr "Wähle ein SAN-basierten Datastore mit mindestens {:0.1f} freien Speicherplatz aus."
+
+#: lib/cr_vmware_tpl/handler.py:255
+msgid "Cannot use datastore {n!r} - not accessible."
+msgstr "Kann Datastore {n!r} nicht verwenden - nicht verfügbar."
+
+#: lib/cr_vmware_tpl/handler.py:259
+msgid "Cannot use datastore {n!r}, not in cluster {c!r}."
+msgstr "Kann Datastore {n!r} nicht verwenden, da er nicht im Cluster {c!r} liegt."
+
+#: lib/cr_vmware_tpl/handler.py:263
+msgid "Checking datastore:"
+msgstr "Überprüfe Datastore:"
+
+#: lib/cr_vmware_tpl/handler.py:266
+msgid "Cannot use datastore {n!r}, is of type {t!r}."
+msgstr "Kann Datastore {n!r} nicht verwenden, da er vom Typ {t!r} ist."
+
+#: lib/cr_vmware_tpl/handler.py:271
+msgid "Cannot use datastore {n!r}, free space {free:0.1f} GiB is less than {min:0.1f} GiB."
+msgstr ""
+"Kann Datastore {n!r} nicht verwenden, da der freie Speicherplatz {free:0.1f} GiB weniger als "
+"{min:0.1f} GiB ist."
+
+#: lib/cr_vmware_tpl/handler.py:279
+msgid "Found {} usable datastores."
+msgstr "Habe {} verwendungsfähige Datastores gefunden."
+
+#: lib/cr_vmware_tpl/handler.py:281
+msgid "Did not found an usable datastore."
+msgstr "Keinen verwendungsfähigen Datastore gefunden."
+
+#: lib/cr_vmware_tpl/handler.py:294
+msgid "Using datastore {!r} for volume of temporary VM to create."
+msgstr "Verwende Datastore {!r} für die Disk der temporären VM."
+
+#: lib/cr_vmware_tpl/handler.py:317
+msgid "VM-Folder object for template VM: {c} - {n!r}"
+msgstr "VM-Ordner-Obket der temporären VM: {c} - {n!r}"
+
+#: lib/cr_vmware_tpl/handler.py:329
+msgid "Waiting for finishing installation ..."
+msgstr "Warte auf Beendigung der Installation …"
+
+#: lib/cr_vmware_tpl/handler.py:331
+msgid "Waiting initially for {} seconds:"
+msgstr "Warte initial {} Sekunden:"
+
+#: lib/cr_vmware_tpl/handler.py:347
+msgid "Waiting for SSH available ..."
+msgstr "Warte auf die Verfügbarkeit von SSH …"
+
+#: lib/cr_vmware_tpl/handler.py:352
+msgid "Got following address_infos for {h!r}, IPv4 TCP port {p}:"
+msgstr "Habe folgende Adress-Informationen für {h!r}, IPv4 TCP-Port {p}, gefunden:"
+
+#: lib/cr_vmware_tpl/handler.py:357
+msgid "Did not get address infos for {h!r}, IPv4 TCP port {p}."
+msgstr "Keine Adress-Informationen für {h!r}, IPv4 TCP-Port {p}, gefunden."
+
+#: lib/cr_vmware_tpl/handler.py:361
+msgid "Using address info: {}"
+msgstr "Verwende Adress-Informationen: {}"
+
+#: lib/cr_vmware_tpl/handler.py:392
+msgid "Trying to connect to {a} via TCP port {p} ..."
+msgstr "Versuche mit {a} auf TCP-Port {p} zu verbinden …"
+
+#: lib/cr_vmware_tpl/handler.py:399
+msgid "Error creating socket: {}"
+msgstr "Fehler bei der Erstellung des Netzwerksockels: {}"
+
+#: lib/cr_vmware_tpl/handler.py:408
+msgid "Could not connect: {}"
+msgstr "Konnte nicht verbinden: {}"
+
+#: lib/cr_vmware_tpl/handler.py:414
+msgid "Connected to {a} via TCP port {p}."
+msgstr "Mit {a} auf TCP-Port {p} verbunden."
+
+#: lib/cr_vmware_tpl/handler.py:419
+msgid "Got SSHD banner: {}"
+msgstr "Erhaltener SSHD-Banner: {}"
+
+#: lib/cr_vmware_tpl/handler.py:430
+msgid "Needed {m} minutes and {s:0.1f} seconds."
+msgstr "Insgesamt {m} Minuten und {s:0.1f} Sekunden benötigt."
+
+#: lib/cr_vmware_tpl/handler.py:435
+msgid "SSH not available after {:0.1f} seconds, giving up."
+msgstr "SSH nach {:0.1f} Sekunden nicht verfügbar, gebe auf."
+
+#: lib/cr_vmware_tpl/handler.py:440
+msgid "Trying to get possible post-installation errors ..."
+msgstr "Versuche, mögliche Post-Installations-Fehler zu ermitteln …"
+
+#: lib/cr_vmware_tpl/handler.py:451 lib/cr_vmware_tpl/handler.py:548 lib/cr_vmware_tpl/handler.py:650
+msgid "Initializing {} ..."
+msgstr "Initialisiere {} …"
+
+#: lib/cr_vmware_tpl/handler.py:453 lib/cr_vmware_tpl/handler.py:550 lib/cr_vmware_tpl/handler.py:652
+msgid "Loading SSH system host keys."
+msgstr "Lade SSH-Systemschlüssel."
+
+#: lib/cr_vmware_tpl/handler.py:455 lib/cr_vmware_tpl/handler.py:552 lib/cr_vmware_tpl/handler.py:654
+msgid "Setting SSH missing host key policy to {}."
+msgstr "Setze Richtline für vermißte Schlüssel auf {}."
+
+#: lib/cr_vmware_tpl/handler.py:458 lib/cr_vmware_tpl/handler.py:555 lib/cr_vmware_tpl/handler.py:657
+msgid "Connecting to {h!r}, port {p} as {u!r} per SSH ..."
+msgstr "Verbinde mich zu {h!r}, Port {p}, als {u!r} per SSH …"
+
+#: lib/cr_vmware_tpl/handler.py:464
+msgid "Trying to read {!r} ..."
+msgstr "Versuche {!r} zu lesen …"
+
+#: lib/cr_vmware_tpl/handler.py:466 lib/cr_vmware_tpl/handler.py:563 lib/cr_vmware_tpl/handler.py:665
+msgid "Commands to execute:"
+msgstr "Auszuführende Befehle:"
+
+#: lib/cr_vmware_tpl/handler.py:474 lib/cr_vmware_tpl/handler.py:568 lib/cr_vmware_tpl/handler.py:569
+#: lib/cr_vmware_tpl/handler.py:670 lib/cr_vmware_tpl/handler.py:671
+msgid "Output on {}:"
+msgstr "Ausgabe an {}:"
+
+#: lib/cr_vmware_tpl/handler.py:478
+msgid "Got postinstall errors:"
+msgstr "Post-Installations-Fehler erhalten:"
+
+#: lib/cr_vmware_tpl/handler.py:480
+msgid "No postinstall errors found."
+msgstr "Keine Post-Installations-Fehler gefunden."
+
+#: lib/cr_vmware_tpl/handler.py:485 lib/cr_vmware_tpl/handler.py:574 lib/cr_vmware_tpl/handler.py:676
+msgid "Closing SSH connection."
+msgstr "Schließe SSH-Verbindung."
+
+#: lib/cr_vmware_tpl/handler.py:489
+msgid "Template VM {!r} has to be removed."
+msgstr "Die Vorlagen-VM {!r} muß gelöscht werden."
+
+#: lib/cr_vmware_tpl/handler.py:494
+msgid "Executing tasks per SSH after installation ..."
+msgstr "Führe Tasks per SSH nach der Installation aus …"
+
+#: lib/cr_vmware_tpl/handler.py:561
+msgid "Executing postinstall tasks ..."
+msgstr "Führe Post-Installations-Tasks aus …"
+
+#: lib/cr_vmware_tpl/handler.py:582
+msgid "Waiting for {} seconds before shutting down:"
+msgstr "Warte {} Sekunden vor dem Herunterfahren:"
+
+#: lib/cr_vmware_tpl/handler.py:603
+msgid "Last actions before powering off VM {!r} ..."
+msgstr "Letzte Aktionen vor dem Ausschalten der VM {!r} …"
+
+#: lib/cr_vmware_tpl/handler.py:636 lib/cr_vmware_tpl/handler.py:689
+msgid "Current state of template VM is {!r}"
+msgstr "Der aktuelle Status der Vorlagen-VM ist {!r}"
+
+#: lib/cr_vmware_tpl/handler.py:638
+msgid "Template VM is already shut off."
+msgstr "Die Vorlagen-VM ist bereits ausgeschaltet."
+
+#: lib/cr_vmware_tpl/handler.py:643
+msgid "Cannot shut down VM {h!r}, is currently in state {s!r}."
+msgstr "Kann VM {h!r} nicht herunterfahren, sie ist aktuell im Status {s!r}."
+
+#: lib/cr_vmware_tpl/handler.py:646
+msgid "Powering off VM {!r} per SSH ..."
+msgstr "Schalte VM {!r} per SSH aus …"
+
+#: lib/cr_vmware_tpl/handler.py:663
+msgid "Executing {} ..."
+msgstr "Füher {} aus …"
+
+#: lib/cr_vmware_tpl/handler.py:685
+msgid "Waiting for successful shut down of VM ..."
+msgstr "Warte auf Erfolg des Herunterfahrens der VM …"
+
+#: lib/cr_vmware_tpl/handler.py:713
+msgid "Still waiting for completing shutdown, current state is {!r}."
+msgstr "Warte noch auf Beendigung des Herunterfahrens, aktueller Status is {!r}."
+
+#: lib/cr_vmware_tpl/handler.py:718
+msgid "Template VM {h!r} was shutting down in {t:0.1f} seconds."
+msgstr "Die Vorlagen-VM {h!r} wurde in {t:0.1f} Sekunden heruntergefahren."
+
+#: lib/cr_vmware_tpl/handler.py:726
+msgid "VM {h!r} was not shut down after {t:0.1f} seconds, current state is {s!r}."
+msgstr "Die VM {h!r} ist nach {t:0.1f} Sekunden nioch nicht heruntergefahren, aktueller Status is {!r}."
+
+#: lib/cr_vmware_tpl/handler.py:733
+msgid "Setting a new, randomized MAC address for template VM ..."
+msgstr "Setze eine neue, randomisierte MAC-Adresse für die Vorlagen-VM …"
+
+#: lib/cr_vmware_tpl/handler.py:738
+msgid "New MAC address: {!r}."
+msgstr "Neue MAC-Adresse: {!r}."
+
+#: lib/cr_vmware_tpl/handler.py:746
+msgid "Searching for existing templates and rotate them ..."
+msgstr "Suche nach existierenden Vorlagen und rotiere sie …"
+
+#: lib/cr_vmware_tpl/handler.py:754
+msgid "Did not found any existing templates."
+msgstr "Keine existierenden Vorlagen gefunden."
+
+#: lib/cr_vmware_tpl/handler.py:777
+msgid "Found template {n!r}, created: {ts}."
+msgstr "Vorlage {n!r} gefunden, erstellt am: {ts}."
+
+#: lib/cr_vmware_tpl/handler.py:788
+msgid "Templates sorted by creation date:"
+msgstr "Vorlagen nach Erstellungsdatum sortiert:"
+
+#: lib/cr_vmware_tpl/handler.py:798
+msgid "Templates to remove:"
+msgstr "Zu löschende Vorlagen:"
+
+#: lib/cr_vmware_tpl/handler.py:800
+msgid "There are no templates to remove."
+msgstr "Es gibt keine Vorlagen, die gelöscht werden müssen."
+
+#: lib/cr_vmware_tpl/handler.py:805
+msgid "Removing template {!r} ..."
+msgstr "Lösche Vorlage {!r} …"
+
+#: lib/cr_vmware_tpl/handler.py:807
+msgid "Successful removed template {!r}."
+msgstr "Vorlage {!r} erfolgreich gelöscht."
+
+#: lib/cr_vmware_tpl/handler.py:821
+msgid "Renaming template {o!r} => {n!r} ..."
+msgstr "Umbenennen der Vorlage {o!r} => {n!r} …"
+
+#: lib/cr_vmware_tpl/handler.py:824
+msgid "Successful renamed template into {!r}."
+msgstr "Vorlage erfolgreich nach {!r} umbenannt."
+
+#: lib/cr_vmware_tpl/handler.py:832
+msgid "Renaming VM {o!r} => {n!r} ..."
+msgstr "Umbenennen der VM {o!r} => {n!r} …"
+
+#: lib/cr_vmware_tpl/handler.py:838
+msgid "Successful renamed VM into {!r}."
+msgstr "VM erfolgreich nach {!r} umbenannt."
+
+#: lib/cr_vmware_tpl/handler.py:840
+msgid "Changing VM {!r} into a VMWare template ..."
+msgstr "Wandle VM {!r} in eine VMWare-Vorlage um …"
+
+#: lib/cr_vmware_tpl/handler.py:842
+msgid "Object {!r} is now a VMWare template."
+msgstr "Das Objekt {!r} ist jeztzt eine VMWare-Vorlage."
+
#: lib/cr_vmware_tpl/xlate.py:54
msgid "Module directory: {!r}"
msgstr "Modul-Verzeichnis: {!r}"
#
msgid ""
msgstr ""
-"Project-Id-Version: create_vm_template 1.0.0\n"
+"Project-Id-Version: create_vm_template 1.1.0\n"
"Report-Msgid-Bugs-To: frank.brehm@pixelpark.com\n"
-"POT-Creation-Date: 2019-02-08 10:47+0100\n"
-"PO-Revision-Date: 2019-02-08 09:56+0100\n"
+"POT-Creation-Date: 2019-02-08 16:09+0100\n"
+"PO-Revision-Date: 2019-02-08 16:10+0100\n"
"Last-Translator: FULL NAME <frank.brehm@pixelpark.com>\n"
"Language: en_US\n"
"Language-Team: en_US <LL@li.org>\n"
msgid "Setting timeout {p!r} to {v:0.1f} seconds."
msgstr ""
+#: lib/cr_vmware_tpl/handler.py:62
+msgid "The temporary VM {!r} is already existing, cannot continue."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:124
+msgid "{}-object not initialized."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:127
+msgid "{w} is not an instance of {c}, but an instance of {i} instead."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:144
+msgid "Got a {n}: {e}"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:151
+msgid "Closing ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:160
+msgid "Starting handling ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:166
+msgid "Found VSphere cluster {!r}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:168
+msgid "Could not find VSphere cluster {!r}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:173
+msgid "Network {n!r} not available in cluster {c!r}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:184
+msgid "Only executing of template rotating."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:190
+msgid "Simulation mode - VM not created in real."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:192
+msgid "Could not find VM after creating."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:200
+msgid "Aborting after creation of template VM."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:201
+msgid "You are responsible yourself to cleaning up the VM!!!"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:221
+msgid "First checking, whether {!r} exists ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:226
+msgid "Temporary VM {n!r} exists, raising {e}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:234
+msgid "Temporary VM {!r} does not exists, will be created."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:245
+msgid "Selecting a SAN based datastore with at least {:0.1f} GiB available space."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:255
+msgid "Cannot use datastore {n!r} - not accessible."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:259
+msgid "Cannot use datastore {n!r}, not in cluster {c!r}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:263
+msgid "Checking datastore:"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:266
+msgid "Cannot use datastore {n!r}, is of type {t!r}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:271
+msgid "Cannot use datastore {n!r}, free space {free:0.1f} GiB is less than {min:0.1f} GiB."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:279
+msgid "Found {} usable datastores."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:281
+msgid "Did not found an usable datastore."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:294
+msgid "Using datastore {!r} for volume of temporary VM to create."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:317
+msgid "VM-Folder object for template VM: {c} - {n!r}"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:329
+msgid "Waiting for finishing installation ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:331
+msgid "Waiting initially for {} seconds:"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:347
+msgid "Waiting for SSH available ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:352
+msgid "Got following address_infos for {h!r}, IPv4 TCP port {p}:"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:357
+msgid "Did not get address infos for {h!r}, IPv4 TCP port {p}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:361
+msgid "Using address info: {}"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:392
+msgid "Trying to connect to {a} via TCP port {p} ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:399
+msgid "Error creating socket: {}"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:408
+msgid "Could not connect: {}"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:414
+msgid "Connected to {a} via TCP port {p}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:419
+msgid "Got SSHD banner: {}"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:430
+msgid "Needed {m} minutes and {s:0.1f} seconds."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:435
+msgid "SSH not available after {:0.1f} seconds, giving up."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:440
+msgid "Trying to get possible post-installation errors ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:451 lib/cr_vmware_tpl/handler.py:548 lib/cr_vmware_tpl/handler.py:650
+msgid "Initializing {} ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:453 lib/cr_vmware_tpl/handler.py:550 lib/cr_vmware_tpl/handler.py:652
+msgid "Loading SSH system host keys."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:455 lib/cr_vmware_tpl/handler.py:552 lib/cr_vmware_tpl/handler.py:654
+msgid "Setting SSH missing host key policy to {}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:458 lib/cr_vmware_tpl/handler.py:555 lib/cr_vmware_tpl/handler.py:657
+msgid "Connecting to {h!r}, port {p} as {u!r} per SSH ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:464
+msgid "Trying to read {!r} ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:466 lib/cr_vmware_tpl/handler.py:563 lib/cr_vmware_tpl/handler.py:665
+msgid "Commands to execute:"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:474 lib/cr_vmware_tpl/handler.py:568 lib/cr_vmware_tpl/handler.py:569
+#: lib/cr_vmware_tpl/handler.py:670 lib/cr_vmware_tpl/handler.py:671
+msgid "Output on {}:"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:478
+msgid "Got postinstall errors:"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:480
+msgid "No postinstall errors found."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:485 lib/cr_vmware_tpl/handler.py:574 lib/cr_vmware_tpl/handler.py:676
+msgid "Closing SSH connection."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:489
+msgid "Template VM {!r} has to be removed."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:494
+msgid "Executing tasks per SSH after installation ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:561
+msgid "Executing postinstall tasks ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:582
+msgid "Waiting for {} seconds before shutting down:"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:603
+msgid "Last actions before powering off VM {!r} ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:636 lib/cr_vmware_tpl/handler.py:689
+msgid "Current state of template VM is {!r}"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:638
+msgid "Template VM is already shut off."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:643
+msgid "Cannot shut down VM {h!r}, is currently in state {s!r}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:646
+msgid "Powering off VM {!r} per SSH ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:663
+msgid "Executing {} ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:685
+msgid "Waiting for successful shut down of VM ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:713
+msgid "Still waiting for completing shutdown, current state is {!r}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:718
+msgid "Template VM {h!r} was shutting down in {t:0.1f} seconds."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:726
+msgid "VM {h!r} was not shut down after {t:0.1f} seconds, current state is {s!r}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:733
+msgid "Setting a new, randomized MAC address for template VM ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:738
+msgid "New MAC address: {!r}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:746
+msgid "Searching for existing templates and rotate them ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:754
+msgid "Did not found any existing templates."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:777
+msgid "Found template {n!r}, created: {ts}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:788
+msgid "Templates sorted by creation date:"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:798
+msgid "Templates to remove:"
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:800
+msgid "There are no templates to remove."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:805
+msgid "Removing template {!r} ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:807
+msgid "Successful removed template {!r}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:821
+msgid "Renaming template {o!r} => {n!r} ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:824
+msgid "Successful renamed template into {!r}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:832
+msgid "Renaming VM {o!r} => {n!r} ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:838
+msgid "Successful renamed VM into {!r}."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:840
+msgid "Changing VM {!r} into a VMWare template ..."
+msgstr ""
+
+#: lib/cr_vmware_tpl/handler.py:842
+msgid "Object {!r} is now a VMWare template."
+msgstr ""
+
#: lib/cr_vmware_tpl/xlate.py:54
msgid "Module directory: {!r}"
msgstr ""