QoS policy API does not accept 'tenant_id' filter

Bug #1695954 reported by Akihiro Motoki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Opinion
Medium
Akihiro Motoki

Bug Description

The list operation of QoS policy API does not accept 'tenant_id' as filter. 'project_id' filtering works.
We treat project_id and tenant_id equally in the API layer. It would be a bug.

ubuntu@sheep6:~/devstack (master) [OS_CLOUD:devstack][18:32:40]$ openstack token issue
+------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| expires | 2017-06-05T19:32:46+0000 |
| id | gAAAAABZNaPOLTZpwefhxI9PNpNhDtJUuuQSNIyFP063zkoN6RfqM9Cu81k-WXBTWkKWcQzC2-fWQXUVUY5fvL5PunEcSpEn3gimAG1SOdBTL8IKzn8G6SDicc1G5ilZy-ruE99F3ztn4QW8BLd-Vh8F6O0Mkp0GwkIs4tE5e48r8xQh3kI_RFs |
| project_id | dda5fe79cdd547e18647a4dd70cb411f |
| user_id | 7bcf326322944db99548092976dadd6b |
+------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
ubuntu@sheep6:~/devstack (master) [OS_CLOUD:devstack][18:32:46]$ neutron qos-policy-list --tenant-id dda5fe79cdd547e18647a4dd70cb411f
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
Invalid input for operation: 'tenant_id' is not supported for filtering.
Neutron server returns request_ids: ['req-0a0d76b2-b557-43a9-8608-48642512f951']
ubuntu@sheep6:~/devstack (master) [OS_CLOUD:devstack][18:32:52]$ neutron qos-policy-list --project-id dda5fe79cdd547e18647a4dd70cb411f
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.

Tags: api qos
Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

Hello Akihiro:

Is this a bug for Neutron or python-neutronclient?

Anyway, as you say "we treat project_id and tenant_id equally in the API layer", but this is not true anymore. Since Newton release [1], all "tenant_id" references in the DB changed to "project_id". And the OpenStack client, at least the networking commands, doesn't support "tenant_id" [2][3]. There are no commands with "tenant_id" as input [3][4].

BTW, this bug should affect only to python-neutronclient. This project is deprecated in favor of python-openstackclient.

[1] https://review.openstack.org/#/c/335786/
[2] http://codesearch.openstack.org/?q=tenant_id&i=fosho&files=openstackclient%2Fnetwork%2F&repos=python-openstackclient --> All references you find are only to address correctly the migration from project_id to tenant_id.
[3] "tenant" references in doc: http://codesearch.openstack.org/?q=tenant&i=nope&files=doc%2Fsource%2Fcommand-objects&repos=python-openstackclient
[4] "project" references in doc: http://codesearch.openstack.org/?q=project&i=nope&files=doc%2Fsource%2Fcommand-objects&repos=python-openstackclient

Revision history for this message
Trevor McCasland (twm2016) wrote :

I agree, the client could easily reassign tenant_id to project_id and pass to the backend. Marking as incomplete to Rodolfo's point. Thanks for the bug triage :)

Revision history for this message
Trevor McCasland (twm2016) wrote :

or you know what.. he mentions.. in the API layer. I could see how this may be useful for people who just use the curl command.

Changed in neutron:
status: New → Opinion
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.