mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-05 04:16:11 +02:00
ofctl_rest: fix mod_meter_entry in OpenFlow1.0/1.2
mod_meter_entry causes the following error when the protocol version is 1.0 or 1.2. AttributeError: 'module' object has no attribute 'OFPMC_ADD' this patch fixes this problem. 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:
parent
79e2460c20
commit
7a10aafd39
@ -256,6 +256,11 @@ class StatsController(ControllerBase):
|
||||
if dp is None:
|
||||
return Response(status=404)
|
||||
|
||||
if dp.ofproto.OFP_VERSION == ofproto_v1_0.OFP_VERSION or \
|
||||
dp.ofproto.OFP_VERSION == ofproto_v1_2.OFP_VERSION:
|
||||
LOG.debug('Unsupported OF protocol')
|
||||
return Response(status=501)
|
||||
|
||||
if cmd == 'add':
|
||||
cmd = dp.ofproto.OFPMC_ADD
|
||||
elif cmd == 'modify':
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user