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:
Simon Horman 2014-01-28 08:58:47 +09:00 committed by FUJITA Tomonori
parent d5c2c1f2e3
commit 8639905bb7
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -10,6 +10,8 @@
"instructions": [
{
"OFPInstructionMeter": {
"len": 8,
"type": 6,
"meter_id": 1
}
},