mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-08 13:56:09 +02:00
bgp: fix pep8
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
8bda92da85
commit
57166dc485
@ -40,7 +40,7 @@ def start(**kwargs):
|
||||
waiter = kwargs.pop('waiter')
|
||||
common_config = CommonConf(**kwargs)
|
||||
hub.spawn(CORE_MANAGER.start, *[], **{'common_conf': common_config,
|
||||
'waiter': waiter})
|
||||
'waiter': waiter})
|
||||
return True
|
||||
|
||||
|
||||
|
||||
@ -181,7 +181,7 @@ class Activity(object):
|
||||
|
||||
# Schedule to spawn a new greenthread after requested delay
|
||||
greenthread = hub.spawn_after(seconds, activity.start, *args,
|
||||
**kwargs)
|
||||
**kwargs)
|
||||
self._child_thread_map[activity.name] = greenthread
|
||||
self._child_activity_map[activity.name] = activity
|
||||
return greenthread
|
||||
@ -353,6 +353,7 @@ class Activity(object):
|
||||
self._spawn(conn_name, conn_handler, sock)
|
||||
return sock
|
||||
|
||||
|
||||
#
|
||||
# Sink
|
||||
#
|
||||
|
||||
@ -726,7 +726,7 @@ class Peer(Source, Sink, NeighborConfListener, Activity):
|
||||
# NeighborConf has this setting we add this to existing list.
|
||||
communities = path_extcomm_attr.communities
|
||||
if self._neigh_conf.soo_list:
|
||||
#construct extended community
|
||||
# construct extended community
|
||||
soo_list = self._neigh_conf.soo_list
|
||||
subtype = 0x03
|
||||
for soo in soo_list:
|
||||
|
||||
@ -425,8 +425,8 @@ class BgpProtocol(Protocol, Activity):
|
||||
message except for *Open* and *Notification* message. On receiving
|
||||
*Notification* message we close connection with peer.
|
||||
"""
|
||||
LOG.debug('Received msg from %s << %s' % \
|
||||
(str(self.get_peername()), msg))
|
||||
LOG.debug('Received msg from %s << %s' % (str(self.get_peername()),
|
||||
msg))
|
||||
|
||||
# If we receive open message we try to bind to protocol
|
||||
if (msg.type == BGP_MSG_OPEN):
|
||||
|
||||
@ -34,6 +34,7 @@ class EventletIOFactory(object):
|
||||
LOG.debug('create_looping_call called')
|
||||
return LoopingCall(funct, *args, **kwargs)
|
||||
|
||||
|
||||
# TODO: improve Timer service and move it into framework
|
||||
class LoopingCall(object):
|
||||
"""Call a function repeatedly.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user