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 :param parser: The option parser
""" """
parser.add_option('-v', '--verbose', default=False, action="store_true", 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", 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", parser.add_option('-H', '--host', metavar="ADDRESS", default="0.0.0.0",
help="Address of Glance API host. " help="Address of Glance API host. "
"Default: %default") "Default: %default.")
parser.add_option('-p', '--port', dest="port", metavar="PORT", parser.add_option('-p', '--port', dest="port", metavar="PORT",
type=int, default=9292, type=int, default=9292,
help="Port the Glance API host listens on. " help="Port the Glance API host listens on. "
"Default: %default") "Default: %default.")
parser.add_option('-k', '--insecure', dest="insecure", parser.add_option('-k', '--insecure', dest="insecure",
default=False, action="store_true", default=False, action="store_true",
help="Explicitly allow glance to perform \"insecure\" " help="Explicitly allow glance to perform \"insecure\" "
@ -322,12 +322,12 @@ def create_options(parser):
parser.add_option('-f', '--force', dest="force", metavar="FORCE", parser.add_option('-f', '--force', dest="force", metavar="FORCE",
default=False, action="store_true", default=False, action="store_true",
help="Prevent select actions from requesting " help="Prevent select actions from requesting "
"user confirmation") "user confirmation.")
parser.add_option('--os-auth-token', parser.add_option('--os-auth-token',
dest='os_auth_token', dest='os_auth_token',
default=env('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', parser.add_option('-A', '--os_auth_token', '--auth_token',
dest='os_auth_token', dest='os_auth_token',
help=optparse.SUPPRESS_HELP) help=optparse.SUPPRESS_HELP)
@ -335,7 +335,7 @@ def create_options(parser):
parser.add_option('--os-username', parser.add_option('--os-username',
dest='os_username', dest='os_username',
default=env('OS_USERNAME'), default=env('OS_USERNAME'),
help='Defaults to env[OS_USERNAME]') help='Defaults to env[OS_USERNAME].')
parser.add_option('-I', '--os_username', parser.add_option('-I', '--os_username',
dest='os_username', dest='os_username',
help=optparse.SUPPRESS_HELP) help=optparse.SUPPRESS_HELP)
@ -343,7 +343,7 @@ def create_options(parser):
parser.add_option('--os-password', parser.add_option('--os-password',
dest='os_password', dest='os_password',
default=env('OS_PASSWORD'), default=env('OS_PASSWORD'),
help='Defaults to env[OS_PASSWORD]') help='Defaults to env[OS_PASSWORD].')
parser.add_option('-K', '--os_password', parser.add_option('-K', '--os_password',
dest='os_password', dest='os_password',
help=optparse.SUPPRESS_HELP) help=optparse.SUPPRESS_HELP)
@ -351,7 +351,7 @@ def create_options(parser):
parser.add_option('--os-region-name', parser.add_option('--os-region-name',
dest='os_region_name', dest='os_region_name',
default=env('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', parser.add_option('-R', '--os_region_name',
dest='os_region_name', dest='os_region_name',
help=optparse.SUPPRESS_HELP) help=optparse.SUPPRESS_HELP)
@ -359,7 +359,7 @@ def create_options(parser):
parser.add_option('--os-tenant-id', parser.add_option('--os-tenant-id',
dest='os_tenant_id', dest='os_tenant_id',
default=env('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', parser.add_option('--os_tenant_id',
dest='os_tenant_id', dest='os_tenant_id',
help=optparse.SUPPRESS_HELP) help=optparse.SUPPRESS_HELP)
@ -367,21 +367,21 @@ def create_options(parser):
parser.add_option('--os-tenant-name', parser.add_option('--os-tenant-name',
dest='os_tenant_name', dest='os_tenant_name',
default=env('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', parser.add_option('-T', '--os_tenant_name',
dest='os_tenant_name', dest='os_tenant_name',
help=optparse.SUPPRESS_HELP) help=optparse.SUPPRESS_HELP)
parser.add_option('--os-auth-url', parser.add_option('--os-auth-url',
default=env('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', parser.add_option('-N', '--os_auth_url',
dest='os_auth_url', dest='os_auth_url',
help=optparse.SUPPRESS_HELP) help=optparse.SUPPRESS_HELP)
parser.add_option('-S', '--os_auth_strategy', dest="os_auth_strategy", parser.add_option('-S', '--os_auth_strategy', dest="os_auth_strategy",
metavar="STRATEGY", default=None, metavar="STRATEGY", default=None,
help="Authentication strategy (keystone or noauth)") help="Authentication strategy (keystone or noauth).")
def parse_options(parser, cli_args): def parse_options(parser, cli_args):

View File

@ -292,20 +292,20 @@ def main():
cfg.StrOpt('pid-file', cfg.StrOpt('pid-file',
metavar='PATH', metavar='PATH',
help='File to use as pid file. Default: ' help='File to use as pid file. Default: '
'/var/run/glance/$server.pid'), '/var/run/glance/$server.pid.'),
cfg.IntOpt('await-child', cfg.IntOpt('await-child',
metavar='DELAY', metavar='DELAY',
default=0, default=0,
help='Period to wait for service death ' help='Period to wait for service death '
'in order to report exit code ' 'in order to report exit code '
'(default is to not wait at all)'), '(default is to not wait at all).'),
cfg.BoolOpt('capture-output', cfg.BoolOpt('capture-output',
default=False, default=False,
help='Capture stdout/err in syslog ' help='Capture stdout/err in syslog '
'instead of discarding'), 'instead of discarding it.'),
cfg.BoolOpt('respawn', cfg.BoolOpt('respawn',
default=False, default=False,
help='Restart service on unexpected death'), help='Restart service on unexpected death.'),
] ]
CONF.register_cli_opts(opts) CONF.register_cli_opts(opts)

View File

@ -737,19 +737,19 @@ def main():
# Options # Options
oparser.add_option('-c', '--chunksize', action="store", default=65536, 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, 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", oparser.add_option('-D', '--dontreplicate', action="store",
default=('created_at date deleted_at location ' default=('created_at date deleted_at location '
'updated_at'), '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, 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='', 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, 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='', oparser.add_option('-t', '--token', action="store", default='',
help=("Pass in your authentication token if you have " help=("Pass in your authentication token if you have "
"one. If you use this option the same token is " "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 " help=("Pass in your authentication token if you have "
"one. This is the token used for the slave.")) "one. This is the token used for the slave."))
oparser.add_option('-v', '--verbose', action="store_true", default=False, 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:]) (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.')), help=_('The maximum size in bytes that the cache can use.')),
cfg.IntOpt('image_cache_stall_time', default=86400, # 24 hours cfg.IntOpt('image_cache_stall_time', default=86400, # 24 hours
help=_('The amount of time to let an image remain in the ' 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', cfg.StrOpt('image_cache_dir',
help=_('Base directory that the Image Cache uses.')), help=_('Base directory that the Image Cache uses.')),
] ]

View File

@ -36,7 +36,7 @@ notifier_opts = [
'default). (DEPRECATED)')), 'default). (DEPRECATED)')),
cfg.StrOpt('default_publisher_id', default="image.localhost", 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 CONF = cfg.CONF

View File

@ -37,7 +37,7 @@ scrubber_opts = [
help=_('Directory that the scrubber will use to track ' help=_('Directory that the scrubber will use to track '
'information about what to delete. ' 'information about what to delete. '
'Make sure this is set in glance-api.conf and ' 'Make sure this is set in glance-api.conf and '
'glance-scrubber.conf')), 'glance-scrubber.conf.')),
cfg.IntOpt('scrub_time', default=0, cfg.IntOpt('scrub_time', default=0,
help=_('The amount of time in seconds to delay before ' help=_('The amount of time in seconds to delay before '
'performing a delete.')), 'performing a delete.')),

View File

@ -52,7 +52,7 @@ store_opts = [
help=_('Directory that the scrubber will use to track ' help=_('Directory that the scrubber will use to track '
'information about what to delete. ' 'information about what to delete. '
'Make sure this is set in glance-api.conf and ' 'Make sure this is set in glance-api.conf and '
'glance-scrubber.conf')), 'glance-scrubber.conf.')),
cfg.BoolOpt('delayed_delete', default=False, cfg.BoolOpt('delayed_delete', default=False,
help=_('Turn on/off delayed delete.')), help=_('Turn on/off delayed delete.')),
cfg.BoolOpt('use_user_token', default=True, cfg.BoolOpt('use_user_token', default=True,

View File

@ -31,25 +31,25 @@ cinder_opts = [
cfg.StrOpt('cinder_catalog_info', cfg.StrOpt('cinder_catalog_info',
default='volume:cinder:publicURL', default='volume:cinder:publicURL',
help='Info to match when looking for cinder in the service ' 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: '
'<service_type>:<service_name>:<endpoint_type>'), '<service_type>:<service_name>:<endpoint_type>.'),
cfg.StrOpt('cinder_endpoint_template', cfg.StrOpt('cinder_endpoint_template',
default=None, default=None,
help='Override service catalog lookup with template for cinder ' 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', cfg.StrOpt('os_region_name',
default=None, default=None,
help='Region name of this node'), help='Region name of this node.'),
cfg.StrOpt('cinder_ca_certificates_file', cfg.StrOpt('cinder_ca_certificates_file',
default=None, 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.'), 'requests.'),
cfg.IntOpt('cinder_http_retries', cfg.IntOpt('cinder_http_retries',
default=3, 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', cfg.BoolOpt('cinder_api_insecure',
default=False, default=False,
help='Allow to perform insecure SSL requests to cinder'), help='Allow to perform insecure SSL requests to cinder.'),
] ]
CONF = cfg.CONF CONF = cfg.CONF

View File

@ -41,8 +41,8 @@ gridfs_opts = [
"or a mongodb URI, or a list of hostnames / mongodb URIs. " "or a mongodb URI, or a list of hostnames / mongodb URIs. "
"If host is an IPv6 literal it must be enclosed " "If host is an IPv6 literal it must be enclosed "
"in '[' and ']' characters following the RFC2732 " "in '[' and ']' characters following the RFC2732 "
"URL syntax (e.g. '[::1]' for localhost)"), "URL syntax (e.g. '[::1]' for localhost)."),
cfg.StrOpt('mongodb_store_db', default=None, help='Database to use'), cfg.StrOpt('mongodb_store_db', default=None, help='Database to use.'),
] ]
CONF = cfg.CONF CONF = cfg.CONF

View File

@ -56,13 +56,13 @@ rbd_opts = [
cfg.StrOpt('rbd_store_user', default=DEFAULT_USER, cfg.StrOpt('rbd_store_user', default=DEFAULT_USER,
help=_('RADOS user to authenticate as (only applicable if ' help=_('RADOS user to authenticate as (only applicable if '
'using Cephx. If <None>, a default will be chosen based ' '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, cfg.StrOpt('rbd_store_ceph_conf', default=DEFAULT_CONFFILE,
help=_('Ceph configuration file path. ' help=_('Ceph configuration file path. '
'If <None>, librados will locate the default config. ' 'If <None>, librados will locate the default config. '
'If using cephx authentication, this file should ' 'If using cephx authentication, this file should '
'include a reference to the right keyring ' 'include a reference to the right keyring '
'in a client.<USER> section')), 'in a client.<USER> section.')),
] ]
CONF = cfg.CONF CONF = cfg.CONF

View File

@ -54,14 +54,14 @@ swift_opts = [
'is listening.')), 'is listening.')),
cfg.StrOpt('swift_store_user', secret=True, cfg.StrOpt('swift_store_user', secret=True,
help=_('The user to authenticate against the Swift ' help=_('The user to authenticate against the Swift '
'authentication service')), 'authentication service.')),
cfg.StrOpt('swift_store_key', secret=True, cfg.StrOpt('swift_store_key', secret=True,
help=_('Auth key for the user authenticating against the ' help=_('Auth key for the user authenticating against the '
'Swift authentication service.')), 'Swift authentication service.')),
cfg.StrOpt('swift_store_auth_version', default='2', cfg.StrOpt('swift_store_auth_version', default='2',
help=_('Version of the authentication service to use. ' help=_('Version of the authentication service to use. '
'Valid versions are 2 for keystone and 1 for swauth ' 'Valid versions are 2 for keystone and 1 for swauth '
'and rackspace')), 'and rackspace.')),
cfg.BoolOpt('swift_store_auth_insecure', default=False, cfg.BoolOpt('swift_store_auth_insecure', default=False,
help=_('If True, swiftclient won\'t check for a valid SSL ' help=_('If True, swiftclient won\'t check for a valid SSL '
'certificate when authenticating.')), 'certificate when authenticating.')),
@ -85,7 +85,7 @@ swift_opts = [
cfg.IntOpt('swift_store_large_object_size', cfg.IntOpt('swift_store_large_object_size',
default=DEFAULT_LARGE_OBJECT_SIZE, default=DEFAULT_LARGE_OBJECT_SIZE,
help=_('The size, in MB, that Glance will start chunking image ' 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', cfg.IntOpt('swift_store_large_object_chunk_size',
default=DEFAULT_LARGE_OBJECT_CHUNK_SIZE, default=DEFAULT_LARGE_OBJECT_CHUNK_SIZE,
help=_('The amount of data written to a temporary disk buffer ' 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.')), 'will be stored in the VMware datastore.')),
cfg.BoolOpt('vmware_api_insecure', cfg.BoolOpt('vmware_api_insecure',
default=False, 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 CONF = cfg.CONF