Improve docs around configuring Castellan

It wasn't clear to me as a newcomer how to init a CONF object with my
own config file. Make the docs more clear around this. Also the
context=None arg to credential_factory is not needed.

Change-Id: Id633718fd19e0fe9b1627b64a2f50d751eeb93a2
This commit is contained in:
Paul Bourke 2017-07-13 17:39:43 +01:00 committed by Paul Bourke (pbourke)
parent 54b1b52533
commit 100f9ab1b3
1 changed files with 3 additions and 2 deletions

View File

@ -64,8 +64,9 @@ generate the appropriate context.
from castellan.common import utils
CONF = <your_configuration>
context = utils.credential_factory(conf=CONF, context=None)
CONF = cfg.CONF
CONF(default_config_files=['~/castellan.conf'])
context = utils.credential_factory(conf=CONF)
Now you can go ahead and pass the context and use it for authentication.