From bccda7adf62b8a8092c450f1887c07187c1c1af6 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sun, 9 Feb 2014 20:17:45 +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 "." Change-Id: Iac0a0fc0ea6c0cf23f2523fe6030a842810b6909 --- glance/cmd/cache_manage.py | 26 +++++++++++++------------- glance/cmd/control.py | 8 ++++---- glance/cmd/replicator.py | 14 +++++++------- glance/image_cache/__init__.py | 2 +- glance/notifier.py | 2 +- glance/scrubber.py | 2 +- glance/store/__init__.py | 2 +- glance/store/cinder.py | 14 +++++++------- glance/store/gridfs.py | 4 ++-- glance/store/rbd.py | 4 ++-- glance/store/swift.py | 6 +++--- glance/store/vmware_datastore.py | 2 +- 12 files changed, 43 insertions(+), 43 deletions(-) diff --git a/glance/cmd/cache_manage.py b/glance/cmd/cache_manage.py index 706feb7793..218e209d2d 100755 --- a/glance/cmd/cache_manage.py +++ b/glance/cmd/cache_manage.py @@ -303,16 +303,16 @@ def create_options(parser): :param parser: The option parser """ parser.add_option('-v', '--verbose', default=False, action="store_true", - help="Print more verbose output") + help="Print more verbose output.") parser.add_option('-d', '--debug', default=False, action="store_true", - help="Print debugging output") + help="Print debugging output.") parser.add_option('-H', '--host', metavar="ADDRESS", default="0.0.0.0", help="Address of Glance API host. " - "Default: %default") + "Default: %default.") parser.add_option('-p', '--port', dest="port", metavar="PORT", type=int, default=9292, help="Port the Glance API host listens on. " - "Default: %default") + "Default: %default.") parser.add_option('-k', '--insecure', dest="insecure", default=False, action="store_true", help="Explicitly allow glance to perform \"insecure\" " @@ -322,12 +322,12 @@ def create_options(parser): parser.add_option('-f', '--force', dest="force", metavar="FORCE", default=False, action="store_true", help="Prevent select actions from requesting " - "user confirmation") + "user confirmation.") parser.add_option('--os-auth-token', dest='os_auth_token', default=env('OS_AUTH_TOKEN'), - help='Defaults to env[OS_AUTH_TOKEN]') + help='Defaults to env[OS_AUTH_TOKEN].') parser.add_option('-A', '--os_auth_token', '--auth_token', dest='os_auth_token', help=optparse.SUPPRESS_HELP) @@ -335,7 +335,7 @@ def create_options(parser): parser.add_option('--os-username', dest='os_username', default=env('OS_USERNAME'), - help='Defaults to env[OS_USERNAME]') + help='Defaults to env[OS_USERNAME].') parser.add_option('-I', '--os_username', dest='os_username', help=optparse.SUPPRESS_HELP) @@ -343,7 +343,7 @@ def create_options(parser): parser.add_option('--os-password', dest='os_password', default=env('OS_PASSWORD'), - help='Defaults to env[OS_PASSWORD]') + help='Defaults to env[OS_PASSWORD].') parser.add_option('-K', '--os_password', dest='os_password', help=optparse.SUPPRESS_HELP) @@ -351,7 +351,7 @@ def create_options(parser): parser.add_option('--os-region-name', dest='os_region_name', default=env('OS_REGION_NAME'), - help='Defaults to env[OS_REGION_NAME]') + help='Defaults to env[OS_REGION_NAME].') parser.add_option('-R', '--os_region_name', dest='os_region_name', help=optparse.SUPPRESS_HELP) @@ -359,7 +359,7 @@ def create_options(parser): parser.add_option('--os-tenant-id', dest='os_tenant_id', default=env('OS_TENANT_ID'), - help='Defaults to env[OS_TENANT_ID]') + help='Defaults to env[OS_TENANT_ID].') parser.add_option('--os_tenant_id', dest='os_tenant_id', help=optparse.SUPPRESS_HELP) @@ -367,21 +367,21 @@ def create_options(parser): parser.add_option('--os-tenant-name', dest='os_tenant_name', default=env('OS_TENANT_NAME'), - help='Defaults to env[OS_TENANT_NAME]') + help='Defaults to env[OS_TENANT_NAME].') parser.add_option('-T', '--os_tenant_name', dest='os_tenant_name', help=optparse.SUPPRESS_HELP) parser.add_option('--os-auth-url', default=env('OS_AUTH_URL'), - help='Defaults to env[OS_AUTH_URL]') + help='Defaults to env[OS_AUTH_URL].') parser.add_option('-N', '--os_auth_url', dest='os_auth_url', help=optparse.SUPPRESS_HELP) parser.add_option('-S', '--os_auth_strategy', dest="os_auth_strategy", metavar="STRATEGY", default=None, - help="Authentication strategy (keystone or noauth)") + help="Authentication strategy (keystone or noauth).") def parse_options(parser, cli_args): diff --git a/glance/cmd/control.py b/glance/cmd/control.py index 7e8558a69e..21a55f504f 100644 --- a/glance/cmd/control.py +++ b/glance/cmd/control.py @@ -292,20 +292,20 @@ def main(): cfg.StrOpt('pid-file', metavar='PATH', help='File to use as pid file. Default: ' - '/var/run/glance/$server.pid'), + '/var/run/glance/$server.pid.'), cfg.IntOpt('await-child', metavar='DELAY', default=0, help='Period to wait for service death ' 'in order to report exit code ' - '(default is to not wait at all)'), + '(default is to not wait at all).'), cfg.BoolOpt('capture-output', default=False, help='Capture stdout/err in syslog ' - 'instead of discarding'), + 'instead of discarding it.'), cfg.BoolOpt('respawn', default=False, - help='Restart service on unexpected death'), + help='Restart service on unexpected death.'), ] CONF.register_cli_opts(opts) diff --git a/glance/cmd/replicator.py b/glance/cmd/replicator.py index bbd905e597..0eb2322c2e 100755 --- a/glance/cmd/replicator.py +++ b/glance/cmd/replicator.py @@ -737,19 +737,19 @@ def main(): # Options oparser.add_option('-c', '--chunksize', action="store", default=65536, - help="Amount of data to transfer per HTTP write") + help="Amount of data to transfer per HTTP write.") oparser.add_option('-d', '--debug', action="store_true", default=False, - help="Print debugging information") + help="Print debugging information.") oparser.add_option('-D', '--dontreplicate', action="store", default=('created_at date deleted_at location ' 'updated_at'), - help="List of fields to not replicate") + help="List of fields to not replicate.") oparser.add_option('-m', '--metaonly', action="store_true", default=False, - help="Only replicate metadata, not images") + help="Only replicate metadata, not images.") oparser.add_option('-l', '--logfile', action="store", default='', - help="Path of file to log to") + help="Path of file to log to.") oparser.add_option('-s', '--syslog', action="store_true", default=False, - help="Log to syslog instead of a file") + help="Log to syslog instead of a file.") oparser.add_option('-t', '--token', action="store", default='', help=("Pass in your authentication token if you have " "one. If you use this option the same token is " @@ -761,7 +761,7 @@ def main(): help=("Pass in your authentication token if you have " "one. This is the token used for the slave.")) oparser.add_option('-v', '--verbose', action="store_true", default=False, - help="Print more verbose output") + help="Print more verbose output.") (options, command, args) = parse_options(oparser, sys.argv[1:]) diff --git a/glance/image_cache/__init__.py b/glance/image_cache/__init__.py index fa891dfbc1..028e778af6 100644 --- a/glance/image_cache/__init__.py +++ b/glance/image_cache/__init__.py @@ -36,7 +36,7 @@ image_cache_opts = [ help=_('The maximum size in bytes that the cache can use.')), cfg.IntOpt('image_cache_stall_time', default=86400, # 24 hours help=_('The amount of time to let an image remain in the ' - 'cache without being accessed')), + 'cache without being accessed.')), cfg.StrOpt('image_cache_dir', help=_('Base directory that the Image Cache uses.')), ] diff --git a/glance/notifier.py b/glance/notifier.py index a482e4105b..334aa4f5d5 100644 --- a/glance/notifier.py +++ b/glance/notifier.py @@ -36,7 +36,7 @@ notifier_opts = [ 'default). (DEPRECATED)')), cfg.StrOpt('default_publisher_id', default="image.localhost", - help='Default publisher_id for outgoing notifications'), + help='Default publisher_id for outgoing notifications.'), ] CONF = cfg.CONF diff --git a/glance/scrubber.py b/glance/scrubber.py index edb18d764b..921939dfa6 100644 --- a/glance/scrubber.py +++ b/glance/scrubber.py @@ -37,7 +37,7 @@ scrubber_opts = [ help=_('Directory that the scrubber will use to track ' 'information about what to delete. ' 'Make sure this is set in glance-api.conf and ' - 'glance-scrubber.conf')), + 'glance-scrubber.conf.')), cfg.IntOpt('scrub_time', default=0, help=_('The amount of time in seconds to delay before ' 'performing a delete.')), diff --git a/glance/store/__init__.py b/glance/store/__init__.py index e1fba4e015..3a91e90fe9 100644 --- a/glance/store/__init__.py +++ b/glance/store/__init__.py @@ -52,7 +52,7 @@ store_opts = [ help=_('Directory that the scrubber will use to track ' 'information about what to delete. ' 'Make sure this is set in glance-api.conf and ' - 'glance-scrubber.conf')), + 'glance-scrubber.conf.')), cfg.BoolOpt('delayed_delete', default=False, help=_('Turn on/off delayed delete.')), cfg.BoolOpt('use_user_token', default=True, diff --git a/glance/store/cinder.py b/glance/store/cinder.py index a75d5b7778..c1f0bc4059 100644 --- a/glance/store/cinder.py +++ b/glance/store/cinder.py @@ -31,25 +31,25 @@ cinder_opts = [ cfg.StrOpt('cinder_catalog_info', default='volume:cinder:publicURL', help='Info to match when looking for cinder in the service ' - 'catalog. Format is : separated values of the form: ' - '::'), + 'catalog. Format is: separated values of the form: ' + '::.'), cfg.StrOpt('cinder_endpoint_template', default=None, help='Override service catalog lookup with template for cinder ' - 'endpoint e.g. http://localhost:8776/v1/%(project_id)s'), + 'endpoint e.g. http://localhost:8776/v1/%(project_id)s.'), cfg.StrOpt('os_region_name', default=None, - help='Region name of this node'), + help='Region name of this node.'), cfg.StrOpt('cinder_ca_certificates_file', default=None, - help='Location of ca certicates file to use for cinder client ' + help='Location of CA certicates file to use for cinder client ' 'requests.'), cfg.IntOpt('cinder_http_retries', default=3, - help='Number of cinderclient retries on failed http calls'), + help='Number of cinderclient retries on failed http calls.'), cfg.BoolOpt('cinder_api_insecure', default=False, - help='Allow to perform insecure SSL requests to cinder'), + help='Allow to perform insecure SSL requests to cinder.'), ] CONF = cfg.CONF diff --git a/glance/store/gridfs.py b/glance/store/gridfs.py index 3cfddf54b3..fd963cff3f 100644 --- a/glance/store/gridfs.py +++ b/glance/store/gridfs.py @@ -41,8 +41,8 @@ gridfs_opts = [ "or a mongodb URI, or a list of hostnames / mongodb URIs. " "If host is an IPv6 literal it must be enclosed " "in '[' and ']' characters following the RFC2732 " - "URL syntax (e.g. '[::1]' for localhost)"), - cfg.StrOpt('mongodb_store_db', default=None, help='Database to use'), + "URL syntax (e.g. '[::1]' for localhost)."), + cfg.StrOpt('mongodb_store_db', default=None, help='Database to use.'), ] CONF = cfg.CONF diff --git a/glance/store/rbd.py b/glance/store/rbd.py index 703c1aa74e..666aa8c558 100644 --- a/glance/store/rbd.py +++ b/glance/store/rbd.py @@ -56,13 +56,13 @@ rbd_opts = [ cfg.StrOpt('rbd_store_user', default=DEFAULT_USER, help=_('RADOS user to authenticate as (only applicable if ' 'using Cephx. If , a default will be chosen based ' - 'on the client. section in rbd_store_ceph_conf)')), + 'on the client. section in rbd_store_ceph_conf).')), cfg.StrOpt('rbd_store_ceph_conf', default=DEFAULT_CONFFILE, help=_('Ceph configuration file path. ' 'If , librados will locate the default config. ' 'If using cephx authentication, this file should ' 'include a reference to the right keyring ' - 'in a client. section')), + 'in a client. section.')), ] CONF = cfg.CONF diff --git a/glance/store/swift.py b/glance/store/swift.py index ded5a45ba4..75126db104 100644 --- a/glance/store/swift.py +++ b/glance/store/swift.py @@ -54,14 +54,14 @@ swift_opts = [ 'is listening.')), cfg.StrOpt('swift_store_user', secret=True, help=_('The user to authenticate against the Swift ' - 'authentication service')), + 'authentication service.')), cfg.StrOpt('swift_store_key', secret=True, help=_('Auth key for the user authenticating against the ' 'Swift authentication service.')), cfg.StrOpt('swift_store_auth_version', default='2', help=_('Version of the authentication service to use. ' 'Valid versions are 2 for keystone and 1 for swauth ' - 'and rackspace')), + 'and rackspace.')), cfg.BoolOpt('swift_store_auth_insecure', default=False, help=_('If True, swiftclient won\'t check for a valid SSL ' 'certificate when authenticating.')), @@ -85,7 +85,7 @@ swift_opts = [ cfg.IntOpt('swift_store_large_object_size', default=DEFAULT_LARGE_OBJECT_SIZE, help=_('The size, in MB, that Glance will start chunking image ' - 'files and do a large object manifest in Swift')), + 'files and do a large object manifest in Swift.')), cfg.IntOpt('swift_store_large_object_chunk_size', default=DEFAULT_LARGE_OBJECT_CHUNK_SIZE, help=_('The amount of data written to a temporary disk buffer ' diff --git a/glance/store/vmware_datastore.py b/glance/store/vmware_datastore.py index a56593d825..be4a6dc195 100644 --- a/glance/store/vmware_datastore.py +++ b/glance/store/vmware_datastore.py @@ -73,7 +73,7 @@ vmware_opts = [ 'will be stored in the VMware datastore.')), cfg.BoolOpt('vmware_api_insecure', default=False, - help=_('Allow to perform insecure SSL requests to ESX/VC')), + help=_('Allow to perform insecure SSL requests to ESX/VC.')), ] CONF = cfg.CONF