diff options
author | Yusuke Iwase <iwase.yusuke0@gmail.com> | 2014-09-26 15:58:02 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-09-27 18:28:19 +0900 |
commit | 52393362069735aaaf5e51302420d5eec8210eb5 (patch) | |
tree | 7f99f89aab4417addcf2e2c79ab58fca187f1afe | |
parent | 9bcce6010f81630d68663ef81f807e1fdf078636 (diff) |
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>
-rw-r--r-- | ryu/lib/ofctl_v1_2.py | 2 | ||||
-rw-r--r-- | ryu/lib/ofctl_v1_3.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ryu/lib/ofctl_v1_2.py b/ryu/lib/ofctl_v1_2.py index da300f77..21a3e340 100644 --- a/ryu/lib/ofctl_v1_2.py +++ b/ryu/lib/ofctl_v1_2.py @@ -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')) diff --git a/ryu/lib/ofctl_v1_3.py b/ryu/lib/ofctl_v1_3.py index b60c4cc0..11673247 100644 --- a/ryu/lib/ofctl_v1_3.py +++ b/ryu/lib/ofctl_v1_3.py @@ -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')) |