Commit Graph

9 Commits

Author SHA1 Message Date
Takashi NATSUME 80b4286981 Replace MB with MiB
Change-Id: Ie5bd325d8e0f7e9af76c1ddae1d679b0e797c84b
2018-10-22 07:11:25 +00:00
Zuul 8cabab774c Merge "Microversion 2.61 - support extra_specs in flavor API" 2018-04-17 19:46:41 +00:00
Takashi NATSUME 229d0df752 Microversion 2.61 - support extra_specs in flavor API
Starting from microversion 2.61, the responses of the 'Flavor' APIs
include the 'extra_specs' parameter. Therefore 'Flavors extra-specs'
(os-extra_specs) API calls have been removed in the following commands
since microversion 2.61.

* nova flavor-list
* nova flavor-show

Change-Id: I10d621d9b62764114d55cb368e720d182eaffd11
Implements: blueprint add-extra-specs-to-flavor-list
2018-04-17 10:02:35 -04:00
Takashi NATSUME 936b5a572d Fix comments in novaclient/tests/unit/fakes.py
Replace 'Assert than' with 'Assert that'.

TrivialFix
Change-Id: I426895467dfa693214f78b495d82e730f4307b9d
2018-04-17 11:38:03 +09: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
Takashi NATSUME 2220c56375 Add wrapper classes for return-request-id-to-caller
Added wrapper classes which are inherited from base data types str,
list, tuple and dict. Each of these wrapper classes and
the Resource class contain a 'request_ids' attribute
which is populated with a 'x-compute-request-id' or
a 'x-openstack-request-id' received in a header from a response body.

This change is required to return 'request_id' from
client to log request_id mappings of cross projects.

This patch is one of a series of patches for implementing
return-request-id-to-caller.

Co-authored-by: Ankit Agrawal <ankit11.agrawal@nttdata.com>
Change-Id: I422c4f4ee59991ca89a0a16f548b537c8b61bb97
Implements: blueprint return-request-id-to-caller
2016-01-26 23:46:10 +00:00
Javeme e919c9b792 remove the default arguments "[]"
remove the default arguments "[]" when the function is defined.

ref: http://docs.python-guide.org/en/latest/writing/gotchas/

Change-Id: I71ee8fbf5dec12d93bbed0e336124ad833014845
2015-12-09 20:59:48 +08:00
Ghanshyam 573bdaa290 Fix H404/405 violations in novaclient/tests/*
There is a lot of H404/405 violations in novaclient, and it is better
to fix those to have a better doc string for class/methods.

This patch fixes these violations for files under  novaclient/tests/
folder.

As there are lot of violations and cannot be fixed in single patches,
So separating those in multiple patches for easy review.

Partial-Bug: #1521899
Change-Id: I6e712ece14c745013bfba0bee9d77e7875dd2263
2015-12-07 14:17:56 +09:00
Joe Gordon 3561772f8b Move unit tests into unit test directory
In order to pave the way for functional testing, move existing unit
tests into a directory labeled unit. A subsequent patch will add a
directory for functional tests.

Change-Id: I0adb8b9f14451acb382c725d31f5387b4b6d82bb
2015-01-27 13:06:06 -08:00