remove default=None for config options

In the cfg module default=None is set as the default value.

Change-Id: I8bb9142ae506584ccc4099024b588ad639c2a242
Closes-bug: #1323975
This commit is contained in:
Shuquan Huang 2015-11-08 20:43:07 +08:00
parent 9fe583fcb2
commit dcb1ae9f89
16 changed files with 19 additions and 52 deletions

View File

@ -157,13 +157,13 @@ class IPABackend(base.Backend):
help='IPA RPC listener host - must be FQDN'),
cfg.IntOpt('ipa-port', default=IPA_DEFAULT_PORT,
help='IPA RPC listener port'),
cfg.StrOpt('ipa-client-keytab', default=None,
cfg.StrOpt('ipa-client-keytab',
help='Kerberos client keytab file'),
cfg.StrOpt('ipa-auth-driver-class',
default='designate.backend.impl_ipa.auth.IPAAuth',
help='Class that implements the authentication '
'driver for IPA'),
cfg.StrOpt('ipa-ca-cert', default=None,
cfg.StrOpt('ipa-ca-cert',
help='CA certificate for use with https to IPA'),
cfg.StrOpt('ipa-base-url', default='/ipa',
help='Base URL for IPA RPC, relative to host[:port]'),

View File

@ -39,7 +39,6 @@ IdentityGroup = [
default=False,
help="Set to True if using self-signed SSL certificates."),
cfg.StrOpt('uri',
default=None,
help="Full URI of the OpenStack Identity API (Keystone), v2"),
cfg.StrOpt('uri_v3',
help='Full URI of the OpenStack Identity API (Keystone), v3'),
@ -59,52 +58,40 @@ IdentityGroup = [
'publicURL', 'adminURL', 'internalURL'],
help="The endpoint type to use for the identity service."),
cfg.StrOpt('username',
default=None,
help="Username to use for Nova API requests."),
cfg.StrOpt('tenant_name',
default=None,
help="Tenant name to use for Nova API requests."),
cfg.StrOpt('admin_role',
default='admin',
help="Role required to administrate keystone."),
cfg.StrOpt('password',
default=None,
help="API key to use when authenticating.",
secret=True),
cfg.StrOpt('domain_name',
default=None,
help="Domain name for authentication (Keystone V3)."
"The same domain applies to user and project"),
cfg.StrOpt('alt_username',
default=None,
help="Username of alternate user to use for Nova API "
"requests."),
cfg.StrOpt('alt_tenant_name',
default=None,
help="Alternate user's Tenant name to use for Nova API "
"requests."),
cfg.StrOpt('alt_password',
default=None,
help="API key to use when authenticating as alternate user.",
secret=True),
cfg.StrOpt('alt_domain_name',
default=None,
help="Alternate domain name for authentication (Keystone V3)."
"The same domain applies to user and project"),
cfg.StrOpt('admin_username',
default=None,
help="Administrative Username to use for "
"Keystone API requests."),
cfg.StrOpt('admin_tenant_name',
default=None,
help="Administrative Tenant name to use for Keystone API "
"requests."),
cfg.StrOpt('admin_password',
default=None,
help="API key to use when authenticating as admin.",
secret=True),
cfg.StrOpt('admin_domain_name',
default=None,
help="Admin domain name for authentication (Keystone V3)."
"The same domain applies to user and project"),
]
@ -232,7 +219,6 @@ ComputeGroup = [
default='computev3',
help="Catalog type of the Compute v3 service."),
cfg.StrOpt('path_to_private_key',
default=None,
help="Path to a private key file for SSH access to remote "
"hosts"),
cfg.StrOpt('volume_device_name',
@ -311,18 +297,14 @@ compute_admin_group = cfg.OptGroup(name='compute-admin',
ComputeAdminGroup = [
cfg.StrOpt('username',
default=None,
help="Administrative Username to use for Nova API requests."),
cfg.StrOpt('tenant_name',
default=None,
help="Administrative Tenant name to use for Nova API "
"requests."),
cfg.StrOpt('password',
default=None,
help="API key to use when authenticating as admin.",
secret=True),
cfg.StrOpt('domain_name',
default=None,
help="Domain name for authentication as admin (Keystone V3)."
"The same domain applies to user and project"),
]
@ -584,15 +566,12 @@ dns_admin_group = cfg.OptGroup(name='dns-admin',
DnsAdminGroup = [
cfg.StrOpt('username',
default=None,
help="Administrative Username to use for "
"Designate API requests."),
cfg.StrOpt('tenant_name',
default=None,
help="Administrative Tenant name to use for Designate API "
"requests."),
cfg.StrOpt('password',
default=None,
help="API key to use when authenticating as admin.",
secret=True),
]
@ -632,11 +611,9 @@ OrchestrationGroup = [
help="Instance type for tests. Needs to be big enough for a "
"full OS plus the test workload"),
cfg.StrOpt('image_ref',
default=None,
help="Name of heat-cfntools enabled image to use when "
"launching test instances."),
cfg.StrOpt('keypair_name',
default=None,
help="Name of existing keypair to launch servers with."),
cfg.IntOpt('max_template_size',
default=524288,
@ -701,11 +678,9 @@ BotoGroup = [
default="http://localhost:8080",
help="S3 URL"),
cfg.StrOpt('aws_secret',
default=None,
help="AWS Secret Key",
secret=True),
cfg.StrOpt('aws_access',
default=None,
help="AWS Access Key"),
cfg.StrOpt('aws_zone',
default="nova",
@ -744,26 +719,20 @@ stress_group = cfg.OptGroup(name='stress', title='Stress Test Options')
StressGroup = [
cfg.StrOpt('nova_logdir',
default=None,
help='Directory containing log files on the compute nodes'),
cfg.IntOpt('max_instances',
default=16,
help='Maximum number of instances to create during test.'),
cfg.StrOpt('controller',
default=None,
help='Controller host.'),
# new stress options
cfg.StrOpt('target_controller',
default=None,
help='Controller host.'),
cfg.StrOpt('target_ssh_user',
default=None,
help='ssh user.'),
cfg.StrOpt('target_private_key_path',
default=None,
help='Path to private key.'),
cfg.StrOpt('target_logfiles',
default=None,
help='regexp for list of log files.'),
cfg.IntOpt('log_check_interval',
default=60,

View File

@ -20,7 +20,7 @@ cfg.CONF.register_group(cfg.OptGroup(
))
OPTS = [
cfg.IntOpt('workers', default=None,
cfg.IntOpt('workers',
help='Number of agent worker processes to spawn'),
cfg.IntOpt('threads', default=1000,
help='Number of agent greenthreads to spawn'),
@ -38,7 +38,7 @@ OPTS = [
help='List of masters for the Agent, format ip:port'),
cfg.StrOpt('backend-driver', default='bind9',
help='The backend driver to use'),
cfg.StrOpt('transfer-source', default=None,
cfg.StrOpt('transfer-source',
help='An IP address to be used to fetch zones transferred in'),
cfg.FloatOpt('notify-delay', default=0.0,
help='Delay after a NOTIFY arrives for a zone that the Agent '

View File

@ -21,7 +21,7 @@ cfg.CONF.register_group(cfg.OptGroup(
))
cfg.CONF.register_opts([
cfg.IntOpt('workers', default=None,
cfg.IntOpt('workers',
help='Number of api worker processes to spawn'),
cfg.IntOpt('threads', default=1000,
help='Number of api greenthreads to spawn'),

View File

@ -47,7 +47,6 @@ cfg.CONF.register_opts([
"the original request protocol scheme was, even if it was "
"removed by an SSL terminating proxy."),
cfg.StrOpt('override-proto',
default=None,
help="A scheme that will be used to override "
"the request protocol scheme, even if it was "
"set by an SSL terminating proxy.")

View File

@ -44,9 +44,9 @@ class Bind9Backend(base.AgentBackend):
opts = [
cfg.StrOpt('rndc-host', default='127.0.0.1', help='RNDC Host'),
cfg.IntOpt('rndc-port', default=953, help='RNDC Port'),
cfg.StrOpt('rndc-config-file', default=None,
cfg.StrOpt('rndc-config-file',
help='RNDC Config File'),
cfg.StrOpt('rndc-key-file', default=None, help='RNDC Key File'),
cfg.StrOpt('rndc-key-file', help='RNDC Key File'),
cfg.StrOpt('zone-file-path', default='$state_path/zones',
help='Path where zone files are stored'),
cfg.StrOpt('query-destination', default='127.0.0.1',

View File

@ -20,7 +20,7 @@ cfg.CONF.register_group(cfg.OptGroup(
))
cfg.CONF.register_opts([
cfg.IntOpt('workers', default=None,
cfg.IntOpt('workers',
help='Number of central worker processes to spawn'),
cfg.IntOpt('threads', default=1000,
help='Number of central greenthreads to spawn'),
@ -38,7 +38,7 @@ cfg.CONF.register_opts([
cfg.StrOpt('managed_resource_tenant_id',
default="00000000-0000-0000-0000-000000000000",
help="The Tenant ID that will own any managed resources."),
cfg.IntOpt('min_ttl', default=None, help="Minimum TTL allowed"),
cfg.IntOpt('min_ttl', help="Minimum TTL allowed"),
# TODO(betsy): Move to Pool Service once that is written
cfg.StrOpt('default_pool_id',
default='794ccc2c-d751-44fe-b57f-8894c9f5c842',

View File

@ -32,7 +32,6 @@ LOG = log.getLogger(__name__)
OPTS = [
cfg.StrOpt('backend_url',
default=None,
help='The backend URL to use for distributed coordination. If '
'unset services that need coordination will function as '
'a standalone service.'),

View File

@ -23,7 +23,7 @@ cfg.CONF.register_group(cfg.OptGroup(
))
OPTS = [
cfg.IntOpt('workers', default=None,
cfg.IntOpt('workers',
help='Number of mdns worker processes to spawn'),
cfg.IntOpt('threads', default=1000,
help='Number of mdns greenthreads to spawn'),

View File

@ -29,7 +29,7 @@ cfg.CONF.register_group(cfg.OptGroup(
cfg.CONF.register_opts([
cfg.ListOpt('notification-topics', default=['notifications']),
cfg.StrOpt('control-exchange', default='neutron'),
cfg.StrOpt('domain-id', default=None),
cfg.StrOpt('domain-id'),
cfg.MultiStrOpt('format', default=[
'%(octet0)s-%(octet1)s-%(octet2)s-%(octet3)s.%(domain)s'])
], group='handler:neutron_floatingip')

View File

@ -29,7 +29,7 @@ cfg.CONF.register_group(cfg.OptGroup(
cfg.CONF.register_opts([
cfg.ListOpt('notification-topics', default=['notifications']),
cfg.StrOpt('control-exchange', default='nova'),
cfg.StrOpt('domain-id', default=None),
cfg.StrOpt('domain-id'),
cfg.MultiStrOpt('format', default=[
'%(octet0)s-%(octet1)s-%(octet2)s-%(octet3)s.%(domain)s'])
], group='handler:nova_fixed')

View File

@ -22,7 +22,7 @@ CONF.register_group(cfg.OptGroup(
))
OPTS = [
cfg.IntOpt('workers', default=None,
cfg.IntOpt('workers',
help='Number of Pool Manager worker processes to spawn'),
cfg.IntOpt('threads', default=1000,
help='Number of Pool Manager greenthreads to spawn'),

View File

@ -20,7 +20,7 @@ cfg.CONF.register_group(cfg.OptGroup(
))
cfg.CONF.register_opts([
cfg.IntOpt('workers', default=None,
cfg.IntOpt('workers',
help='Number of sink worker processes to spawn'),
cfg.IntOpt('threads', default=1000,
help='Number of sink greenthreads to spawn'),

View File

@ -52,9 +52,9 @@ cfg.CONF.register_group(cfg.OptGroup(
))
proxy_opts = [
cfg.StrOpt('http_proxy', default=None,
cfg.StrOpt('http_proxy',
help='Proxy HTTP requests via this proxy.'),
cfg.StrOpt('https_proxy', default=None,
cfg.StrOpt('https_proxy',
help='Proxy HTTPS requests via this proxy'),
cfg.ListOpt('no_proxy', default=[],
help='These addresses should not be proxied')

View File

@ -22,11 +22,11 @@ CONF.register_group(cfg.OptGroup(
))
OPTS = [
cfg.IntOpt('workers', default=None,
cfg.IntOpt('workers',
help='Number of Zone Manager worker processes to spawn'),
cfg.IntOpt('threads', default=1000,
help='Number of Zone Manager greenthreads to spawn'),
cfg.ListOpt('enabled_tasks', default=None,
cfg.ListOpt('enabled_tasks',
help='Enabled tasks to run'),
cfg.StrOpt('storage-driver', default='sqlalchemy',
help='The storage driver to use'),

View File

@ -37,7 +37,7 @@ cfg.CONF.register_opts([
cfg.StrOpt('uri', help="The Keystone v2 endpoint"),
cfg.StrOpt('uri_v3', help="The Keystone v3 endpoint"),
cfg.StrOpt('auth_version', default='v2'),
cfg.StrOpt('region', default=None),
cfg.StrOpt('region'),
cfg.StrOpt('username'),
cfg.StrOpt('tenant_name'),