Allow PUT on direction param in QoS minimum pps rule
Based on discussion in the previous review [1] and IRC [2], it was decided to allow direction parameter in QoS minimum packet rate rule to be updated with a PUT request. This behavior matches current behavior of other QoS rules. If the rule to be updated is associated with a bound port, the request is going to be rejected by the server. Since direction-oriented and direction-less QoS min pps rules are mutually exclusive, the request is going to be rejected if it would result in mixing direction-oriented and direction-less rules in a single policy. [1] https://review.opendev.org/802486 [2] https://meetings.opendev.org/irclogs/%23openstack-neutron/latest.log.html#t2021-08-09T07:56:39 Related-Bug: #1922237 See-Also: https://review.opendev.org/785236 Change-Id: If1f7b28184c740c30388f564b704ba42c8967527
This commit is contained in:
parent
8c473f4d32
commit
fb4775cf83
@ -4161,6 +4161,12 @@ min_kpps-response:
|
||||
in: body
|
||||
required: true
|
||||
type: integer
|
||||
min_kpps-update:
|
||||
description: |
|
||||
The minimum kilo (1000) packets per second (kpps) value.
|
||||
in: body
|
||||
required: false
|
||||
type: integer
|
||||
min_prefixlen:
|
||||
description: |
|
||||
The smallest prefix that can be allocated from a
|
||||
@ -4948,6 +4954,16 @@ qos-rule-minimum-packet-rate-direction:
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
qos-rule-minimum-packet-rate-direction-update:
|
||||
description: |
|
||||
The direction of the traffic to which the QoS
|
||||
minimum packet rate rule is applied, as seen
|
||||
from the point of view of the ``port``. Valid
|
||||
values are ``any``, ``egress`` and
|
||||
``ingress``.
|
||||
in: body
|
||||
required: false
|
||||
type: string
|
||||
qos-rule-type:
|
||||
description: |
|
||||
The type of QoS rule.
|
||||
|
@ -1131,7 +1131,7 @@ code 501, if there is any bound port referring to the rule via the qos policy.
|
||||
|
||||
Normal response codes: 202
|
||||
|
||||
Error response codes: 400, 401, 404, 501
|
||||
Error response codes: 400, 401, 404, 409, 501
|
||||
|
||||
Request
|
||||
-------
|
||||
@ -1141,7 +1141,8 @@ Request
|
||||
- policy_id: qos-policy-id-path
|
||||
- rule_id: qos-rule_id
|
||||
- minimum_packet_rate_rule: minimum_packet_rate_rule
|
||||
- min_kpps: min_kpps
|
||||
- min_kpps: min_kpps-update
|
||||
- direction: qos-rule-minimum-packet-rate-direction-update
|
||||
|
||||
Request Example
|
||||
---------------
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"minimum_packet_rate_rule": {
|
||||
"min_kpps": 2000
|
||||
"min_kpps": 2000,
|
||||
"direction": "any"
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ SUB_RESOURCE_ATTRIBUTE_MAP = {
|
||||
},
|
||||
qos_constants.DIRECTION: {
|
||||
'allow_post': True,
|
||||
'allow_put': False,
|
||||
'allow_put': True,
|
||||
'is_visible': True,
|
||||
'default': None,
|
||||
'is_filter': True,
|
||||
|
Loading…
x
Reference in New Issue
Block a user