summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2014-04-21 05:32:34 +0000
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-04-21 20:55:35 +0900
commit57166dc4853f64c4111e2240c9d5c6eaa64065f6 (patch)
tree76b5bd907c633f80b74a5afc87962b03467f4721
parent8bda92da85bd666aa91b657319a019e00bf27126 (diff)
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>
-rw-r--r--ryu/services/protocols/bgp/api/core.py2
-rw-r--r--ryu/services/protocols/bgp/base.py3
-rw-r--r--ryu/services/protocols/bgp/peer.py2
-rw-r--r--ryu/services/protocols/bgp/speaker.py4
-rw-r--r--ryu/services/protocols/bgp/utils/evtlet.py1
5 files changed, 7 insertions, 5 deletions
diff --git a/ryu/services/protocols/bgp/api/core.py b/ryu/services/protocols/bgp/api/core.py
index e272eef9..e45adf27 100644
--- a/ryu/services/protocols/bgp/api/core.py
+++ b/ryu/services/protocols/bgp/api/core.py
@@ -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
diff --git a/ryu/services/protocols/bgp/base.py b/ryu/services/protocols/bgp/base.py
index 77c8ef0b..571826f5 100644
--- a/ryu/services/protocols/bgp/base.py
+++ b/ryu/services/protocols/bgp/base.py
@@ -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
#
diff --git a/ryu/services/protocols/bgp/peer.py b/ryu/services/protocols/bgp/peer.py
index 7a11af14..24edf2df 100644
--- a/ryu/services/protocols/bgp/peer.py
+++ b/ryu/services/protocols/bgp/peer.py
@@ -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:
diff --git a/ryu/services/protocols/bgp/speaker.py b/ryu/services/protocols/bgp/speaker.py
index 07ec6dec..a0e2ae57 100644
--- a/ryu/services/protocols/bgp/speaker.py
+++ b/ryu/services/protocols/bgp/speaker.py
@@ -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):
diff --git a/ryu/services/protocols/bgp/utils/evtlet.py b/ryu/services/protocols/bgp/utils/evtlet.py
index 4c2aa44b..339837fb 100644
--- a/ryu/services/protocols/bgp/utils/evtlet.py
+++ b/ryu/services/protocols/bgp/utils/evtlet.py
@@ -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.