BGPSpeaker: Fix typos

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
IWASE Yusuke 2016-09-26 13:59:51 +09:00 committed by FUJITA Tomonori
parent cb83c858cd
commit 4348ae6a1f
16 changed files with 27 additions and 27 deletions

View File

@ -61,7 +61,7 @@ def stop(**kwargs):
@register(name='core.reset_neighbor')
def reset_neighor(ip_address):
def reset_neighbor(ip_address):
neighs_conf = CORE_MANAGER.neighbors_conf
neigh_conf = neighs_conf.get_neighbor_conf(ip_address)
# Check if we have neighbor with given IP.

View File

@ -252,7 +252,7 @@ class Activity(object):
def pause(self, seconds=0):
"""Relinquishes hub for given number of seconds.
In other words is puts to sleep to give other greeenthread a chance to
In other words is puts to sleep to give other greenthread a chance to
run.
"""
hub.sleep(seconds)

View File

@ -454,7 +454,7 @@ class BGPSpeaker(object):
return call('operator.show', **show)
def prefix_add(self, prefix, next_hop=None, route_dist=None):
""" This method adds a new prefix to be advertized.
""" This method adds a new prefix to be advertised.
``prefix`` must be the string representation of an IP network
(e.g., 10.1.1.0/24).
@ -489,7 +489,7 @@ class BGPSpeaker(object):
return call(func_name, **networks)
def prefix_del(self, prefix, route_dist=None):
""" This method deletes a advertized prefix.
""" This method deletes a advertised prefix.
``prefix`` must be the string representation of an IP network
(e.g., 10.1.1.0/24).

View File

@ -397,7 +397,7 @@ class CoreService(Factory, Activity):
def on_peer_removed(self, peer):
if peer._neigh_conf.password:
# seting zero length key means deleting the key
# setting zero length key means deleting the key
self._set_password(peer._neigh_conf.ip_address, '')
if peer.rtc_as != self.asn:

View File

@ -150,7 +150,7 @@ class Table(object):
uninteresting_dest_count = 0
for dest in self.values():
added_withdraw = \
dest.withdraw_unintresting_paths(interested_rts)
dest.withdraw_uninteresting_paths(interested_rts)
if added_withdraw:
self._signal_bus.dest_changed(dest)
uninteresting_dest_count += 1
@ -617,7 +617,7 @@ class Destination(object):
return current_best_path, best_path_reason
def withdraw_unintresting_paths(self, interested_rts):
def withdraw_uninteresting_paths(self, interested_rts):
"""Withdraws paths that are no longer interesting.
For all known paths that do not have any route target in common with

View File

@ -585,7 +585,7 @@ class VrfNlriImportMap(ImportMap):
def match(self, vrf_path):
if vrf_path.route_family != self.VRF_PATH_CLASS.ROUTE_FAMILY:
LOG.error(
"vrf_paths route_family doesn\'t match importmaps"
"vrf_paths route_family does not match importmaps"
"route_family. Applied to wrong table?")
return False

View File

@ -85,7 +85,7 @@ class Command(object):
int subcommand and eth1 / 1 is param for subcommand.
:return: returns tuple of CommandsResponse and class of
sub - command on which _action was called. (last sub - command)
CommandsResposne.status is action status,
CommandsResponse.status is action status,
and CommandsResponse.value is formatted response.
"""
if len(params) == 0:
@ -162,7 +162,7 @@ class Command(object):
:param params: list of text parameters applied to this command.
:return: returns CommandsResponse instance.
CommandsResposne.status can be STATUS_OK or STATUS_ERROR
CommandsResponse.status can be STATUS_OK or STATUS_ERROR
CommandsResponse.value should be dict or str
"""
return CommandsResponse(STATUS_ERROR, 'Not implemented')

View File

@ -92,7 +92,7 @@ class OperatorAbstractView(object):
@property
def model(self):
"""Getter for data model being presented by this view. Every view is
associatetd with some data model.
associated with some data model.
:return: underlaying data of this view
"""

View File

@ -249,7 +249,7 @@ class PeerState(object):
@property
def total_msg_recv(self):
"""Returns total number of UPDATE, NOTIFCATION and ROUTE_REFRESH
"""Returns total number of UPDATE, NOTIFICATION and ROUTE_REFRESH
messages received from this peer.
"""
return (self.get_count(PeerCounterNames.RECV_UPDATES) +
@ -1164,7 +1164,7 @@ class Peer(Source, Sink, NeighborConfListener, Activity):
communities=communities
)
# UNKOWN Attributes.
# UNKNOWN Attributes.
# Get optional transitive path attributes
unknown_opttrans_attrs = bgp_utils.get_unknown_opttrans_attr(path)
@ -1203,7 +1203,7 @@ class Peer(Source, Sink, NeighborConfListener, Activity):
return update
def _connect_loop(self, client_factory):
"""In the current greeenlet we try to establish connection with peer.
"""In the current greenlet we try to establish connection with peer.
This greenlet will spin another greenlet to handle incoming data
from the peer once connection is established.
@ -1379,7 +1379,7 @@ class Peer(Source, Sink, NeighborConfListener, Activity):
else:
yield L
opts = list(flatten(
list(self._neigh_conf.get_configured_capabilites().values())))
list(self._neigh_conf.get_configured_capabilities().values())))
open_msg = BGPOpen(
my_as=asnum,
bgp_identifier=bgpid,
@ -2143,7 +2143,7 @@ class Peer(Source, Sink, NeighborConfListener, Activity):
return
# If this peer is a route server client, we forward the path
# regardless of AS PATH loop, whether the connction is iBGP or eBGP,
# regardless of AS PATH loop, whether the connection is iBGP or eBGP,
# or path's communities.
if self.is_route_server_client:
outgoing_route = OutgoingRoute(path)
@ -2166,7 +2166,7 @@ class Peer(Source, Sink, NeighborConfListener, Activity):
# If path from a bgp-peer is new best path, we share it with
# all bgp-peers except the source peer and other peers in his AS.
# This is default JNOS setting that in JNOS can be disabled with
# This is default Junos setting that in Junos can be disabled with
# 'advertise-peer-as' setting.
elif (self != path.source or
self.remote_as != path.source.remote_as):

View File

@ -225,7 +225,7 @@ def compute_best_path(local_asn, path1, path2):
best_path = _cmp_by_reachable_nh(path1, path2)
best_path_reason = BPR_REACHABLE_NEXT_HOP
if best_path is None:
best_path = _cmp_by_higest_wg(path1, path2)
best_path = _cmp_by_highest_wg(path1, path2)
best_path_reason = BPR_HIGHEST_WEIGHT
if best_path is None:
best_path = _cmp_by_local_pref(path1, path2)
@ -267,7 +267,7 @@ def _cmp_by_reachable_nh(path1, path2):
return None
def _cmp_by_higest_wg(path1, path2):
def _cmp_by_highest_wg(path1, path2):
"""Selects a path with highest weight.
Weight is BGPS specific parameter. It is local to the router on which it

View File

@ -587,7 +587,7 @@ class NeighborConf(ConfWithId, ConfWithStats):
return does_exceed
def get_configured_capabilites(self):
def get_configured_capabilities(self):
"""Returns configured capabilities."""
capabilities = OrderedDict()

View File

@ -440,7 +440,7 @@ class VrfsConf(BaseConf):
vrf_rf=None):
"""Removes any matching `VrfConf` for given `route_dist` or `vrf_id`
Paramters:
Parameters:
- `route_dist`: (str) route distinguisher of a configured VRF
- `vrf_id`: (str) vrf ID
- `vrf_rf`: (str) route family of the VRF configuration

View File

@ -8,7 +8,7 @@ class SignalBus(object):
def emit_signal(self, identifier, data):
identifier = _to_tuple(identifier)
LOG.debug('SIGNAL: %s emited with data: %s ', identifier, data)
LOG.debug('SIGNAL: %s emitted with data: %s ', identifier, data)
for func, filter_func in self._listeners.get(identifier, []):
if not filter_func or filter_func(data):
func(identifier, data)

View File

@ -70,7 +70,7 @@ class BgpProtocolException(BGPSException):
pass
def nofitication_factory(code, subcode):
def notification_factory(code, subcode):
"""Returns a `Notification` message corresponding to given codes.
Parameters:
@ -573,7 +573,7 @@ class BgpProtocol(Protocol, Activity):
def connection_made(self):
"""Connection to peer handler.
We send bgp open message to peer and intialize related attributes.
We send bgp open message to peer and initialize related attributes.
"""
assert self.state == BGP_FSM_CONNECT
# We have a connection with peer we send open message.

View File

@ -47,7 +47,7 @@ from ryu.services.protocols.bgp.info_base.evpn import EvpnPath
LOG = logging.getLogger('utils.bgp')
# RouteFmaily to path sub-class mapping.
# RouteFamily to path sub-class mapping.
_ROUTE_FAMILY_TO_PATH_MAP = {RF_IPv4_UC: Ipv4Path,
RF_IPv6_UC: Ipv6Path,
RF_IPv4_VPN: Vpnv4Path,

View File

@ -161,7 +161,7 @@ class RouteTargetManager(object):
if desired_rts.intersection(new_rts):
peer.communicate_path(dest.best_path)
def _compute_global_intrested_rts(self):
def _compute_global_interested_rts(self):
"""Computes current global interested RTs for global tables.
Computes interested RTs based on current RT filters for peers. This
@ -187,7 +187,7 @@ class RouteTargetManager(object):
interesting RTs.
"""
prev_global_rts = self._global_interested_rts
curr_global_rts = self._compute_global_intrested_rts()
curr_global_rts = self._compute_global_interested_rts()
new_global_rts = curr_global_rts - prev_global_rts
removed_global_rts = prev_global_rts - curr_global_rts