diff --git a/doc/source/usage.rst b/doc/source/usage.rst index 979a40a..ca43855 100644 --- a/doc/source/usage.rst +++ b/doc/source/usage.rst @@ -270,14 +270,14 @@ Castellan does not parse the configuration files by default. When you create the files and occupy them, you still need to manipulate the -``oslo_config.cfg.ConfigOpts`` object before passing it to the +``oslo_config.cfg`` object before passing it to the ``castellan.key_manager.API`` object. You can create a list of locations where the configuration files reside. If multiple configuration files are specified, the variables will be used from the most recently parsed file and overwrite any previous variables. In the example below, the configuration file in the ``/etc/castellan`` directory will overwrite the values found in the file in the user's home directory. If a file is not found in one of the -specified locations, then a file not found error will occur. +specified locations, then a config file not found error will occur. **Example. Parsing the config files.** @@ -286,8 +286,9 @@ from oslo_config import cfg from castellan import key_manager - conf = cfg.ConfigOpts() - conf(['~/castellan.conf', '/etc/castellan/castellan.conf']) + conf=cfg.CONF + config_files = ['~/castellan.conf', '/etc/castellan/castellan.conf'] + conf(default_config_files=config_files) manager = key_manager.API(configuration=conf) There are two options for parsing the Castellan values from a