diff --git a/tacker/alarm_receiver.py b/tacker/alarm_receiver.py index 89d5aa0b8..eb7e3cc09 100644 --- a/tacker/alarm_receiver.py +++ b/tacker/alarm_receiver.py @@ -26,9 +26,9 @@ OPTS = [ cfg.StrOpt('username', default='admin', help=_('User name for alarm monitoring')), cfg.StrOpt('password', default='devstack', - help=_('password for alarm monitoring')), + help=_('Password for alarm monitoring')), 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') diff --git a/tacker/api/v1/attributes.py b/tacker/api/v1/attributes.py index d3022581c..08fe1226c 100644 --- a/tacker/api/v1/attributes.py +++ b/tacker/api/v1/attributes.py @@ -54,7 +54,7 @@ def _verify_dict_keys(expected_keys, target_dict, strict=True): predicate = expected_keys.__eq__ if strict else expected_keys.issubset if not predicate(provided_keys): - msg = (_("Validation of dictionary's keys failed." + msg = (_("Validation of dictionary's keys failed. " "Expected keys: %(expected_keys)s " "Provided keys: %(provided_keys)s") % {'expected_keys': expected_keys, diff --git a/tacker/api/v1/base.py b/tacker/api/v1/base.py index ce8253479..aee0bc332 100644 --- a/tacker/api/v1/base.py +++ b/tacker/api/v1/base.py @@ -487,7 +487,7 @@ class Controller(object): res_dict['tenant_id'] = context.tenant_id else: msg = _("Running without keystone AuthN requires " - " that tenant_id is specified") + "that tenant_id is specified") raise webob.exc.HTTPBadRequest(msg) @staticmethod diff --git a/tacker/common/exceptions.py b/tacker/common/exceptions.py index f347d8639..f2c66a768 100644 --- a/tacker/common/exceptions.py +++ b/tacker/common/exceptions.py @@ -95,7 +95,7 @@ class PolicyCheckError(TackerException): class InUse(TackerException): - message = _("The resource is inuse") + message = _("The resource is in use") class MalformedRequestBody(BadRequest): diff --git a/tacker/db/migration/cli.py b/tacker/db/migration/cli.py index f7094f729..70b506b84 100644 --- a/tacker/db/migration/cli.py +++ b/tacker/db/migration/cli.py @@ -146,7 +146,7 @@ def add_command_parsers(subparsers): help=_('Resource name for which deleted entries are to be purged.')) # optional parameter, can be skipped. 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')) # optional parameter, can be skipped. default='days' parser.add_argument( diff --git a/tacker/extensions/vnfm.py b/tacker/extensions/vnfm.py index b13ed9ccf..1cd2d28f1 100644 --- a/tacker/extensions/vnfm.py +++ b/tacker/extensions/vnfm.py @@ -48,7 +48,7 @@ class VNFInUse(exceptions.InUse): 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): @@ -108,9 +108,9 @@ class IPAddrInvalidInput(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'," - "'any' or an integer value in MB") + " 'any' or an integer value in MB") class CpuAllocationInvalidKeys(exceptions.InvalidInput): @@ -134,7 +134,7 @@ class InfraDriverUnreachable(exceptions.ServiceUnavailable): 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): @@ -170,11 +170,11 @@ class InvalidKubernetesInputParameter(exceptions.InvalidInput): def _validate_service_type_list(data, valid_values=None): 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) return msg 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) return msg key_specs = { diff --git a/tacker/nfvo/drivers/vim/kubernetes_driver.py b/tacker/nfvo/drivers/vim/kubernetes_driver.py index 54a96c899..19e810ef0 100644 --- a/tacker/nfvo/drivers/vim/kubernetes_driver.py +++ b/tacker/nfvo/drivers/vim/kubernetes_driver.py @@ -30,7 +30,7 @@ KUBERNETES_OPTS = [ cfg.BoolOpt('use_barbican', default=True, help=_('Use barbican to encrypt vim password if True' ', save vim credentials in local file system' - 'if False')) + ' if False')) ] cfg.CONF.register_opts(KUBERNETES_OPTS, 'k8s_vim') diff --git a/tacker/nfvo/drivers/vim/openstack_driver.py b/tacker/nfvo/drivers/vim/openstack_driver.py index 05c5f18d7..121fa012d 100644 --- a/tacker/nfvo/drivers/vim/openstack_driver.py +++ b/tacker/nfvo/drivers/vim/openstack_driver.py @@ -53,11 +53,11 @@ OPTS = [cfg.StrOpt('openstack', default='/etc/tacker/vim/fernet_keys', # same params as we used in ping monitor driver OPENSTACK_OPTS = [ cfg.StrOpt('count', default='1', - help=_('number of ICMP packets to send')), + help=_('Number of ICMP packets to send')), 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', - 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(OPENSTACK_OPTS, 'vim_monitor') diff --git a/tacker/policy.py b/tacker/policy.py index eb0da8e5c..b96c83fcf 100644 --- a/tacker/policy.py +++ b/tacker/policy.py @@ -199,7 +199,7 @@ class OwnerCheck(policy.Check): self.target_field = re.findall(r'^\%\((.*)\)s$', match)[0] 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 %%()s") % match) LOG.exception(err_reason) diff --git a/tacker/vnfm/infra_drivers/openstack/openstack.py b/tacker/vnfm/infra_drivers/openstack/openstack.py index ce1378566..f35b1b795 100644 --- a/tacker/vnfm/infra_drivers/openstack/openstack.py +++ b/tacker/vnfm/infra_drivers/openstack/openstack.py @@ -265,7 +265,7 @@ class OpenStack(abstract_driver.DeviceAbstractDriver, raise vnfm.VNFDeleteWaitFailed(reason=error_reason) 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=status) LOG.warning(error_reason) @@ -347,7 +347,7 @@ class OpenStack(abstract_driver.DeviceAbstractDriver, if stack_retries == 0: metadata = heatclient.resource_metadata(stack_id, policy_name) 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, ' 'so ignore it') LOG.warning(error_reason) diff --git a/tacker/vnfm/mgmt_drivers/openwrt/openwrt.py b/tacker/vnfm/mgmt_drivers/openwrt/openwrt.py index b28fdf3d9..4499a4cfe 100644 --- a/tacker/vnfm/mgmt_drivers/openwrt/openwrt.py +++ b/tacker/vnfm/mgmt_drivers/openwrt/openwrt.py @@ -28,8 +28,8 @@ from tacker.vnfm.mgmt_drivers import constants as mgmt_constants LOG = logging.getLogger(__name__) OPTS = [ - cfg.StrOpt('user', default='root', help=_('user name to login openwrt')), - cfg.StrOpt('password', default='', help=_('password to login openwrt')), + cfg.StrOpt('user', default='root', help=_('User name to login openwrt')), + cfg.StrOpt('password', default='', help=_('Password to login openwrt')), ] cfg.CONF.register_opts(OPTS, 'openwrt') diff --git a/tacker/vnfm/monitor_drivers/http_ping/http_ping.py b/tacker/vnfm/monitor_drivers/http_ping/http_ping.py index a014081f2..da5a8920e 100644 --- a/tacker/vnfm/monitor_drivers/http_ping/http_ping.py +++ b/tacker/vnfm/monitor_drivers/http_ping/http_ping.py @@ -24,9 +24,9 @@ from tacker.vnfm.monitor_drivers import abstract_driver LOG = logging.getLogger(__name__) OPTS = [ cfg.IntOpt('retry', default=5, - help=_('number of times to retry')), + help=_('Number of times to retry')), 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, help=_('HTTP port number to send request')) ] diff --git a/tacker/vnfm/monitor_drivers/ping/ping.py b/tacker/vnfm/monitor_drivers/ping/ping.py index 9b13c5621..8635fd845 100644 --- a/tacker/vnfm/monitor_drivers/ping/ping.py +++ b/tacker/vnfm/monitor_drivers/ping/ping.py @@ -23,11 +23,11 @@ from tacker.vnfm.monitor_drivers import abstract_driver LOG = logging.getLogger(__name__) OPTS = [ cfg.StrOpt('count', default='1', - help=_('number of ICMP packets to send')), + help=_('Number of ICMP packets to send')), 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', - help=_('number of seconds to wait between packets')) + help=_('Number of seconds to wait between packets')) ] cfg.CONF.register_opts(OPTS, 'monitor_ping') diff --git a/tacker/vnfm/plugin.py b/tacker/vnfm/plugin.py index 0ca66b1d0..f44255104 100644 --- a/tacker/vnfm/plugin.py +++ b/tacker/vnfm/plugin.py @@ -830,9 +830,9 @@ class VNFMPlugin(vnfm_db.VNFMPluginDb, VNFMMgmtMixin): bckend_policy_type = bckend_policy['type'] if bckend_policy_type == constants.POLICY_SCALING: if vnf_dict['status'] != constants.ACTIVE: - LOG.info(_("Scaling Policy action" - "skipped due to status:" - "%(status)s for vnf: %(vnfid)s"), + LOG.info(_("Scaling Policy action " + "skipped due to status " + "%(status)s for vnf %(vnfid)s"), {"status": vnf_dict['status'], "vnfid": vnf_dict['id']}) return diff --git a/tacker/wsgi.py b/tacker/wsgi.py index 10a31eb94..a9186be9e 100644 --- a/tacker/wsgi.py +++ b/tacker/wsgi.py @@ -151,18 +151,18 @@ class Server(object): if CONF.use_ssl: 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) # ssl_key_file is optional because the key may be embedded in the # certificate file if CONF.ssl_key_file and not os.path.exists(CONF.ssl_key_file): 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 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) def wrap_ssl(sock):