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
Description of microversion:
Add a new API for triggering crash dump in an instance. Different operation
systems in instance may need different configurations to trigger crash dump.
Note:
- it is hard to write a functional test for this microversion, since it
requires instance in error state
- all possible failed responses already covered by novaclient.exceptions
Nova's change: I6ed777ff637254b4b79417008f9055dd19fc7405
Change-Id: If03b1864bbe7074c720b946fc2700bd5d07debc3
when we try to restore an instance, it's already deleted state,
so we need to add 'delete=True' as default to restore command,
otherwise, the search function can't find the instance
whose state is deleted with the given name
Change-Id: I81cdc46897d76333452069a691824264ad504518
Closes-Bug: 1534644
Shell was not extended in original patch[1], which turned on v2.12, since
there was not any support of vif in shell yet.
Since shell entry point for legacy vif was merged[2], we need to add support
for v2.12 in shell too.
[1] - I18cf23847d3b2b01f5a6ffae2ebc4bede54babce
[2] - Ib3078125beb7beaa08a3408486db54e0d10763e6
Change-Id: Ie38d099b2babfd8424c7d15bd3dfe8bd75e51136
Added support for new host_status attribute in endpoints
servers/detail and servers/{server_id}.
Partially implements blueprint get-valid-server-state
Change-Id: If72fbcaa02267077dc082a7557c593f35474c4bb
The added tests check functionality of os-services actions
except 'service-delete' (it's hard to recover after test running)
Also 'forced_down' attribute exposed by microversion 2.11
is checked here
Change-Id: I6652bac4ce49d5174592f19b1b4d91ac5bd51500
The added tests check granting access actions for public and
non-public flavors
The test for microversion 2.7 checks that the appropriate
error is returned when attempting to grant an access
to a public flavor for the given tenant
The base TenantTest class has been added to avoid code
duplication in test_keypairs and test_flavor_access tests
Also, test_keypairs code has been modified in accordance with
TenantTestBase class usage
Change-Id: Icf21d8aceaa191aee8b8ffc7c52e97ebe9509b3d
It would be nice to check not only unit test on py3 env, but functional
tests too.
Also, this patch fixes usage of xrange in functional tests.
Change-Id: I15ef204022583a40a02b3f2a48771347ddc95f3e
With I3f156d5e5df4d9642bb4b0ffac30a6288459ce61 nova introduced
microversion 2.15 which adds two new policies soft-affinty and
soft-anti-affinity for the server-group api.
This patch bumps the nova client microversion support to 2.15.
The novaclient is transparent regarding the policy value of the
server-group api so no further changes are needed. However the
help text of the policies parameter mentioned the possible policies.
This was removed as the current framework does not support providing
different help text for a parameter depending on the microversion.
Implements: blueprint soft-affinity-for-server-group
Change-Id: I739ed1dd3e4c15e28a269c4f980a12a74fb1def0
Problem:
When we run nova client unit test, there are lots of UserWarnings
printed on the screen. These warnings mean to remind users not to
use v2.client directly.
Solution:
1. In top level tests such as some tests in test_auth_plugins.py
test_client.py and fixture_data/client.py, we use updated usage
novaclient.client instead of using novaclient.v2.client directly.
2. In v2 unit tests, we clean those warnings with setting direct_use
False.
Change-Id: I70682e54874860f1d67d29325811c9da616bb705
Closes-Bug: #1532711
We have had deprecated command line options in novaclient for a long
time, but no warnings about the deprecations were ever emitted, despite
the help text being suppressed. It would be nice to finally get rid of
those deprecated options. This change sets up the precondition to
accomplish this, by emitting appropriate warnings when a deprecated
option is used.
Note: The "use" text for the deprecated options has been deliberately
chosen to reduce the number of translations required.
Change-Id: Ibe13faa56c5abca97f85f9c5172ef5a5591b5f71
assertTrue(isinstance(A, B)) or assertEqual(type(A), B) in tests
should be replaced by assertIsInstance(A, B) provided by testtools.
Change-Id: Ie4fe7b40e3f4350db94b350395269340ee6acf11
Related-bug: #1268480
The usage of assertEqual(True/False, ***) should be changed
to a meaningful format of assertTrue/False(***).
Change-Id: I66110e5fc1afdf9dd6824b1f7bcb7b2c091a272d
Closes-Bug: #1512207
In I54bfa1275e188573c1b95d770d89160a86cdf52c the onSharedStorage
flag is removed from the evacuate API. This patch removes it from
the novaclient as well.
Implements: bp remove-shared-storage-flag-in-evacuate-api
Change-Id: I5ae75fdac226f0246f22a4d5245c1e4952571fc1
Reviewing the import of novaclient 3.1.0 into the CLI Reference (change
Ib39cdfdd563a2a53f0e6de1f8d2dc4f8c4678c15), a few inconsistencies where
found and fixed:
* Missing "." at end of help string
* Inconsistent capitalization of "DEPRECATED, use"
* Inconsistent capitalization of "Set or delete"
* It's IPv4 and IPv6
* It's ID
Change-Id: I425cd6575ca31efd92fc7f0be6192031886fcc41
Currently fixed ip address passed with --nic is not validated.
This patch add the validation to the fixed address.
Change-Id: I032cc9ce9333b723d37e94b81d699cc0d78d36bf
Closes-Bug: #1528455
Nova now supports API microversion 2.13 to
allow return project_id and user_id for
os-server-groups API. Sync this to the
client side.
Change-Id: Ia09ab4bd5c693ed95b0f5dd9bc709b7597f7034e
Closes-Bug: #1526143
I8d599b712b17dcfc0be940a61c537d2dfe1b715b change provides a wrong fix for
an issue with cli arguments.
_find_actions method is designed to find all action methods(do_server_list,
do_server_show and etc). Since one module can include several versions of
one action(after microversion implementation) and only the last one will
be registrated in module, _find_actions method was adopted to handle
versioned methods.
Now it checks that discovered method is related to versioning stuff and
replace it by appropriate(in terms of microversions) functions. In this case,
the substituation is used only to determine function name and that it relates
to versioning methods. That is why the change(see a change-id above) is not
help at all.
We should share list object named "arguments"(it used by all action methods to
store cli arguments) with substitution and original method(which will be used
by _find_action). It will allow to put api_versions.wraps and cliutils.arg
decorators in any order.
Change-Id: Ief316a8597555db6cb02c9f23406b9f1f09f8313
Method run_command() gets max and min API verisons
from FakeHTTPClient.get_versions(). That's why max version
which could be tested by run)command is 2.3 (because it's
hardcoded in get_versions()).
get_versions() should return max and min versions from
novaclient.__init__.py
Closes-Bug: #1528527
Change-Id: I489c4714cacb345d3b45d5987113093c038cf151
oslo-incubator was deprecated and all modules used by novaclient were
removed from oslo-incubator master branch. This patch removes all unused
code from novaclient's repo.
Change-Id: Ie3c542d19da6ed4d25ec490faf6a86a82f48cd34
When user specifies some attributes using "--fields" subcommand for
"nova list" and "nova network-list", these attributes are shown in
the list even if the server or network don't have these attributes
in their object.
Before passing attributes via "--fields", we should validate values
and if non-existent attributes are included, error will be raised.
Change-Id: I3eb4810993259515ee33a72e8bd99f9951721b60
Closes-Bug: #1522989
There is virtual-interface-list API support in nova but no
command line interface in novaclient, this patch adds it.
Closes-Bug: 1522424
Change-Id: Ib3078125beb7beaa08a3408486db54e0d10763e6
As a stepping stone to the os-client-config patch, first switch to
using keystoneauth, its Session and its argparse registration and
plugin loading to sort out any issues with that level of plumbing.
The next patch will layer on the ability to use os-client-config
for argument processing and client construction.
Change-Id: Id681e5eb56b47d06000620f7c92c9b0c5f8d4408
add functional test for v2.8 API (webmks console type
enablement).
Also, fixed an issue related to v2.8 microversion
enablement for the console API.
Change-Id: I7660a189cc3051dd7dbc802ad2d40a4995b44960