Fix typos

Change-Id: I605bcdde50a3e4427af74ba616887c15c787a40a
This commit is contained in:
ericxiett 2021-09-21 09:33:29 +08:00
parent b30c7fc7f8
commit 4b4f291545
4 changed files with 10 additions and 10 deletions

View File

@ -81,7 +81,7 @@ def _ensure_vlan_privileged(vlan_num, bridge_interface, mac_address, mtu):
check_exit_code=[0, 2, 254]) check_exit_code=[0, 2, 254])
ip_lib.set(interface, state='up', check_exit_code=[0, 2, 254]) ip_lib.set(interface, state='up', check_exit_code=[0, 2, 254])
# NOTE(vish): set mtu every time to ensure that changes to mtu get # NOTE(vish): set mtu every time to ensure that changes to mtu get
# propogated # propagated
_set_device_mtu(interface, mtu) _set_device_mtu(interface, mtu)
return interface return interface
@ -204,7 +204,7 @@ def _ensure_bridge_privileged(bridge, interface, net_attrs, gateway,
_set_device_mtu(interface, mtu) _set_device_mtu(interface, mtu)
_update_bridge_routes(interface, bridge) _update_bridge_routes(interface, bridge)
# NOTE(sean-k-mooney): # NOTE(sean-k-mooney):
# The bridge mtu cannont be set until after an # The bridge mtu cannot be set until after an
# interface is added due to bug: # interface is added due to bug:
# https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1399064 # https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1399064
_set_device_mtu(bridge, mtu) _set_device_mtu(bridge, mtu)

View File

@ -102,7 +102,7 @@ def _disable_ipv6(bridge):
privsep context. privsep context.
""" """
# NOTE(sean-k-mooney): os-vif disables ipv6 to ensure the Bridge # NOTE(sean-k-mooney): os-vif disables ipv6 to ensure the Bridge
# does not aquire an ipv6 auto config or link local adress. # does not acquire an ipv6 auto config or link local address.
# This is required to prevent bug 1302080. # This is required to prevent bug 1302080.
# https://bugs.launchpad.net/neutron/+bug/1302080 # https://bugs.launchpad.net/neutron/+bug/1302080
disv6 = ('/proc/sys/net/ipv6/conf/%s/disable_ipv6' % disv6 = ('/proc/sys/net/ipv6/conf/%s/disable_ipv6' %
@ -147,7 +147,7 @@ def delete_bridge(bridge, dev):
# Note(sean-k-mooney): this will detach all ports on # Note(sean-k-mooney): this will detach all ports on
# the bridge before deleting the bridge. # the bridge before deleting the bridge.
ip_lib.delete(bridge, check_exit_code=[0, 2, 254]) ip_lib.delete(bridge, check_exit_code=[0, 2, 254])
# howver it will not set the detached interface down # however it will not set the detached interface down
# so we set the dev down if dev is not None and exists. # so we set the dev down if dev is not None and exists.
if dev and ip_lib.exists(dev): if dev and ip_lib.exists(dev):
set_interface_state(dev, "down") set_interface_state(dev, "down")

View File

@ -46,7 +46,7 @@ class OvsPlugin(plugin.PluginBase):
If given a VIFBridge, then it will create connect the VM via If given a VIFBridge, then it will create connect the VM via
a regular Linux bridge device to allow security group rules to a regular Linux bridge device to allow security group rules to
be applied to VM traiffic. be applied to VM traffic.
""" """
NIC_NAME_LEN = 14 NIC_NAME_LEN = 14
@ -291,8 +291,8 @@ class OvsPlugin(plugin.PluginBase):
# was written it was understood by me that libvirt would not # was written it was understood by me that libvirt would not
# modify ovs if the port exists but in fact it deletes and # modify ovs if the port exists but in fact it deletes and
# recreates the port. This both undoes the effort to resolve # recreates the port. This both undoes the effort to resolve
# bug #1734320 and intoduces other issues for neutron. # bug #1734320 and introduces other issues for neutron.
# this comment will be removed when we actully fix #1734320 in # this comment will be removed when we actually fix #1734320 in
# all cases. # all cases.
# NOTE(hamdyk): As a WA to the above note, one can use # NOTE(hamdyk): As a WA to the above note, one can use

View File

@ -72,7 +72,7 @@ class BaseOVS(object):
datapath_type=datapath_type).execute() datapath_type=datapath_type).execute()
def delete_ovs_bridge(self, bridge): def delete_ovs_bridge(self, bridge):
"""Delete ovs brdige by name """Delete ovs bridge by name
:param bridge: bridge name as a string :param bridge: bridge name as a string
@ -105,7 +105,7 @@ class BaseOVS(object):
# NOTE(sean-k-mooney): we use a transaction here for 2 reasons: # NOTE(sean-k-mooney): we use a transaction here for 2 reasons:
# 1.) if using the vsctl client its faster # 1.) if using the vsctl client its faster
# 2.) in all cases we either want to fully create the patch port # 2.) in all cases we either want to fully create the patch port
# pair or not create it atomicly. By using a transaction we know # pair or not create it atomically. By using a transaction we know
# that we will never be in a mixed state where it was partly created. # that we will never be in a mixed state where it was partly created.
with self.ovsdb.transaction() as txn: with self.ovsdb.transaction() as txn:
# create integration bridge patch peer # create integration bridge patch peer
@ -126,7 +126,7 @@ class BaseOVS(object):
txn.add( txn.add(
self.ovsdb.db_set('Interface', int_bridge_port, *col_values)) self.ovsdb.db_set('Interface', int_bridge_port, *col_values))
# create port bidge patch peer # create port bridge patch peer
col_values = [ col_values = [
('type', 'patch'), ('type', 'patch'),
('options', {'peer': int_bridge_port}) ('options', {'peer': int_bridge_port})