ofctl: Add default value to type field of OFPGroupMod

In OF1.2 and OF1.3 Spec, the group type need not be specified
for the group delete request.
However, an error occurs at mod_group_entry in ofctl_v1_[23].py
without specifying group type to delete a group entry.

This patch adds default value to type field of OFPGroupMod
at mod_group_entry in order to reflect OpenFlow Specification.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
Yusuke Iwase 2014-09-26 15:58:02 +09:00 committed by FUJITA Tomonori
parent 9bcce6010f
commit 5239336206
2 changed files with 2 additions and 2 deletions

View File

@ -822,7 +822,7 @@ def mod_group_entry(dp, group, cmd):
'INDIRECT': dp.ofproto.OFPGT_INDIRECT,
'FF': dp.ofproto.OFPGT_FF}
type_ = type_convert.get(group.get('type'))
type_ = type_convert.get(group.get('type', 'ALL'))
if type_ is None:
LOG.debug('Unknown type: %s', group.get('type'))

View File

@ -1002,7 +1002,7 @@ def mod_group_entry(dp, group, cmd):
'INDIRECT': dp.ofproto.OFPGT_INDIRECT,
'FF': dp.ofproto.OFPGT_FF}
type_ = type_convert.get(group.get('type'))
type_ = type_convert.get(group.get('type', 'ALL'))
if type_ is None:
LOG.debug('Unknown type: %s', group.get('type'))