Improve help strings

Follow oslo.config style guide for help strings better to create
consistent help strings:
* Capitalize first word of each help string
* Finish help strings with "."

Change-Id: Ia08fa09593661e6e5b834d98bbd92689c2674075
This commit is contained in:
Andreas Jaeger 2014-02-07 22:13:30 +01:00
parent 355d15aee3
commit 5a860beb87
13 changed files with 46 additions and 43 deletions

View File

@ -50,7 +50,7 @@ amqp_opts = [
# FIXME(markmc): this was toplevel in openstack.common.rpc # FIXME(markmc): this was toplevel in openstack.common.rpc
cfg.IntOpt('rpc_conn_pool_size', cfg.IntOpt('rpc_conn_pool_size',
default=30, default=30,
help='Size of RPC connection pool'), help='Size of RPC connection pool.'),
] ]
UNIQUE_ID = '_unique_id' UNIQUE_ID = '_unique_id'

View File

@ -80,8 +80,9 @@ _exception_opts = [
'cinder.exception', 'cinder.exception',
_EXCEPTIONS_MODULE, _EXCEPTIONS_MODULE,
], ],
help='Modules of exceptions that are permitted to be recreated' help='Modules of exceptions that are permitted to be '
'upon receiving exception data from an rpc call.'), 'recreated upon receiving exception data from an rpc '
'call.'),
] ]

View File

@ -39,32 +39,33 @@ LOG = logging.getLogger(__name__)
qpid_opts = [ qpid_opts = [
cfg.StrOpt('qpid_hostname', cfg.StrOpt('qpid_hostname',
default='localhost', default='localhost',
help='Qpid broker hostname'), help='Qpid broker hostname.'),
cfg.IntOpt('qpid_port', cfg.IntOpt('qpid_port',
default=5672, default=5672,
help='Qpid broker port'), help='Qpid broker port.'),
cfg.ListOpt('qpid_hosts', cfg.ListOpt('qpid_hosts',
default=['$qpid_hostname:$qpid_port'], default=['$qpid_hostname:$qpid_port'],
help='Qpid HA cluster host:port pairs'), help='Qpid HA cluster host:port pairs.'),
cfg.StrOpt('qpid_username', cfg.StrOpt('qpid_username',
default='', default='',
help='Username for Qpid connection'), help='Username for Qpid connection.'),
cfg.StrOpt('qpid_password', cfg.StrOpt('qpid_password',
default='', default='',
help='Password for Qpid connection', help='Password for Qpid connection.',
secret=True), secret=True),
cfg.StrOpt('qpid_sasl_mechanisms', cfg.StrOpt('qpid_sasl_mechanisms',
default='', default='',
help='Space separated list of SASL mechanisms to use for auth'), help='Space separated list of SASL mechanisms to use for '
'auth.'),
cfg.IntOpt('qpid_heartbeat', cfg.IntOpt('qpid_heartbeat',
default=60, default=60,
help='Seconds between connection keepalive heartbeats'), help='Seconds between connection keepalive heartbeats.'),
cfg.StrOpt('qpid_protocol', cfg.StrOpt('qpid_protocol',
default='tcp', default='tcp',
help="Transport to use, either 'tcp' or 'ssl'"), help="Transport to use, either 'tcp' or 'ssl'."),
cfg.BoolOpt('qpid_tcp_nodelay', cfg.BoolOpt('qpid_tcp_nodelay',
default=True, default=True,
help='Disable Nagle algorithm'), help='Whether to disable the Nagle algorithm.'),
# NOTE(russellb) If any additional versions are added (beyond 1 and 2), # NOTE(russellb) If any additional versions are added (beyond 1 and 2),
# this file could probably use some additional refactoring so that the # this file could probably use some additional refactoring so that the
# differences between each version are split into different classes. # differences between each version are split into different classes.

View File

@ -41,51 +41,52 @@ rabbit_opts = [
default='', default='',
help='SSL version to use (valid only if SSL enabled). ' help='SSL version to use (valid only if SSL enabled). '
'valid values are TLSv1, SSLv23 and SSLv3. SSLv2 may ' 'valid values are TLSv1, SSLv23 and SSLv3. SSLv2 may '
'be available on some distributions' 'be available on some distributions.'
), ),
cfg.StrOpt('kombu_ssl_keyfile', cfg.StrOpt('kombu_ssl_keyfile',
default='', default='',
help='SSL key file (valid only if SSL enabled)'), help='SSL key file (valid only if SSL enabled).'),
cfg.StrOpt('kombu_ssl_certfile', cfg.StrOpt('kombu_ssl_certfile',
default='', default='',
help='SSL cert file (valid only if SSL enabled)'), help='SSL cert file (valid only if SSL enabled).'),
cfg.StrOpt('kombu_ssl_ca_certs', cfg.StrOpt('kombu_ssl_ca_certs',
default='', default='',
help=('SSL certification authority file ' help=('SSL certification authority file '
'(valid only if SSL enabled)')), '(valid only if SSL enabled).')),
cfg.StrOpt('rabbit_host', cfg.StrOpt('rabbit_host',
default='localhost', default='localhost',
help='The RabbitMQ broker address where a single node is used'), help='The RabbitMQ broker address where a single node is '
'used.'),
cfg.IntOpt('rabbit_port', cfg.IntOpt('rabbit_port',
default=5672, default=5672,
help='The RabbitMQ broker port where a single node is used'), help='The RabbitMQ broker port where a single node is used.'),
cfg.ListOpt('rabbit_hosts', cfg.ListOpt('rabbit_hosts',
default=['$rabbit_host:$rabbit_port'], default=['$rabbit_host:$rabbit_port'],
help='RabbitMQ HA cluster host:port pairs'), help='RabbitMQ HA cluster host:port pairs.'),
cfg.BoolOpt('rabbit_use_ssl', cfg.BoolOpt('rabbit_use_ssl',
default=False, default=False,
help='Connect over SSL for RabbitMQ'), help='Connect over SSL for RabbitMQ.'),
cfg.StrOpt('rabbit_userid', cfg.StrOpt('rabbit_userid',
default='guest', default='guest',
help='The RabbitMQ userid'), help='The RabbitMQ userid.'),
cfg.StrOpt('rabbit_password', cfg.StrOpt('rabbit_password',
default='guest', default='guest',
help='The RabbitMQ password', help='The RabbitMQ password.',
secret=True), secret=True),
cfg.StrOpt('rabbit_virtual_host', cfg.StrOpt('rabbit_virtual_host',
default='/', default='/',
help='The RabbitMQ virtual host'), help='The RabbitMQ virtual host.'),
cfg.IntOpt('rabbit_retry_interval', cfg.IntOpt('rabbit_retry_interval',
default=1, default=1,
help='How frequently to retry connecting with RabbitMQ'), help='How frequently to retry connecting with RabbitMQ.'),
cfg.IntOpt('rabbit_retry_backoff', cfg.IntOpt('rabbit_retry_backoff',
default=2, default=2,
help='How long to backoff for between retries when connecting ' help='How long to backoff for between retries when connecting '
'to RabbitMQ'), 'to RabbitMQ.'),
cfg.IntOpt('rabbit_max_retries', cfg.IntOpt('rabbit_max_retries',
default=0, default=0,
help='Maximum number of RabbitMQ connection retries. ' help='Maximum number of RabbitMQ connection retries. '
'Default is 0 (infinite retry count)'), 'Default is 0 (infinite retry count).'),
cfg.BoolOpt('rabbit_ha_queues', cfg.BoolOpt('rabbit_ha_queues',
default=False, default=False,
help='Use HA queues in RabbitMQ (x-ha-policy: all). ' help='Use HA queues in RabbitMQ (x-ha-policy: all). '
@ -95,7 +96,7 @@ rabbit_opts = [
# FIXME(markmc): this was toplevel in openstack.common.rpc # FIXME(markmc): this was toplevel in openstack.common.rpc
cfg.BoolOpt('fake_rabbit', cfg.BoolOpt('fake_rabbit',
default=False, default=False,
help='If passed, use a fake RabbitMQ provider'), help='If passed, use a fake RabbitMQ provider.'),
] ]
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -60,22 +60,22 @@ zmq_opts = [
'rpc_zmq_matchmaker', 'rpc_zmq_matchmaker',
default=('oslo.messaging._drivers.' default=('oslo.messaging._drivers.'
'matchmaker.MatchMakerLocalhost'), 'matchmaker.MatchMakerLocalhost'),
help='MatchMaker driver', help='MatchMaker driver.',
), ),
# The following port is unassigned by IANA as of 2012-05-21 # The following port is unassigned by IANA as of 2012-05-21
cfg.IntOpt('rpc_zmq_port', default=9501, cfg.IntOpt('rpc_zmq_port', default=9501,
help='ZeroMQ receiver listening port'), help='ZeroMQ receiver listening port.'),
cfg.IntOpt('rpc_zmq_contexts', default=1, cfg.IntOpt('rpc_zmq_contexts', default=1,
help='Number of ZeroMQ contexts, defaults to 1'), help='Number of ZeroMQ contexts, defaults to 1.'),
cfg.IntOpt('rpc_zmq_topic_backlog', default=None, cfg.IntOpt('rpc_zmq_topic_backlog', default=None,
help='Maximum number of ingress messages to locally buffer ' help='Maximum number of ingress messages to locally buffer '
'per topic. Default is unlimited.'), 'per topic. Default is unlimited.'),
cfg.StrOpt('rpc_zmq_ipc_dir', default='/var/run/openstack', cfg.StrOpt('rpc_zmq_ipc_dir', default='/var/run/openstack',
help='Directory for holding IPC sockets'), help='Directory for holding IPC sockets.'),
cfg.StrOpt('rpc_zmq_host', default=socket.gethostname(), cfg.StrOpt('rpc_zmq_host', default=socket.gethostname(),
help='Name of this node. Must be a valid hostname, FQDN, or ' help='Name of this node. Must be a valid hostname, FQDN, or '

View File

@ -30,7 +30,7 @@ _ = lambda s: s
matchmaker_opts = [ matchmaker_opts = [
cfg.IntOpt('matchmaker_heartbeat_freq', cfg.IntOpt('matchmaker_heartbeat_freq',
default=300, default=300,
help='Heartbeat frequency'), help='Heartbeat frequency.'),
cfg.IntOpt('matchmaker_heartbeat_ttl', cfg.IntOpt('matchmaker_heartbeat_ttl',
default=600, default=600,
help='Heartbeat time-to-live.'), help='Heartbeat time-to-live.'),

View File

@ -29,13 +29,13 @@ redis = importutils.try_import('redis')
matchmaker_redis_opts = [ matchmaker_redis_opts = [
cfg.StrOpt('host', cfg.StrOpt('host',
default='127.0.0.1', default='127.0.0.1',
help='Host to locate redis'), help='Host to locate redis.'),
cfg.IntOpt('port', cfg.IntOpt('port',
default=6379, default=6379,
help='Use this port to connect to redis host.'), help='Use this port to connect to redis host.'),
cfg.StrOpt('password', cfg.StrOpt('password',
default=None, default=None,
help='Password for Redis server. (optional)'), help='Password for Redis server (optional).'),
] ]
CONF = cfg.CONF CONF = cfg.CONF

View File

@ -35,7 +35,7 @@ matchmaker_opts = [
deprecated_name='matchmaker_ringfile', deprecated_name='matchmaker_ringfile',
deprecated_group='DEFAULT', deprecated_group='DEFAULT',
default='/etc/oslo/matchmaker_ring.json', default='/etc/oslo/matchmaker_ring.json',
help='Matchmaker ring file (JSON)'), help='Matchmaker ring file (JSON).'),
] ]
CONF = cfg.CONF CONF = cfg.CONF

View File

@ -25,7 +25,7 @@ from oslo.messaging.openstack.common import excutils
_eventlet_opts = [ _eventlet_opts = [
cfg.IntOpt('rpc_thread_pool_size', cfg.IntOpt('rpc_thread_pool_size',
default=64, default=64,
help='Size of RPC greenthread pool'), help='Size of RPC greenthread pool.'),
] ]

View File

@ -28,7 +28,7 @@ from oslo.messaging.openstack.common.gettextutils import _ # noqa
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
router_config = cfg.StrOpt('routing_notifier_config', default='', router_config = cfg.StrOpt('routing_notifier_config', default='',
help='RoutingNotifier configuration file location') help='RoutingNotifier configuration file location.')
CONF = cfg.CONF CONF = cfg.CONF
CONF.register_opt(router_config) CONF.register_opt(router_config)

View File

@ -29,12 +29,12 @@ from oslo.messaging import serializer as msg_serializer
_notifier_opts = [ _notifier_opts = [
cfg.MultiStrOpt('notification_driver', cfg.MultiStrOpt('notification_driver',
default=[], default=[],
help='Driver or drivers to handle sending notifications'), help='Driver or drivers to handle sending notifications.'),
cfg.ListOpt('notification_topics', cfg.ListOpt('notification_topics',
default=['notifications', ], default=['notifications', ],
deprecated_name='topics', deprecated_name='topics',
deprecated_group='rpc_notifier2', deprecated_group='rpc_notifier2',
help='AMQP topic used for OpenStack notifications'), help='AMQP topic used for OpenStack notifications.'),
] ]
_LOG = logging.getLogger(__name__) _LOG = logging.getLogger(__name__)

View File

@ -24,15 +24,15 @@ ssl_opts = [
cfg.StrOpt('ca_file', cfg.StrOpt('ca_file',
default=None, default=None,
help="CA certificate file to use to verify " help="CA certificate file to use to verify "
"connecting clients"), "connecting clients."),
cfg.StrOpt('cert_file', cfg.StrOpt('cert_file',
default=None, default=None,
help="Certificate file to use when starting " help="Certificate file to use when starting "
"the server securely"), "the server securely."),
cfg.StrOpt('key_file', cfg.StrOpt('key_file',
default=None, default=None,
help="Private key file to use when starting " help="Private key file to use when starting "
"the server securely"), "the server securely."),
] ]

View File

@ -34,7 +34,7 @@ from oslo.messaging import serializer as msg_serializer
_client_opts = [ _client_opts = [
cfg.IntOpt('rpc_response_timeout', cfg.IntOpt('rpc_response_timeout',
default=60, default=60,
help='Seconds to wait for a response from a call'), help='Seconds to wait for a response from a call.'),
] ]