python-blazarclient/blazarclient
Jason Anderson 3f30c49c6b Don't fetch entire list when looking up by ID
Blazar APIs support directly fetching a resource (whether host, floating
ip, or lease) with its ID. However, the default logic for this includes
a block that supports additionally looking up the resource by name (to
allow looking up e.g., a lease by it's name.) This requires fetching the
entire list of all resources and iterating over them until a match is
found, which is very inefficient. Moreover, this branch would be taken
even if the input was already a UUID.

This commit changes that behavior so that if a UUID is provided, it is
used to directly fetch the resource, which seems to be what the original
intent was in the first place.

Change-Id: I5b1ccf4abfe4aa9068bc011764cac4b3507ef697
2020-01-30 16:59:44 +01:00
..
tests Don't fetch entire list when looking up by ID 2020-01-30 16:59:44 +01:00
v1 Support floating IP reservation parameters in lease-update 2019-09-11 17:50:43 +02:00
__init__.py Migrate Python namespace from climateclient to blazarclient 2017-02-21 21:53:05 +00:00
base.py Fix typo in exception class name 2018-12-17 15:24:01 +01:00
client.py Migrate Python namespace from climateclient to blazarclient 2017-02-21 21:53:05 +00:00
command.py Support hostname in show, update and delete host operations 2018-04-19 09:55:28 +00:00
exception.py Fix typo in exception class name 2018-12-17 15:24:01 +01:00
i18n.py Fix link to oslo.i18n usage documentation 2018-08-15 09:22:10 +00:00
shell.py Add support for floating IP reservation 2019-05-30 11:29:04 +01:00
utils.py Don't fetch entire list when looking up by ID 2020-01-30 16:59:44 +01:00
version.py Migrate Python namespace from climateclient to blazarclient 2017-02-21 21:53:05 +00:00