Improved configuration options for castellan consumers
Currently castellan uses the oslo.config global CONF object to store its configuration options. This presents an issue to developers wishing to consume castellan as they must work around the global configuration inclusion if they wish to change default options, or if they wish to create a sample configuration file that includes the castellan options.
This blueprint proposes moving away from the global CONF object in favor of a developer supplied ConfigOpts object. By changing to allow a supplied configuration object, castellan can be made more friendly to developers who might wish to to change the default configuration assumptions, add configuration options, or include the default configuration options in their applications. This style of configuration can be seen in the oslo.db and oslo.messaging packages.
The changes proposed by this blueprint are as follow:
* adding a configuration argument to the castellan.
* adding a castellan.config package that will contain a function to list the options available
* adding a function to set the default values in castellan.
* adding documentation
* adding testing
Backward compatibility will be retained by allowing the user to not specify a configuration object which will default to the global CONF object. In these cases though, the configuration options will need to be gathered by the use of the listing function or through instantiation of the specified object (i.e. castellan.
Blueprint information
- Status:
- Complete
- Approver:
- Douglas Mendizábal
- Priority:
- Medium
- Drafter:
- Michael McCune
- Direction:
- Approved
- Assignee:
- Michael McCune
- Definition:
- Approved
- Series goal:
- None
- Implementation:
- Implemented
- Milestone target:
- None
- Started by
- Douglas Mendizábal
- Completed by
- Michael McCune
Related branches
Related bugs
Sprints
Whiteboard
Gerrit topic: https:/
Addressed by: https:/
refactoring castellan configuration