from .xlate import __mo_file__ as __xlate_mo_file__
from .xlate import XLATOR, LOCALE_DIR, DOMAIN
-__version__ = '1.0.6'
+__version__ = '1.1.0'
LOG = logging.getLogger(__name__)
SIGNAL_NAMES = {
self.perform_arg_parser_rest()
- if not self.config.vsphere_password:
- self.config.vsphere_password = self.get_secret(
- prompt=_('Password for vSphere host {h!r} and user {u!r}').format(
- h=self.config.vsphere_host, u=self.config.vsphere_user),
- item_name=_('vSphere password'))
-
if not self.config.pdns_api_key:
url = 'http'
if self.config.pdns_api_use_https:
default_cfg_file = self.base_dir.joinpath('etc').joinpath(self.appname + '.ini')
default_cfg_file_rel = Path(os.path.relpath(str(default_cfg_file), str(cur_dir)))
- tf_dir = Path(CrTfConfiguration.default_terraform_dir)
- if not tf_dir.is_absolute():
- tf_dir = self.base_dir.joinpath(tf_dir).resolve()
- tf_dir_rel = Path(os.path.relpath(str(tf_dir), str(cur_dir)))
-
- self.arg_parser.add_argument(
- '-D', '--dir', '--directory', '--terraform_directory',
- metavar=_("DIR"), dest="terraform_dir",
- help=_(
- "The directory, where the terraform project directories should be created. "
- "Default: {!r}").format(str(tf_dir_rel))
- )
-
steps = list(CreateTerraformHandler.steps[:]) + ['?']
self.arg_parser.add_argument(
help=_("Configuration file (default: {!r})").format(str(default_cfg_file_rel))
)
- # vSphere options
- vmware_group = self.arg_parser.add_argument_group(_('vSphere options'))
-
- vmware_group.add_argument(
- '-H', '--host', dest='vsphere_host', metavar=_("HOST"),
- help=_("Remote vSphere host to connect to (Default: {!r}).").format(
- CrTfConfiguration.default_vsphere_host)
- )
-
- vmware_group.add_argument(
- '-p', '--port', dest='vsphere_port', type=int, metavar=_("PORT"),
- help=_("Port on vSphere host to connect on (Default: {}).").format(
- CrTfConfiguration.default_vsphere_port)
- )
-
- vmware_group.add_argument(
- '-U', '--user', dest='vsphere_user', metavar=_("USER"),
- help=_("User name to use when connecting to vSphere host (Default: {!r}).").format(
- CrTfConfiguration.default_vsphere_user)
- )
-
- vmware_group.add_argument(
- '-P', '--password', dest='vsphere_password', metavar=_("PASSWORD"),
- help=_("Password to use when connecting to vSphere host."),
- )
-
# PowerDNS options
pdns_group = self.arg_parser.add_argument_group(_('PowerDNS options'))
the command line parameters.
"""
- self.perform_arg_parser_vmware()
self.perform_arg_parser_pdns()
self.yaml_file = Path(self.args.yaml_file[0])
if not self.yaml_file.is_absolute():
self.yaml_file = self.yaml_file.resolve()
- # -------------------------------------------------------------------------
- def perform_arg_parser_vmware(self):
-
- if self.args.vsphere_host:
- self.config.vsphere_host = self.args.vsphere_host
- if self.args.vsphere_port:
- self.config.vsphere_port = self.args.vsphere_port
- if self.args.vsphere_user:
- self.config.vsphere_user = self.args.vsphere_user
- if self.args.vsphere_password:
- self.config.password = self.args.vsphere_password
-
# -------------------------------------------------------------------------
def perform_arg_parser_pdns(self):