from .xlate import __mo_file__ as __xlate_mo_file__
from .xlate import XLATOR, LOCALE_DIR, DOMAIN
-__version__ = '1.4.1'
+__version__ = '1.5.0'
LOG = logging.getLogger(__name__)
SIGNAL_NAMES = {
if not self.handler:
raise TerraformHandlerError(_("No handler object available."))
- need_nl = False
-
- if not self.handler.vsphere_user:
-
- need_nl = True
- msg = '\n' + _("Please input the {}.").format(self.colored(
- _('vSphere user name'), 'AQUA'))
- print(msg)
- self.handler.vsphere_user = input(self.colored(_('Name'), 'AQUA') + ': ')
- if not self.handler.vsphere_user:
- msg = _("No {} given.").format(_('vSphere user name'))
- raise ExpectedHandlerError(msg)
-
- for vsphere_name in self.handler.vsphere.keys():
- LOG.debug(_("Setting user for vSphere {vs!r} to {usr!r}.").format(
- vs=vsphere_name, usr=self.handler.vsphere_user))
- # Dirty, but else a change of fb_tools would be necessary (later)
- self.handler.vsphere[vsphere_name]._user = self.handler.vsphere_user
- print('')
- need_nl = False
-
- if not self.handler.vsphere_password:
-
- # Get the name of the first (and hopefully only) VSphere
- vsphere_name = None
- for vn in self.handler.vsphere.keys():
- vsphere_name = vn
- break
-
- if need_nl:
- print('')
- prompt = self.colored(_("User password of {!r}").format(
- self.handler.vsphere_user), 'AQUA')
- item = _('Password for user {u!r} of vSphere {n} on {h!r}').format(
- u=self.handler.vsphere_user, n=vsphere_name,
- h=self.config.vsphere[vsphere_name].host)
- item = self.colored(item, 'AQUA')
- self.handler.vsphere_password = self.get_secret(prompt=prompt, item_name=item)
- if not self.handler.vsphere_password:
- msg = _("No {} given.").format(_('password of vSphere user'))
- raise ExpectedHandlerError(msg)
-
- for vsphere_name in self.handler.vsphere.keys():
- LOG.debug(_("Setting passwort of vSphere {vs!r} user {usr!r}.").format(
- vs=vsphere_name, usr=self.handler.vsphere_user))
- # Dirty, but else a change of fb_tools would be necessary (later)
- self.handler.vsphere[vsphere_name]._password = self.handler.vsphere_password
- print('')
- need_nl = False
-
- if need_nl:
- print('')
+ return
# -------------------------------------------------------------------------
def post_run(self):
from fb_tools.handler import BaseHandler
# Own modules
+from ..errors import ConsulApiNotFoundError
from .dns import CrTfHandlerDnsMixin
-from .errors import ConsulApiNotFoundError
from .files import CrTfHandlerFilesMixin
from .first import CrTfHandlerFirstMixin
from .read import CrTfHandlerReadMixin
from ..xlate import XLATOR
-__version__ = '4.3.1'
+__version__ = '4.3.2'
LOG = logging.getLogger(__name__)
_ = XLATOR.gettext
self.vsphere_vm_cache = {}
- self.vsphere_user = None
- self.vsphere_password = None
-
self.used_networks = {}
self.used_dc_clusters = {}
self.used_datastores = {}
from ..xlate import XLATOR
-__version__ = '1.0.1'
+__version__ = '1.1.0'
LOG = logging.getLogger(__name__)
_ = XLATOR.gettext
msg = _("VSPhere {!r} not defined in configuration.").format(vsphere_name)
raise ExpectedHandlerError(msg)
- if not self.vsphere_user and self.config.vsphere[vsphere_name].user:
- LOG.debug(_("Setting {st} to {what!r}.").format(
- st='handler.vsphere_user', what=self.config.vsphere[vsphere_name].user))
- self.vsphere_user = self.config.vsphere[vsphere_name].user
- if not self.vsphere_password and self.config.vsphere[vsphere_name].password:
- LOG.debug(_("Setting {}.").format('handler.vsphere_password'))
- self.vsphere_password = self.config.vsphere[vsphere_name].password
-
try:
params = {
'appname': self.appname,
connect_info = VSPhereConfigInfo(
appname=self.appname, verbose=self.verbose, base_dir=self.base_dir,
- host=vs_host, port=vs_port, dc=vs_dc, user=self.vsphere_user,
- password=self.vsphere_password, initialized=True)
+ host=vs_host, port=vs_port, dc=vs_dc, user=self.config.vsphere[vsphere_name].user,
+ configured_password=self.config.vsphere[vsphere_name].password, initialized=True)
params['connect_info'] = connect_info
show_params['connect_info'] = connect_info.as_dict()
LOG.debug(msg)
vsphere = VsphereConnection(**params)
+ vsphere._check_credentials()
self.vsphere[vsphere_name] = vsphere
except VSphereExpectedError as e:
#: lib/create_terraform/app.py:292
msgid "Removing allowed puppet environments ..."
-msgstr "Ungültige Puppet-Umgebung {!r}."
+msgstr "Entferne erlaubte Puppet-Umgebungen …"
#: lib/create_terraform/app.py:296
msgid "Removing puppet environment {!r} ..."
-msgstr "Setze Puppet Umgebung auf {!r}."
+msgstr "Entferne Puppet Umgebung {!r} …"
#: lib/create_terraform/app.py:300
msgid "Adding allowed puppet environments ..."
-msgstr "Ungültige Puppet-Umgebung {!r}."
+msgstr "Füge erlaubte Puppet-Umgebungen hinzu …"
#: lib/create_terraform/app.py:304
msgid "Adding puppet environment {!r} ..."
-msgstr "Ungültige Puppet-Umgebung {!r}."
+msgstr "Füge Puppet-Umgebung {!r} hinzu …"
#: lib/create_terraform/app.py:309
msgid "Allowed puppet environments:"
-msgstr "Ungültige Puppet-Umgebung {!r}."
+msgstr "Erlaubte Puppet-Umgebungen:"
#: lib/create_terraform/app.py:321
msgid "PowerDNS API key for {!r}"