From: Nate Potter <nathaniel.potter@intel.com>
Date: Tue, 27 Oct 2015 16:09:40 +0000 (+0000)
Subject: Don't use default=None for config options
X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=db8076be96548cf1aa7cf91931e8284122c50cd0;p=openstack-build%2Fcinder-build.git

Don't use default=None for config options

In the config module default=None is set as the default value,
so it isn't necessary to set it again when doing config options.

Change-Id: I09989ab679d249a9f7dea6af5d53c14dd1726e09
Closes-Bug: #1323975
---

diff --git a/cinder/api/common.py b/cinder/api/common.py
index 793da39aa..0352ddd4a 100644
--- a/cinder/api/common.py
+++ b/cinder/api/common.py
@@ -35,7 +35,6 @@ api_common_opts = [
                help='The maximum number of items that a collection '
                     'resource returns in a single response'),
     cfg.StrOpt('osapi_volume_base_URL',
-               default=None,
                help='Base URL that will be presented to users in links '
                     'to the OpenStack Volume API',
                deprecated_name='osapi_compute_link_prefix'),
diff --git a/cinder/api/views/versions.py b/cinder/api/views/versions.py
index d2471925b..1129f3470 100644
--- a/cinder/api/views/versions.py
+++ b/cinder/api/views/versions.py
@@ -20,7 +20,7 @@ from oslo_config import cfg
 
 
 versions_opts = [
-    cfg.StrOpt('public_endpoint', default=None,
+    cfg.StrOpt('public_endpoint',
                help="Public url to use for versions endpoint. The default "
                     "is None, which will use the request's host_url "
                     "attribute to populate the URL base. If Cinder is "
diff --git a/cinder/backup/drivers/glusterfs.py b/cinder/backup/drivers/glusterfs.py
index 4da838fe6..7e274b505 100644
--- a/cinder/backup/drivers/glusterfs.py
+++ b/cinder/backup/drivers/glusterfs.py
@@ -32,7 +32,6 @@ glusterfsbackup_service_opts = [
                default='$state_path/backup_mount',
                help='Base dir containing mount point for gluster share.'),
     cfg.StrOpt('glusterfs_backup_share',
-               default=None,
                help='GlusterFS share in '
                     '<hostname|ipv4addr|ipv6addr>:<gluster_vol_name> format. '
                     'Eg: 1.2.3.4:backup_vol'),
diff --git a/cinder/backup/drivers/nfs.py b/cinder/backup/drivers/nfs.py
index 3a884b29a..b3d4d3651 100644
--- a/cinder/backup/drivers/nfs.py
+++ b/cinder/backup/drivers/nfs.py
@@ -33,11 +33,9 @@ nfsbackup_service_opts = [
                default='$state_path/backup_mount',
                help='Base dir containing mount point for NFS share.'),
     cfg.StrOpt('backup_share',
-               default=None,
                help='NFS share in hostname:path, ipv4addr:path, '
                     'or "[ipv6addr]:path" format.'),
     cfg.StrOpt('backup_mount_options',
-               default=None,
                help=('Mount options passed to the NFS client. See NFS '
                      'man page for details.')),
 ]
diff --git a/cinder/backup/drivers/swift.py b/cinder/backup/drivers/swift.py
index 1525e791e..eb00133b7 100644
--- a/cinder/backup/drivers/swift.py
+++ b/cinder/backup/drivers/swift.py
@@ -61,10 +61,8 @@ LOG = logging.getLogger(__name__)
 
 swiftbackup_service_opts = [
     cfg.StrOpt('backup_swift_url',
-               default=None,
                help='The URL of the Swift endpoint'),
     cfg.StrOpt('backup_swift_auth_url',
-               default=None,
                help='The URL of the Keystone endpoint'),
     cfg.StrOpt('swift_catalog_info',
                default='object-store:swift:publicURL',
@@ -86,14 +84,11 @@ swiftbackup_service_opts = [
                help='Swift authentication version. Specify "1" for auth 1.0'
                     ', or "2" for auth 2.0'),
     cfg.StrOpt('backup_swift_tenant',
-               default=None,
                help='Swift tenant/account name. Required when connecting'
                     ' to an auth 2.0 system'),
     cfg.StrOpt('backup_swift_user',
-               default=None,
                help='Swift user name'),
     cfg.StrOpt('backup_swift_key',
-               default=None,
                help='Swift key for authentication'),
     cfg.StrOpt('backup_swift_container',
                default='volumebackups',
@@ -119,7 +114,6 @@ swiftbackup_service_opts = [
                      'up the volume to the Swift backend storage. The '
                      'default value is True to enable the timer.'),
     cfg.StrOpt('backup_swift_ca_cert_file',
-               default=None,
                help='Location of the CA certificate file to use for swift '
                     'client requests.'),
     cfg.BoolOpt('backup_swift_auth_insecure',
diff --git a/cinder/cmd/volume_usage_audit.py b/cinder/cmd/volume_usage_audit.py
index b5123e508..23b9a4a1c 100644
--- a/cinder/cmd/volume_usage_audit.py
+++ b/cinder/cmd/volume_usage_audit.py
@@ -55,12 +55,10 @@ import cinder.volume.utils
 CONF = cfg.CONF
 script_opts = [
     cfg.StrOpt('start_time',
-               default=None,
                help="If this option is specified then the start time "
                     "specified is used instead of the start time of the "
                     "last completed audit period."),
     cfg.StrOpt('end_time',
-               default=None,
                help="If this option is specified then the end time "
                     "specified is used instead of the end time of the "
                     "last completed audit period."),
diff --git a/cinder/common/config.py b/cinder/common/config.py
index de45905fa..79033bc03 100644
--- a/cinder/common/config.py
+++ b/cinder/common/config.py
@@ -88,7 +88,6 @@ global_opts = [
                help='Location of ca certificates file to use for glance '
                     'client requests.'),
     cfg.IntOpt('glance_request_timeout',
-               default=None,
                help='http/https timeout value for glance operations. If no '
                     'value (None) is supplied here, the glanceclient default '
                     'value is used.'),
@@ -136,7 +135,6 @@ global_opts = [
                default='nova',
                help='Availability zone of this node'),
     cfg.StrOpt('default_availability_zone',
-               default=None,
                help='Default availability zone for new volumes. If not set, '
                     'the storage_availability_zone option value is used as '
                     'the default for new volumes.'),
@@ -147,7 +145,6 @@ global_opts = [
                      'default_availability_zone, then '
                      'storage_availability_zone, instead of failing.'),
     cfg.StrOpt('default_volume_type',
-               default=None,
                help='Default volume type to use'),
     cfg.StrOpt('volume_usage_audit_period',
                default='month',
@@ -178,7 +175,6 @@ global_opts = [
                choices=['noauth', 'keystone'],
                help='The strategy to use for auth. Supports noauth or keystone.'),
     cfg.ListOpt('enabled_backends',
-                default=None,
                 help='A list of backend names to use. These backend names '
                      'should be backed by a unique [CONFIG] group '
                      'with its options'),
@@ -195,21 +191,17 @@ global_opts = [
                default='cinder.consistencygroup.api.API',
                help='The full class name of the consistencygroup API class'),
     cfg.StrOpt('os_privileged_user_name',
-               default=None,
                help='OpenStack privileged account username. Used for requests '
                     'to other services (such as Nova) that require an account '
                     'with special rights.'),
     cfg.StrOpt('os_privileged_user_password',
-               default=None,
                help='Password associated with the OpenStack privileged '
                     'account.',
                secret=True),
     cfg.StrOpt('os_privileged_user_tenant',
-               default=None,
                help='Tenant name associated with the OpenStack privileged '
                     'account.'),
     cfg.StrOpt('os_privileged_user_auth_url',
-               default=None,
                help='Auth URL associated with the OpenStack privileged '
                     'account.'),
 ]
diff --git a/cinder/compute/nova.py b/cinder/compute/nova.py
index 58a349da5..600e823d5 100644
--- a/cinder/compute/nova.py
+++ b/cinder/compute/nova.py
@@ -39,17 +39,13 @@ nova_opts = [
                default='compute:Compute Service:adminURL',
                help='Same as nova_catalog_info, but for admin endpoint.'),
     cfg.StrOpt('nova_endpoint_template',
-               default=None,
                help='Override service catalog lookup with template for nova '
                     'endpoint e.g. http://localhost:8774/v2/%(project_id)s'),
     cfg.StrOpt('nova_endpoint_admin_template',
-               default=None,
                help='Same as nova_endpoint_template, but for admin endpoint.'),
     cfg.StrOpt('os_region_name',
-               default=None,
                help='Region name of this node'),
     cfg.StrOpt('nova_ca_certificates_file',
-               default=None,
                help='Location of ca certificates file to use for nova client '
                     'requests.'),
     cfg.BoolOpt('nova_api_insecure',
diff --git a/cinder/context.py b/cinder/context.py
index 08274fe76..8c43d9884 100644
--- a/cinder/context.py
+++ b/cinder/context.py
@@ -30,11 +30,9 @@ from cinder import policy
 
 context_opts = [
     cfg.StrOpt('cinder_internal_tenant_project_id',
-               default=None,
                help='ID of the project which will be used as the Cinder '
                     'internal tenant.'),
     cfg.StrOpt('cinder_internal_tenant_user_id',
-               default=None,
                help='ID of the user to be used in volume operations as the '
                     'Cinder internal tenant.'),
 ]
diff --git a/cinder/tests/unit/test_service.py b/cinder/tests/unit/test_service.py
index 5303f8938..fee6b60b8 100644
--- a/cinder/tests/unit/test_service.py
+++ b/cinder/tests/unit/test_service.py
@@ -40,7 +40,6 @@ test_service_opts = [
                default="cinder.tests.unit.test_service.FakeManager",
                help="Manager for testing"),
     cfg.StrOpt("test_service_listen",
-               default=None,
                help="Host to bind test service to"),
     cfg.IntOpt("test_service_listen_port",
                default=0,
diff --git a/cinder/tests/unit/volume/drivers/emc/scaleio/mocks.py b/cinder/tests/unit/volume/drivers/emc/scaleio/mocks.py
index 5b8c630f6..660ff2287 100644
--- a/cinder/tests/unit/volume/drivers/emc/scaleio/mocks.py
+++ b/cinder/tests/unit/volume/drivers/emc/scaleio/mocks.py
@@ -29,7 +29,7 @@ class ScaleIODriver(scaleio.ScaleIODriver):
     def __init__(self, *args, **kwargs):
         configuration = conf.Configuration(
             [
-                cfg.StrOpt('fake', default=None),
+                cfg.StrOpt('fake'),
             ],
             None
         )
diff --git a/cinder/volume/driver.py b/cinder/volume/driver.py
index 1b6f43893..f69f0e8b1 100644
--- a/cinder/volume/driver.py
+++ b/cinder/volume/driver.py
@@ -67,7 +67,6 @@ volume_opts = [
                help='The maximum number of times to rescan targets'
                     ' to find volume'),
     cfg.StrOpt('volume_backend_name',
-               default=None,
                help='The backend name for a given driver implementation'),
     cfg.BoolOpt('use_multipath_for_image_xfer',
                 default=False,
@@ -86,7 +85,6 @@ volume_opts = [
                default=0,
                help='Size in MiB to wipe at start of old volumes. 0 => all'),
     cfg.StrOpt('volume_clear_ionice',
-               default=None,
                help='The flag to pass to ionice to alter the i/o priority '
                     'of the process used to zero a volume after deletion, '
                     'for example "-c3" for idle only priority.'),
@@ -150,11 +148,9 @@ volume_opts = [
                     'with the value "iser". The supported iSCSI protocol '
                     'values are "iscsi" and "iser".'),
     cfg.StrOpt('driver_client_cert_key',
-               default=None,
                help='The path to the client certificate key for verification, '
                     'if the driver supports it.'),
     cfg.StrOpt('driver_client_cert',
-               default=None,
                help='The path to the client certificate for verification, '
                     'if the driver supports it.'),
     cfg.BoolOpt('driver_use_ssl',
@@ -173,7 +169,6 @@ volume_opts = [
                       'capacity. A ratio lower than 1.0 will be ignored and '
                       'the default value will be used instead.'),
     cfg.StrOpt('scst_target_iqn_name',
-               default=None,
                help='Certain ISCSI targets have predefined target names, '
                     'SCST target driver uses this name.'),
     cfg.StrOpt('scst_target_driver',
@@ -195,16 +190,13 @@ volume_opts = [
                deprecated_opts=deprecated_chap_password_opts,
                secret=True),
     cfg.StrOpt('driver_data_namespace',
-               default=None,
                help='Namespace for driver private data values to be '
                     'saved in.'),
     cfg.StrOpt('filter_function',
-               default=None,
                help='String representation for an equation that will be '
                     'used to filter hosts. Only used when the driver '
                     'filter is set to be used by the Cinder scheduler.'),
     cfg.StrOpt('goodness_function',
-               default=None,
                help='String representation for an equation that will be '
                     'used to determine the goodness of a host. Only used '
                     'when using the goodness weigher is set to be used by '
@@ -214,13 +206,11 @@ volume_opts = [
                 help='If set to True the http client will validate the SSL '
                      'certificate of the backend endpoint.'),
     cfg.ListOpt('trace_flags',
-                default=None,
                 help='List of options that control which trace info '
                      'is written to the DEBUG log level to assist '
                      'developers. Valid values are method and api.'),
     cfg.MultiOpt('replication_device',
                  item_type=types.Dict(),
-                 default=None,
                  help="Multi opt of dictionaries to represent a replication "
                       "target device.  This option may be specified multiple "
                       "times in a single config section to specify multiple "
diff --git a/cinder/volume/drivers/blockbridge.py b/cinder/volume/drivers/blockbridge.py
index b0530d0bc..69c817259 100644
--- a/cinder/volume/drivers/blockbridge.py
+++ b/cinder/volume/drivers/blockbridge.py
@@ -36,10 +36,8 @@ LOG = logging.getLogger(__name__)
 
 blockbridge_opts = [
     cfg.StrOpt("blockbridge_api_host",
-               default=None,
                help=_("IP address/hostname of Blockbridge API.")),
     cfg.IntOpt("blockbridge_api_port",
-               default=None,
                help=_("Override HTTPS port to connect to Blockbridge "
                       "API server.")),
     cfg.StrOpt("blockbridge_auth_scheme",
@@ -48,14 +46,11 @@ blockbridge_opts = [
                help=_("Blockbridge API authentication scheme (token "
                       "or password)")),
     cfg.StrOpt("blockbridge_auth_token",
-               default=None,
                help=_("Blockbridge API token (for auth scheme 'token')"),
                secret=True),
     cfg.StrOpt("blockbridge_auth_user",
-               default=None,
                help=_("Blockbridge API user (for auth scheme 'password')")),
     cfg.StrOpt("blockbridge_auth_password",
-               default=None,
                help=_("Blockbridge API password (for auth scheme 'password')"),
                secret=True),
     cfg.DictOpt("blockbridge_pools",
@@ -63,7 +58,6 @@ blockbridge_opts = [
                 help=_("Defines the set of exposed pools and their associated "
                        "backend query strings")),
     cfg.StrOpt("blockbridge_default_pool",
-               default=None,
                help=_("Default pool name if unspecified.")),
 ]
 
diff --git a/cinder/volume/drivers/cloudbyte/options.py b/cinder/volume/drivers/cloudbyte/options.py
index c40cf35a5..7cf08818f 100644
--- a/cinder/volume/drivers/cloudbyte/options.py
+++ b/cinder/volume/drivers/cloudbyte/options.py
@@ -17,15 +17,12 @@ from oslo_config import cfg
 
 cloudbyte_connection_opts = [
     cfg.StrOpt("cb_apikey",
-               default=None,
                help="Driver will use this API key to authenticate "
                     "against the CloudByte storage's management interface."),
     cfg.StrOpt("cb_account_name",
-               default=None,
                help="CloudByte storage specific account name. "
                     "This maps to a project name in OpenStack."),
     cfg.StrOpt("cb_tsm_name",
-               default=None,
                help="This corresponds to the name of "
                     "Tenant Storage Machine (TSM) in CloudByte storage. "
                     "A volume will be created in this TSM."),
@@ -50,7 +47,6 @@ cloudbyte_connection_opts = [
                     "deletion in CloudByte storage by making "
                     "this many number of attempts."),
     cfg.StrOpt("cb_auth_group",
-               default="None",
                help="This corresponds to the discovery authentication "
                     "group in CloudByte storage. "
                     "Chap users are added to this group. "
diff --git a/cinder/volume/drivers/datera.py b/cinder/volume/drivers/datera.py
index d710a6a59..7a567c4e5 100644
--- a/cinder/volume/drivers/datera.py
+++ b/cinder/volume/drivers/datera.py
@@ -35,7 +35,6 @@ LOG = logging.getLogger(__name__)
 
 d_opts = [
     cfg.StrOpt('datera_api_token',
-               default=None,
                help='DEPRECATED: This will be removed in the Liberty release. '
                     'Use san_login and san_password instead. This directly '
                     'sets the Datera API token.'),
diff --git a/cinder/volume/drivers/dothill/dothill_common.py b/cinder/volume/drivers/dothill/dothill_common.py
index 45affb0b2..cfa28019f 100644
--- a/cinder/volume/drivers/dothill/dothill_common.py
+++ b/cinder/volume/drivers/dothill/dothill_common.py
@@ -46,7 +46,6 @@ common_opts = [
                 default=False,
                 help="Whether to verify DotHill array SSL certificate."),
     cfg.StrOpt('dothill_verify_certificate_path',
-               default=None,
                help="DotHill array SSL certificate path."),
 ]
 
diff --git a/cinder/volume/drivers/emc/emc_vnx_cli.py b/cinder/volume/drivers/emc/emc_vnx_cli.py
index 26173ef8c..68060c7ed 100644
--- a/cinder/volume/drivers/emc/emc_vnx_cli.py
+++ b/cinder/volume/drivers/emc/emc_vnx_cli.py
@@ -65,18 +65,15 @@ loc_opts = [
                default='global',
                help='VNX authentication scope type.'),
     cfg.StrOpt('storage_vnx_security_file_dir',
-               default=None,
                help='Directory path that contains the VNX security file. '
                'Make sure the security file is generated first.'),
     cfg.StrOpt('naviseccli_path',
                default='',
                help='Naviseccli Path.'),
     cfg.StrOpt('storage_vnx_pool_names',
-               default=None,
                deprecated_name='storage_vnx_pool_name',
                help='Comma-separated list of storage pool names to be used.'),
     cfg.StrOpt('san_secondary_ip',
-               default=None,
                help='VNX secondary SP IP Address.'),
     cfg.IntOpt('default_timeout',
                default=60 * 24 * 365,
diff --git a/cinder/volume/drivers/emc/scaleio.py b/cinder/volume/drivers/emc/scaleio.py
index b6ac50538..26036dc4d 100644
--- a/cinder/volume/drivers/emc/scaleio.py
+++ b/cinder/volume/drivers/emc/scaleio.py
@@ -49,7 +49,6 @@ scaleio_opts = [
                 default=False,
                 help='Whether to verify server certificate.'),
     cfg.StrOpt('sio_server_certificate_path',
-               default=None,
                help='Server certificate path.'),
     cfg.BoolOpt('sio_round_volume_capacity',
                 default=True,
@@ -61,19 +60,14 @@ scaleio_opts = [
                 default=False,
                 help='Whether to unmap volume before deletion.'),
     cfg.StrOpt('sio_protection_domain_id',
-               default=None,
                help='Protection domain id.'),
     cfg.StrOpt('sio_protection_domain_name',
-               default=None,
                help='Protection domain name.'),
     cfg.StrOpt('sio_storage_pools',
-               default=None,
                help='Storage pools.'),
     cfg.StrOpt('sio_storage_pool_name',
-               default=None,
                help='Storage pool name.'),
     cfg.StrOpt('sio_storage_pool_id',
-               default=None,
                help='Storage pool id.')
 ]
 
diff --git a/cinder/volume/drivers/hitachi/hbsd_common.py b/cinder/volume/drivers/hitachi/hbsd_common.py
index 37ec4bac7..d93a50c22 100644
--- a/cinder/volume/drivers/hitachi/hbsd_common.py
+++ b/cinder/volume/drivers/hitachi/hbsd_common.py
@@ -58,19 +58,14 @@ LOG = logging.getLogger(__name__)
 
 volume_opts = [
     cfg.StrOpt('hitachi_serial_number',
-               default=None,
                help='Serial number of storage system'),
     cfg.StrOpt('hitachi_unit_name',
-               default=None,
                help='Name of an array unit'),
     cfg.IntOpt('hitachi_pool_id',
-               default=None,
                help='Pool ID of storage system'),
     cfg.IntOpt('hitachi_thin_pool_id',
-               default=None,
                help='Thin pool ID of storage system'),
     cfg.StrOpt('hitachi_ldev_range',
-               default=None,
                help='Range of logical device of storage system'),
     cfg.StrOpt('hitachi_default_copy_method',
                default='FULL',
@@ -85,10 +80,8 @@ volume_opts = [
                default=10,
                help='Interval to check copy asynchronously'),
     cfg.StrOpt('hitachi_target_ports',
-               default=None,
                help='Control port names for HostGroup or iSCSI Target'),
     cfg.StrOpt('hitachi_group_range',
-               default=None,
                help='Range of group number'),
     cfg.BoolOpt('hitachi_group_request',
                 default=False,
diff --git a/cinder/volume/drivers/hitachi/hbsd_horcm.py b/cinder/volume/drivers/hitachi/hbsd_horcm.py
index b15e4935c..658582a2c 100644
--- a/cinder/volume/drivers/hitachi/hbsd_horcm.py
+++ b/cinder/volume/drivers/hitachi/hbsd_horcm.py
@@ -104,10 +104,8 @@ volume_opts = [
                default='200,201',
                help='Instance numbers for HORCM'),
     cfg.StrOpt('hitachi_horcm_user',
-               default=None,
                help='Username of storage system for HORCM'),
     cfg.StrOpt('hitachi_horcm_password',
-               default=None,
                help='Password of storage system for HORCM',
                secret=True),
     cfg.BoolOpt('hitachi_horcm_add_conf',
diff --git a/cinder/volume/drivers/hitachi/hbsd_iscsi.py b/cinder/volume/drivers/hitachi/hbsd_iscsi.py
index efb4ed0e7..489252836 100644
--- a/cinder/volume/drivers/hitachi/hbsd_iscsi.py
+++ b/cinder/volume/drivers/hitachi/hbsd_iscsi.py
@@ -39,7 +39,6 @@ volume_opts = [
                 default=False,
                 help='Add CHAP user'),
     cfg.StrOpt('hitachi_auth_method',
-               default=None,
                help='iSCSI authentication method'),
     cfg.StrOpt('hitachi_auth_user',
                default='%sCHAP-user' % basic_lib.NAME_PREFIX,
diff --git a/cinder/volume/drivers/huawei/huawei_driver.py b/cinder/volume/drivers/huawei/huawei_driver.py
index 3e1a1a2e5..0ecbbb5b3 100644
--- a/cinder/volume/drivers/huawei/huawei_driver.py
+++ b/cinder/volume/drivers/huawei/huawei_driver.py
@@ -43,7 +43,6 @@ huawei_opts = [
                default='/etc/cinder/cinder_huawei_conf.xml',
                help='The configuration file for the Cinder Huawei driver.'),
     cfg.StrOpt('hypermetro_devices',
-               default=None,
                help='The remote device hypermetro will use.'),
 ]
 
diff --git a/cinder/volume/drivers/ibm/gpfs.py b/cinder/volume/drivers/ibm/gpfs.py
index 2c0884707..22cac022a 100644
--- a/cinder/volume/drivers/ibm/gpfs.py
+++ b/cinder/volume/drivers/ibm/gpfs.py
@@ -46,15 +46,12 @@ LOG = logging.getLogger(__name__)
 
 gpfs_opts = [
     cfg.StrOpt('gpfs_mount_point_base',
-               default=None,
                help='Specifies the path of the GPFS directory where Block '
                     'Storage volume and snapshot files are stored.'),
     cfg.StrOpt('gpfs_images_dir',
-               default=None,
                help='Specifies the path of the Image service repository in '
                     'GPFS.  Leave undefined if not storing images in GPFS.'),
     cfg.StrOpt('gpfs_images_share_mode',
-               default=None,
                choices=['copy', 'copy_on_write', None],
                help='Specifies the type of image copy to be used.  Set this '
                     'when the Image service repository also uses GPFS so '
diff --git a/cinder/volume/drivers/ibm/storwize_svc/__init__.py b/cinder/volume/drivers/ibm/storwize_svc/__init__.py
index ac03b394f..2ed62c893 100644
--- a/cinder/volume/drivers/ibm/storwize_svc/__init__.py
+++ b/cinder/volume/drivers/ibm/storwize_svc/__init__.py
@@ -122,7 +122,6 @@ storwize_svc_opts = [
                 default=False,
                 help='Allow tenants to specify QOS on create'),
     cfg.StrOpt('storwize_svc_stretched_cluster_partner',
-               default=None,
                help='If operating in stretched cluster mode, specify the '
                     'name of the pool in which mirrored copies are stored.'
                     'Example: "pool2"'),
diff --git a/cinder/volume/drivers/lenovo/lenovo_common.py b/cinder/volume/drivers/lenovo/lenovo_common.py
index 3bafc7f42..199ae9e00 100644
--- a/cinder/volume/drivers/lenovo/lenovo_common.py
+++ b/cinder/volume/drivers/lenovo/lenovo_common.py
@@ -35,7 +35,6 @@ common_opts = [
                 default=False,
                 help="Whether to verify Lenovo array SSL certificate."),
     cfg.StrOpt('lenovo_verify_certificate_path',
-               default=None,
                help="Lenovo array SSL certificate path.")
 ]
 
diff --git a/cinder/volume/drivers/netapp/options.py b/cinder/volume/drivers/netapp/options.py
index f4df96702..0967b1827 100644
--- a/cinder/volume/drivers/netapp/options.py
+++ b/cinder/volume/drivers/netapp/options.py
@@ -43,11 +43,9 @@ netapp_proxy_opts = [
 
 netapp_connection_opts = [
     cfg.StrOpt('netapp_server_hostname',
-               default=None,
                help='The hostname (or IP address) for the storage system or '
                     'proxy server.'),
     cfg.IntOpt('netapp_server_port',
-               default=None,
                help=('The TCP port to use for communication with the storage '
                      'system or proxy server. If not specified, Data ONTAP '
                      'drivers will use 80 for HTTP and 443 for HTTPS; '
@@ -62,11 +60,9 @@ netapp_transport_opts = [
 
 netapp_basicauth_opts = [
     cfg.StrOpt('netapp_login',
-               default=None,
                help=('Administrative user account name used to access the '
                      'storage system or proxy server.')),
     cfg.StrOpt('netapp_password',
-               default=None,
                help=('Password for the administrative user account '
                      'specified in the netapp_login option.'),
                secret=True), ]
@@ -90,14 +86,12 @@ netapp_provisioning_opts = [
 
 netapp_cluster_opts = [
     cfg.StrOpt('netapp_vserver',
-               default=None,
                help=('This option specifies the virtual storage server '
                      '(Vserver) name on the storage cluster on which '
                      'provisioning of block storage volumes should occur.')), ]
 
 netapp_7mode_opts = [
     cfg.StrOpt('netapp_vfiler',
-               default=None,
                help=('The vFiler unit on which provisioning of block storage '
                      'volumes will be done. This option is only used by the '
                      'driver when connecting to an instance with a storage '
@@ -105,7 +99,6 @@ netapp_7mode_opts = [
                      'option when utilizing the MultiStore feature on the '
                      'NetApp storage system.')),
     cfg.StrOpt('netapp_partner_backend_name',
-               default=None,
                help=('The name of the config.conf stanza for a Data ONTAP '
                      '(7-mode) HA partner.  This option is only used by the '
                      'driver when connecting to an instance with a storage '
@@ -145,7 +138,6 @@ netapp_eseries_opts = [
                      'to create the URL used by the driver to connect to the '
                      'proxy application.')),
     cfg.StrOpt('netapp_controller_ips',
-               default=None,
                help=('This option is only utilized when the storage family '
                      'is configured to eseries. This option is used to '
                      'restrict provisioning to the specified controllers. '
@@ -153,7 +145,6 @@ netapp_eseries_opts = [
                      'separated list of controller hostnames or IP addresses '
                      'to be used for provisioning.')),
     cfg.StrOpt('netapp_sa_password',
-               default=None,
                help=('Password for the NetApp E-Series storage array.'),
                secret=True),
     cfg.BoolOpt('netapp_enable_multiattach',
@@ -168,20 +159,17 @@ netapp_eseries_opts = [
 ]
 netapp_nfs_extra_opts = [
     cfg.StrOpt('netapp_copyoffload_tool_path',
-               default=None,
                help=('This option specifies the path of the NetApp copy '
                      'offload tool binary. Ensure that the binary has execute '
                      'permissions set which allow the effective user of the '
                      'cinder-volume process to execute the file.')), ]
 netapp_san_opts = [
     cfg.StrOpt('netapp_lun_ostype',
-               default=None,
                help=('This option defines the type of operating system that'
                      ' will access a LUN exported from Data ONTAP; it is'
                      ' assigned to the LUN at the time it is created.')),
     cfg.StrOpt('netapp_host_type',
                deprecated_name='netapp_eseries_host_type',
-               default=None,
                help=('This option defines the type of operating system for'
                      ' all initiators that can access a LUN. This information'
                      ' is used when mapping LUNs to individual hosts or'
diff --git a/cinder/volume/drivers/nfs.py b/cinder/volume/drivers/nfs.py
index bda7f6a62..951e062de 100644
--- a/cinder/volume/drivers/nfs.py
+++ b/cinder/volume/drivers/nfs.py
@@ -69,7 +69,6 @@ nfs_opts = [
                default='$state_path/mnt',
                help=('Base dir containing mount points for nfs shares.')),
     cfg.StrOpt('nfs_mount_options',
-               default=None,
                help=('Mount options passed to the nfs client. See section '
                      'of the nfs man page for details.')),
     cfg.IntOpt('nfs_mount_attempts',
diff --git a/cinder/volume/drivers/pure.py b/cinder/volume/drivers/pure.py
index eef8d598f..4cb1663b1 100644
--- a/cinder/volume/drivers/pure.py
+++ b/cinder/volume/drivers/pure.py
@@ -46,7 +46,6 @@ LOG = logging.getLogger(__name__)
 
 PURE_OPTS = [
     cfg.StrOpt("pure_api_token",
-               default=None,
                help="REST API authorization token."),
 ]
 
diff --git a/cinder/volume/drivers/quobyte.py b/cinder/volume/drivers/quobyte.py
index 9f6559cf9..7f398e0bf 100644
--- a/cinder/volume/drivers/quobyte.py
+++ b/cinder/volume/drivers/quobyte.py
@@ -35,11 +35,9 @@ LOG = logging.getLogger(__name__)
 
 volume_opts = [
     cfg.StrOpt('quobyte_volume_url',
-               default=None,
                help=('URL to the Quobyte volume e.g.,'
                      ' quobyte://<DIR host>/<volume name>')),
     cfg.StrOpt('quobyte_client_cfg',
-               default=None,
                help=('Path to a Quobyte Client configuration file.')),
     cfg.BoolOpt('quobyte_sparsed_volumes',
                 default=True,
diff --git a/cinder/volume/drivers/rbd.py b/cinder/volume/drivers/rbd.py
index afbc1c07b..6ad26647a 100644
--- a/cinder/volume/drivers/rbd.py
+++ b/cinder/volume/drivers/rbd.py
@@ -51,7 +51,6 @@ rbd_opts = [
                default='rbd',
                help='The RADOS pool where rbd volumes are stored'),
     cfg.StrOpt('rbd_user',
-               default=None,
                help='The RADOS client name for accessing rbd volumes '
                     '- only set when using cephx authentication'),
     cfg.StrOpt('rbd_ceph_conf',
@@ -62,11 +61,9 @@ rbd_opts = [
                 help='Flatten volumes created from snapshots to remove '
                      'dependency from volume to snapshot'),
     cfg.StrOpt('rbd_secret_uuid',
-               default=None,
                help='The libvirt uuid of the secret for the rbd_user '
                     'volumes'),
     cfg.StrOpt('volume_tmp_dir',
-               default=None,
                help='Directory where temporary image files are stored '
                     'when the volume driver does not write them directly '
                     'to the volume.  Warning: this option is now deprecated, '
diff --git a/cinder/volume/drivers/remotefs.py b/cinder/volume/drivers/remotefs.py
index 1fa8f0ccb..4bb5d65af 100644
--- a/cinder/volume/drivers/remotefs.py
+++ b/cinder/volume/drivers/remotefs.py
@@ -81,7 +81,6 @@ nas_opts = [
                      'For example:  "/srv/export1" for an NFS server export '
                      'available at 10.0.5.10:/srv/export1 .')),
     cfg.StrOpt('nas_mount_options',
-               default=None,
                help=('Options used to mount the storage backend file system '
                      'where Cinder volumes are stored.')),
 ]
diff --git a/cinder/volume/drivers/san/hp/hp_lefthand_rest_proxy.py b/cinder/volume/drivers/san/hp/hp_lefthand_rest_proxy.py
index 0418766f8..9063eae37 100644
--- a/cinder/volume/drivers/san/hp/hp_lefthand_rest_proxy.py
+++ b/cinder/volume/drivers/san/hp/hp_lefthand_rest_proxy.py
@@ -43,18 +43,14 @@ if hplefthandclient:
 
 hplefthand_opts = [
     cfg.StrOpt('hplefthand_api_url',
-               default=None,
                help="HP LeftHand WSAPI Server Url like "
                     "https://<LeftHand ip>:8081/lhos"),
     cfg.StrOpt('hplefthand_username',
-               default=None,
                help="HP LeftHand Super user username"),
     cfg.StrOpt('hplefthand_password',
-               default=None,
                help="HP LeftHand Super user password",
                secret=True),
     cfg.StrOpt('hplefthand_clustername',
-               default=None,
                help="HP LeftHand cluster name"),
     cfg.BoolOpt('hplefthand_iscsi_chap_enabled',
                 default=False,
diff --git a/cinder/volume/drivers/san/hp/hp_xp_opts.py b/cinder/volume/drivers/san/hp/hp_xp_opts.py
index 277e878eb..9190effd8 100644
--- a/cinder/volume/drivers/san/hp/hp_xp_opts.py
+++ b/cinder/volume/drivers/san/hp/hp_xp_opts.py
@@ -25,23 +25,18 @@ FC_VOLUME_OPTS = [
 COMMON_VOLUME_OPTS = [
     cfg.StrOpt(
         'hpxp_storage_cli',
-        default=None,
         help='Type of storage command line interface'),
     cfg.StrOpt(
         'hpxp_storage_id',
-        default=None,
         help='ID of storage system'),
     cfg.StrOpt(
         'hpxp_pool',
-        default=None,
         help='Pool of storage system'),
     cfg.StrOpt(
         'hpxp_thin_pool',
-        default=None,
         help='Thin pool of storage system'),
     cfg.StrOpt(
         'hpxp_ldev_range',
-        default=None,
         help='Logical device range of storage system'),
     cfg.StrOpt(
         'hpxp_default_copy_method',
@@ -63,11 +58,9 @@ COMMON_VOLUME_OPTS = [
         help='Interval to check copy asynchronously'),
     cfg.ListOpt(
         'hpxp_target_ports',
-        default=None,
         help='Target port names for host group or iSCSI target'),
     cfg.ListOpt(
         'hpxp_compute_target_ports',
-        default=None,
         help=(
             'Target port names of compute node '
             'for host group or iSCSI target')),
@@ -84,7 +77,6 @@ HORCM_VOLUME_OPTS = [
         help='Instance numbers for HORCM'),
     cfg.StrOpt(
         'hpxp_horcm_user',
-        default=None,
         help='Username of storage system for HORCM'),
     cfg.BoolOpt(
         'hpxp_horcm_add_conf',
diff --git a/cinder/volume/drivers/san/hp/hpmsa_common.py b/cinder/volume/drivers/san/hp/hpmsa_common.py
index 781163092..b43f4b146 100644
--- a/cinder/volume/drivers/san/hp/hpmsa_common.py
+++ b/cinder/volume/drivers/san/hp/hpmsa_common.py
@@ -35,7 +35,6 @@ common_opts = [
                 default=False,
                 help="Whether to verify HPMSA array SSL certificate."),
     cfg.StrOpt('hpmsa_verify_certificate_path',
-               default=None,
                help="HPMSA array SSL certificate path."),
 
 ]
diff --git a/cinder/volume/drivers/scality.py b/cinder/volume/drivers/scality.py
index c339a7685..046455570 100644
--- a/cinder/volume/drivers/scality.py
+++ b/cinder/volume/drivers/scality.py
@@ -40,7 +40,6 @@ LOG = logging.getLogger(__name__)
 
 volume_opts = [
     cfg.StrOpt('scality_sofs_config',
-               default=None,
                help='Path or URL to Scality SOFS configuration file'),
     cfg.StrOpt('scality_sofs_mount_point',
                default='$state_path/scality',
diff --git a/cinder/volume/drivers/solidfire.py b/cinder/volume/drivers/solidfire.py
index 166632672..d18ec5c27 100644
--- a/cinder/volume/drivers/solidfire.py
+++ b/cinder/volume/drivers/solidfire.py
@@ -50,7 +50,6 @@ sf_opts = [
                 help='Allow tenants to specify QOS on create'),
 
     cfg.StrOpt('sf_account_prefix',
-               default=None,
                help='Create SolidFire accounts with this prefix. Any string '
                     'can be used here, but the string \"hostname\" is special '
                     'and will create a prefix using the cinder node hostname '
@@ -74,7 +73,6 @@ sf_opts = [
                      'glance and qemu-conversion on subsequent calls.'),
 
     cfg.StrOpt('sf_svip',
-               default=None,
                help='Overrides default cluster SVIP with the one specified. '
                     'This is required or deployments that have implemented '
                     'the use of VLANs for iSCSI networks in their cloud.'),
diff --git a/cinder/volume/drivers/srb.py b/cinder/volume/drivers/srb.py
index e6a534b27..1a22e4cb2 100644
--- a/cinder/volume/drivers/srb.py
+++ b/cinder/volume/drivers/srb.py
@@ -47,7 +47,6 @@ LOG = logging.getLogger(__name__)
 
 srb_opts = [
     cfg.StrOpt('srb_base_urls',
-               default=None,
                help='Comma-separated list of REST servers IP to connect to. '
                     '(eg http://IP1/,http://IP2:81/path'),
 ]
diff --git a/cinder/volume/drivers/tintri.py b/cinder/volume/drivers/tintri.py
index 2254c2c87..df1944b88 100644
--- a/cinder/volume/drivers/tintri.py
+++ b/cinder/volume/drivers/tintri.py
@@ -43,13 +43,10 @@ tintri_path = '/tintri/'
 
 tintri_opts = [
     cfg.StrOpt('tintri_server_hostname',
-               default=None,
                help='The hostname (or IP address) for the storage system'),
     cfg.StrOpt('tintri_server_username',
-               default=None,
                help='User name for the storage system'),
     cfg.StrOpt('tintri_server_password',
-               default=None,
                help='Password for the storage system',
                secret=True),
     cfg.StrOpt('tintri_api_version',
diff --git a/cinder/volume/drivers/violin/v6000_common.py b/cinder/volume/drivers/violin/v6000_common.py
index 9d1cc09c0..3dfe14d65 100644
--- a/cinder/volume/drivers/violin/v6000_common.py
+++ b/cinder/volume/drivers/violin/v6000_common.py
@@ -52,10 +52,8 @@ VMOS_SUPPORTED_VERSION_PATTERNS = ['V6.3.0.[4-9]', 'V6.3.[1-9].?[0-9]?']
 
 violin_opts = [
     cfg.StrOpt('gateway_mga',
-               default=None,
                help='IP address or hostname of mg-a'),
     cfg.StrOpt('gateway_mgb',
-               default=None,
                help='IP address or hostname of mg-b'),
     cfg.BoolOpt('use_igroups',
                 default=False,
diff --git a/cinder/volume/drivers/vmware/vmdk.py b/cinder/volume/drivers/vmware/vmdk.py
index e331519ba..c2c9c5b5e 100644
--- a/cinder/volume/drivers/vmware/vmdk.py
+++ b/cinder/volume/drivers/vmware/vmdk.py
@@ -64,19 +64,15 @@ EXTRA_CONFIG_VOLUME_ID_KEY = "cinder.volume.id"
 
 vmdk_opts = [
     cfg.StrOpt('vmware_host_ip',
-               default=None,
                help='IP address for connecting to VMware vCenter server.'),
     cfg.StrOpt('vmware_host_username',
-               default=None,
                help='Username for authenticating with VMware vCenter '
                     'server.'),
     cfg.StrOpt('vmware_host_password',
-               default=None,
                help='Password for authenticating with VMware vCenter '
                     'server.',
                secret=True),
     cfg.StrOpt('vmware_wsdl_location',
-               default=None,
                help='Optional VIM service WSDL Location '
                     'e.g http://<server>/vimService.wsdl. Optional over-ride '
                     'to default location for bug work-arounds.'),
@@ -115,7 +111,6 @@ vmdk_opts = [
                help='Directory where virtual disks are stored during volume '
                     'backup and restore.'),
     cfg.StrOpt('vmware_ca_file',
-               default=None,
                help='CA bundle file to use in verifying the vCenter server '
                     'certificate.'),
     cfg.BoolOpt('vmware_insecure',
@@ -125,7 +120,6 @@ vmdk_opts = [
                      'used for verification. This option is ignored if '
                      '"vmware_ca_file" is set.'),
     cfg.MultiStrOpt('vmware_cluster_name',
-                    default=None,
                     help='Name of a vCenter compute cluster where volumes '
                          'should be created.'),
 ]
diff --git a/cinder/volume/drivers/vzstorage.py b/cinder/volume/drivers/vzstorage.py
index 8f14d8b86..f1659004f 100644
--- a/cinder/volume/drivers/vzstorage.py
+++ b/cinder/volume/drivers/vzstorage.py
@@ -53,7 +53,6 @@ vzstorage_opts = [
                help=('Base dir containing mount points for '
                      'vzstorage shares.')),
     cfg.ListOpt('vzstorage_mount_options',
-                default=None,
                 help=('Mount options passed to the vzstorage client. '
                       'See section of the pstorage-mount man page '
                       'for details.')),
diff --git a/cinder/volume/manager.py b/cinder/volume/manager.py
index 783eb58ff..74e3b9af2 100644
--- a/cinder/volume/manager.py
+++ b/cinder/volume/manager.py
@@ -94,7 +94,6 @@ volume_manager_opts = [
                 help='Offload pending volume delete during '
                      'volume service startup'),
     cfg.StrOpt('zoning_mode',
-               default='none',
                help='FC Zoning mode configured'),
     cfg.StrOpt('extra_capabilities',
                default='{}',
diff --git a/cinder/wsgi/eventlet_server.py b/cinder/wsgi/eventlet_server.py
index f40595680..cabe89943 100644
--- a/cinder/wsgi/eventlet_server.py
+++ b/cinder/wsgi/eventlet_server.py
@@ -50,15 +50,12 @@ socket_opts = [
                help="Sets the value of TCP_KEEPCNT for each "
                     "server socket. Not supported on OS X."),
     cfg.StrOpt('ssl_ca_file',
-               default=None,
                help="CA certificate file to use to verify "
                     "connecting clients"),
     cfg.StrOpt('ssl_cert_file',
-               default=None,
                help="Certificate file to use when starting "
                     "the server securely"),
     cfg.StrOpt('ssl_key_file',
-               default=None,
                help="Private key file to use when starting "
                     "the server securely"),
 ]
diff --git a/cinder/zonemanager/drivers/brocade/brcd_fabric_opts.py b/cinder/zonemanager/drivers/brocade/brcd_fabric_opts.py
index 26c8fbec0..ec311f87b 100644
--- a/cinder/zonemanager/drivers/brocade/brcd_fabric_opts.py
+++ b/cinder/zonemanager/drivers/brocade/brcd_fabric_opts.py
@@ -42,10 +42,8 @@ brcd_zone_opts = [
                 default=True,
                 help='overridden zoning activation state'),
     cfg.StrOpt('zone_name_prefix',
-               default=None,
                help='overridden zone name prefix'),
     cfg.StrOpt('principal_switch_wwn',
-               default=None,
                help='Principal switch WWN of the fabric'),
 ]
 
diff --git a/cinder/zonemanager/drivers/brocade/brcd_fc_zone_driver.py b/cinder/zonemanager/drivers/brocade/brcd_fc_zone_driver.py
index 506888d85..8b8fe227b 100644
--- a/cinder/zonemanager/drivers/brocade/brcd_fc_zone_driver.py
+++ b/cinder/zonemanager/drivers/brocade/brcd_fc_zone_driver.py
@@ -80,7 +80,7 @@ class BrcdFCZoneDriver(fc_zone_driver.FCZoneDriver):
             base_san_opts = []
             if not fabric_names:
                 base_san_opts.append(
-                    cfg.StrOpt('fc_fabric_names', default=None,
+                    cfg.StrOpt('fc_fabric_names',
                                help='Comma separated list of fibre channel '
                                'fabric names. This list of names is used to'
                                ' retrieve other SAN credentials for connecting'
diff --git a/cinder/zonemanager/drivers/cisco/cisco_fabric_opts.py b/cinder/zonemanager/drivers/cisco/cisco_fabric_opts.py
index 0aa0ceafa..b29b408d5 100644
--- a/cinder/zonemanager/drivers/cisco/cisco_fabric_opts.py
+++ b/cinder/zonemanager/drivers/cisco/cisco_fabric_opts.py
@@ -39,10 +39,8 @@ cisco_zone_opts = [
                 default=True,
                 help='overridden zoning activation state'),
     cfg.StrOpt('cisco_zone_name_prefix',
-               default=None,
                help='overridden zone name prefix'),
     cfg.StrOpt('cisco_zoning_vsan',
-               default=None,
                help='VSAN of the Fabric'),
 ]
 
diff --git a/cinder/zonemanager/drivers/cisco/cisco_fc_zone_driver.py b/cinder/zonemanager/drivers/cisco/cisco_fc_zone_driver.py
index 85d69b6d9..b94733ede 100644
--- a/cinder/zonemanager/drivers/cisco/cisco_fc_zone_driver.py
+++ b/cinder/zonemanager/drivers/cisco/cisco_fc_zone_driver.py
@@ -79,7 +79,7 @@ class CiscoFCZoneDriver(fc_zone_driver.FCZoneDriver):
             base_san_opts = []
             if not fabric_names:
                 base_san_opts.append(
-                    cfg.StrOpt('fc_fabric_names', default=None,
+                    cfg.StrOpt('fc_fabric_names',
                                help='Comma separated list of fibre channel '
                                'fabric names. This list of names is used to'
                                ' retrieve other SAN credentials for connecting'
diff --git a/cinder/zonemanager/fc_zone_manager.py b/cinder/zonemanager/fc_zone_manager.py
index 011890be4..c19565a85 100644
--- a/cinder/zonemanager/fc_zone_manager.py
+++ b/cinder/zonemanager/fc_zone_manager.py
@@ -53,7 +53,6 @@ zone_manager_opts = [
                help='Zoning policy configured by user; valid values include '
                '"initiator-target" or "initiator"'),
     cfg.StrOpt('fc_fabric_names',
-               default=None,
                help='Comma separated list of Fibre Channel fabric names.'
                ' This list of names is used to retrieve other SAN credentials'
                ' for connecting to each SAN fabric'),