From 471a49326ee8755bf2440962a36a30f4df619a17 Mon Sep 17 00:00:00 2001 From: Endi Sukma Dewata Date: Wed, 28 Nov 2012 13:12:24 -0500 Subject: Simplified the configuration file using defaults. Previously to create a subsystem the admin would have to copy the entire default deployment configuration, which contains many parameters, and then customize it. Now the deployment code has been changed such that the default config file will be used to provide the default values, so the admin will only need to provide the non-default parameters, thus reducing the size of the file. Sample configuration files are provided in /usr/share/pki/ deployment/config. Ticket #399 --- base/deploy/src/scriptlets/pkiparser.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'base/deploy/src/scriptlets/pkiparser.py') diff --git a/base/deploy/src/scriptlets/pkiparser.py b/base/deploy/src/scriptlets/pkiparser.py index 438b23bd7..d05870e04 100644 --- a/base/deploy/src/scriptlets/pkiparser.py +++ b/base/deploy/src/scriptlets/pkiparser.py @@ -178,7 +178,7 @@ class PKIConfigParser: deployed_pki_subsystem_path + "/" +\ "registry" + "/" +\ config.pki_subsystem.lower() + "/" +\ - config.PKI_DEPLOYMENT_DEFAULT_CONFIGURATION_FILE + config.PKI_DEPLOYMENT_CONFIGURATION_FILE # always verify that configuration file exists if not os.path.exists(config.pkideployment_cfg) or\ not os.path.isfile(config.pkideployment_cfg): @@ -222,7 +222,9 @@ class PKIConfigParser: self.pki_config = ConfigParser.ConfigParser() # Make keys case-sensitive! self.pki_config.optionxform = str - self.pki_config.read(config.pkideployment_cfg) + self.pki_config.read([ + config.PKI_DEPLOYMENT_DEFAULT_CONFIGURATION_FILE, + config.pkideployment_cfg]) config.pki_default_dict = self.pki_config.defaults() pkilogging.sensitive_parameters = config.pki_default_dict['sensitive_parameters'].split() config.pki_common_dict = dict(self.pki_config._sections['Common']) @@ -2309,11 +2311,11 @@ class PKIConfigParser: # Finalization name/value pairs config.pki_master_dict['pki_deployment_cfg_replica'] =\ os.path.join(config.pki_master_dict['pki_subsystem_registry_path'], - config.PKI_DEPLOYMENT_DEFAULT_CONFIGURATION_FILE) + config.PKI_DEPLOYMENT_CONFIGURATION_FILE) config.pki_master_dict['pki_deployment_cfg_spawn_archive'] =\ config.pki_master_dict['pki_subsystem_archive_log_path'] + "/" +\ "spawn" + "_" +\ - config.PKI_DEPLOYMENT_DEFAULT_CONFIGURATION_FILE + "." +\ + config.PKI_DEPLOYMENT_CONFIGURATION_FILE + "." +\ config.pki_master_dict['pki_timestamp'] config.pki_master_dict['pki_deployment_cfg_respawn_archive'] =\ config.pki_master_dict['pki_subsystem_archive_log_path'] + "/" +\ -- cgit