Use StrOpt's parameter choices to restritct option auth_strategy

oslo.config provides value check for StrOpt with parameter choices.
And we use option auth_strategy directly without any check like:
 limit_name = CONF.auth_strategy + '_nolimit'
So we'd better restrict its value in keystone and noauth2.

Change-Id: I782c493d43fcdd27c3d6660cbb2800c90fbbd980
This commit is contained in:
ChangBo Guo(gcb)
2015-07-11 17:54:21 +08:00
committed by ChangBo Guo(gcb)
parent b0013d93ff
commit 61b1088bf6

View File

@@ -36,6 +36,7 @@ auth_opts = [
'is removed from v2.1 api.'),
cfg.StrOpt('auth_strategy',
default='keystone',
choices=('keystone', 'noauth2'),
help='''
The strategy to use for auth: keystone or noauth2. noauth2 is designed for
testing only, as it does no actual credential checking. noauth2 provides