From 02144d04dd44b6eab33af900dd6a1ded336c6c80 Mon Sep 17 00:00:00 2001 From: Jiong Liu Date: Tue, 27 Sep 2016 21:52:53 +0800 Subject: [PATCH] Remove default=None when set value in Config By default oslo.cfg sets the default values as None [1], there is no need to explicitly do this. [1] https://github.com/openstack/oslo.config/blob/master/oslo_config/cfg.py#L829 Change-Id: I97c70439c76fd17712f79371dd0ebc0ab12caabf Closes-bug: #1323975 --- castellan/common/utils.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/castellan/common/utils.py b/castellan/common/utils.py index 5a7d87ab..7340ea48 100644 --- a/castellan/common/utils.py +++ b/castellan/common/utils.py @@ -31,55 +31,55 @@ LOG = logging.getLogger(__name__) credential_opts = [ # auth_type opt - cfg.StrOpt('auth_type', default=None, + cfg.StrOpt('auth_type', help="The type of authentication credential to create. " "Possible values are 'token', 'password', 'keystone_token', " "and 'keystone_password'. Required if no context is passed to " "the credential factory."), # token opt - cfg.StrOpt('token', default=None, secret=True, + cfg.StrOpt('token', secret=True, help="Token for authentication. Required for 'token' and " "'keystone_token' auth_type if no context is passed to the " "credential factory."), # password opts - cfg.StrOpt('username', default=None, + cfg.StrOpt('username', help="Username for authentication. Required for 'password' " "auth_type. Optional for the 'keystone_password' auth_type."), - cfg.StrOpt('password', default=None, secret=True, + cfg.StrOpt('password', secret=True, help="Password for authentication. Required for 'password' and " "'keystone_password' auth_type."), # keystone credential opts - cfg.StrOpt('user_id', default=None, + cfg.StrOpt('user_id', help="User ID for authentication. Optional for " "'keystone_token' and 'keystone_password' auth_type."), - cfg.StrOpt('user_domain_id', default=None, + cfg.StrOpt('user_domain_id', help="User's domain ID for authentication. Optional for " "'keystone_token' and 'keystone_password' auth_type."), - cfg.StrOpt('user_domain_name', default=None, + cfg.StrOpt('user_domain_name', help="User's domain name for authentication. Optional for " "'keystone_token' and 'keystone_password' auth_type."), - cfg.StrOpt('trust_id', default=None, + cfg.StrOpt('trust_id', help="Trust ID for trust scoping. Optional for " "'keystone_token' and 'keystone_password' auth_type."), - cfg.StrOpt('domain_id', default=None, + cfg.StrOpt('domain_id', help="Domain ID for domain scoping. Optional for " "'keystone_token' and 'keystone_password' auth_type."), - cfg.StrOpt('domain_name', default=None, + cfg.StrOpt('domain_name', help="Domain name for domain scoping. Optional for " "'keystone_token' and 'keystone_password' auth_type."), - cfg.StrOpt('project_id', default=None, + cfg.StrOpt('project_id', help="Project ID for project scoping. Optional for " "'keystone_token' and 'keystone_password' auth_type."), - cfg.StrOpt('project_name', default=None, + cfg.StrOpt('project_name', help="Project name for project scoping. Optional for " "'keystone_token' and 'keystone_password' auth_type."), - cfg.StrOpt('project_domain_id', default=None, + cfg.StrOpt('project_domain_id', help="Project's domain ID for project. Optional for " "'keystone_token' and 'keystone_password' auth_type."), - cfg.StrOpt('project_domain_name', default=None, + cfg.StrOpt('project_domain_name', help="Project's domain name for project. Optional for " "'keystone_token' and 'keystone_password' auth_type."), cfg.BoolOpt('reauthenticate', default=True,