Remove config option help translation

Config option help is used to generate sample config files.  This
is done statically and only in English. Translation is done
dynamically at runtime by loading the translation catalogs. So
putting the _() translation around config option help creates
unnecessary work for the translators as this will never be loaded
and translated.

This removes translation markers from config option definitions.

Change-Id: I0597a5b69ef4e179324885cb35bbb72fceb2b830
This commit is contained in:
Sean McGinnis 2018-07-16 16:55:55 -05:00 committed by Brian Rosmaita
parent 65959d6393
commit 1bbe9b3f8a
10 changed files with 146 additions and 148 deletions

View File

@ -53,7 +53,7 @@ LOG = logging.getLogger(__name__)
_CINDER_OPTS = [
cfg.StrOpt('cinder_catalog_info',
default='volumev2::publicURL',
help=_("""
help="""
Information to match when looking for cinder in the service catalog.
When the ``cinder_endpoint_template`` is not set and any of
@ -79,10 +79,10 @@ Related options:
* cinder_store_project_name
* cinder_store_password
""")),
"""),
cfg.StrOpt('cinder_endpoint_template',
default=None,
help=_("""
help="""
Override service catalog lookup with template for cinder endpoint.
When this option is set, this value is used to generate cinder endpoint,
@ -105,10 +105,10 @@ Related options:
* cinder_store_password
* cinder_catalog_info
""")),
"""),
cfg.StrOpt('cinder_os_region_name', deprecated_name='os_region_name',
default=None,
help=_("""
help="""
Region name to lookup cinder service from the service catalog.
This is used only when ``cinder_catalog_info`` is used for determining the
@ -122,9 +122,9 @@ Possible values:
Related options:
* cinder_catalog_info
""")),
"""),
cfg.StrOpt('cinder_ca_certificates_file',
help=_("""
help="""
Location of a CA certificates file used for cinder client requests.
The specified CA certificates file, if set, is used to verify cinder
@ -137,11 +137,11 @@ Possible values:
Related options:
* cinder_api_insecure
""")),
"""),
cfg.IntOpt('cinder_http_retries',
min=0,
default=3,
help=_("""
help="""
Number of cinderclient retries on failed http calls.
When a call failed by any errors, cinderclient will retry the call up to the
@ -153,11 +153,11 @@ Possible values:
Related options:
* None
""")),
"""),
cfg.IntOpt('cinder_state_transition_timeout',
min=0,
default=300,
help=_("""
help="""
Time period, in seconds, to wait for a cinder volume transition to
complete.
@ -174,10 +174,10 @@ Possible values:
Related options:
* None
""")),
"""),
cfg.BoolOpt('cinder_api_insecure',
default=False,
help=_("""
help="""
Allow to perform insecure SSL requests to cinder.
If this option is set to True, HTTPS endpoint connection is verified using the
@ -190,10 +190,10 @@ Possible values:
Related options:
* cinder_ca_certificates_file
""")),
"""),
cfg.StrOpt('cinder_store_auth_address',
default=None,
help=_("""
help="""
The address where the cinder authentication service is listening.
When all of ``cinder_store_auth_address``, ``cinder_store_user_name``,
@ -215,10 +215,10 @@ Related options:
* cinder_store_password
* cinder_store_project_name
""")),
"""),
cfg.StrOpt('cinder_store_user_name',
default=None,
help=_("""
help="""
User name to authenticate against cinder.
This must be used with all the following related options. If any of these are
@ -232,9 +232,9 @@ Related options:
* cinder_store_password
* cinder_store_project_name
""")),
"""),
cfg.StrOpt('cinder_store_password', secret=True,
help=_("""
help="""
Password for the user authenticating against cinder.
This must be used with all the following related options. If any of these are
@ -248,10 +248,10 @@ Related options:
* cinder_store_user_name
* cinder_store_project_name
""")),
"""),
cfg.StrOpt('cinder_store_project_name',
default=None,
help=_("""
help="""
Project name where the image volume is stored in cinder.
If this configuration option is not set, the project in current context is
@ -268,10 +268,10 @@ Related options:
* ``cinder_store_user_name``
* ``cinder_store_password``
""")),
"""),
cfg.StrOpt('rootwrap_config',
default='/etc/glance/rootwrap.conf',
help=_("""
help="""
Path to the rootwrap configuration file to use for running commands as root.
The cinder store requires root privileges to operate the image volumes (for
@ -285,10 +285,10 @@ Possible values:
Related options:
* None
""")),
"""),
cfg.StrOpt('cinder_volume_type',
default=None,
help=_("""
help="""
Volume type that will be used for volume creation in cinder.
Some cinder backends can have several volume types to optimize storage usage.
@ -304,7 +304,7 @@ Possible values:
Related options:
* None
""")),
"""),
]

View File

@ -46,7 +46,7 @@ LOG = logging.getLogger(__name__)
_FILESYSTEM_CONFIGS = [
cfg.StrOpt('filesystem_store_datadir',
default='/var/lib/glance/images',
help=_("""
help="""
Directory to which the filesystem backend store writes images.
Upon start up, Glance creates the directory if it doesn't already
@ -69,9 +69,9 @@ Related options:
* ``filesystem_store_datadirs``
* ``filesystem_store_file_perm``
""")),
"""),
cfg.MultiStrOpt('filesystem_store_datadirs',
help=_("""
help="""
List of directories and their priorities to which the filesystem
backend store writes images.
@ -105,9 +105,9 @@ Related options:
* ``filesystem_store_datadir``
* ``filesystem_store_file_perm``
""")),
"""),
cfg.StrOpt('filesystem_store_metadata_file',
help=_("""
help="""
Filesystem store metadata file.
The path to a file which contains the metadata to be returned with
@ -122,10 +122,10 @@ Possible values:
Related options:
* None
""")),
"""),
cfg.IntOpt('filesystem_store_file_perm',
default=0,
help=_("""
help="""
File access permissions for the image files.
Set the intended file access permissions for image data. This provides
@ -148,7 +148,7 @@ Possible values:
Related options:
* None
"""))]
""")]
MULTI_FILESYSTEM_METADATA_SCHEMA = {
"type": "array",

View File

@ -35,7 +35,7 @@ MAX_REDIRECTS = 5
_HTTP_OPTS = [
cfg.StrOpt('https_ca_certificates_file',
help=_("""
help="""
Path to the CA bundle file.
This configuration option enables the operator to use a custom
@ -50,10 +50,10 @@ Possible values:
Related options:
* https_insecure
""")),
"""),
cfg.BoolOpt('https_insecure',
default=True,
help=_("""
help="""
Set verification of the remote server certificate.
This configuration option takes in a boolean value to determine
@ -72,10 +72,10 @@ Possible values:
Related options:
* https_ca_certificates_file
""")),
"""),
cfg.DictOpt('http_proxy_information',
default={},
help=_("""
help="""
The http/https proxy information to be used to connect to the remote
server.
@ -92,7 +92,7 @@ Possible values:
Related options:
* None
"""))]
""")]
class StoreLocation(glance_store.location.StoreLocation):

View File

@ -52,7 +52,7 @@ LOG = logging.getLogger(__name__)
_RBD_OPTS = [
cfg.IntOpt('rbd_store_chunk_size', default=DEFAULT_CHUNKSIZE,
min=1,
help=_("""
help="""
Size, in megabytes, to chunk RADOS images into.
Provide an integer value representing the size in megabytes to chunk
@ -70,9 +70,9 @@ Possible Values:
Related options:
* None
""")),
"""),
cfg.StrOpt('rbd_store_pool', default=DEFAULT_POOL,
help=_("""
help="""
RADOS pool in which images are stored.
When RBD is used as the storage backend for storing Glance images, the
@ -90,9 +90,9 @@ Possible Values:
Related options:
* None
""")),
"""),
cfg.StrOpt('rbd_store_user', default=DEFAULT_USER,
help=_("""
help="""
RADOS user to authenticate as.
This configuration option takes in the RADOS user to authenticate as.
@ -108,9 +108,9 @@ Possible Values:
Related options:
* rbd_store_ceph_conf
""")),
"""),
cfg.StrOpt('rbd_store_ceph_conf', default=DEFAULT_CONFFILE,
help=_("""
help="""
Ceph configuration file path.
This configuration option takes in the path to the Ceph configuration
@ -126,9 +126,9 @@ Possible Values:
Related options:
* rbd_store_user
""")),
"""),
cfg.IntOpt('rados_connect_timeout', default=0,
help=_("""
help="""
Timeout value for connecting to Ceph cluster.
This configuration option takes in the timeout value in seconds used
@ -144,7 +144,7 @@ Possible Values:
Related options:
* None
"""))
"""),
]

View File

@ -44,7 +44,7 @@ _SHEEPDOG_OPTS = [
cfg.IntOpt('sheepdog_store_chunk_size',
min=1,
default=DEFAULT_CHUNKSIZE,
help=_("""
help="""
Chunk size for images to be stored in Sheepdog data store.
Provide an integer value representing the size in mebibyte
@ -64,10 +64,10 @@ Possible values:
Related Options:
* None
""")),
"""),
cfg.PortOpt('sheepdog_store_port',
default=DEFAULT_PORT,
help=_("""
help="""
Port number on which the sheep daemon will listen.
Provide an integer value representing a valid port number on
@ -86,10 +86,10 @@ Possible values:
Related Options:
* sheepdog_store_address
""")),
"""),
cfg.HostAddressOpt('sheepdog_store_address',
default=DEFAULT_ADDR,
help=_("""
help="""
Address to bind the Sheepdog daemon to.
Provide a string value representing the address to bind the
@ -110,7 +110,7 @@ Possible values:
Related Options:
* sheepdog_store_port
"""))
"""),
]

View File

@ -25,7 +25,7 @@ READ_SIZE = 65536
BUFFERING_OPTS = [
cfg.StrOpt('swift_upload_buffer_dir',
help=_("""
help="""
Directory to buffer image segments before upload to Swift.
Provide a string value representing the absolute path to the
@ -47,7 +47,7 @@ Related options:
* swift_buffer_on_upload
* swift_store_large_object_chunk_size
""")),
"""),
]
CONF = cfg.CONF

View File

@ -55,7 +55,7 @@ ONE_MB = units.k * units.Ki # Here we used the mixed meaning of MB
_SWIFT_OPTS = [
cfg.BoolOpt('swift_store_auth_insecure', default=False,
help=_("""
help="""
Set verification of the server certificate.
This boolean determines whether or not to verify the server
@ -70,10 +70,10 @@ Possible values:
Related options:
* swift_store_cacert
""")),
"""),
cfg.StrOpt('swift_store_cacert',
sample_default='/etc/ssl/certs/ca-certificates.crt',
help=_("""
help="""
Path to the CA bundle file.
This configuration option enables the operator to specify the path to
@ -86,10 +86,10 @@ Possible values:
Related options:
* swift_store_auth_insecure
""")),
"""),
cfg.StrOpt('swift_store_region',
sample_default='RegionTwo',
help=_("""
help="""
The region of Swift endpoint to use by Glance.
Provide a string value representing a Swift region where Glance
@ -115,13 +115,13 @@ Possible values:
Related Options:
* None
""")),
"""),
cfg.StrOpt('swift_store_endpoint',
sample_default="""\
https://swift.openstack.example.org/v1/path_not_including_container\
_name\
""",
help=_("""
help="""
The URL endpoint to use for Swift backend storage.
Provide a string value representing the URL endpoint to use for
@ -140,10 +140,10 @@ Possible values:
Related Options:
* None
""")),
"""),
cfg.StrOpt('swift_store_endpoint_type', default='publicURL',
choices=('publicURL', 'adminURL', 'internalURL'),
help=_("""
help="""
Endpoint Type of Swift service.
This string value indicates the endpoint type to use to fetch the
@ -160,10 +160,10 @@ Possible values:
Related options:
* swift_store_endpoint
""")),
"""),
cfg.StrOpt('swift_store_service_type',
default='object-store',
help=_("""
help="""
Type of Swift service to use.
Provide a string value representing the service type to use for
@ -181,10 +181,10 @@ Possible values:
Related Options:
* None
""")),
"""),
cfg.StrOpt('swift_store_container',
default=DEFAULT_CONTAINER,
help=_("""
help="""
Name of single container to store images/name prefix for multiple containers
When a single container is being used to store images, this configuration
@ -218,10 +218,10 @@ Related options:
* ``swift_store_multi_tenant``
* ``swift_store_create_container_on_put``
""")),
"""),
cfg.IntOpt('swift_store_large_object_size',
default=DEFAULT_LARGE_OBJECT_SIZE, min=1,
help=_("""
help="""
The size threshold, in MB, after which Glance will start segmenting image data.
Swift has an upper limit on the size of a single uploaded object. By default,
@ -244,10 +244,10 @@ Possible values:
Related options:
* ``swift_store_large_object_chunk_size``
""")),
"""),
cfg.IntOpt('swift_store_large_object_chunk_size',
default=DEFAULT_LARGE_OBJECT_CHUNK_SIZE, min=1,
help=_("""
help="""
The maximum size, in MB, of the segments when image data is segmented.
When image data is segmented to upload images that are larger than the limit
@ -267,9 +267,9 @@ Possible values:
Related options:
* ``swift_store_large_object_size``
""")),
"""),
cfg.BoolOpt('swift_store_create_container_on_put', default=False,
help=_("""
help="""
Create container, if it doesn't already exist, when uploading image.
At the time of uploading an image, if the corresponding container doesn't
@ -284,9 +284,9 @@ Possible values:
Related options:
* None
""")),
"""),
cfg.BoolOpt('swift_store_multi_tenant', default=False,
help=_("""
help="""
Store images in tenant's Swift account.
This enables multi-tenant storage mode which causes Glance images to be stored
@ -305,10 +305,10 @@ Possible values:
Related options:
* swift_store_config_file
""")),
"""),
cfg.IntOpt('swift_store_multiple_containers_seed',
default=0, min=0, max=32,
help=_("""
help="""
Seed indicating the number of containers to use for storing images.
When using a single-tenant store, images can be stored in one or more than one
@ -333,9 +333,9 @@ Related options:
* ``swift_store_multi_tenant``
* ``swift_store_create_container_on_put``
""")),
"""),
cfg.ListOpt('swift_store_admin_tenants', default=[],
help=_("""
help="""
List of tenants that will be granted admin access.
This is a list of tenants that will be granted read/write access on
@ -349,10 +349,10 @@ Possible values:
Related options:
* None
""")),
"""),
cfg.BoolOpt('swift_store_ssl_compression',
default=True,
help=_("""
help="""
SSL layer compression for HTTPS Swift requests.
Provide a boolean value to determine whether or not to compress
@ -373,11 +373,11 @@ Possible values:
Related Options:
* None
""")),
"""),
cfg.IntOpt('swift_store_retry_get_count',
default=0,
min=0,
help=_("""
help="""
The number of times a Swift download will be retried before the
request fails.
@ -395,11 +395,11 @@ Possible values:
Related Options:
* None
""")),
"""),
cfg.IntOpt('swift_store_expire_soon_interval',
min=0,
default=60,
help=_("""
help="""
Time in seconds defining the size of the window in which a new
token may be requested before the current token is due to expire.
@ -421,10 +421,10 @@ Possible values:
Related Options:
* None
""")),
"""),
cfg.BoolOpt('swift_store_use_trusts',
default=True,
help=_("""
help="""
Use trusts for multi-tenant Swift store.
This option instructs the Swift store to create a trust for each
@ -447,10 +447,10 @@ Possible values:
Related options:
* swift_store_multi_tenant
""")),
"""),
cfg.BoolOpt('swift_buffer_on_upload',
default=False,
help=_("""
help="""
Buffer image segments before upload to Swift.
Provide a boolean value to indicate whether or not Glance should
@ -473,7 +473,7 @@ Possible values:
Related options:
* swift_upload_buffer_dir
"""))
"""),
]
@ -501,8 +501,7 @@ def swift_retry_iter(resp_iter, length, store, location, manager):
yield chunk
bytes_read += len(chunk)
except swiftclient.ClientException as e:
LOG.warning(_("Swift exception raised %s")
LOG.warning("Swift exception raised %s"
% encodeutils.exception_to_unicode(e))
if bytes_read != length:

View File

@ -24,7 +24,7 @@ from glance_store.i18n import _, _LE
swift_opts = [
cfg.StrOpt('default_swift_reference',
default="ref1",
help=_("""
help="""
Reference to default Swift account/backing store parameters.
Provide a string value representing a reference to the default set
@ -40,42 +40,42 @@ Possible values:
Related options:
* None
""")),
"""),
cfg.StrOpt('swift_store_auth_version', default='2',
help=_('Version of the authentication service to use. '
'Valid versions are 2 and 3 for keystone and 1 '
'(deprecated) for swauth and rackspace.'),
help='Version of the authentication service to use. '
'Valid versions are 2 and 3 for keystone and 1 '
'(deprecated) for swauth and rackspace.',
deprecated_for_removal=True,
deprecated_reason=_("""
deprecated_reason="""
The option 'auth_version' in the Swift back-end configuration file is
used instead.
""")),
"""),
cfg.StrOpt('swift_store_auth_address',
help=_('The address where the Swift authentication '
'service is listening.'),
help='The address where the Swift authentication '
'service is listening.',
deprecated_for_removal=True,
deprecated_reason=_("""
deprecated_reason="""
The option 'auth_address' in the Swift back-end configuration file is
used instead.
""")),
"""),
cfg.StrOpt('swift_store_user', secret=True,
help=_('The user to authenticate against the Swift '
'authentication service.'),
help='The user to authenticate against the Swift '
'authentication service.',
deprecated_for_removal=True,
deprecated_reason=_("""
deprecated_reason="""
The option 'user' in the Swift back-end configuration file is set instead.
""")),
"""),
cfg.StrOpt('swift_store_key', secret=True,
help=_('Auth key for the user authenticating against the '
'Swift authentication service.'),
help='Auth key for the user authenticating against the '
'Swift authentication service.',
deprecated_for_removal=True,
deprecated_reason=_("""
deprecated_reason="""
The option 'key' in the Swift back-end configuration file is used
to set the authentication key instead.
""")),
"""),
cfg.StrOpt('swift_store_config_file',
default=None,
help=_("""
help="""
Absolute path to the file containing the swift account(s)
configurations.
@ -96,7 +96,7 @@ Possible values:
Related options:
* swift_store_multi_tenant
""")),
"""),
]
_config_defaults = {'user_domain_id': 'default',

View File

@ -61,7 +61,7 @@ STORE_SCHEME = 'vsphere'
_VMWARE_OPTS = [
cfg.HostAddressOpt('vmware_server_host',
sample_default='127.0.0.1',
help=_("""
help="""
Address of the ESX/ESXi or vCenter Server target system.
This configuration option sets the address of the ESX/ESXi or vCenter
@ -77,10 +77,10 @@ Related options:
* vmware_server_username
* vmware_server_password
""")),
"""),
cfg.StrOpt('vmware_server_username',
sample_default='root',
help=_("""
help="""
Server username.
This configuration option takes the username for authenticating with
@ -95,10 +95,10 @@ Related options:
* vmware_server_host
* vmware_server_password
""")),
"""),
cfg.StrOpt('vmware_server_password',
sample_default='vmware',
help=_("""
help="""
Server password.
This configuration option takes the password for authenticating with
@ -113,12 +113,12 @@ Related options:
* vmware_server_host
* vmware_server_username
"""),
""",
secret=True),
cfg.IntOpt('vmware_api_retry_count',
default=10,
min=1,
help=_("""
help="""
The number of VMware API retries.
This configuration option specifies the number of times the VMware
@ -132,11 +132,11 @@ Possible Values:
Related options:
* None
""")),
"""),
cfg.IntOpt('vmware_task_poll_interval',
default=5,
min=1,
help=_("""
help="""
Interval in seconds used for polling remote tasks invoked on VMware
ESX/VC server.
@ -149,10 +149,10 @@ Possible Values:
Related options:
* None
""")),
"""),
cfg.StrOpt('vmware_store_image_dir',
default=DEFAULT_STORE_IMAGE_DIR,
help=_("""
help="""
The directory where the glance images will be stored in the datastore.
This configuration option specifies the path to the directory where the
@ -166,11 +166,11 @@ Possible Values:
Related options:
* None
""")),
"""),
cfg.BoolOpt('vmware_insecure',
default=False,
deprecated_name='vmware_api_insecure',
help=_("""
help="""
Set verification of the ESX/vCenter server certificate.
This configuration option takes a boolean value to determine
@ -190,10 +190,10 @@ Possible Values:
Related options:
* vmware_ca_file
""")),
"""),
cfg.StrOpt('vmware_ca_file',
sample_default='/etc/ssl/certs/ca-certificates.crt',
help=_("""
help="""
Absolute path to the CA bundle file.
This configuration option enables the operator to use a custom
@ -209,10 +209,10 @@ Possible Values:
Related options:
* vmware_insecure
""")),
"""),
cfg.MultiStrOpt(
'vmware_datastores',
help=_("""
help="""
The datastores where the image can be stored.
This configuration option specifies the datastores where the image can
@ -237,7 +237,7 @@ Possible Values:
Related options:
* None
"""))]
""")]
def http_response_iterator(conn, response, size):

View File

@ -35,15 +35,15 @@ _STORE_OPTS = [
default=['file', 'http'],
deprecated_for_removal=True,
deprecated_since='Rocky',
deprecated_reason=_("""
deprecated_reason="""
This option is deprecated against new config option
``enabled_backends`` which helps to configure multiple backend stores
of different schemes.
This option is scheduled for removal in the Stein development
cycle.
"""),
help=_("""
""",
help="""
List of enabled Glance stores.
Register the storage backends to use for storing disk images
@ -63,24 +63,23 @@ Possible values:
Related Options:
* default_store
""")),
"""),
cfg.StrOpt('default_store',
default='file',
choices=('file', 'filesystem', 'http', 'https', 'swift',
'swift+http', 'swift+https', 'swift+config', 'rbd',
'sheepdog', 'cinder', 'vsphere'),
deprecated_for_removal=True,
deprecated_since='Rocky',
deprecated_reason=_("""
deprecated_reason="""
This option is deprecated against new config option
``default_backend`` which acts similar to ``default_store`` config
option.
This option is scheduled for removal in the Stein development
cycle.
"""),
help=_("""
""",
help="""
The default scheme to use for storing images.
Provide a string value representing the default scheme to use for
@ -108,21 +107,21 @@ Possible values:
Related Options:
* stores
""")),
"""),
cfg.IntOpt('store_capabilities_update_min_interval',
default=0,
min=0,
deprecated_for_removal=True,
deprecated_since='Rocky',
deprecated_reason=_("""
deprecated_reason="""
This option configures a stub method that has not been implemented
for any existing store drivers. Hence it is non-operational, and
giving it a value does absolutely nothing.
This option is scheduled for removal early in the Stein development
cycle.
"""),
help=_("""
""",
help="""
Minimum interval in seconds to execute updating dynamic storage
capabilities based on current backend status.
@ -158,7 +157,7 @@ Possible values:
Related Options:
* None
""")),
"""),
]
_STORE_CFG_GROUP = 'glance_store'