Designate DNS - List project limits. No project ID is included in response

Bug #1933444 reported by Arkady Shtempler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Designate
New
Low
Unassigned

Bug Description

### Scenario ###
Activate API to get “project limits” for all projects using Admin client and “x-auth-all-projects: True”

### Actual result ###
Received API response is dictionary, there is no way to know whom (project) those received values are associated with.

2021-06-24 11:52:23.414 4116243 INFO tempest.lib.common.rest_client [req-82a52407-6f02-42de-8139-6846920d8522 ] Request (DesignateLimit:test_list_designate_limits_all_projects): 200 GET http://10.35.64.8/dns/v2/limits 0.162s
2021-06-24 11:52:23.414 4116243 DEBUG tempest.lib.common.rest_client [req-82a52407-6f02-42de-8139-6846920d8522 ] Request - Headers: {'x-auth-all-projects': True, 'X-Auth-Token': '<omitted>'}
        Body: None
    Response - Headers: {'date': 'Thu, 24 Jun 2021 08:52:23 GMT', 'server': 'Apache/2.4.41 (Ubuntu)', 'content-length': '203', 'x-openstack-request-id': 'req-82a52407-6f02-42de-8139-6846920d8522', 'connection': 'close', 'content-type': 'application/json', 'status': '200', 'content-location': 'http://10.35.64.8/dns/v2/limits'}
        Body: b'{"max_zones": 10, "max_zone_recordsets": 500, "max_zone_records": 500, "max_recordset_records": 20, "min_ttl": null, "max_zone_name_length": 255, "max_recordset_name_length": 255, "max_page_limit": 1000}' _log_request_full /opt/stack/tempest/tempest/lib/common/rest_client.py:450

### Expected result ####
Basing on Documentation we have:
https://docs.openstack.org/api-ref/dns/?expanded=set-floatingip-s-ptr-record-detail,unset-floatingip-s-ptr-record-detail,get-project-limits-detail#get-project-limits we would probably had to respond with some other data structure (maybe list of dictionaries) where project_id is included.

Note: it's possible to use: https://review.opendev.org/c/openstack/designate-tempest-plugin/+/797678 (patchset #2) for reproducing.

description: updated
Revision history for this message
Michael Johnson (johnsom) wrote :

Does it always just return one dictionary of limits, or does it change to a list (array) of limits when the "x-auth-all-projects" header is used?

If it does return a list with multiple limits dictionaries, we need to fix the content of the dictionary to include the project_id. If it always just returns one set, I might consider this a documentation bug and simply remove the "x-auth-all-projects" from the api-reference docs.

Changed in designate:
importance: Undecided → Low
Revision history for this message
Arkady Shtempler (ashtempl) wrote :

It's always a same response (always dictionary, I've never seen a list) no matter if "x-auth-all-projects" was provided or not.
The name of this API (as far as i understand it) says that we can get the limits for projects/tenants and if so, we need to fix the respond to be a list and to include "project_id" as a key in dictionaries.
Otherwise, if the only meaning of this API is to get the limits (kind of global Designate limits in general) we need to fix the DOC and probably to replace: "project limits" to "Designate limits" or something to avoid misunderstandings + removing all HTTP irrelevant headers.

It's on design level I think, so I don't really know what should be done here :-(

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.