mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-05 20:36:10 +02:00
Fix OFPQueuePropMinRate class
- __str__ method: needs to pass a tuple to msg_str_attr - parser method: rate shouldn't be a tuple. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
e817357a3b
commit
7df808edec
@ -841,12 +841,13 @@ class OFPQueuePropMinRate(OFPQueuePropHeader):
|
||||
|
||||
def __str__(self):
|
||||
buf = super(OFPQueuePropMinRate, self).__str__()
|
||||
return msg_str_attr(self, buf, ('rate'))
|
||||
return msg_str_attr(self, buf, ('rate',))
|
||||
|
||||
@classmethod
|
||||
def parser(cls, buf, offset):
|
||||
rate = struct.pack_from(ofproto_v1_0.OFP_QUEUE_PROP_MIN_RATE_PACK_STR,
|
||||
buf, offset)
|
||||
(rate,) = struct.unpack_from(
|
||||
ofproto_v1_0.OFP_QUEUE_PROP_MIN_RATE_PACK_STR,
|
||||
buf, offset)
|
||||
return cls(rate)
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user