diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2017-09-05 10:13:46 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-09-17 13:37:32 +0900 |
commit | 3c22bf414453cc2200155b38272b9a50cd898a65 (patch) | |
tree | d77727ada71823a43fd7f4dddd10d541e78e23e8 | |
parent | bf9b8ac5887e06d65e7b385827bd03e962f19590 (diff) |
zclient/zserver: Support FRRouting messages format
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/services/protocols/zebra/client/zclient.py | 11 | ||||
-rw-r--r-- | ryu/services/protocols/zebra/event.py | 2 | ||||
-rw-r--r-- | ryu/services/protocols/zebra/server/zserver.py | 2 |
3 files changed, 10 insertions, 5 deletions
diff --git a/ryu/services/protocols/zebra/client/zclient.py b/ryu/services/protocols/zebra/client/zclient.py index 570a42c8..7a7816a5 100644 --- a/ryu/services/protocols/zebra/client/zclient.py +++ b/ryu/services/protocols/zebra/client/zclient.py @@ -116,15 +116,17 @@ class ZServer(object): self.client.send_msg( zebra.ZebraMessage( version=self.client.zserv_ver, - body=zebra.ZebraHello(self.client.route_type))) + body=zebra.ZebraHello( + route_type=self.client.route_type, + instance=0))) self.client.send_msg( zebra.ZebraMessage( version=self.client.zserv_ver, - command=zebra.ZEBRA_ROUTER_ID_ADD)) + body=zebra.ZebraRouterIDAdd())) self.client.send_msg( zebra.ZebraMessage( version=self.client.zserv_ver, - command=zebra.ZEBRA_INTERFACE_ADD)) + body=zebra.ZebraInterfaceAdd())) self.client.send_event_to_observers( zclient_event.EventZServConnected(self)) @@ -285,7 +287,8 @@ class ZClient(RyuApp): distance=distance, metric=metric, mtu=mtu, - tag=tag)) + tag=tag, + instance=0)) self.send_msg(msg) return msg diff --git a/ryu/services/protocols/zebra/event.py b/ryu/services/protocols/zebra/event.py index 030909c3..47c4c2c9 100644 --- a/ryu/services/protocols/zebra/event.py +++ b/ryu/services/protocols/zebra/event.py @@ -90,7 +90,7 @@ def message_to_event(zclient, msg): if not isinstance(msg, zebra.ZebraMessage): return None - body_cls = zebra._ZebraMessageBody.lookup_command(msg.command) + body_cls = msg.get_body_class(msg.version, msg.command) ev_cls = getattr(MOD, _event_name(body_cls), None) if ev_cls is None: return None diff --git a/ryu/services/protocols/zebra/server/zserver.py b/ryu/services/protocols/zebra/server/zserver.py index f8119900..e12ce005 100644 --- a/ryu/services/protocols/zebra/server/zserver.py +++ b/ryu/services/protocols/zebra/server/zserver.py @@ -277,6 +277,8 @@ class ZServer(RyuApp): ifindex=intf.ifindex, status=intf.status, if_flags=intf.flags, + ptm_enable=zebra.ZEBRA_IF_PTM_ENABLE_OFF, + ptm_status=zebra.ZEBRA_PTM_STATUS_UNKNOWN, metric=intf.metric, ifmtu=intf.ifmtu, ifmtu6=intf.ifmtu6, |