mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-12 00:03:24 +02:00
Make type and len class attributes of OFPInstructionMeter
Make type and len class attributes of OFPInstructionMeter and update JSON accordingly. This is in keeping with the implementation of other OFPInstruction classes. Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
d5c2c1f2e3
commit
8639905bb7
@ -2558,9 +2558,8 @@ class OFPInstructionMeter(StringifyMixin):
|
||||
meter_id Meter instance
|
||||
================ ======================================================
|
||||
"""
|
||||
_base_attributes = ['type', 'len']
|
||||
|
||||
def __init__(self, meter_id):
|
||||
def __init__(self, meter_id, type_=None, len_=None):
|
||||
super(OFPInstructionMeter, self).__init__()
|
||||
self.type = ofproto_v1_3.OFPIT_METER
|
||||
self.len = ofproto_v1_3.OFP_INSTRUCTION_METER_SIZE
|
||||
|
||||
@ -10,6 +10,8 @@
|
||||
"instructions": [
|
||||
{
|
||||
"OFPInstructionMeter": {
|
||||
"len": 8,
|
||||
"type": 6,
|
||||
"meter_id": 1
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user