Bug 2000618

Summary: Neutron - “Update bandwidth limit rule” API on SUCCESS responds with 200 instead of Expected 202
Product: Red Hat OpenStack Reporter: Arkady Shtempler <ashtempl>
Component: openstack-tempestAssignee: Rodolfo Alonso <ralonsoh>
Status: CLOSED ERRATA QA Contact: Fiorella Yanac <fyanac>
Severity: medium Docs Contact:
Priority: medium    
Version: 17.0 (Wallaby)CC: apevec, ccamposr, chrisw, jschluet, lhh, mkopec, ralonsoh, scohen, slinaber, udesale
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tempest-28.1.0-0.20210913221832.ad2c300.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-09-21 12:17:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Arkady Shtempler 2021-09-02 14:02:07 UTC
### Scenario ###
Activate “Update bandwidth limit rule” API with proper values to make it PASS

### Actual Result ###
Received status code is 200 OK

### Expected Result ###
According the Documentation it needs to be 202 Accepted
https://docs.openstack.org/api-ref/network/v2/index.html?expanded=update-bandwidth-limit-rule-detail#update-bandwidth-limit-rule

### Tempest prompt output ###
BUG_200_instead_of_202BUG_200_instead_of_202BUG_200_instead_of_202BUG_200_instead_of_202BUG_200_instead_of_202BUG_200_instead_of_202BUG_200_instead_of_202BUG_200_instead_of_202BUG_200_instead_of_202BUG_200_instead_of_202BUG_200_instead_of_202BUG_200_instead_of_202BUG_200_instead_of_202
2021-09-01 15:21:48.668 529226 INFO tempest.lib.common.rest_client [req-27de559b-db51-433b-b01b-fd27cba24664 ] Request (QoSTest:test_qos_basic_and_update): 200 PUT http://10.0.0.125:9696/v2.0/qos/policies/31e15f98-8b03-4f8b-9a1a-27847ea48971/bandwidth_limit_rules/f17625ab-24c7-46c1-bcd2-0e326c9ac360 0.269s
2021-09-01 15:21:48.668 529226 DEBUG tempest.lib.common.rest_client [req-27de559b-db51-433b-b01b-fd27cba24664 ] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
        Body: {"bandwidth_limit_rule": {"max_kbps": 2000, "max_burst_kbps": 2000}}
    Response - Headers: {'content-type': 'application/json', 'content-length': '137', 'x-openstack-request-id': 'req-27de559b-db51-433b-b01b-fd27cba24664', 'date': 'Wed, 01 Sep 2021 19:21:48 GMT', 'connection': 'close', 'status': '200', 'content-location': 'http://10.0.0.125:9696/v2.0/qos/policies/31e15f98-8b03-4f8b-9a1a-27847ea48971/bandwidth_limit_rules/f17625ab-24c7-46c1-bcd2-0e326c9ac360'}
        Body: b'{"bandwidth_limit_rule": {"max_kbps": 2000, "max_burst_kbps": 2000, "direction": "egress", "id": "f17625ab-24c7-46c1-bcd2-0e326c9ac360"}}' _log_request_full /home/stack/tempest/tempest/lib/common/rest_client.py:456

Comment 1 Rodolfo Alonso 2021-09-06 14:02:46 UTC
Hello:

The neutron-lib documentation was changed in [1]

The U/S tempest patch is [2]. Because OSP17 is using U/S master, this BZ could be set to MODIFIED.

Regards.

[1]https://review.opendev.org/c/openstack/neutron-lib/+/807390
[2]https://review.opendev.org/c/openstack/tempest/+/807480

Comment 11 errata-xmlrpc 2022-09-21 12:17:06 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Release of components for Red Hat OpenStack Platform 17.0 (Wallaby)), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2022:6543