From 31c8582f3951137c361af5a5346eeab79e99cfc9 Mon Sep 17 00:00:00 2001 From: "ChangBo Guo(gcb)" Date: Thu, 23 Jun 2016 07:37:32 +0800 Subject: [PATCH] Config: no need to set default=None By default oslo.cfg sets the default value as None. There is no need to explicitly do this. TrivialFix Change-Id: Icba893180617ab03e42b477706ce089cc5c5b5d1 --- keystonemiddleware/audit.py | 3 --- keystonemiddleware/auth_token/_auth.py | 1 - keystonemiddleware/auth_token/_opts.py | 9 ++------- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/keystonemiddleware/audit.py b/keystonemiddleware/audit.py index 7f636f72..fd6f9da2 100644 --- a/keystonemiddleware/audit.py +++ b/keystonemiddleware/audit.py @@ -61,18 +61,15 @@ AUDIT_MIDDLEWARE_GROUP = 'audit_middleware_notifications' _AUDIT_OPTS = [ cfg.StrOpt('driver', - default=None, help='The Driver to handle sending notifications. Possible ' 'values are messaging, messagingv2, routing, log, test, ' 'noop. If not specified, then value from ' 'oslo_messaging_notifications conf section is used.'), cfg.ListOpt('topics', - default=None, help='List of AMQP topics used for OpenStack notifications. If' ' not specified, then value from ' ' oslo_messaging_notifications conf section is used.'), cfg.StrOpt('transport_url', - default=None, secret=True, help='A URL representing messaging driver to use for ' 'notification. If not specified, we fall back to the same ' diff --git a/keystonemiddleware/auth_token/_auth.py b/keystonemiddleware/auth_token/_auth.py index f8317c45..95ae31ce 100644 --- a/keystonemiddleware/auth_token/_auth.py +++ b/keystonemiddleware/auth_token/_auth.py @@ -163,7 +163,6 @@ OPTS = [ help='Protocol of the admin Identity API endpoint. ' 'Deprecated, use identity_uri.'), cfg.StrOpt('identity_uri', - default=None, help='Complete admin Identity API endpoint. This ' 'should specify the unversioned root endpoint ' 'e.g. https://localhost:35357/'), diff --git a/keystonemiddleware/auth_token/_opts.py b/keystonemiddleware/auth_token/_opts.py index 52372eb7..bf7e5576 100644 --- a/keystonemiddleware/auth_token/_opts.py +++ b/keystonemiddleware/auth_token/_opts.py @@ -29,7 +29,6 @@ from keystonemiddleware.auth_token import _base _OPTS = [ cfg.StrOpt('auth_uri', - default=None, # FIXME(dolph): should be default='http://127.0.0.1:5000/v2.0/', # or (depending on client support) an unversioned, publicly # accessible identity endpoint (see bug 1207517). Further, we @@ -49,7 +48,6 @@ _OPTS = [ ' for validating tokens, because normal end users may not be ' ' able to reach that endpoint.'), cfg.StrOpt('auth_version', - default=None, help='API version of the admin Identity API endpoint.'), cfg.BoolOpt('delay_auth_decision', default=False, @@ -57,7 +55,6 @@ _OPTS = [ ' middleware, but delegate the authorization decision to' ' downstream WSGI components.'), cfg.IntOpt('http_connect_timeout', - default=None, help='Request timeout value for communicating with Identity' ' API server.'), cfg.IntOpt('http_request_max_retries', @@ -65,17 +62,16 @@ _OPTS = [ help='How many times are we trying to reconnect when' ' communicating with Identity API Server.'), cfg.StrOpt('cache', - default=None, help='Env key for the swift cache.'), cfg.StrOpt('certfile', help='Required if identity server requires client certificate'), cfg.StrOpt('keyfile', help='Required if identity server requires client certificate'), - cfg.StrOpt('cafile', default=None, + cfg.StrOpt('cafile', help='A PEM encoded Certificate Authority to use when ' 'verifying HTTPs connections. Defaults to system CAs.'), cfg.BoolOpt('insecure', default=False, help='Verify HTTPS connections.'), - cfg.StrOpt('region_name', default=None, + cfg.StrOpt('region_name', help='The region in which the identity server can be found.'), cfg.StrOpt('signing_dir', help='Directory used to cache files related to PKI tokens.'), @@ -108,7 +104,6 @@ _OPTS = [ ' cache. If the value is not one of these options or empty,' ' auth_token will raise an exception on initialization.'), cfg.StrOpt('memcache_secret_key', - default=None, secret=True, help='(Optional, mandatory if memcache_security_strategy is' ' defined) This string is used for key derivation.'),