Merge "bw-limit: Pass int parameters to Open vSwitch" into stable/wallaby
This commit is contained in:
commit
f3d9ece690
|
@ -820,11 +820,11 @@ class OVSBridge(BaseOVS):
|
||||||
def _update_ingress_bw_limit_for_port(
|
def _update_ingress_bw_limit_for_port(
|
||||||
self, port_name, max_bw_in_bits, max_burst_in_bits):
|
self, port_name, max_bw_in_bits, max_burst_in_bits):
|
||||||
qos_other_config = {
|
qos_other_config = {
|
||||||
'max-rate': str(max_bw_in_bits)
|
'max-rate': str(int(max_bw_in_bits))
|
||||||
}
|
}
|
||||||
queue_other_config = {
|
queue_other_config = {
|
||||||
'max-rate': str(max_bw_in_bits),
|
'max-rate': str(int(max_bw_in_bits)),
|
||||||
'burst': str(max_burst_in_bits),
|
'burst': str(int(max_burst_in_bits)),
|
||||||
}
|
}
|
||||||
qos = self.find_qos(port_name)
|
qos = self.find_qos(port_name)
|
||||||
queue = self.find_queue(port_name, QOS_DEFAULT_QUEUE)
|
queue = self.find_queue(port_name, QOS_DEFAULT_QUEUE)
|
||||||
|
@ -848,8 +848,8 @@ class OVSBridge(BaseOVS):
|
||||||
self, port_name, max_bw_in_bits, max_burst_in_bits):
|
self, port_name, max_bw_in_bits, max_burst_in_bits):
|
||||||
# cir and cbs should be set in bytes instead of bits
|
# cir and cbs should be set in bytes instead of bits
|
||||||
qos_other_config = {
|
qos_other_config = {
|
||||||
'cir': str(max_bw_in_bits / 8),
|
'cir': str(max_bw_in_bits // 8),
|
||||||
'cbs': str(max_burst_in_bits / 8)
|
'cbs': str(max_burst_in_bits // 8)
|
||||||
}
|
}
|
||||||
qos = self.find_qos(port_name)
|
qos = self.find_qos(port_name)
|
||||||
qos_uuid = qos['_uuid'] if qos else None
|
qos_uuid = qos['_uuid'] if qos else None
|
||||||
|
|
Loading…
Reference in New Issue