From 100f9ab1b35703ca1d587dd1306e68ffe1118171 Mon Sep 17 00:00:00 2001 From: Paul Bourke Date: Thu, 13 Jul 2017 17:39:43 +0100 Subject: [PATCH] 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 --- doc/source/user/index.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/source/user/index.rst b/doc/source/user/index.rst index 3ebccf5..71a3152 100644 --- a/doc/source/user/index.rst +++ b/doc/source/user/index.rst @@ -64,8 +64,9 @@ generate the appropriate context. from castellan.common import utils - CONF = - 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.