ofctl_v1_2/3: fix unsuitable log

when using action type below, the log unsuitable is outputted:
Unknown action type: [action type]

  * GOTO_TABLE, WRITE_METADATA, METER(only ofctl_v1_3.py)

this patch fixes this problem.

Reported-by: jalee <jalee@inno-tech.com.tw>
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 2014-07-28 16:22:33 +09:00 committed by FUJITA Tomonori
parent 883a2aacf9
commit 312eee129f
2 changed files with 2 additions and 4 deletions

View File

@ -47,7 +47,6 @@ def to_action(dp, dic):
ofp = dp.ofproto
parser = dp.ofproto_parser
result = None
action_type = dic.get('type')
if action_type == 'OUTPUT':
out_port = int(dic.get('port', ofp.OFPP_ANY))
@ -89,7 +88,7 @@ def to_action(dp, dic):
value = dic.get('value')
result = parser.OFPActionSetField(**{field: value})
else:
LOG.debug('Unknown action type: %s' % action_type)
result = None
return result

View File

@ -47,7 +47,6 @@ def to_action(dp, dic):
ofp = dp.ofproto
parser = dp.ofproto_parser
result = None
action_type = dic.get('type')
if action_type == 'OUTPUT':
out_port = int(dic.get('port', ofp.OFPP_ANY))
@ -94,7 +93,7 @@ def to_action(dp, dic):
elif action_type == 'POP_PBB':
result = parser.OFPActionPopPbb()
else:
LOG.debug('Unknown action type: %s' % action_type)
result = None
return result