Signed-off-by: YAMAMOTO Takashi <[email protected]>
---
ryu/ofproto/ofproto_v1_2_parser.py | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/ryu/ofproto/ofproto_v1_2_parser.py
b/ryu/ofproto/ofproto_v1_2_parser.py
index e48aa7c..e2fabd2 100644
--- a/ryu/ofproto/ofproto_v1_2_parser.py
+++ b/ryu/ofproto/ofproto_v1_2_parser.py
@@ -1656,7 +1656,18 @@ class OFPMatch(StringifyMixin):
stringify_attrs = iteritems
def to_jsondict(self):
- return super(OFPMatch, self).to_jsondict(lambda x: x)
+ # XXX old api compat
+ if self._composed_with_old_api():
+ # copy object first because serialize_old is destructive
+ o2 = OFPMatch()
+ o2.fields = self.fields[:]
+ # serialize and parse to fill OFPMatch._fields2
+ buf = bytearray()
+ o2.serialize(buf, 0)
+ o = OFPMatch.parser(str(buf), 0)
+ else:
+ o = self
+ return super(OFPMatch, o).to_jsondict(lambda x: x)
@classmethod
def from_jsondict(cls, dict_):
--
1.8.1.5
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel