Commit Graph

9 Commits

Author SHA1 Message Date
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
Diana Clarke 53b23d5217 Microversion 2.40 - Simple tenant usage pagination
Add optional parameters 'limit' and 'marker' to the
os-simple-tenant-usage endpoints for pagaination.

  /os-simple-tenant-usage?limit={limit}&marker={instance_uuid}
  /os-simple-tenant-usage/{tenant}?limit={limit}&marker={instance_uuid}

Implements blueprint paginate-simple-tenant-usage
Depends-on: Ic8e9f869f1b855f968967bedbf77542f287f26c0
Change-Id: If99db6933de012b71cf2c982075f08b3e664361e
2016-12-19 14:04:13 -05:00
Matt Riedemann 5c4d436d21 Revert "Microversion 2.39 - Simple tenant usage pagination"
This reverts commit f47393dbbf.

The 2.39 microversion has not been merged in Nova, and this
change is missing a functional test to show the support added
here, which if present would have required a depends-on to the
Nova change for the 2.39 support. So this needs to come back
out until it's ready.

Change-Id: I6b6990b9a4e1e7cfea1d2aabe5f2464614440360
2016-12-02 21:05:22 +00:00
Diana Clarke f47393dbbf Microversion 2.39 - Simple tenant usage pagination
Optional parameters 'limit' and 'marker' were added to the GET
/os-simple-tenant-usage and GET os-simple-tenant-usage/{tenant_id}
endpoints.

/os-simple-tenant-usage?limit={limit}&marker={instance_uuid}
/os-simple-tenant-usage/{tenant_id}?limit={limit}&marker={instance_uuid}

Implements blueprint paginate-simple-tenant-usage
Change-Id: I9e96d31ede323f1c2aed4271a4fcab720cc9507b
2016-12-01 10:19:29 -05:00
Andrey Kurilin 65c1fbae70 Store api_version object in one place
Currently we store api_version in two places: client and
HTTPClient/SessionClient instances.

It would be nice to store it in one place, so it would be easier
to change api_version without recreating novaclient object.

Change-Id: I36369a126c20de5922141e8725834ca93d6b0a1a
2016-08-18 18:36:40 +03:00
Cao ShuFeng 3a538f6d86 Overwrite Usage class's get() function
base.Resource's get function will call its manager's get() function
with one parameter. However UsageManager's get function takes three
parameters.

Change-Id: I958a55c4d52cec4d1177371b788b3cf788098a6c
Closes-bug: 1552616
2016-03-06 04:21:02 +00:00
Takashi NATSUME 0414bab3d3 Add return-request-id-to-caller function(3/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/keypairs.py
* novaclient/v2/limits.py
* novaclient/v2/networks.py
* novaclient/v2/quota_classes.py
* novaclient/v2/quotas.py
* novaclient/v2/security_group_default_rules.py
* novaclient/v2/security_group_rules.py
* novaclient/v2/security_groups.py
* novaclient/v2/server_groups.py
* novaclient/v2/services.py
* novaclient/v2/usage.py
* novaclient/v2/versions.py

Co-authored-by: Ankit Agrawal <ankit11.agrawal@nttdata.com>
Change-Id: I9203f70a0eef5686b590fbff35563f2cf8b6f586
Implements: blueprint return-request-id-to-caller
2016-01-28 11:22:00 +00:00
Kevin L. Mitchell 0a327ce375 Eliminate test comprehensions
The novaclient tests are rife with examples of using a list comprehension
to perform a series of asserts, when a simple for loop would be more
appropriate and more idiomatic; part of the problem is the propensity
for people to cut and paste.  Eliminating the existing examples should
remove the temptation for developers to use this non-idiom to perform
tests.

Change-Id: I2cc8979e720740eae81692a60e30a3d95dce2a2c
2015-05-21 19:12:35 -05: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