summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYAMAMOTO Takashi <yamamoto@valinux.co.jp>2013-06-27 16:12:21 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2013-06-29 03:45:56 +0900
commit03e469c1fc7474a4fbf4655b456df43074617481 (patch)
tree4a1ba40abdd8da04e5a41fdb04cc3c407da7f9b4
parent42a097c596e7ccb35de7762b165c939999ddd0ce (diff)
of1.2: OFPGroupFeaturesStats: tuple -> list
tuples are json-unfriendly. (of1.3 version was completely broken until very recently and the way i fixed it is consistent with this change.) Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/ofproto/ofproto_v1_2_parser.py4
-rw-r--r--ryu/tests/unit/ofproto/test_parser_v12.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/ryu/ofproto/ofproto_v1_2_parser.py b/ryu/ofproto/ofproto_v1_2_parser.py
index 224bcb27..19a95bc4 100644
--- a/ryu/ofproto/ofproto_v1_2_parser.py
+++ b/ryu/ofproto/ofproto_v1_2_parser.py
@@ -1279,8 +1279,8 @@ class OFPGroupFeaturesStats(object):
ofproto_v1_2.OFP_GROUP_FEATURES_STATS_PACK_STR, buf, offset)
types = stats[0]
capabilities = stats[1]
- max_groups = stats[2:6]
- actions = stats[6:10]
+ max_groups = list(stats[2:6])
+ actions = list(stats[6:10])
return cls(types, capabilities, max_groups, actions)
diff --git a/ryu/tests/unit/ofproto/test_parser_v12.py b/ryu/tests/unit/ofproto/test_parser_v12.py
index 6eb76130..c7eae760 100644
--- a/ryu/tests/unit/ofproto/test_parser_v12.py
+++ b/ryu/tests/unit/ofproto/test_parser_v12.py
@@ -6064,8 +6064,8 @@ class TestOFPGroupFeaturesStats(unittest.TestCase):
# max_groups and actions after the parser is tuple
eq_(types, res.types)
eq_(capabilities, res.capabilities)
- eq_(tuple(max_groups), res.max_groups)
- eq_(tuple(actions), res.actions)
+ eq_(max_groups, res.max_groups)
+ eq_(actions, res.actions)
def test_parser_mid(self):
self._test_parser(self.types, self.capabilities,