diff --git a/neutron/cmd/ovn/ml2ovn_trace.py b/neutron/cmd/ovn/ml2ovn_trace.py index 5102751b80b..48a7a95f3cf 100644 --- a/neutron/cmd/ovn/ml2ovn_trace.py +++ b/neutron/cmd/ovn/ml2ovn_trace.py @@ -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): diff --git a/neutron/cmd/upgrade_checks/checks.py b/neutron/cmd/upgrade_checks/checks.py index 340d2346d6c..33178e209de 100644 --- a/neutron/cmd/upgrade_checks/checks.py +++ b/neutron/cmd/upgrade_checks/checks.py @@ -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 diff --git a/neutron/common/ovn/exceptions.py b/neutron/common/ovn/exceptions.py index c5b4ae4f802..7dd30d2c135 100644 --- a/neutron/common/ovn/exceptions.py +++ b/neutron/common/ovn/exceptions.py @@ -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): diff --git a/neutron/common/ovn/utils.py b/neutron/common/ovn/utils.py index c6413e94a53..bede8d2d326 100644 --- a/neutron/common/ovn/utils.py +++ b/neutron/common/ovn/utils.py @@ -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) diff --git a/neutron/common/utils.py b/neutron/common/utils.py index 84f5d9be062..16bef8662a0 100644 --- a/neutron/common/utils.py +++ b/neutron/common/utils.py @@ -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) diff --git a/neutron/conf/plugins/ml2/drivers/linuxbridge.py b/neutron/conf/plugins/ml2/drivers/linuxbridge.py index 20d6503427b..8154ed0f0bb 100644 --- a/neutron/conf/plugins/ml2/drivers/linuxbridge.py +++ b/neutron/conf/plugins/ml2/drivers/linuxbridge.py @@ -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 " diff --git a/neutron/conf/policies/port.py b/neutron/conf/policies/port.py index f9f7de40a83..9ce3d6ba750 100644 --- a/neutron/conf/policies/port.py +++ b/neutron/conf/policies/port.py @@ -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', diff --git a/neutron/db/ipam_pluggable_backend.py b/neutron/db/ipam_pluggable_backend.py index 5b69d04d0f8..f31b66ab52f 100644 --- a/neutron/db/ipam_pluggable_backend.py +++ b/neutron/db/ipam_pluggable_backend.py @@ -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, diff --git a/neutron/debug/README b/neutron/debug/README index 181cb4fab2f..f5ce9a1271e 100644 --- a/neutron/debug/README +++ b/neutron/debug/README @@ -23,7 +23,7 @@ probe-create 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 Delete probe - delete port then uplug +probe-delete Delete probe - delete port then unplug probe-exec 'command' Exec commands on the namespace of the probe `probe-exec ` 'interactive command' Exec interactive command (eg, ssh) diff --git a/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py b/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py index f8edb14ef5a..85a105bb0c6 100644 --- a/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py +++ b/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py @@ -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) diff --git a/neutron/services/logapi/agent/l3/base.py b/neutron/services/logapi/agent/l3/base.py index 8b9cc4f6044..a37eaa0d6ce 100644 --- a/neutron/services/logapi/agent/l3/base.py +++ b/neutron/services/logapi/agent/l3/base.py @@ -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( diff --git a/neutron/services/logapi/drivers/ovn/driver.py b/neutron/services/logapi/drivers/ovn/driver.py index 2cb855fe159..080bcc475b8 100644 --- a/neutron/services/logapi/drivers/ovn/driver.py +++ b/neutron/services/logapi/drivers/ovn/driver.py @@ -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( diff --git a/neutron/services/ndp_proxy/exceptions.py b/neutron/services/ndp_proxy/exceptions.py index f9f5a68dd17..15e5b7e8708 100644 --- a/neutron/services/ndp_proxy/exceptions.py +++ b/neutron/services/ndp_proxy/exceptions.py @@ -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): diff --git a/neutron/services/placement_report/plugin.py b/neutron/services/placement_report/plugin.py index 0605f95978e..33e8c4ba9ee 100644 --- a/neutron/services/placement_report/plugin.py +++ b/neutron/services/placement_report/plugin.py @@ -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']}) diff --git a/neutron/tests/unit/extensions/test_l3_ndp_proxy.py b/neutron/tests/unit/extensions/test_l3_ndp_proxy.py index b86cee4df1b..6f83c602d33 100644 --- a/neutron/tests/unit/extensions/test_l3_ndp_proxy.py +++ b/neutron/tests/unit/extensions/test_l3_ndp_proxy.py @@ -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(