From 5779e3bfc274b9ea9348180a42cb58c76e365c8c Mon Sep 17 00:00:00 2001 From: asarfaty Date: Sun, 5 Jan 2020 14:24:03 +0200 Subject: [PATCH] Fix some typos Change-Id: Id1f18847fafd769f11c23924fa50781d272d0fb1 --- vmware_nsx/common/config.py | 2 +- vmware_nsx/plugins/common_v3/availability_zones.py | 6 ++---- vmware_nsx/plugins/common_v3/plugin.py | 2 +- vmware_nsx/plugins/nsx_p/plugin.py | 4 +--- .../plugins/nsx_v/drivers/distributed_router_driver.py | 2 +- vmware_nsx/plugins/nsx_v3/plugin.py | 4 +--- 6 files changed, 7 insertions(+), 13 deletions(-) diff --git a/vmware_nsx/common/config.py b/vmware_nsx/common/config.py index 19138d0087..21a703fa30 100644 --- a/vmware_nsx/common/config.py +++ b/vmware_nsx/common/config.py @@ -437,7 +437,7 @@ nsx_v3_opts = nsx_v3_and_p + [ "endpoint profile that will be used to perform L2 " "bridging between networks in the NSX fabric and " "VLANs external to NSX. If not specified, operators " - "will need to explictly create a layer-2 gateway in " + "will need to explicitly create a layer-2 gateway in " "Neutron using the L2 gateway APIs.")), cfg.StrOpt('default_tier0_router', help=_("Name or UUID of the default tier0 router that will be " diff --git a/vmware_nsx/plugins/common_v3/availability_zones.py b/vmware_nsx/plugins/common_v3/availability_zones.py index 00fbf416e8..e4c172e937 100644 --- a/vmware_nsx/plugins/common_v3/availability_zones.py +++ b/vmware_nsx/plugins/common_v3/availability_zones.py @@ -28,7 +28,7 @@ class NsxV3AvailabilityZone(common_az.ConfiguredAvailabilityZone): reason=_("Expected a list of names")) def _has_native_dhcp_metadata(self): - # May be overriden by children + # May be overridden by children return True def get_az_opts(self): @@ -126,10 +126,8 @@ class NsxV3AvailabilityZone(common_az.ConfiguredAvailabilityZone): self._native_md_proxy_uuid = None def translate_configured_names_to_uuids(self, nsxlib): - # May be overriden by children + # May be overridden by children # Default implementation assumes UUID is provided in config - # TODO(annak): refine this when we have a better picture - # what az config is relevant for policy self._default_overlay_tz_uuid = self.default_overlay_tz self._default_vlan_tz_uuid = self.default_vlan_tz self._default_tier0_router = self.default_tier0_router diff --git a/vmware_nsx/plugins/common_v3/plugin.py b/vmware_nsx/plugins/common_v3/plugin.py index 50234c3330..1a48ea8c5f 100644 --- a/vmware_nsx/plugins/common_v3/plugin.py +++ b/vmware_nsx/plugins/common_v3/plugin.py @@ -2201,7 +2201,7 @@ class NsxPluginV3Base(agentschedulers_db.AZDhcpAgentSchedulerDbMixin, # Note that the session.rollback() function is called here. # session.rollback() will invoke transaction.rollback() on # the transaction this session maintains. The latter will - # deactive the transaction and clear the session's cache. + # deactivate the transaction and clear the session's cache. # # But depending on where the exception occurred, # transaction.rollback() may have already been called diff --git a/vmware_nsx/plugins/nsx_p/plugin.py b/vmware_nsx/plugins/nsx_p/plugin.py index 6e23bc9417..ff7f95a62b 100644 --- a/vmware_nsx/plugins/nsx_p/plugin.py +++ b/vmware_nsx/plugins/nsx_p/plugin.py @@ -1743,7 +1743,6 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base): if (actions['remove_router_link_port'] or actions['add_router_link_port']): # GW was changed. update GW and route advertisement - # pylint: disable=unexpected-keyword-arg self.nsxpolicy.tier1.update_route_advertisement( router_id, static_routes=not new_enable_snat, @@ -1837,7 +1836,6 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base): # Also create the empty locale-service as it must always exist self.nsxpolicy.tier1.create_locale_service(router['id']) - #TODO(annak): narrow down the exception except Exception as ex: with excutils.save_and_reraise_exception(): LOG.error('Failed to create router %(id)s ' @@ -2111,7 +2109,7 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base): return info def remove_router_interface(self, context, router_id, interface_info): - # find the subnet - it is need for removing the SNAT rule + # First get the subnet, which is needed for removing the SNAT rule subnet = subnet_id = None if 'port_id' in interface_info: port_id = interface_info['port_id'] diff --git a/vmware_nsx/plugins/nsx_v/drivers/distributed_router_driver.py b/vmware_nsx/plugins/nsx_v/drivers/distributed_router_driver.py index e2cc5e2e99..c611b05d9f 100644 --- a/vmware_nsx/plugins/nsx_v/drivers/distributed_router_driver.py +++ b/vmware_nsx/plugins/nsx_v/drivers/distributed_router_driver.py @@ -283,7 +283,7 @@ class RouterDistributedDriver(router_driver.RouterBaseDriver): self._update_routes(context, router_id, nexthop) - # In case of failure, rollbak will be done in teh plugin level + # In case of failure, rollback will be done in the plugin level return info def remove_router_interface(self, context, router_id, interface_info): diff --git a/vmware_nsx/plugins/nsx_v3/plugin.py b/vmware_nsx/plugins/nsx_v3/plugin.py index 4a38630fb8..5eeb115920 100644 --- a/vmware_nsx/plugins/nsx_v3/plugin.py +++ b/vmware_nsx/plugins/nsx_v3/plugin.py @@ -661,7 +661,6 @@ class NsxV3Plugin(nsx_plugin_common.NsxPluginV3Base, def _init_mac_learning_profiles(self): with locking.LockManager.get_lock('nsxv3_mac_learning_profile_init'): if not self._get_mac_learning_profile(): - # pylint: disable=unexpected-keyword-arg self.nsxlib.switching_profile.create_mac_learning_profile( NSX_V3_MAC_LEARNING_PROFILE_NAME, 'Neutron MAC Learning Profile', @@ -669,7 +668,6 @@ class NsxV3Plugin(nsx_plugin_common.NsxPluginV3Base, tags=self.nsxlib.build_v3_api_version_tag()) self._get_mac_learning_profile() if not self._get_mac_learning_disabled_profile(): - # pylint: disable=unexpected-keyword-arg self.nsxlib.switching_profile.create_mac_learning_profile( NSX_V3_MAC_DISABLED_PROFILE_NAME, 'Neutron MAC Learning Disabled Profile', @@ -2792,7 +2790,7 @@ class NsxV3Plugin(nsx_plugin_common.NsxPluginV3Base, network_id = None if 'port_id' in interface_info: port_id = interface_info['port_id'] - # find subnet_id - it is need for removing the SNAT rule + # Find subnet_id which is needed for removing the SNAT rule port = self._get_port(context, port_id) network_id = port['network_id'] if port.get('fixed_ips'):