From: Frank Brehm Date: Wed, 24 Oct 2018 09:12:56 +0000 (+0200) Subject: Changing method CrTplConfiguration.as_dict() X-Git-Tag: 0.3.2^2~36 X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=38158c3ec12e0f8e6a03b59aa8084f8d7e4b3a84;p=pixelpark%2Fcreate-vmware-tpl.git Changing method CrTplConfiguration.as_dict() --- diff --git a/lib/cr_vmware_tpl/config.py b/lib/cr_vmware_tpl/config.py index 5c45de7..1e688a6 100644 --- a/lib/cr_vmware_tpl/config.py +++ b/lib/cr_vmware_tpl/config.py @@ -19,7 +19,7 @@ import six # Own modules from fb_tools.config import ConfigError, BaseConfiguration -__version__ = '0.6.2' +__version__ = '0.6.3' LOG = logging.getLogger(__name__) @@ -88,10 +88,6 @@ class CrTplConfiguration(BaseConfiguration): encoding=encoding, config_dir=config_dir, config_file=config_file, initialized=False, ) - # Workaround, bis das Lesen der Config implementiert ist - self.vsphere_host = 'test-vcsa01.pixelpark.net' - self.vsphere_user = 'Administrator@vsphere.local' - if initialized: self.initialized = True @@ -132,30 +128,18 @@ class CrTplConfiguration(BaseConfiguration): """ res = super(CrTplConfiguration, self).as_dict(short=short) - res['default_vsphere_host'] = self.default_vsphere_host - res['default_vsphere_port'] = self.default_vsphere_port - res['default_vsphere_user'] = self.default_vsphere_user - res['default_vsphere_cluster'] = self.default_vsphere_cluster - res['default_dc'] = self.default_dc - res['default_folder'] = self.default_folder - res['default_template_vm'] = self.default_template_vm - res['default_template_name'] = self.default_template_name - res['default_data_size_gb'] = self.default_data_size_gb - res['default_num_cpus'] = self.default_num_cpus - res['default_ram_mb'] = self.default_ram_mb - res['default_network'] = self.default_network - res['default_mac_address'] = self.default_mac_address - res['default_max_wait_for_finish_install'] = self.default_max_wait_for_finish_install - res['default_max_nr_templates_stay'] = self.default_max_nr_templates_stay - res['limit_max_nr_templates_stay'] = self.limit_max_nr_templates_stay - res['min_max_wait_for_finish_install'] = self.min_max_wait_for_finish_install - res['max_max_wait_for_finish_install'] = self.max_max_wait_for_finish_install - res['mac_address_template'] = self.mac_address_template res['data_size_mb'] = self.data_size_mb res['data_size_kb'] = self.data_size_kb res['data_size'] = self.data_size res['ram_gb'] = self.ram_gb + res['password'] = None + if self.password: + if self.verbose > 4: + res['password'] = self.password + else: + res['password'] = '*******' + return res # -------------------------------------------------------------------------