When net_ctrl has received 'core.start' method through RPC-Session, if has 
occurred ERROR as follows .

(rpc-client)
$ PYTHONPATH=. ./rpc_cli.py --peers=bgps=localhost:50002
(Cmd) request bgps core.start [{'router_id': '10.0.0.7', 'local_as': 65000}]
RPC ERROR 500.1 - 'waiter'

(Ryu-Bgp)
.. snip
DEBUG 2014-09-06 08:29:03,160 net_ctrl 337 NetworkController started listening 
for connections...
DEBUG 2014-09-06 08:29:21,277 base 345 Connect request received from client for 
port 127.0.0.1:45654
CRITICAL 2014-09-06 08:29:21,280 net_ctrl 121 RPC Session to ('127.0.0.1', 
45654) started
DEBUG 2014-09-06 08:29:21,281 net_ctrl 199 NetworkController processing 
outgoing request list.
DEBUG 2014-09-06 08:29:21,281 net_ctrl 166 NetworkController started processing 
incoming messages
DEBUG 2014-09-06 08:29:39,582 net_ctrl 373 Request from NetworkController<<: 
core.start [{'router_id': '10.0.0.7', 'local_as': 65000}]
INFO 2014-09-06 08:29:39,582 base 208 API method core.start called with args: 
{'router_id': '10.0.0.7', 'local_as': 65000}
ERROR 2014-09-06 08:29:39,599 base 226 Traceback (most recent call last):
  File 
"/usr/local/lib/python2.7/dist-packages/ryu/services/protocols/bgp/api/base.py",
 line 221, in call
    return call(**kwargs)
  File 
"/usr/local/lib/python2.7/dist-packages/ryu/services/protocols/bgp/api/core.py",
 line 40, in start
    waiter = kwargs.pop('waiter')
KeyError: 'waiter'

Signed-off-by: Toshiki Tsuboi <[email protected]>
---
 ryu/services/protocols/bgp/api/core.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ryu/services/protocols/bgp/api/core.py 
b/ryu/services/protocols/bgp/api/core.py
index 4d9a516..f7c5c28 100644
--- a/ryu/services/protocols/bgp/api/core.py
+++ b/ryu/services/protocols/bgp/api/core.py
@@ -37,7 +37,10 @@ def start(**kwargs):
         raise RuntimeConfigError('Current context has to be stopped to start '
                                  'a new context.')
 
-    waiter = kwargs.pop('waiter')
+    try:
+        waiter = kwargs.pop('waiter')
+    except KeyError:
+        waiter = hub.Event()
     common_config = CommonConf(**kwargs)
     hub.spawn(CORE_MANAGER.start, *[], **{'common_conf': common_config,
                                           'waiter': waiter})
-- 
1.9.1



------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to