sw test tool: Enable parsing OFPGroupMod messages in 'prerequisite'

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
Yuichi Ito 2014-05-27 10:05:43 +09:00 committed by FUJITA Tomonori
parent 99ab1a4a95
commit af5267b4ab

View File

@ -99,6 +99,7 @@ KEY_DESC = 'description'
KEY_PREREQ = 'prerequisite'
KEY_FLOW = 'OFPFlowMod'
KEY_METER = 'OFPMeterMod'
KEY_GROUP = 'OFPGroupMod'
KEY_TESTS = 'tests'
KEY_INGRESS = 'ingress'
KEY_EGRESS = 'egress'
@ -1236,7 +1237,7 @@ class Test(stringify.StringifyMixin):
prerequisite = []
if KEY_PREREQ not in buf:
raise ValueError('a test requires a "%s" block' % KEY_PREREQ)
allowed_mod = [KEY_FLOW, KEY_METER]
allowed_mod = [KEY_FLOW, KEY_METER, KEY_GROUP]
for flow in buf[KEY_PREREQ]:
key, value = flow.popitem()
if key not in allowed_mod: