summaryrefslogtreecommitdiffstats
path: root/base/deploy/src/scriptlets/pkiparser.py
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2012-11-28 13:12:24 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2012-11-28 15:33:47 -0500
commitb769780f64968c6b8d1dfec6782f73c18a82692f (patch)
treefa5758623d4c5f051f78662eb40970063cb1b18c /base/deploy/src/scriptlets/pkiparser.py
parent310a30f230eae7fd34d8a41e54ee3125ffb91046 (diff)
downloadpki-b769780f64968c6b8d1dfec6782f73c18a82692f.tar.gz
pki-b769780f64968c6b8d1dfec6782f73c18a82692f.tar.xz
pki-b769780f64968c6b8d1dfec6782f73c18a82692f.zip
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
Diffstat (limited to 'base/deploy/src/scriptlets/pkiparser.py')
-rw-r--r--base/deploy/src/scriptlets/pkiparser.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/base/deploy/src/scriptlets/pkiparser.py b/base/deploy/src/scriptlets/pkiparser.py
index 0d811af6e..6103ce9e5 100644
--- a/base/deploy/src/scriptlets/pkiparser.py
+++ b/base/deploy/src/scriptlets/pkiparser.py
@@ -171,7 +171,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):
@@ -215,7 +215,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'])
@@ -2302,11 +2304,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_manifest'] =\
config.pki_master_dict['pki_subsystem_registry_path'] + "/" +\