]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Finish adding help strings to all config options in Quantum code.
authorKyle Mestery <kmestery@cisco.com>
Mon, 28 Jan 2013 10:18:32 +0000 (10:18 +0000)
committerKyle Mestery <kmestery@cisco.com>
Tue, 29 Jan 2013 08:08:25 +0000 (08:08 +0000)
This adds reasonable help strings to all remaining config options
in Quantum code. This includes all the plugins as well.

Fixes bug 1101356

Change-Id: I1cbe8303ad6d86756b992ae302707a0365625f52

14 files changed:
quantum/agent/dhcp_agent.py
quantum/agent/l3_agent.py
quantum/agent/metadata/agent.py
quantum/agent/netns_cleanup_util.py
quantum/agent/ovs_cleanup_util.py
quantum/debug/debug_agent.py
quantum/plugins/bigswitch/plugin.py
quantum/plugins/hyperv/agent/hyperv_quantum_agent.py
quantum/plugins/linuxbridge/common/config.py
quantum/plugins/metaplugin/common/config.py
quantum/plugins/nec/common/config.py
quantum/plugins/nicira/nicira_nvp_plugin/common/config.py
quantum/plugins/openvswitch/common/config.py
quantum/plugins/ryu/common/config.py

index a629a393a0541fb9e42d8ae380e11d84e62e7aed..660a6ca39a5ddfed09fd8e3f7c416523c2403030 100644 (file)
@@ -43,8 +43,10 @@ NS_PREFIX = 'qdhcp-'
 
 class DhcpAgent(object):
     OPTS = [
-        cfg.StrOpt('root_helper', default='sudo'),
-        cfg.IntOpt('resync_interval', default=30),
+        cfg.StrOpt('root_helper', default='sudo',
+                   help=_("Root helper application.")),
+        cfg.IntOpt('resync_interval', default=30,
+                   help=_("Interval to resync.")),
         cfg.StrOpt('dhcp_driver',
                    default='quantum.agent.linux.dhcp.Dnsmasq',
                    help=_("The driver used to manage the DHCP server.")),
@@ -374,13 +376,18 @@ class NetworkCache(object):
 
 class DeviceManager(object):
     OPTS = [
-        cfg.StrOpt('admin_user'),
-        cfg.StrOpt('admin_password'),
-        cfg.StrOpt('admin_tenant_name'),
-        cfg.StrOpt('auth_url'),
+        cfg.StrOpt('admin_user',
+                   help=_("Admin username")),
+        cfg.StrOpt('admin_password',
+                   help=_("Admin password")),
+        cfg.StrOpt('admin_tenant_name',
+                   help=_("Admin tenant name")),
+        cfg.StrOpt('auth_url',
+                   help=_("Authentication URL")),
         cfg.StrOpt('auth_strategy', default='keystone',
                    help=_("The type of authentication to use")),
-        cfg.StrOpt('auth_region'),
+        cfg.StrOpt('auth_region',
+                   help=_("Authentication region")),
         cfg.StrOpt('interface_driver',
                    help=_("The driver used to manage the virtual interface."))
     ]
index 8a48493c853527f486aaea49b302cd7887e9cc0f..ead51988070e3957c1f42602fd02f5806bcad5fd 100644 (file)
@@ -111,7 +111,8 @@ class RouterInfo(object):
 class L3NATAgent(manager.Manager):
 
     OPTS = [
-        cfg.StrOpt('root_helper', default='sudo'),
+        cfg.StrOpt('root_helper', default='sudo',
+                   help=_("Root helper application.")),
         cfg.StrOpt('external_network_bridge', default='br-ex',
                    help=_("Name of bridge used for external network "
                           "traffic.")),
@@ -140,7 +141,8 @@ class L3NATAgent(manager.Manager):
                    help=_("UUID of external network for routers implemented "
                           "by the agents.")),
         cfg.StrOpt('l3_agent_manager',
-                   default='quantum.agent.l3_agent.L3NATAgent'),
+                   default='quantum.agent.l3_agent.L3NATAgent',
+                   help=_("The Quantum L3 Agent manager.")),
     ]
 
     def __init__(self, host, conf=None):
index 210268c0fd749ede0880d5a148caa27c1c0dd35c..825125dcbb94aebf9cc50d55e8433eab059b6758 100644 (file)
@@ -39,13 +39,18 @@ DEVICE_OWNER_ROUTER_INTF = "network:router_interface"
 
 class MetadataProxyHandler(object):
     OPTS = [
-        cfg.StrOpt('admin_user'),
-        cfg.StrOpt('admin_password'),
-        cfg.StrOpt('admin_tenant_name'),
-        cfg.StrOpt('auth_url'),
+        cfg.StrOpt('admin_user',
+                   help=_("Admin user")),
+        cfg.StrOpt('admin_password',
+                   help=_("Admin password")),
+        cfg.StrOpt('admin_tenant_name',
+                   help=_("Admin tenant name")),
+        cfg.StrOpt('auth_url',
+                   help=_("Authentication URL")),
         cfg.StrOpt('auth_strategy', default='keystone',
                    help=_("The type of authentication to use")),
-        cfg.StrOpt('auth_region'),
+        cfg.StrOpt('auth_region',
+                   help=_("Authentication region")),
         cfg.StrOpt('nova_metadata_ip', default='127.0.0.1',
                    help=_("IP address used by Nova metadata server.")),
         cfg.IntOpt('nova_metadata_port',
index 12d8ebc174b7cf909d1738759555b9a9df28b4a6..73f64c315848cec0f80f4fe42111b7403f205b5f 100644 (file)
@@ -56,7 +56,8 @@ def setup_conf():
     """
 
     opts = [
-        cfg.StrOpt('root_helper', default='sudo'),
+        cfg.StrOpt('root_helper', default='sudo',
+                   help=_("Root helper application.")),
         cfg.StrOpt('dhcp_driver',
                    default='quantum.agent.linux.dhcp.Dnsmasq',
                    help=_("The driver used to manage the DHCP server.")),
index a744c16dbbb2f38a0e5d9ca805a7df8ad508c82c..3c88c1e58bd858052b8bba2d3ef78c3b69970869 100644 (file)
@@ -42,7 +42,8 @@ def setup_conf():
     ]
 
     agent_opts = [
-        cfg.StrOpt('root_helper', default='sudo'),
+        cfg.StrOpt('root_helper', default='sudo',
+                   help=_("Root helper application.")),
     ]
 
     conf = cfg.CommonConfigOpts()
index 40bdc2ec5035b63f19d612556f438095472e2a83..06138d63278c0f8533ccd28591efea438d8d4867 100644 (file)
@@ -35,16 +35,23 @@ DEVICE_OWNER_PROBE = 'network:probe'
 class QuantumDebugAgent():
 
     OPTS = [
-        cfg.StrOpt('root_helper', default='sudo'),
+        cfg.StrOpt('root_helper', default='sudo',
+                   help=_("Root helper application.")),
         # Needed for drivers
-        cfg.StrOpt('admin_user'),
-        cfg.StrOpt('admin_password'),
-        cfg.StrOpt('admin_tenant_name'),
-        cfg.StrOpt('auth_url'),
+        cfg.StrOpt('admin_user',
+                   help=_("Admin user")),
+        cfg.StrOpt('admin_password',
+                   help=_("Admin password")),
+        cfg.StrOpt('admin_tenant_name',
+                   help=_("Admin tenant name")),
+        cfg.StrOpt('auth_url',
+                   help=_("Authentication URL")),
         cfg.StrOpt('auth_strategy', default='keystone',
                    help=_("The type of authentication to use")),
-        cfg.StrOpt('auth_region'),
-        cfg.BoolOpt('use_namespaces', default=True),
+        cfg.StrOpt('auth_region',
+                   help=_("Authentication region")),
+        cfg.BoolOpt('use_namespaces', default=True,
+                    help=_("Use Linux network namespaces")),
         cfg.StrOpt('interface_driver',
                    help=_("The driver used to manage the virtual "
                           "interface.")),
index 511ce29343dd6bb8b1f6ebddf0ad3658f00b04e5..9cfb2aaada346809a42cf939c493abe821aac2a1 100644 (file)
@@ -66,11 +66,18 @@ LOG = logging.getLogger(__name__)
 
 
 restproxy_opts = [
-    cfg.StrOpt('servers', default='localhost:8800'),
-    cfg.StrOpt('serverauth', default='username:password'),
-    cfg.BoolOpt('serverssl', default=False),
-    cfg.BoolOpt('syncdata', default=False),
-    cfg.IntOpt('servertimeout', default=10),
+    cfg.StrOpt('servers', default='localhost:8800',
+               help=_("A comma separated list of servers and port numbers "
+                      "to proxy request to.")),
+    cfg.StrOpt('serverauth', default='username:password',
+               help=_("Server authentication")),
+    cfg.BoolOpt('serverssl', default=False,
+                help=_("Use SSL to connect")),
+    cfg.BoolOpt('syncdata', default=False,
+                help=_("Sync data on connect")),
+    cfg.IntOpt('servertimeout', default=10,
+               help=_("Maximum number of seconds to wait for proxy request "
+                      "to connect and complete.")),
 ]
 
 
index 687da722d9d415281500dd29b5b33e7aef2aa99c..35d042a780f04cbf8d4d0ba3bd0a2eb7e25e4756 100644 (file)
@@ -47,7 +47,9 @@ agent_opts = [
         'local_network_vswitch',
         default='private',
         help=_('Private vswitch name used for local networks')),
-    cfg.IntOpt('polling_interval', default=2),
+    cfg.IntOpt('polling_interval', default=2,
+               help=_("The number of seconds the agent will wait between "
+                      "polling for local device changes.")),
 ]
 
 
index 779cb7df5f45287bb49d7bb27ace76437cf55721..39cffdd4736fdba3e803fc481a56ded021af80b4 100644 (file)
@@ -40,8 +40,11 @@ bridge_opts = [
 ]
 
 agent_opts = [
-    cfg.IntOpt('polling_interval', default=2),
-    cfg.StrOpt('root_helper', default='sudo'),
+    cfg.IntOpt('polling_interval', default=2,
+               help=_("The number of seconds the agent will wait between "
+                      "polling for local device changes.")),
+    cfg.StrOpt('root_helper', default='sudo',
+               help=_("Root helper application.")),
 ]
 
 
index 3b827bfc7081dc2dfef05db56ab936d437afb484..cf0e354f8626ec031102b917cc8f4298c7f5b79d 100644 (file)
@@ -19,22 +19,33 @@ from quantum.openstack.common import cfg
 
 
 meta_plugin_opts = [
-    cfg.StrOpt('plugin_list', default=''),
-    cfg.StrOpt('l3_plugin_list', default=''),
-    cfg.StrOpt('default_flavor', default=''),
-    cfg.StrOpt('default_l3_flavor', default=''),
-    cfg.StrOpt('supported_extension_aliases', default=''),
-    cfg.StrOpt('extension_map', default='')
+    cfg.StrOpt('plugin_list', default='',
+               help=_("List of plugins to load")),
+    cfg.StrOpt('l3_plugin_list', default='',
+               help=_("List of L3 plugins to load")),
+    cfg.StrOpt('default_flavor', default='',
+               help=_("Default flavor to use")),
+    cfg.StrOpt('default_l3_flavor', default='',
+               help=_("Default L3 flavor to use")),
+    cfg.StrOpt('supported_extension_aliases', default='',
+               help=_("Supported extension aliases")),
+    cfg.StrOpt('extension_map', default='',
+               help=_("A list of extensions, per plugin, to load.")),
 ]
 
 proxy_plugin_opts = [
-    cfg.StrOpt('admin_user'),
-    cfg.StrOpt('admin_password'),
-    cfg.StrOpt('admin_tenant_name'),
-    cfg.StrOpt('auth_url'),
+    cfg.StrOpt('admin_user',
+               help=_("Admin user")),
+    cfg.StrOpt('admin_password',
+               help=_("Admin password")),
+    cfg.StrOpt('admin_tenant_name',
+               help=_("Admin tenant name")),
+    cfg.StrOpt('auth_url',
+               help=_("Authentication URL")),
     cfg.StrOpt('auth_strategy', default='keystone',
                help=_("The type of authentication to use")),
-    cfg.StrOpt('auth_region'),
+    cfg.StrOpt('auth_region',
+               help=_("Authentication region")),
 ]
 
 cfg.CONF.register_opts(meta_plugin_opts, "META")
index 313851df29d04595f398e9157b8375ff5d136cf6..0c9228bde3e15d8b4c128b6e94655438f98b3e43 100644 (file)
@@ -21,22 +21,33 @@ from quantum.openstack.common import rpc
 
 
 ovs_opts = [
-    cfg.StrOpt('integration_bridge', default='br-int'),
+    cfg.StrOpt('integration_bridge', default='br-int',
+               help=_("Integration bridge to use")),
 ]
 
 agent_opts = [
-    cfg.IntOpt('polling_interval', default=2),
-    cfg.StrOpt('root_helper', default='sudo'),
+    cfg.IntOpt('polling_interval', default=2,
+               help=_("The number of seconds the agent will wait between "
+                      "polling for local device changes.")),
+    cfg.StrOpt('root_helper', default='sudo',
+               help=_("Root helper application.")),
 ]
 
 ofc_opts = [
-    cfg.StrOpt('host', default='127.0.0.1'),
-    cfg.StrOpt('port', default='8888'),
-    cfg.StrOpt('driver', default='trema'),
-    cfg.BoolOpt('enable_packet_filter', default=True),
-    cfg.BoolOpt('use_ssl', default=False),
-    cfg.StrOpt('key_file', default=None),
-    cfg.StrOpt('cert_file', default=None),
+    cfg.StrOpt('host', default='127.0.0.1',
+               help=_("Host to connect to")),
+    cfg.StrOpt('port', default='8888',
+               help=_("Port to connect to")),
+    cfg.StrOpt('driver', default='trema',
+               help=_("Driver to use")),
+    cfg.BoolOpt('enable_packet_filter', default=True,
+                help=_("Enable packet filter")),
+    cfg.BoolOpt('use_ssl', default=False,
+                help=_("Use SSL to connect")),
+    cfg.StrOpt('key_file', default=None,
+               help=_("Key file")),
+    cfg.StrOpt('cert_file', default=None,
+               help=_("Certificate file")),
 ]
 
 
index 41db479201eefb6f77ae34c9500092730e39ed96..7a26bc04f5e1f7cfbb1474df8217c5b853f115dd 100644 (file)
@@ -18,20 +18,41 @@ from quantum.openstack.common import cfg
 
 
 nvp_opts = [
-    cfg.IntOpt('max_lp_per_bridged_ls', default=64),
-    cfg.IntOpt('max_lp_per_overlay_ls', default=256),
-    cfg.IntOpt('concurrent_connections', default=5),
-    cfg.IntOpt('nvp_gen_timeout', default=-1),
-    cfg.StrOpt('default_cluster_name')
+    cfg.IntOpt('max_lp_per_bridged_ls', default=64,
+               help=_("Maximum number of ports of a logical switch on a "
+                      "bridged transport zone (default 64)")),
+    cfg.IntOpt('max_lp_per_overlay_ls', default=256,
+               help=_("Maximum number of ports of a logical switch on an "
+                      "overlay transport zone (default 64)")),
+    cfg.IntOpt('concurrent_connections', default=5,
+               help=_("Maximum concurrent connections")),
+    cfg.IntOpt('nvp_gen_timeout', default=-1,
+               help=_("Number of seconds a generation id should be valid for "
+                      "(default -1 meaning do not time out)")),
+    cfg.StrOpt('default_cluster_name',
+               help=_("Default cluster name")),
 ]
 
 cluster_opts = [
-    cfg.StrOpt('default_tz_uuid'),
-    cfg.StrOpt('nvp_cluster_uuid'),
-    cfg.StrOpt('nova_zone_id'),
-    cfg.MultiStrOpt('nvp_controller_connection')
+    cfg.StrOpt('default_tz_uuid',
+               help=_("This is uuid of the default NVP Transport zone that "
+                      "will be used for creating tunneled isolated "
+                      "\"Quantum\" networks. It needs to be created in NVP "
+                      "before starting Quantum with the nvp plugin.")),
+    cfg.StrOpt('nvp_cluster_uuid',
+               help=_("Optional paramter identifying the UUID of the cluster "
+                      "in NVP.  This can be retrieved from NVP management "
+                      "console \"admin\" section.")),
+    cfg.StrOpt('nova_zone_id',
+               help=_("Optional parameter identifying the Nova \"zone\" that "
+                      "maps to this NVP cluster.")),
+    cfg.MultiStrOpt('nvp_controller_connection',
+                    help=_("Describes a connection to a single NVP "
+                           "controller. A different connection for each "
+                           "controller in the cluster can be specified; "
+                           "there must be at least one connection per "
+                           "cluster."))
 ]
-
 cfg.CONF.register_opts(nvp_opts, "NVP")
 
 
index a6358509bc519eae0045a0fefad5a50a9b0efa61..fdd7c3918d25382247a52789c4485cff38bbda0e 100644 (file)
@@ -22,16 +22,20 @@ DEFAULT_VLAN_RANGES = []
 DEFAULT_TUNNEL_RANGES = []
 
 ovs_opts = [
-    cfg.StrOpt('integration_bridge', default='br-int'),
-    cfg.BoolOpt('enable_tunneling', default=False),
-    cfg.StrOpt('tunnel_bridge', default='br-tun'),
+    cfg.StrOpt('integration_bridge', default='br-int',
+               help=_("Integration bridge to use")),
+    cfg.BoolOpt('enable_tunneling', default=False,
+                help=_("Enable tunneling support")),
+    cfg.StrOpt('tunnel_bridge', default='br-tun',
+               help=_("Tunnel bridge to use")),
     cfg.StrOpt('int_peer_patch_port', default='patch-tun',
                help=_("Peer patch port in integration bridge for tunnel "
                       "bridge")),
     cfg.StrOpt('tun_peer_patch_port', default='patch-int',
                help=_("Peer patch port in tunnel bridge for integration "
                       "bridge")),
-    cfg.StrOpt('local_ip', default=''),
+    cfg.StrOpt('local_ip', default='',
+               help=_("Local IP address of GRE tunnel endpoints.")),
     cfg.ListOpt('bridge_mappings',
                 default=DEFAULT_BRIDGE_MAPPINGS,
                 help=_("List of <physical_network>:<bridge>")),
@@ -48,8 +52,11 @@ ovs_opts = [
 ]
 
 agent_opts = [
-    cfg.IntOpt('polling_interval', default=2),
-    cfg.StrOpt('root_helper', default='sudo'),
+    cfg.IntOpt('polling_interval', default=2,
+               help=_("The number of seconds the agent will wait between "
+                      "polling for local device changes.")),
+    cfg.StrOpt('root_helper', default='sudo',
+               help=_("Root helper application.")),
 ]
 
 
index a24ffe049befdba5f1c448a8782333734e2eb8d8..c8b75b4ec96e496089c534b96bd9e35ad08551c5 100644 (file)
@@ -18,21 +18,31 @@ from quantum.openstack.common import cfg
 
 
 ovs_opts = [
-    cfg.StrOpt('integration_bridge', default='br-int'),
-    cfg.StrOpt('openflow_controller', default='127.0.0.1:6633'),
-    cfg.StrOpt('openflow_rest_api', default='127.0.0.1:8080'),
-    cfg.IntOpt('tunnel_key_min', default=1),
-    cfg.IntOpt('tunnel_key_max', default=0xffffff),
-    cfg.StrOpt('tunnel_ip', default=None),
-    cfg.StrOpt('tunnel_interface', default=None),
-    cfg.IntOpt('ovsdb_port', default=6634),
-    cfg.StrOpt('ovsdb_ip', default=None),
-    cfg.StrOpt('ovsdb_interface', default=None),
+    cfg.StrOpt('integration_bridge', default='br-int',
+               help=_("Integration bridge to use")),
+    cfg.StrOpt('openflow_controller', default='127.0.0.1:6633',
+               help=_("OpenFlow controller to connect to")),
+    cfg.StrOpt('openflow_rest_api', default='127.0.0.1:8080',
+               help=_("OpenFlow REST API location")),
+    cfg.IntOpt('tunnel_key_min', default=1,
+               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,
+               help=_("Tunnel IP to use")),
+    cfg.StrOpt('tunnel_interface', default=None,
+               help=_("Tunnel interface to use")),
+    cfg.IntOpt('ovsdb_port', default=6634,
+               help=_("OVSDB port to connect to")),
+    cfg.StrOpt('ovsdb_ip', default=None,
+               help=_("OVSDB IP to connect to")),
+    cfg.StrOpt('ovsdb_interface', default=None,
+               help=_("OVSDB interface to connect to")),
 ]
 
 agent_opts = [
-    cfg.IntOpt('polling_interval', default=2),
-    cfg.StrOpt('root_helper', default='sudo'),
+    cfg.StrOpt('root_helper', default='sudo',
+               help=_("Root helper application.")),
 ]