From bc8aa84ec73cb07e93093367b5b6190400fb7766 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 8 Feb 2014 12:48:22 +0100 Subject: [PATCH] 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 "." * Improve wording and capitalization Change-Id: I461589e4d20be6085281962ebf6e99262a58c761 --- trove/common/cfg.py | 24 ++++++++++++------------ trove/common/debug_utils.py | 10 +++++----- trove/db/__init__.py | 2 +- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/trove/common/cfg.py b/trove/common/cfg.py index 1a9688e1e7..37ce9b07c5 100644 --- a/trove/common/cfg.py +++ b/trove/common/cfg.py @@ -36,7 +36,7 @@ LOG = logging.getLogger(__name__) common_opts = [ cfg.StrOpt('sql_connection', default='sqlite:///trove_test.sqlite', - help='SQL Connection', + help='SQL Connection.', secret=True), cfg.IntOpt('sql_idle_timeout', default=3600), cfg.BoolOpt('sql_query_log', default=False), @@ -51,10 +51,10 @@ common_opts = [ help='Whether to provision a cinder volume for datadir.'), cfg.ListOpt('admin_roles', default=['admin']), cfg.BoolOpt('update_status_on_fail', default=False, - help='If instance failed to become active, ' + help='If instance fails to become active, ' 'taskmanager updates statuses, ' 'service status = FAILED_TIMEOUT_GUESTAGENT, ' - 'instance task status = BUILDING_ERROR_TIMEOUT_GA'), + 'instance task status = BUILDING_ERROR_TIMEOUT_GA.'), cfg.StrOpt('nova_compute_url', default='http://localhost:8774/v2'), cfg.StrOpt('cinder_url', default='http://localhost:8776/v2'), cfg.StrOpt('heat_url', default='http://localhost:8004/v1'), @@ -120,8 +120,8 @@ common_opts = [ cfg.StrOpt('mount_point', default='/var/lib/mysql'), cfg.StrOpt('default_datastore', default=None, help="The default datastore id or name to use if one is not " - "provided by the user. If the default value is None, the field" - " becomes required in the instance-create request."), + "provided by the user. If the default value is None, the field " + "becomes required in the instance-create request."), cfg.StrOpt('datastore_manager', default=None, help='Manager class in guestagent, setup by taskmanager on ' 'instance provision.'), @@ -185,9 +185,9 @@ common_opts = [ cfg.BoolOpt('backup_use_gzip_compression', default=True, help='Compress backups using gzip.'), cfg.BoolOpt('backup_use_openssl_encryption', default=True, - help='Encrypt backups using openssl.'), + help='Encrypt backups using OpenSSL.'), cfg.StrOpt('backup_aes_cbc_key', default='default_aes_cbc_key', - help='Default openssl aes_cbc key.'), + help='Default OpenSSL aes_cbc key.'), cfg.BoolOpt('backup_use_snet', default=False, help='Send backup files over snet.'), cfg.IntOpt('backup_chunk_size', default=2 ** 16, @@ -211,18 +211,18 @@ common_opts = [ cfg.StrOpt('remote_swift_client', default='trove.common.remote.swift_client'), cfg.StrOpt('exists_notification_transformer', - help='Transformer for exists notifications'), + help='Transformer for exists notifications.'), cfg.IntOpt('exists_notification_ticks', default=360, help='Number of report_intervals to wait between pushing ' 'events (see report_interval).'), cfg.DictOpt('notification_service_id', default={}, help='Unique ID to tag notification events.'), cfg.StrOpt('nova_proxy_admin_user', default='', - help="Admin username used to connect to Nova.", secret=True), + help="Admin username used to connect to nova.", secret=True), cfg.StrOpt('nova_proxy_admin_pass', default='', - help="Admin password used to connect to Nova,", secret=True), + help="Admin password used to connect to nova,", secret=True), cfg.StrOpt('nova_proxy_admin_tenant_name', default='', - help="Admin tenant used to connect to Nova.", secret=True), + help="Admin tenant used to connect to nova.", secret=True), cfg.StrOpt('network_label_regex', default='^private$'), cfg.StrOpt('ip_regex', default=None), cfg.StrOpt('cloudinit_location', default='/etc/trove/cloudinit', @@ -239,7 +239,7 @@ common_opts = [ help='Path which leads to datastore templates.'), cfg.BoolOpt('sql_query_logging', default=False, help='Allow insecure logging while ' - 'executing queries through sqlalchemy.'), + 'executing queries through SQLAlchemy.'), cfg.ListOpt('expected_filetype_suffixes', default=['atom', 'json', 'xml'], help='Filetype endings not to be reattached to an id ' diff --git a/trove/common/debug_utils.py b/trove/common/debug_utils.py index 1f9412f277..78582d58e6 100644 --- a/trove/common/debug_utils.py +++ b/trove/common/debug_utils.py @@ -35,17 +35,17 @@ pydev_debug_opts = [ help="Enable or disable pydev remote debugging. " "If value is 'auto' tries to connect to remote " "debugger server, but in case of error " - "continue running with disabled debugging"), + "continues running with debugging disabled."), cfg.StrOpt("pydev_debug_host", - help="pydev debug server host (localhost by default)"), + help="Pydev debug server host (localhost by default)."), cfg.IntOpt("pydev_debug_port", - help="pydev debug server port (5678 by default)"), + help="Pydev debug server port (5678 by default)."), cfg.StrOpt("pydev_path", - help="defines path to pydevd library, used if pydevd is " - "not found in python sys.path") + help="Set path to pydevd library, used if pydevd is " + "not found in python sys.path.") ] CONF.register_opts(pydev_debug_opts) diff --git a/trove/db/__init__.py b/trove/db/__init__.py index 0b8943cb03..3d9e087354 100644 --- a/trove/db/__init__.py +++ b/trove/db/__init__.py @@ -110,5 +110,5 @@ def add_options(parser): metavar="CONNECTION", default=None, help="A valid SQLAlchemy connection string for the " - "registry database. Default: %default") + "registry database. Default: %(default)s.") parser.add_option_group(group)