fix various typos in different messages

due the hard string freeze fixed only in master branch

Change-Id: If5ef3e0290e081cca56903882ffc86d9b11d7806
This commit is contained in:
Frank Kloeker 2018-02-10 17:39:40 +01:00
parent 1df345f8dc
commit 666490bc78
15 changed files with 32 additions and 32 deletions

View File

@ -26,9 +26,9 @@ OPTS = [
cfg.StrOpt('username', default='admin', cfg.StrOpt('username', default='admin',
help=_('User name for alarm monitoring')), help=_('User name for alarm monitoring')),
cfg.StrOpt('password', default='devstack', cfg.StrOpt('password', default='devstack',
help=_('password for alarm monitoring')), help=_('Password for alarm monitoring')),
cfg.StrOpt('project_name', default='admin', cfg.StrOpt('project_name', default='admin',
help=_('project name for alarm monitoring')), help=_('Project name for alarm monitoring')),
] ]
cfg.CONF.register_opts(OPTS, 'alarm_auth') cfg.CONF.register_opts(OPTS, 'alarm_auth')

View File

@ -54,7 +54,7 @@ def _verify_dict_keys(expected_keys, target_dict, strict=True):
predicate = expected_keys.__eq__ if strict else expected_keys.issubset predicate = expected_keys.__eq__ if strict else expected_keys.issubset
if not predicate(provided_keys): if not predicate(provided_keys):
msg = (_("Validation of dictionary's keys failed." msg = (_("Validation of dictionary's keys failed. "
"Expected keys: %(expected_keys)s " "Expected keys: %(expected_keys)s "
"Provided keys: %(provided_keys)s") % "Provided keys: %(provided_keys)s") %
{'expected_keys': expected_keys, {'expected_keys': expected_keys,

View File

@ -487,7 +487,7 @@ class Controller(object):
res_dict['tenant_id'] = context.tenant_id res_dict['tenant_id'] = context.tenant_id
else: else:
msg = _("Running without keystone AuthN requires " msg = _("Running without keystone AuthN requires "
" that tenant_id is specified") "that tenant_id is specified")
raise webob.exc.HTTPBadRequest(msg) raise webob.exc.HTTPBadRequest(msg)
@staticmethod @staticmethod

View File

@ -95,7 +95,7 @@ class PolicyCheckError(TackerException):
class InUse(TackerException): class InUse(TackerException):
message = _("The resource is inuse") message = _("The resource is in use")
class MalformedRequestBody(BadRequest): class MalformedRequestBody(BadRequest):

View File

@ -146,7 +146,7 @@ def add_command_parsers(subparsers):
help=_('Resource name for which deleted entries are to be purged.')) help=_('Resource name for which deleted entries are to be purged.'))
# optional parameter, can be skipped. default='90' # optional parameter, can be skipped. default='90'
parser.add_argument('-a', '--age', nargs='?', default='90', parser.add_argument('-a', '--age', nargs='?', default='90',
help=_('How long to preserve deleted data,' help=_('How long to preserve deleted data, '
'defaults to 90')) 'defaults to 90'))
# optional parameter, can be skipped. default='days' # optional parameter, can be skipped. default='days'
parser.add_argument( parser.add_argument(

View File

@ -48,7 +48,7 @@ class VNFInUse(exceptions.InUse):
class InvalidInfraDriver(exceptions.InvalidInput): class InvalidInfraDriver(exceptions.InvalidInput):
message = _('VIM type %(vim_name)s is not supported as an infra driver ') message = _('VIM type %(vim_name)s is not supported as an infra driver')
class InvalidServiceType(exceptions.InvalidInput): class InvalidServiceType(exceptions.InvalidInput):
@ -108,9 +108,9 @@ class IPAddrInvalidInput(exceptions.InvalidInput):
class HugePageSizeInvalidInput(exceptions.InvalidInput): class HugePageSizeInvalidInput(exceptions.InvalidInput):
message = _("Value specified for mem_page_size is invalid:" message = _("Value specified for mem_page_size is invalid: "
"%(error_msg_details)s. The valid values are 'small', 'large'," "%(error_msg_details)s. The valid values are 'small', 'large',"
"'any' or an integer value in MB") " 'any' or an integer value in MB")
class CpuAllocationInvalidKeys(exceptions.InvalidInput): class CpuAllocationInvalidKeys(exceptions.InvalidInput):
@ -134,7 +134,7 @@ class InfraDriverUnreachable(exceptions.ServiceUnavailable):
class VNFInactive(exceptions.InvalidInput): class VNFInactive(exceptions.InvalidInput):
message = _("VNF %(vnf_id)s is not in Active state %(message)s") message = _("VNF %(vnf_id)s is not in Active state: %(message)s")
class MetadataNotMatched(exceptions.InvalidInput): class MetadataNotMatched(exceptions.InvalidInput):
@ -170,11 +170,11 @@ class InvalidKubernetesInputParameter(exceptions.InvalidInput):
def _validate_service_type_list(data, valid_values=None): def _validate_service_type_list(data, valid_values=None):
if not isinstance(data, list): if not isinstance(data, list):
msg = _("invalid data format for service list: '%s'") % data msg = _("Invalid data format for service list: '%s'") % data
LOG.debug(msg) LOG.debug(msg)
return msg return msg
if not data: if not data:
msg = _("empty list is not allowed for service list. '%s'") % data msg = _("Empty list is not allowed for service list. '%s'") % data
LOG.debug(msg) LOG.debug(msg)
return msg return msg
key_specs = { key_specs = {

View File

@ -30,7 +30,7 @@ KUBERNETES_OPTS = [
cfg.BoolOpt('use_barbican', default=True, cfg.BoolOpt('use_barbican', default=True,
help=_('Use barbican to encrypt vim password if True' help=_('Use barbican to encrypt vim password if True'
', save vim credentials in local file system' ', save vim credentials in local file system'
'if False')) ' if False'))
] ]
cfg.CONF.register_opts(KUBERNETES_OPTS, 'k8s_vim') cfg.CONF.register_opts(KUBERNETES_OPTS, 'k8s_vim')

View File

@ -53,11 +53,11 @@ OPTS = [cfg.StrOpt('openstack', default='/etc/tacker/vim/fernet_keys',
# same params as we used in ping monitor driver # same params as we used in ping monitor driver
OPENSTACK_OPTS = [ OPENSTACK_OPTS = [
cfg.StrOpt('count', default='1', cfg.StrOpt('count', default='1',
help=_('number of ICMP packets to send')), help=_('Number of ICMP packets to send')),
cfg.StrOpt('timeout', default='1', cfg.StrOpt('timeout', default='1',
help=_('number of seconds to wait for a response')), help=_('Number of seconds to wait for a response')),
cfg.StrOpt('interval', default='1', cfg.StrOpt('interval', default='1',
help=_('number of seconds to wait between packets')) help=_('Number of seconds to wait between packets'))
] ]
cfg.CONF.register_opts(OPTS, 'vim_keys') cfg.CONF.register_opts(OPTS, 'vim_keys')
cfg.CONF.register_opts(OPENSTACK_OPTS, 'vim_monitor') cfg.CONF.register_opts(OPENSTACK_OPTS, 'vim_monitor')

View File

@ -199,7 +199,7 @@ class OwnerCheck(policy.Check):
self.target_field = re.findall(r'^\%\((.*)\)s$', self.target_field = re.findall(r'^\%\((.*)\)s$',
match)[0] match)[0]
except IndexError: except IndexError:
err_reason = (_("Unable to identify a target field from:%s. " err_reason = (_("Unable to identify a target field from: %s. "
"Match should be in the form %%(<field_name>)s") % "Match should be in the form %%(<field_name>)s") %
match) match)
LOG.exception(err_reason) LOG.exception(err_reason)

View File

@ -265,7 +265,7 @@ class OpenStack(abstract_driver.DeviceAbstractDriver,
raise vnfm.VNFDeleteWaitFailed(reason=error_reason) raise vnfm.VNFDeleteWaitFailed(reason=error_reason)
if stack_retries != 0 and status != 'DELETE_COMPLETE': if stack_retries != 0 and status != 'DELETE_COMPLETE':
error_reason = _("vnf {vnf_id} deletion is not completed. " error_reason = _("VNF {vnf_id} deletion is not completed. "
"{stack_status}").format(vnf_id=vnf_id, "{stack_status}").format(vnf_id=vnf_id,
stack_status=status) stack_status=status)
LOG.warning(error_reason) LOG.warning(error_reason)
@ -347,7 +347,7 @@ class OpenStack(abstract_driver.DeviceAbstractDriver,
if stack_retries == 0: if stack_retries == 0:
metadata = heatclient.resource_metadata(stack_id, policy_name) metadata = heatclient.resource_metadata(stack_id, policy_name)
if not metadata['scaling_in_progress']: if not metadata['scaling_in_progress']:
error_reason = _('when signal occurred within cool down ' error_reason = _('When signal occurred within cool down '
'window, no events generated from heat, ' 'window, no events generated from heat, '
'so ignore it') 'so ignore it')
LOG.warning(error_reason) LOG.warning(error_reason)

View File

@ -28,8 +28,8 @@ from tacker.vnfm.mgmt_drivers import constants as mgmt_constants
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
OPTS = [ OPTS = [
cfg.StrOpt('user', default='root', help=_('user name to login openwrt')), cfg.StrOpt('user', default='root', help=_('User name to login openwrt')),
cfg.StrOpt('password', default='', help=_('password to login openwrt')), cfg.StrOpt('password', default='', help=_('Password to login openwrt')),
] ]
cfg.CONF.register_opts(OPTS, 'openwrt') cfg.CONF.register_opts(OPTS, 'openwrt')

View File

@ -24,9 +24,9 @@ from tacker.vnfm.monitor_drivers import abstract_driver
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
OPTS = [ OPTS = [
cfg.IntOpt('retry', default=5, cfg.IntOpt('retry', default=5,
help=_('number of times to retry')), help=_('Number of times to retry')),
cfg.IntOpt('timeout', default=1, cfg.IntOpt('timeout', default=1,
help=_('number of seconds to wait for a response')), help=_('Number of seconds to wait for a response')),
cfg.IntOpt('port', default=80, cfg.IntOpt('port', default=80,
help=_('HTTP port number to send request')) help=_('HTTP port number to send request'))
] ]

View File

@ -23,11 +23,11 @@ from tacker.vnfm.monitor_drivers import abstract_driver
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
OPTS = [ OPTS = [
cfg.StrOpt('count', default='1', cfg.StrOpt('count', default='1',
help=_('number of ICMP packets to send')), help=_('Number of ICMP packets to send')),
cfg.StrOpt('timeout', default='1', cfg.StrOpt('timeout', default='1',
help=_('number of seconds to wait for a response')), help=_('Number of seconds to wait for a response')),
cfg.StrOpt('interval', default='1', cfg.StrOpt('interval', default='1',
help=_('number of seconds to wait between packets')) help=_('Number of seconds to wait between packets'))
] ]
cfg.CONF.register_opts(OPTS, 'monitor_ping') cfg.CONF.register_opts(OPTS, 'monitor_ping')

View File

@ -830,9 +830,9 @@ class VNFMPlugin(vnfm_db.VNFMPluginDb, VNFMMgmtMixin):
bckend_policy_type = bckend_policy['type'] bckend_policy_type = bckend_policy['type']
if bckend_policy_type == constants.POLICY_SCALING: if bckend_policy_type == constants.POLICY_SCALING:
if vnf_dict['status'] != constants.ACTIVE: if vnf_dict['status'] != constants.ACTIVE:
LOG.info(_("Scaling Policy action" LOG.info(_("Scaling Policy action "
"skipped due to status:" "skipped due to status "
"%(status)s for vnf: %(vnfid)s"), "%(status)s for vnf %(vnfid)s"),
{"status": vnf_dict['status'], {"status": vnf_dict['status'],
"vnfid": vnf_dict['id']}) "vnfid": vnf_dict['id']})
return return

View File

@ -151,18 +151,18 @@ class Server(object):
if CONF.use_ssl: if CONF.use_ssl:
if not os.path.exists(CONF.ssl_cert_file): if not os.path.exists(CONF.ssl_cert_file):
raise RuntimeError(_("Unable to find ssl_cert_file " raise RuntimeError(_("Unable to find ssl_cert_file"
": %s") % CONF.ssl_cert_file) ": %s") % CONF.ssl_cert_file)
# ssl_key_file is optional because the key may be embedded in the # ssl_key_file is optional because the key may be embedded in the
# certificate file # certificate file
if CONF.ssl_key_file and not os.path.exists(CONF.ssl_key_file): if CONF.ssl_key_file and not os.path.exists(CONF.ssl_key_file):
raise RuntimeError(_("Unable to find " raise RuntimeError(_("Unable to find "
"ssl_key_file : %s") % CONF.ssl_key_file) "ssl_key_file: %s") % CONF.ssl_key_file)
# ssl_ca_file is optional # ssl_ca_file is optional
if CONF.ssl_ca_file and not os.path.exists(CONF.ssl_ca_file): if CONF.ssl_ca_file and not os.path.exists(CONF.ssl_ca_file):
raise RuntimeError(_("Unable to find ssl_ca_file " raise RuntimeError(_("Unable to find ssl_ca_file"
": %s") % CONF.ssl_ca_file) ": %s") % CONF.ssl_ca_file)
def wrap_ssl(sock): def wrap_ssl(sock):