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
This commit is contained in:
Andreas Jaeger 2014-02-09 20:17:45 +01:00
parent d7f1221684
commit bccda7adf6
12 changed files with 43 additions and 43 deletions

View File

@ -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):

View File

@ -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)

View File

@ -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:])

View File

@ -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.')),
]

View File

@ -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

View File

@ -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.')),

View File

@ -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,

View File

@ -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: '
'<service_type>:<service_name>:<endpoint_type>'),
'catalog. Format is: separated values of the form: '
'<service_type>:<service_name>:<endpoint_type>.'),
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

View File

@ -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

View File

@ -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 <None>, 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 <None>, librados will locate the default config. '
'If using cephx authentication, this file should '
'include a reference to the right keyring '
'in a client.<USER> section')),
'in a client.<USER> section.')),
]
CONF = cfg.CONF

View File

@ -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 '

View File

@ -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