From 5b748b128caa67966aa61d662a65db29061cd499 Mon Sep 17 00:00:00 2001 From: Kyle Mestery Date: Mon, 28 Jan 2013 10:18:32 +0000 Subject: [PATCH] Finish adding help strings to all config options in Quantum code. 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 --- quantum/agent/dhcp_agent.py | 21 ++++++---- quantum/agent/l3_agent.py | 6 ++- quantum/agent/metadata/agent.py | 15 ++++--- quantum/agent/netns_cleanup_util.py | 3 +- quantum/agent/ovs_cleanup_util.py | 3 +- quantum/debug/debug_agent.py | 21 ++++++---- quantum/plugins/bigswitch/plugin.py | 17 +++++--- .../hyperv/agent/hyperv_quantum_agent.py | 4 +- quantum/plugins/linuxbridge/common/config.py | 7 +++- quantum/plugins/metaplugin/common/config.py | 33 ++++++++++----- quantum/plugins/nec/common/config.py | 31 +++++++++----- .../nicira/nicira_nvp_plugin/common/config.py | 41 ++++++++++++++----- quantum/plugins/openvswitch/common/config.py | 19 ++++++--- quantum/plugins/ryu/common/config.py | 34 +++++++++------ 14 files changed, 175 insertions(+), 80 deletions(-) diff --git a/quantum/agent/dhcp_agent.py b/quantum/agent/dhcp_agent.py index a629a393a0..660a6ca39a 100644 --- a/quantum/agent/dhcp_agent.py +++ b/quantum/agent/dhcp_agent.py @@ -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.")) ] diff --git a/quantum/agent/l3_agent.py b/quantum/agent/l3_agent.py index 8a48493c85..ead5198807 100644 --- a/quantum/agent/l3_agent.py +++ b/quantum/agent/l3_agent.py @@ -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): diff --git a/quantum/agent/metadata/agent.py b/quantum/agent/metadata/agent.py index 210268c0fd..825125dcbb 100644 --- a/quantum/agent/metadata/agent.py +++ b/quantum/agent/metadata/agent.py @@ -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', diff --git a/quantum/agent/netns_cleanup_util.py b/quantum/agent/netns_cleanup_util.py index 12d8ebc174..73f64c3158 100644 --- a/quantum/agent/netns_cleanup_util.py +++ b/quantum/agent/netns_cleanup_util.py @@ -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.")), diff --git a/quantum/agent/ovs_cleanup_util.py b/quantum/agent/ovs_cleanup_util.py index a744c16dbb..3c88c1e58b 100644 --- a/quantum/agent/ovs_cleanup_util.py +++ b/quantum/agent/ovs_cleanup_util.py @@ -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() diff --git a/quantum/debug/debug_agent.py b/quantum/debug/debug_agent.py index 40bdc2ec50..06138d6327 100644 --- a/quantum/debug/debug_agent.py +++ b/quantum/debug/debug_agent.py @@ -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.")), diff --git a/quantum/plugins/bigswitch/plugin.py b/quantum/plugins/bigswitch/plugin.py index 511ce29343..9cfb2aaada 100644 --- a/quantum/plugins/bigswitch/plugin.py +++ b/quantum/plugins/bigswitch/plugin.py @@ -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.")), ] diff --git a/quantum/plugins/hyperv/agent/hyperv_quantum_agent.py b/quantum/plugins/hyperv/agent/hyperv_quantum_agent.py index 687da722d9..35d042a780 100644 --- a/quantum/plugins/hyperv/agent/hyperv_quantum_agent.py +++ b/quantum/plugins/hyperv/agent/hyperv_quantum_agent.py @@ -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.")), ] diff --git a/quantum/plugins/linuxbridge/common/config.py b/quantum/plugins/linuxbridge/common/config.py index 779cb7df5f..39cffdd473 100644 --- a/quantum/plugins/linuxbridge/common/config.py +++ b/quantum/plugins/linuxbridge/common/config.py @@ -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.")), ] diff --git a/quantum/plugins/metaplugin/common/config.py b/quantum/plugins/metaplugin/common/config.py index 3b827bfc70..cf0e354f86 100644 --- a/quantum/plugins/metaplugin/common/config.py +++ b/quantum/plugins/metaplugin/common/config.py @@ -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") diff --git a/quantum/plugins/nec/common/config.py b/quantum/plugins/nec/common/config.py index 313851df29..0c9228bde3 100644 --- a/quantum/plugins/nec/common/config.py +++ b/quantum/plugins/nec/common/config.py @@ -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")), ] diff --git a/quantum/plugins/nicira/nicira_nvp_plugin/common/config.py b/quantum/plugins/nicira/nicira_nvp_plugin/common/config.py index 41db479201..7a26bc04f5 100644 --- a/quantum/plugins/nicira/nicira_nvp_plugin/common/config.py +++ b/quantum/plugins/nicira/nicira_nvp_plugin/common/config.py @@ -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") diff --git a/quantum/plugins/openvswitch/common/config.py b/quantum/plugins/openvswitch/common/config.py index a6358509bc..fdd7c3918d 100644 --- a/quantum/plugins/openvswitch/common/config.py +++ b/quantum/plugins/openvswitch/common/config.py @@ -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 :")), @@ -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.")), ] diff --git a/quantum/plugins/ryu/common/config.py b/quantum/plugins/ryu/common/config.py index a24ffe049b..c8b75b4ec9 100644 --- a/quantum/plugins/ryu/common/config.py +++ b/quantum/plugins/ryu/common/config.py @@ -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.")), ]