Merge "Fix typos in log/error messages" into stable/yoga

This commit is contained in:
Zuul 2022-06-22 17:12:56 +00:00 committed by Gerrit Code Review
commit 9f9a0cfb6f
15 changed files with 28 additions and 28 deletions

View File

@ -220,7 +220,7 @@ class ObjEqValueParam(click.ParamType):
try:
return self.types[obj](value, self.direction, ctx)
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):

View File

@ -379,14 +379,14 @@ class CoreChecks(base.BaseChecks):
if mac != converters.convert_to_sanitized_mac_address(mac):
return upgradecheck.Result(
upgradecheck.Code.WARNING,
_("There port MAC addresses not correctly formated in the"
"database. The script "
_("There are port MAC addresses not correctly formatted "
"in the database. The script "
"neutron-sanitize-port-mac-addresses should be "
"executed"))
"executed."))
return upgradecheck.Result(
upgradecheck.Code.SUCCESS,
_("All port MAC addresses are correctly formated in the "
_("All port MAC addresses are correctly formatted in the "
"database."))
@staticmethod
@ -436,13 +436,13 @@ class CoreChecks(base.BaseChecks):
return upgradecheck.Result(
upgradecheck.Code.FAILURE,
_("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 "
"should be executed"))
return upgradecheck.Result(
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."))
@staticmethod

View File

@ -25,7 +25,7 @@ class RevisionConflict(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):

View File

@ -360,12 +360,12 @@ def get_revision_number(resource, resource_type):
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.
Example: ["80:fa:5b:06:72:b7 158.36.44.22",
"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 = []
for addr in addresses:
@ -379,7 +379,7 @@ def get_allowed_address_pairs_ip_addresses(port):
"""Return a list of IP addresses from port's allowed_address_pairs.
: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', [])
if 'ip_address' in x]
@ -392,7 +392,7 @@ def get_allowed_address_pairs_ip_addresses_from_ovn_port(ovn_port):
allowed_address_pairs column using the data in the 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)
port_security = remove_macs_from_lsp_addresses(ovn_port.port_security)

View File

@ -232,7 +232,7 @@ def is_fip_serviced(device_owner):
def ip_to_cidr(ip, prefix=None):
"""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
ipv4 and 128 for ipv6.
"""
@ -321,7 +321,7 @@ def ip_version_from_int(ip_version_int):
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
else n_const.IPv6_BITS)

View File

@ -62,7 +62,7 @@ vxlan_opts = [
"default, the Linux kernel doesn't use the IANA "
"assigned standard value, so if you want to use it, "
"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,
help=_("Extension to use alongside ml2 plugin's l2population "
"mechanism driver. It enables the plugin to populate "

View File

@ -70,7 +70,7 @@ rules = [
base.RULE_NET_OWNER
),
scope_types=['project'],
description='Specify ``device_owner`` attribute when creting a port',
description='Specify ``device_owner`` attribute when creating a port',
operations=ACTION_POST,
deprecated_rule=policy.DeprecatedRule(
name='create_port:device_owner',

View File

@ -63,7 +63,7 @@ class IpamPluggableBackend(ipam_backend_mixin.IpamBackendMixin):
def _safe_rollback(self, func, *args, **kwargs):
"""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.
"""
try:
@ -184,7 +184,7 @@ class IpamPluggableBackend(ipam_backend_mixin.IpamBackendMixin):
def deallocate_ips_from_port(self, context, port, ips):
"""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:
[{
"ip_address": IP.ADDRESS,

View File

@ -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
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>` 'interactive command' Exec interactive command (eg, ssh)

View File

@ -916,7 +916,7 @@ class OvnNbSynchronizer(OvnDbSynchronizer):
if self.mode == SYNC_MODE_REPAIR:
try:
# 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',
net['id'])
self._ovn_client.create_metadata_port(ctx, net)

View File

@ -40,9 +40,9 @@ class L3LoggingExtensionBase(object):
def consume_api(self, 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(
namesapce, driver_name)
namespace, driver_name)
def _register_rpc_consumers(self):
registry.register(

View File

@ -99,7 +99,7 @@ class OVNDriver(base.DriverBase):
of the meter. Current implementation needs only one 'fair' meter row
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(

View File

@ -52,7 +52,7 @@ class PortUnreachableRouter(n_exc.Conflict):
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):

View File

@ -87,7 +87,7 @@ class PlacementReportPlugin(service_base.ServicePluginBase):
# buggy behavior. There we assumed DEFAULT.host is the same as the
# hypervisor name, which is true in many deployments, but not
# 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.)
# TODO(bence romsics): This else branch can be removed when we no
# longer want to support pre-Ussuri agents.
@ -219,7 +219,7 @@ class PlacementReportPlugin(service_base.ServicePluginBase):
LOG.warning(
"The mechanism driver claims agent type supports "
"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': agent['agent_type'],
'type': agent['host']})

View File

@ -316,7 +316,7 @@ class L3NDPProxyTestCase(test_address_scope.AddressScopeTestCase,
'add', self.router1_id,
sub1['subnet']['id'], None)
# 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 "
"port %s.") % port1['port']['id']
self._create_ndp_proxy(
@ -325,7 +325,7 @@ class L3NDPProxyTestCase(test_address_scope.AddressScopeTestCase,
expected_code=exc.HTTPBadRequest.code,
expected_message=err_msg)
# 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 "
"router %s.") % self.router1_id
self._create_ndp_proxy(