]> Frank Brehm's Git Trees - pixelpark/create-vmware-tpl.git/commitdiff
Changing method CrTplConfiguration.as_dict()
authorFrank Brehm <frank.brehm@pixelpark.com>
Wed, 24 Oct 2018 09:12:56 +0000 (11:12 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Wed, 24 Oct 2018 09:12:56 +0000 (11:12 +0200)
lib/cr_vmware_tpl/config.py

index 5c45de7e62e03ba44ea2f7d592f21e77f14551ed..1e688a681010f548e4b22b4915dc9e7f402d0f1f 100644 (file)
@@ -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
 
     # -------------------------------------------------------------------------