Commit Graph

9 Commits

Author SHA1 Message Date
Dan Smith e1bb4378db Add images.GlanceManager.find_images() bulk query
This adds a bulk query method to GlanceManager that takes multiple
image names or ids and attempts to query glance for all of them
in fewer requests than one-per-image.

Change-Id: I1c6ce27b65920356df6b7001c581a2922765ce0c
2019-10-18 10:49:53 -07:00
Matt Riedemann 41f66d15aa Remove deprecated image commands/API bindings
We deprecated the image proxy commands and APIs in Newton
due to the 2.36 microversion. We said after Ocata 15.0.0 we
would remove these, which we can do now in Pike.

Note that the list() method on the ImageManager has to be
moved to the GlanceManager since we still need to list images
for the --image-with option on the boot command. The _match_image
method in the shell has to be updated for a glance v2 response
where custom metadata properties are flat in the image body.

This needs to be released with a major version bump.

Change-Id: I2d9fd0243d42538bd1417a42357c17b09368d2a5
2017-02-22 15:56:28 -05:00
Pavel Kholkin 75052a7afc [proxy-api] microversion 2.39 deprecates image-metadata proxy API
Almost all proxy APIs were deprecated in microversion 2.36.
But the sub-resource image-metadata of image was forgotten to deprecate.
This patch deprecates the image-metdata API from 2.39.

Image commands were already deprecated since 2.36 in
I450917f7fcbfe0a3ea7921c82af9863e80cb40a1

Implements blueprint deprecate-image-meta-proxy-api

Change-Id: Idd4cd1d1fec13f9e5f89dc419b57e094c9ad4b3b
2016-12-16 21:06:28 +03:00
Matt Riedemann 20b721e1ad Cap image API deprecated methods at 2.35
The image proxy API GET/DELETE methods are deprecated
at microversion 2.36 and will return a 404 after that.

This adds the wraps decorator to those python API methods
so set the cap at 2.35 so rather than get a 404 you'll
get a more uesful VersionNotFoundForAPIMethod.

Note that set_meta and delete_meta are not decorated
because we missed deprecating the image-metadata proxy API
with the 2.36 microversion. That will be fixed in Ocata.

Related to blueprint deprecate-api-proxies

Change-Id: Ie65efadb5c65e8a624ffd0315a634accd49f1c30
2016-08-19 16:25:07 -04:00
Sean Dague f839cf1625 Look up image names directly in glance
This does a lookup directly to the image service for name => id
mapping of images. This is required to move on to supporting the
2.36 microversion since that microversion makes the compute
image API proxy return a 404, so before the client can support
that microversion it has to first drop it's usage of the proxy
API.

Because of the way the FakeHTTPClient was stubbing the image
API proxy and the tests are not passing uuids for image IDs,
there is a lot of cleaning up of the tests to make this work
with a fake glance v2 API backend. The tests were basically
false though since you can't do 'nova image-show 1', but because
the stubs mask that it's just been a mountain of lies that has to
be cleaned up here.

As a side effect of fixing a bunch of the tests, this also
makes debugging assert_called less terrible with a better error
message.

Co-Authored-By: Matt Riedemann <mriedem@us.ibm.com>

Related to blueprint deprecate-api-proxies

Change-Id: Iaff3999eafb7d746e5c6032f07ce0756f7b5e868
2016-08-12 16:00:56 -04:00
Matt Riedemann a602e59806 Deprecate image list/show/delete/update CLIs/APIs
This deprecates all of the image CLIs/python API bindings that use
the Nova os-images API which is a proxy to the Glance v1 API.

This will emit a warning each time a deprecated CLI/API is used and also
updates the help docs for the deprecated CLIs and docstrings for APIs.

The plan is to do a release once this is merged so people start seeing
it and then we'll actually remove the deprecated CLIs/APIs in the first
python-novaclient release after the Nova server 15.0.0 'O' release.

Depends-On: Iff5fb3180855de7adb3399f6be16bedc8543b4ec

Change-Id: I3f60cc7f4c6e27861c4a84b925d573f35f1a1848
2016-04-12 11:57:57 -04:00
Takashi NATSUME f194a5abad Add return-request-id-to-caller function(2/5)
Add return-request-id-to-caller function to
resources and resource managers in the following files.
The methods in the resource class and resource manager return
a wrapper class that has 'request_ids' property.
The caller can get request ids of the callee via the property.

* novaclient/v2/agents.py
* novaclient/v2/aggregates.py
* novaclient/v2/availability_zones.py
* novaclient/v2/certs.py
* novaclient/v2/cloudpipe.py
* novaclient/v2/fixed_ips.py
* novaclient/v2/flavor_access.py
* novaclient/v2/flavors.py
* novaclient/v2/floating_ip_dns.py
* novaclient/v2/floating_ip_pools.py
* novaclient/v2/floating_ips_bulk.py
* novaclient/v2/floating_ips.py
* novaclient/v2/fping.py
* novaclient/v2/hosts.py
* novaclient/v2/hypervisors.py
* novaclient/v2/images.py

Co-authored-by: Ankit Agrawal <ankit11.agrawal@nttdata.com>
Change-Id: Ic624d532f1a468dd45105bbb5aa6d8a730984338
Implements: blueprint return-request-id-to-caller
2016-01-27 02:45:22 +00:00
Pete Savage bde241b947 Added marker functionality to flavours and images
Markers to support pagination was missing from flavours
and from images.

Change-Id: I27de83f18a4850b63020ac60e010839a13e916fb
2015-06-26 11:05:10 +01:00
Andrey Kurilin 0a60aae852 Rename v1_1 to v2
Module novaclient.v1_1 is used as implementation of V1.1, V2 and V3.
Since future development(microversioning) will be done across V2,
implementation should be done in appropriate module(to prevent misleading).

Despite the fact that implementation for all versions are equal, discover
method for contrib path worked only for v1.1. This patch fixes this bug and
modifies shell tests to check all versions.

Change-Id: Ib6798f4dfe177586302141f522dc593560ce6a5b
2015-02-04 17:40:46 +02:00