From b60eb1eb0beebbdb60560c79e437882706cb9467 Mon Sep 17 00:00:00 2001 From: Gary Kotton Date: Sun, 25 May 2014 00:46:50 -0700 Subject: [PATCH] Remove redundant default=None for config options By default the cfg modules set the default value as None. There is no reason to set this. Change-Id: I58e09e01760b573612c2ee169a8dd1784fd36a82 --- neutron/agent/metadata/agent.py | 1 - neutron/agent/securitygroups_rpc.py | 1 - neutron/common/config.py | 1 - neutron/plugins/bigswitch/config.py | 2 +- neutron/plugins/embrane/common/config.py | 13 ++++++------- neutron/plugins/ibm/common/config.py | 2 +- neutron/plugins/midonet/common/config.py | 1 - .../plugins/ml2/drivers/cisco/nexus/config.py | 2 +- neutron/plugins/ml2/drivers/type_vxlan.py | 2 +- neutron/plugins/nec/common/config.py | 4 ++-- neutron/plugins/openvswitch/common/config.py | 2 +- neutron/plugins/ryu/common/config.py | 8 ++++---- .../loadbalancer/drivers/embrane/config.py | 18 +++++++++--------- neutron/wsgi.py | 3 --- 14 files changed, 26 insertions(+), 34 deletions(-) diff --git a/neutron/agent/metadata/agent.py b/neutron/agent/metadata/agent.py index bf99326f2..83aad7c3f 100644 --- a/neutron/agent/metadata/agent.py +++ b/neutron/agent/metadata/agent.py @@ -65,7 +65,6 @@ class MetadataProxyHandler(object): help=_("Turn off verification of the certificate for" " ssl")), cfg.StrOpt('auth_ca_cert', - default=None, help=_("Certificate Authority public key (CA cert) " "file for ssl")), cfg.StrOpt('endpoint_type', diff --git a/neutron/agent/securitygroups_rpc.py b/neutron/agent/securitygroups_rpc.py index 7d476729c..736ee659c 100644 --- a/neutron/agent/securitygroups_rpc.py +++ b/neutron/agent/securitygroups_rpc.py @@ -28,7 +28,6 @@ SG_RPC_VERSION = "1.1" security_group_opts = [ cfg.StrOpt( 'firewall_driver', - default=None, help=_('Driver for security groups firewall in the L2 agent')), cfg.BoolOpt( 'enable_security_group', diff --git a/neutron/common/config.py b/neutron/common/config.py index 87d03c42c..06610dcdd 100644 --- a/neutron/common/config.py +++ b/neutron/common/config.py @@ -101,7 +101,6 @@ core_opts = [ help=_('Authorization URL for connecting to nova in admin ' 'context')), cfg.StrOpt('nova_ca_certificates_file', - default=None, help=_('CA file for novaclient to verify server certificates')), cfg.BoolOpt('nova_api_insecure', default=False, help=_("If True, ignore any SSL validation issues")), diff --git a/neutron/plugins/bigswitch/config.py b/neutron/plugins/bigswitch/config.py index 231d856a5..540899b84 100644 --- a/neutron/plugins/bigswitch/config.py +++ b/neutron/plugins/bigswitch/config.py @@ -36,7 +36,7 @@ restproxy_opts = [ "which performs the networking configuration. Only one" "server is needed per deployment, but you may wish to" "deploy multiple servers to support failover.")), - cfg.StrOpt('server_auth', default=None, secret=True, + cfg.StrOpt('server_auth', secret=True, help=_("The username and password for authenticating against " " the Big Switch or Floodlight controller.")), cfg.BoolOpt('server_ssl', default=True, diff --git a/neutron/plugins/embrane/common/config.py b/neutron/plugins/embrane/common/config.py index b376056fc..54c9153f3 100644 --- a/neutron/plugins/embrane/common/config.py +++ b/neutron/plugins/embrane/common/config.py @@ -22,22 +22,21 @@ from oslo.config import cfg heleos_opts = [ cfg.StrOpt('esm_mgmt', - default=None, help=_('ESM management root address')), cfg.StrOpt('admin_username', default='admin', help=_('ESM admin username.')), - cfg.StrOpt('admin_password', default=None, + cfg.StrOpt('admin_password', secret=True, help=_('ESM admin password.')), - cfg.StrOpt('router_image', default=None, + cfg.StrOpt('router_image', help=_('Router image id (Embrane FW/VPN)')), - cfg.StrOpt('inband_id', default=None, + cfg.StrOpt('inband_id', help=_('In band Security Zone id')), - cfg.StrOpt('oob_id', default=None, + cfg.StrOpt('oob_id', help=_('Out of band Security Zone id')), - cfg.StrOpt('mgmt_id', default=None, + cfg.StrOpt('mgmt_id', help=_('Management Security Zone id')), - cfg.StrOpt('dummy_utif_id', default=None, + cfg.StrOpt('dummy_utif_id', help=_('Dummy user traffic Security Zone id')), cfg.StrOpt('resource_pool_id', default='default', help=_('Shared resource pool id')), diff --git a/neutron/plugins/ibm/common/config.py b/neutron/plugins/ibm/common/config.py index d3eb72558..2e8b0b79d 100644 --- a/neutron/plugins/ibm/common/config.py +++ b/neutron/plugins/ibm/common/config.py @@ -40,7 +40,7 @@ sdnve_opts = [ help=_("SDN-VE administrator user id")), cfg.StrOpt('password', default='admin', secret=True, help=_("SDN-VE administrator password")), - cfg.StrOpt('integration_bridge', default=None, + cfg.StrOpt('integration_bridge', help=_("Integration bridge to use")), cfg.BoolOpt('reset_bridge', default=True, help=_("Reset the integration bridge before use")), diff --git a/neutron/plugins/midonet/common/config.py b/neutron/plugins/midonet/common/config.py index 79e2a3311..924474f5b 100644 --- a/neutron/plugins/midonet/common/config.py +++ b/neutron/plugins/midonet/common/config.py @@ -33,7 +33,6 @@ midonet_opts = [ help=_('ID of the project that MidoNet admin user' 'belongs to.')), cfg.StrOpt('provider_router_id', - default=None, help=_('Virtual provider router ID.')), cfg.StrOpt('mode', default='dev', diff --git a/neutron/plugins/ml2/drivers/cisco/nexus/config.py b/neutron/plugins/ml2/drivers/cisco/nexus/config.py index 5e15507ff..3be443088 100644 --- a/neutron/plugins/ml2/drivers/cisco/nexus/config.py +++ b/neutron/plugins/ml2/drivers/cisco/nexus/config.py @@ -21,7 +21,7 @@ ml2_cisco_opts = [ help=_("VLAN Name prefix")), cfg.BoolOpt('svi_round_robin', default=False, help=_("Distribute SVI interfaces over all switches")), - cfg.StrOpt('managed_physical_network', default=None, + cfg.StrOpt('managed_physical_network', help=_("The physical network managed by the switches.")), ] diff --git a/neutron/plugins/ml2/drivers/type_vxlan.py b/neutron/plugins/ml2/drivers/type_vxlan.py index 0764be310..3e5d47567 100644 --- a/neutron/plugins/ml2/drivers/type_vxlan.py +++ b/neutron/plugins/ml2/drivers/type_vxlan.py @@ -37,7 +37,7 @@ vxlan_opts = [ help=_("Comma-separated list of : tuples " "enumerating ranges of VXLAN VNI IDs that are " "available for tenant network allocation")), - cfg.StrOpt('vxlan_group', default=None, + cfg.StrOpt('vxlan_group', help=_("Multicast group for VXLAN. If unset, disables VXLAN " "multicast mode.")), ] diff --git a/neutron/plugins/nec/common/config.py b/neutron/plugins/nec/common/config.py index 80cfd0200..ed35dcb17 100644 --- a/neutron/plugins/nec/common/config.py +++ b/neutron/plugins/nec/common/config.py @@ -47,9 +47,9 @@ ofc_opts = [ help=_("Enable packet filter")), cfg.BoolOpt('use_ssl', default=False, help=_("Use SSL to connect")), - cfg.StrOpt('key_file', default=None, + cfg.StrOpt('key_file', help=_("Key file")), - cfg.StrOpt('cert_file', default=None, + cfg.StrOpt('cert_file', help=_("Certificate file")), cfg.BoolOpt('insecure_ssl', default=False, help=_("Disable SSL certificate verification")), diff --git a/neutron/plugins/openvswitch/common/config.py b/neutron/plugins/openvswitch/common/config.py index b3c332dce..f27be19b1 100644 --- a/neutron/plugins/openvswitch/common/config.py +++ b/neutron/plugins/openvswitch/common/config.py @@ -75,7 +75,7 @@ agent_opts = [ "(gre and/or vxlan)")), cfg.IntOpt('vxlan_udp_port', default=constants.VXLAN_UDP_PORT, help=_("The UDP port to use for VXLAN tunnels.")), - cfg.IntOpt('veth_mtu', default=None, + cfg.IntOpt('veth_mtu', help=_("MTU size of veth interfaces")), cfg.BoolOpt('l2_population', default=False, help=_("Use ml2 l2population mechanism driver to learn " diff --git a/neutron/plugins/ryu/common/config.py b/neutron/plugins/ryu/common/config.py index be6766d1b..504166d58 100644 --- a/neutron/plugins/ryu/common/config.py +++ b/neutron/plugins/ryu/common/config.py @@ -28,15 +28,15 @@ ovs_opts = [ help=_("Minimum tunnel ID to use")), cfg.IntOpt('tunnel_key_max', default=0xffffff, help=_("Maximum tunnel ID to use")), - cfg.StrOpt('tunnel_ip', default=None, + cfg.StrOpt('tunnel_ip', help=_("Tunnel IP to use")), - cfg.StrOpt('tunnel_interface', default=None, + cfg.StrOpt('tunnel_interface', help=_("Tunnel interface to use")), cfg.IntOpt('ovsdb_port', default=6634, help=_("OVSDB port to connect to")), - cfg.StrOpt('ovsdb_ip', default=None, + cfg.StrOpt('ovsdb_ip', help=_("OVSDB IP to connect to")), - cfg.StrOpt('ovsdb_interface', default=None, + cfg.StrOpt('ovsdb_interface', help=_("OVSDB interface to connect to")), ] diff --git a/neutron/services/loadbalancer/drivers/embrane/config.py b/neutron/services/loadbalancer/drivers/embrane/config.py index 8da223169..cac9a63d5 100644 --- a/neutron/services/loadbalancer/drivers/embrane/config.py +++ b/neutron/services/loadbalancer/drivers/embrane/config.py @@ -23,29 +23,29 @@ from oslo.config import cfg heleos_opts = [ cfg.StrOpt('esm_mgmt', help=_('ESM management root address')), - cfg.StrOpt('admin_username', default=None, + cfg.StrOpt('admin_username', help=_('ESM admin username.')), - cfg.StrOpt('admin_password', default=None, + cfg.StrOpt('admin_password', secret=True, help=_('ESM admin password.')), - cfg.StrOpt('lb_image', default=None, + cfg.StrOpt('lb_image', help=_('Load Balancer image id (Embrane LB)')), - cfg.StrOpt('inband_id', default=None, + cfg.StrOpt('inband_id', help=_('In band Security Zone id for LBs')), - cfg.StrOpt('oob_id', default=None, + cfg.StrOpt('oob_id', help=_('Out of band Security Zone id for LBs')), - cfg.StrOpt('mgmt_id', default=None, + cfg.StrOpt('mgmt_id', help=_('Management Security Zone id for LBs')), - cfg.StrOpt('dummy_utif_id', default=None, + cfg.StrOpt('dummy_utif_id', help=_('Dummy user traffic Security Zone id for LBs')), - cfg.StrOpt('resource_pool_id', default=None, + cfg.StrOpt('resource_pool_id', help=_('Shared resource pool id')), cfg.StrOpt('lb_flavor', default="small", help=_('choose LB image flavor to use, accepted values: small, ' 'medium')), cfg.IntOpt('sync_interval', default=60, help=_('resource synchronization interval in seconds')), - cfg.BoolOpt('async_requests', default=None, + cfg.BoolOpt('async_requests', help=_('Define if the requests have ' 'run asynchronously or not')), ] diff --git a/neutron/wsgi.py b/neutron/wsgi.py index 7b41ac2c7..c13c80348 100644 --- a/neutron/wsgi.py +++ b/neutron/wsgi.py @@ -65,15 +65,12 @@ socket_opts = [ default=False, help=_('Enable SSL on the API server')), 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")), ] -- 2.45.2