#226 Dogtag 10: Modularize 'compose_pki_master_dictionary' function in 'pkiparser.py'
Closed: Fixed None Opened 11 years ago by mharmsen.

The 'compose_pki_master_dictionary()' function in its current state is quite large. Logically divide this into callable subfunctions for maintenance purposes.


The current code contains a bunch of conditionals that basically does a rather basic operation -- which is to populate the master dict entries with either a user defined or default value.

One way to do this is to create a dict which contains all the relevant default values (in the right order, so that those values which depend on previous keys are defined). You could then call something like (in pseudocode)

populate_master_dict(user_defined_dict, defaults_dict):
foreach key in defaults_dict:
master_dict[key].value = user_defined[key].value or defaults_dict[key].value

For validations, you could also specify in the defaults dict whether something is required or whether it has the wrong format, and then spit out a message that has been genericised accordingly - rather than having messages for individual components.

this has been completed with the interpolation code.

Metadata Update from @mharmsen:
- Issue assigned to mharmsen
- Issue set to the milestone: 10.1 - 08/13 (August)

7 years ago

Dogtag PKI is moving from Pagure issues to GitHub issues. This means that existing or new
issues will be reported and tracked through Dogtag PKI's GitHub Issue tracker.

This issue has been cloned to GitHub and is available here:
https://github.com/dogtagpki/pki/issues/797

If you want to receive further updates on the issue, please navigate to the
GitHub issue and click on Subscribe button.

Thank you for understanding, and we apologize for any inconvenience.

Login to comment on this ticket.

Metadata