]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Remove redundant default=None for config options
authorGary Kotton <gkotton@vmware.com>
Sun, 25 May 2014 07:46:50 +0000 (00:46 -0700)
committerGary Kotton <gkotton@vmware.com>
Sun, 25 May 2014 07:46:50 +0000 (00:46 -0700)
By default the cfg modules set the default value as None. There
is no reason to set this.

Change-Id: I58e09e01760b573612c2ee169a8dd1784fd36a82

14 files changed:
neutron/agent/metadata/agent.py
neutron/agent/securitygroups_rpc.py
neutron/common/config.py
neutron/plugins/bigswitch/config.py
neutron/plugins/embrane/common/config.py
neutron/plugins/ibm/common/config.py
neutron/plugins/midonet/common/config.py
neutron/plugins/ml2/drivers/cisco/nexus/config.py
neutron/plugins/ml2/drivers/type_vxlan.py
neutron/plugins/nec/common/config.py
neutron/plugins/openvswitch/common/config.py
neutron/plugins/ryu/common/config.py
neutron/services/loadbalancer/drivers/embrane/config.py
neutron/wsgi.py

index bf99326f200a227a6e9611bc3f06afc13bfa880d..83aad7c3feb6eaef528297d73396e325cbab4aa3 100644 (file)
@@ -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',
index 7d476729c403e91f77b18560a5e035cbab827cc9..736ee659c54ac4e26482823bbd7c908021468357 100644 (file)
@@ -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',
index 87d03c42ce02f68e97fe12c4de5d1a58959a5d3b..06610dcdde8b52b7f3bede68dc404b83139406c3 100644 (file)
@@ -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")),
index 231d856a58dc4519c0129a46cb3cea45904c1990..540899b8415922f9720d5a18b2934278a8c8cece 100644 (file)
@@ -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,
index b376056fcc28d9713c6a6a8e9df2739cc7ab2682..54c9153f3c24b227aa8e3590502558105f125e23 100644 (file)
@@ -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')),
index d3eb72558ddf6b5fca4fc6e397fcd32b007a768b..2e8b0b79de5f2482ad7b20766275e45790f23982 100644 (file)
@@ -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")),
index 79e2a331162fc480a614ba4fea55ecd3a8c4d971..924474f5bdfa8653b12b185f327967dfc97e864d 100644 (file)
@@ -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',
index 5e15507ffe36673b0937b400ab0d149c15faf9fb..3be443088d7936fb630417544339624f5b8c98fa 100644 (file)
@@ -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.")),
 ]
 
index 0764be31071a6c615577d63c6b55d5ea70ee0783..3e5d4756791f875b8e98588c99d5f5fafa6ea3f1 100644 (file)
@@ -37,7 +37,7 @@ vxlan_opts = [
                 help=_("Comma-separated list of <vni_min>:<vni_max> 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.")),
 ]
index 80cfd0200ba582aa3f1006a9ebecd677a6060dc6..ed35dcb17fd4e1a3bec83998d406f2193917b91c 100644 (file)
@@ -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")),
index b3c332dce783c3d41e873a22f73b0a8afe6432a6..f27be19b17cff36f9c3d1e71eade08fe4f7ade36 100644 (file)
@@ -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 "
index be6766d1bed59f5e7c32e86cf43ec3d96488ce00..504166d5889d19b32eafecb51091ed487bf51e87 100644 (file)
@@ -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")),
 ]
 
index 8da2231693551d41353f98064bdbba90d690f127..cac9a63d592c8de1e02d968958ffcd4ecd9e6261 100644 (file)
@@ -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')),
 ]
index 7b41ac2c7a1d51acba2bf211ddfd39cc042eba0b..c13c8034826df446f733bc6fd8df58ffd4b7966c 100644 (file)
@@ -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")),
 ]