ofproto/NXAction: Fix NXActionUnknown parsing

Exception error occurs when NXActionUnknown parsing,
because _subtype(NXActionUnknown class member variable) is not defined.

This patch fixes this problem.

Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
Minoru TAKAHASHI 2016-01-21 13:32:24 +09:00 committed by FUJITA Tomonori
parent 97ebd2fc56
commit 75fe76c4a5
4 changed files with 14 additions and 2 deletions

View File

@ -182,6 +182,7 @@ def generate(ofp_name, ofpp_name):
class NXActionUnknown(NXAction):
def __init__(self, subtype, data=None,
type_=None, len_=None, experimenter=None):
self._subtype = subtype
super(NXActionUnknown, self).__init__()
self.data = data

View File

@ -443,6 +443,8 @@ x() ->
#ofp_action_output{port = 6,
max_len = no_buffer},
#ofp_action_experimenter{experimenter = 98765432,
data = <<"exp_data">>},
#ofp_action_experimenter{experimenter = 8992,
data = <<"exp_data">>}
]},
#ofp_instruction_apply_actions{

View File

@ -259,9 +259,18 @@
"experimenter": 98765432,
"type": 65535
}
},
{
"NXActionUnknown": {
"len": 16,
"data": "cF9kYXRh",
"experimenter": 8992,
"type": 65535,
"subtype": 25976
}
}
],
"len": 176,
"len": 192,
"type": 3
}
},
@ -312,7 +321,7 @@
}
}
],
"length": 296,
"length": 312,
"match": {
"OFPMatch": {
"length": 4,