Commit Graph

10 Commits

Author SHA1 Message Date
Stephen Finucane 54d4da112a Add support for microversion v2.88
The key change here is that the 'GET /os-hypervisors/{id}/uptime' API
will now returns a HTTP 404 starting in 2.88. The 'GET
/os-hypervisors/{id}' will instead now include an 'uptime' value. The
'novaclient.v2.hypervisors.HypervisorManager.uptime' method is updated
to handle this.

Change-Id: Ib99fbd820a586c14527ff64b319df0b7a44e1b8b
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-03-02 12:14:12 +00:00
Stephen Finucane b9a7e03074 Random cleanups
Remove some cruft from Sphinx config files, drop the use of 'u' prefixed
strings, which are unnecessary in Python 3, and generally tidy stuff up.

Change-Id: Ib0f33576e160ec842d7fc82b4fcfee99829623d7
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-02-21 09:56:37 +00:00
Stephen Finucane c4c44bcb2d Remove six
Mostly a find-replace job. Let's do this now so we don't have to carry
it for the next decade.

Change-Id: I7bef9fb7c6895f746cee1aca6522786f38b9857c
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-02-21 09:48:38 +00:00
Matt Riedemann 0dc6b96ec8 Allow searching for hypervisors and getting back details
The 2.53 microversion allows listing hypervisors with
details and filtering on a hypervisor_hostname substring
pattern match.

This makes the python API binding HypervisorManager.search
method allow that as well by adding a new 'detailed' boolean
kwarg which defaults to False for backward compatibility for
the /search and /servers routes before 2.53, but allows
searching and getting detailed results back as well.

Change-Id: I81fa4520af3cc7f1298c262f4fdc4e15fbc6d7ba
2019-05-18 14:47:11 -04:00
asmita singh 4450e7ba31 Handle unicode multi-byte characters
If you pass unicode multi-byte character to 'hypervisor-list'
and 'instance-usage-audit-log' commands using --matching
and --before options respectively, it returns keyerror.

This patch fixes these issues by encoding the host name and
date passed to the --matching and --before options
respectively.

Closes-Bug: #1804156

Change-Id: I9587af7e0fdd921fcaebe3e5c6c5bb40a9393e01
2019-02-22 05:32:49 +00:00
Matt Riedemann 5745beae5c Microversion 2.53 - services and hypervisors using UUIDs
Adds support for the 2.53 microversion which changes the
os-services and os-hypervisors APIs to use a UUID for the ID
value on the resource.

Also, the PUT and GET API methods have changed a bit for
both resources in this microversion, so the pythong API
bindings and command lines have been adjusted accordingly.

Part of blueprint service-hyper-uuid-in-api

Change-Id: Ic721143cc154d91e74a8a9dd2c1e991045c94305
2017-07-26 09:04:19 -04:00
Jamie Lennox e88afc046b Clean up requests-mock usage
In line with other clients testing we've found that having the
requests-mock fixture at self.requests can be misleading for new people
as it looks like you're calling requests itself.

Also make use of some of the new features of requests-mock like query
parsing, json handling, method names.

Change-Id: Id61b88c53478d49f91c3f880ed5b90d638051ba0
2016-10-05 06:53:05 +11:00
Andrey Volkov 6bbcedb000 Add support for microversion 2.33
This change allows novaclient to get several hypervisors
with the help of new optional parameters 'limit' and 'marker'
which were added to hipervisor-list command.

Change-Id: Ib723fb1dc1cd57b6f796bb93e0dd8ddf2da4b2a0
2016-08-03 18:37:55 +03: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
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