Fix typos in log/error messages
This change fixes some of the typos in LOG and ERROR messages, comments and variable names. Change-Id: I26ebf751b7d187399e8b3d8089e09b9d51ba3625
This commit is contained in:
parent
8c1ad2dfad
commit
18b1b61401
|
@ -220,7 +220,7 @@ class ObjEqValueParam(click.ParamType):
|
||||||
try:
|
try:
|
||||||
return self.types[obj](value, self.direction, ctx)
|
return self.types[obj](value, self.direction, ctx)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
self.fail(f"Unkown object type {obj!r}", param, ctx)
|
self.fail(f"Unknown object type {obj!r}", param, ctx)
|
||||||
|
|
||||||
|
|
||||||
class ToFromParam(ObjEqValueParam):
|
class ToFromParam(ObjEqValueParam):
|
||||||
|
|
|
@ -379,14 +379,14 @@ class CoreChecks(base.BaseChecks):
|
||||||
if mac != converters.convert_to_sanitized_mac_address(mac):
|
if mac != converters.convert_to_sanitized_mac_address(mac):
|
||||||
return upgradecheck.Result(
|
return upgradecheck.Result(
|
||||||
upgradecheck.Code.WARNING,
|
upgradecheck.Code.WARNING,
|
||||||
_("There port MAC addresses not correctly formated in the"
|
_("There are port MAC addresses not correctly formatted "
|
||||||
"database. The script "
|
"in the database. The script "
|
||||||
"neutron-sanitize-port-mac-addresses should be "
|
"neutron-sanitize-port-mac-addresses should be "
|
||||||
"executed"))
|
"executed."))
|
||||||
|
|
||||||
return upgradecheck.Result(
|
return upgradecheck.Result(
|
||||||
upgradecheck.Code.SUCCESS,
|
upgradecheck.Code.SUCCESS,
|
||||||
_("All port MAC addresses are correctly formated in the "
|
_("All port MAC addresses are correctly formatted in the "
|
||||||
"database."))
|
"database."))
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -436,13 +436,13 @@ class CoreChecks(base.BaseChecks):
|
||||||
return upgradecheck.Result(
|
return upgradecheck.Result(
|
||||||
upgradecheck.Code.FAILURE,
|
upgradecheck.Code.FAILURE,
|
||||||
_("ml2_port_bindings.profile rows are not correctly "
|
_("ml2_port_bindings.profile rows are not correctly "
|
||||||
"formated in the database. The script "
|
"formatted in the database. The script "
|
||||||
"neutron-sanitize-port-binding-profile-allocation "
|
"neutron-sanitize-port-binding-profile-allocation "
|
||||||
"should be executed"))
|
"should be executed"))
|
||||||
|
|
||||||
return upgradecheck.Result(
|
return upgradecheck.Result(
|
||||||
upgradecheck.Code.SUCCESS,
|
upgradecheck.Code.SUCCESS,
|
||||||
_("All ml2_port_bindings.profile rows are correctly formated in "
|
_("All ml2_port_bindings.profile rows are correctly formatted in "
|
||||||
"the database."))
|
"the database."))
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
|
@ -25,7 +25,7 @@ class RevisionConflict(n_exc.NeutronException):
|
||||||
|
|
||||||
|
|
||||||
class UnknownResourceType(n_exc.NeutronException):
|
class UnknownResourceType(n_exc.NeutronException):
|
||||||
message = _('Uknown resource type: %(resource_type)s')
|
message = _('Unknown resource type: %(resource_type)s')
|
||||||
|
|
||||||
|
|
||||||
class StandardAttributeIDNotFound(n_exc.NeutronException):
|
class StandardAttributeIDNotFound(n_exc.NeutronException):
|
||||||
|
|
|
@ -361,12 +361,12 @@ def get_revision_number(resource, resource_type):
|
||||||
|
|
||||||
|
|
||||||
def remove_macs_from_lsp_addresses(addresses):
|
def remove_macs_from_lsp_addresses(addresses):
|
||||||
"""Remove the mac addreses from the Logical_Switch_Port addresses column.
|
"""Remove the mac addresses from the Logical_Switch_Port addresses column.
|
||||||
|
|
||||||
:param addresses: The list of addresses from the Logical_Switch_Port.
|
:param addresses: The list of addresses from the Logical_Switch_Port.
|
||||||
Example: ["80:fa:5b:06:72:b7 158.36.44.22",
|
Example: ["80:fa:5b:06:72:b7 158.36.44.22",
|
||||||
"ff:ff:ff:ff:ff:ff 10.0.0.2"]
|
"ff:ff:ff:ff:ff:ff 10.0.0.2"]
|
||||||
:returns: A list of IP addesses (v4 and v6)
|
:returns: A list of IP addresses (v4 and v6)
|
||||||
"""
|
"""
|
||||||
ip_list = []
|
ip_list = []
|
||||||
for addr in addresses:
|
for addr in addresses:
|
||||||
|
@ -380,7 +380,7 @@ def get_allowed_address_pairs_ip_addresses(port):
|
||||||
"""Return a list of IP addresses from port's allowed_address_pairs.
|
"""Return a list of IP addresses from port's allowed_address_pairs.
|
||||||
|
|
||||||
:param port: A neutron port
|
:param port: A neutron port
|
||||||
:returns: A list of IP addesses (v4 and v6)
|
:returns: A list of IP addresses (v4 and v6)
|
||||||
"""
|
"""
|
||||||
return [x['ip_address'] for x in port.get('allowed_address_pairs', [])
|
return [x['ip_address'] for x in port.get('allowed_address_pairs', [])
|
||||||
if 'ip_address' in x]
|
if 'ip_address' in x]
|
||||||
|
@ -393,7 +393,7 @@ def get_allowed_address_pairs_ip_addresses_from_ovn_port(ovn_port):
|
||||||
allowed_address_pairs column using the data in the OVN port.
|
allowed_address_pairs column using the data in the OVN port.
|
||||||
|
|
||||||
:param ovn_port: A OVN port
|
:param ovn_port: A OVN port
|
||||||
:returns: A list of IP addesses (v4 and v6)
|
:returns: A list of IP addresses (v4 and v6)
|
||||||
"""
|
"""
|
||||||
addresses = remove_macs_from_lsp_addresses(ovn_port.addresses)
|
addresses = remove_macs_from_lsp_addresses(ovn_port.addresses)
|
||||||
port_security = remove_macs_from_lsp_addresses(ovn_port.port_security)
|
port_security = remove_macs_from_lsp_addresses(ovn_port.port_security)
|
||||||
|
|
|
@ -233,7 +233,7 @@ def is_fip_serviced(device_owner):
|
||||||
def ip_to_cidr(ip, prefix=None):
|
def ip_to_cidr(ip, prefix=None):
|
||||||
"""Convert an ip with no prefix to cidr notation
|
"""Convert an ip with no prefix to cidr notation
|
||||||
|
|
||||||
:param ip: An ipv4 or ipv6 address. Convertable to netaddr.IPNetwork.
|
:param ip: An ipv4 or ipv6 address. Convertible to netaddr.IPNetwork.
|
||||||
:param prefix: Optional prefix. If None, the default 32 will be used for
|
:param prefix: Optional prefix. If None, the default 32 will be used for
|
||||||
ipv4 and 128 for ipv6.
|
ipv4 and 128 for ipv6.
|
||||||
"""
|
"""
|
||||||
|
@ -322,7 +322,7 @@ def ip_version_from_int(ip_version_int):
|
||||||
|
|
||||||
|
|
||||||
def get_network_length(ip_version):
|
def get_network_length(ip_version):
|
||||||
"""Returns the network length depeding on the IP version"""
|
"""Returns the network length depending on the IP version"""
|
||||||
return (n_const.IPv4_BITS if ip_version == n_const.IP_VERSION_4
|
return (n_const.IPv4_BITS if ip_version == n_const.IP_VERSION_4
|
||||||
else n_const.IPv6_BITS)
|
else n_const.IPv6_BITS)
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ vxlan_opts = [
|
||||||
"default, the Linux kernel doesn't use the IANA "
|
"default, the Linux kernel doesn't use the IANA "
|
||||||
"assigned standard value, so if you want to use it, "
|
"assigned standard value, so if you want to use it, "
|
||||||
"this option must be set to 4789. It is not set by "
|
"this option must be set to 4789. It is not set by "
|
||||||
"default because of backward compatibiltiy.")),
|
"default because of backward compatibility.")),
|
||||||
cfg.BoolOpt('l2_population', default=False,
|
cfg.BoolOpt('l2_population', default=False,
|
||||||
help=_("Extension to use alongside ml2 plugin's l2population "
|
help=_("Extension to use alongside ml2 plugin's l2population "
|
||||||
"mechanism driver. It enables the plugin to populate "
|
"mechanism driver. It enables the plugin to populate "
|
||||||
|
|
|
@ -70,7 +70,7 @@ rules = [
|
||||||
base.RULE_NET_OWNER
|
base.RULE_NET_OWNER
|
||||||
),
|
),
|
||||||
scope_types=['project'],
|
scope_types=['project'],
|
||||||
description='Specify ``device_owner`` attribute when creting a port',
|
description='Specify ``device_owner`` attribute when creating a port',
|
||||||
operations=ACTION_POST,
|
operations=ACTION_POST,
|
||||||
deprecated_rule=policy.DeprecatedRule(
|
deprecated_rule=policy.DeprecatedRule(
|
||||||
name='create_port:device_owner',
|
name='create_port:device_owner',
|
||||||
|
|
|
@ -63,7 +63,7 @@ class IpamPluggableBackend(ipam_backend_mixin.IpamBackendMixin):
|
||||||
def _safe_rollback(self, func, *args, **kwargs):
|
def _safe_rollback(self, func, *args, **kwargs):
|
||||||
"""Calls rollback actions and catch all exceptions.
|
"""Calls rollback actions and catch all exceptions.
|
||||||
|
|
||||||
All exceptions are catched and logged here to prevent rewriting
|
All exceptions are caught and logged here to prevent rewriting
|
||||||
original exception that triggered rollback action.
|
original exception that triggered rollback action.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
|
@ -184,7 +184,7 @@ class IpamPluggableBackend(ipam_backend_mixin.IpamBackendMixin):
|
||||||
def deallocate_ips_from_port(self, context, port, ips):
|
def deallocate_ips_from_port(self, context, port, ips):
|
||||||
"""Deallocate set of ips from port.
|
"""Deallocate set of ips from port.
|
||||||
|
|
||||||
Deallocate IP addresses previosly allocated for given port.
|
Deallocate IP addresses previously allocated for given port.
|
||||||
Format of the ips:
|
Format of the ips:
|
||||||
[{
|
[{
|
||||||
"ip_address": IP.ADDRESS,
|
"ip_address": IP.ADDRESS,
|
||||||
|
|
|
@ -23,7 +23,7 @@ probe-create <net-id>
|
||||||
modify network and subnet if you want to probe. For example, you need to be admin user if you
|
modify network and subnet if you want to probe. For example, you need to be admin user if you
|
||||||
want to probe external network.
|
want to probe external network.
|
||||||
|
|
||||||
probe-delete <port-id> Delete probe - delete port then uplug
|
probe-delete <port-id> Delete probe - delete port then unplug
|
||||||
probe-exec <port-id> 'command' Exec commands on the namespace of the probe
|
probe-exec <port-id> 'command' Exec commands on the namespace of the probe
|
||||||
`probe-exec <port-id>` 'interactive command' Exec interactive command (eg, ssh)
|
`probe-exec <port-id>` 'interactive command' Exec interactive command (eg, ssh)
|
||||||
|
|
||||||
|
|
|
@ -923,7 +923,7 @@ class OvnNbSynchronizer(OvnDbSynchronizer):
|
||||||
if self.mode == SYNC_MODE_REPAIR:
|
if self.mode == SYNC_MODE_REPAIR:
|
||||||
try:
|
try:
|
||||||
# Create the missing port in both Neutron and OVN.
|
# Create the missing port in both Neutron and OVN.
|
||||||
LOG.warning('Creating missing metadadata port in '
|
LOG.warning('Creating missing metadata port in '
|
||||||
'Neutron and OVN for network %s',
|
'Neutron and OVN for network %s',
|
||||||
net['id'])
|
net['id'])
|
||||||
self._ovn_client.create_metadata_port(ctx, net)
|
self._ovn_client.create_metadata_port(ctx, net)
|
||||||
|
|
|
@ -40,9 +40,9 @@ class L3LoggingExtensionBase(object):
|
||||||
def consume_api(self, agent_api):
|
def consume_api(self, agent_api):
|
||||||
self.agent_api = agent_api
|
self.agent_api = agent_api
|
||||||
|
|
||||||
def _load_driver_cls(self, namesapce, driver_name):
|
def _load_driver_cls(self, namespace, driver_name):
|
||||||
return manager.NeutronManager.load_class_for_provider(
|
return manager.NeutronManager.load_class_for_provider(
|
||||||
namesapce, driver_name)
|
namespace, driver_name)
|
||||||
|
|
||||||
def _register_rpc_consumers(self):
|
def _register_rpc_consumers(self):
|
||||||
registry.register(
|
registry.register(
|
||||||
|
|
|
@ -99,7 +99,7 @@ class OVNDriver(base.DriverBase):
|
||||||
of the meter. Current implementation needs only one 'fair' meter row
|
of the meter. Current implementation needs only one 'fair' meter row
|
||||||
which is then referred by multiple ACL rows.
|
which is then referred by multiple ACL rows.
|
||||||
|
|
||||||
:param ovn_txn: ovn nortbound idl transaction.
|
:param ovn_txn: ovn northbound idl transaction.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
meter = self.ovn_nb.db_find_rows(
|
meter = self.ovn_nb.db_find_rows(
|
||||||
|
|
|
@ -52,7 +52,7 @@ class PortUnreachableRouter(n_exc.Conflict):
|
||||||
|
|
||||||
|
|
||||||
class InvalidAddress(n_exc.BadRequest):
|
class InvalidAddress(n_exc.BadRequest):
|
||||||
message = _("The address %(address)s is invaild, reason: %(reason)s.")
|
message = _("The address %(address)s is invalid, reason: %(reason)s.")
|
||||||
|
|
||||||
|
|
||||||
class RouterIPv6GatewayInUse(n_exc.Conflict):
|
class RouterIPv6GatewayInUse(n_exc.Conflict):
|
||||||
|
|
|
@ -87,7 +87,7 @@ class PlacementReportPlugin(service_base.ServicePluginBase):
|
||||||
# buggy behavior. There we assumed DEFAULT.host is the same as the
|
# buggy behavior. There we assumed DEFAULT.host is the same as the
|
||||||
# hypervisor name, which is true in many deployments, but not
|
# hypervisor name, which is true in many deployments, but not
|
||||||
# always. (In nova terminology: The compute host's DEFAULT.host is
|
# always. (In nova terminology: The compute host's DEFAULT.host is
|
||||||
# not neccessarily the same as the compute node name. We may even
|
# not necessarily the same as the compute node name. We may even
|
||||||
# have multiple compute nodes behind a compute host.)
|
# have multiple compute nodes behind a compute host.)
|
||||||
# TODO(bence romsics): This else branch can be removed when we no
|
# TODO(bence romsics): This else branch can be removed when we no
|
||||||
# longer want to support pre-Ussuri agents.
|
# longer want to support pre-Ussuri agents.
|
||||||
|
@ -219,7 +219,7 @@ class PlacementReportPlugin(service_base.ServicePluginBase):
|
||||||
LOG.warning(
|
LOG.warning(
|
||||||
"The mechanism driver claims agent type supports "
|
"The mechanism driver claims agent type supports "
|
||||||
"placement reports, but the agent does not report "
|
"placement reports, but the agent does not report "
|
||||||
"'resoure_provider_bandwidths' in its configurations. "
|
"'resource_provider_bandwidths' in its configurations. "
|
||||||
"host: %(host)s, type: %(type)s",
|
"host: %(host)s, type: %(type)s",
|
||||||
{'host': agent['agent_type'],
|
{'host': agent['agent_type'],
|
||||||
'type': agent['host']})
|
'type': agent['host']})
|
||||||
|
|
|
@ -316,7 +316,7 @@ class L3NDPProxyTestCase(test_address_scope.AddressScopeTestCase,
|
||||||
'add', self.router1_id,
|
'add', self.router1_id,
|
||||||
sub1['subnet']['id'], None)
|
sub1['subnet']['id'], None)
|
||||||
# Invalid address: the adress not belong to the port
|
# Invalid address: the adress not belong to the port
|
||||||
err_msg = ("The address 2001::10:22 is invaild, reason: "
|
err_msg = ("The address 2001::10:22 is invalid, reason: "
|
||||||
"This address not belong to the "
|
"This address not belong to the "
|
||||||
"port %s.") % port1['port']['id']
|
"port %s.") % port1['port']['id']
|
||||||
self._create_ndp_proxy(
|
self._create_ndp_proxy(
|
||||||
|
@ -325,7 +325,7 @@ class L3NDPProxyTestCase(test_address_scope.AddressScopeTestCase,
|
||||||
expected_code=exc.HTTPBadRequest.code,
|
expected_code=exc.HTTPBadRequest.code,
|
||||||
expected_message=err_msg)
|
expected_message=err_msg)
|
||||||
# The subnet of specified address don't connect to router
|
# The subnet of specified address don't connect to router
|
||||||
err_msg = ("The address 2001::9:12 is invaild, reason: "
|
err_msg = ("The address 2001::9:12 is invalid, reason: "
|
||||||
"This address cannot reach the "
|
"This address cannot reach the "
|
||||||
"router %s.") % self.router1_id
|
"router %s.") % self.router1_id
|
||||||
self._create_ndp_proxy(
|
self._create_ndp_proxy(
|
||||||
|
|
Loading…
Reference in New Issue