Improved configuration options for castellan consumers

Registered by Michael McCune

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.key_manager.API function
* 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.key_manager
* 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.key_manager.API) instead of the current behavior of simply importing the package. Listing the options in this manner would be needed by applications that wish to create a configuration file which includes the castellan options, for example.

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

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.