Support to get resource by id to avoid finding in list loop

Bug #1709577 reported by Rui Chen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Shade
Fix Committed
Undecided
Rui Chen

Bug Description

For finding specified resource, we list all the resources in get_xxx(name_or_id) method, then find the result in list result loop, that might have poor performance and slow response when there are many resources in a project. OpenStack API support to get resource by id directly, and part of them had been implemented in Shade, like: get_server_by_id(), get_user_by_id(), get_volume_snapshot_by_id.

Aims to support more:

- flavor
- image
- volume
- network
- subnet
- port
- floatingip
- security group
- ...

Rui Chen (kiwik-chenrui)
Changed in shade:
assignee: nobody → Rui Chen (kiwik-chenrui)
Revision history for this message
Rui Chen (kiwik-chenrui) wrote :
Revision history for this message
Rui Chen (kiwik-chenrui) wrote :

Patch https://review.openstack.org/#/c/492080/ had been merged into master.

Changed in shade:
status: New → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack-infra/shade 1.23.0

This issue was fixed in the openstack-infra/shade 1.23.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-openstacksdk 0.10.0

This issue was fixed in the openstack/python-openstacksdk 0.10.0 release.

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.