This patch adds ``host`` to novaclient api.
This can help administrators to specify a ``host``
to unshelve a shelve offloaded server from 2.91 microversion.
Depends-On: https://review.opendev.org/c/openstack/nova/+/831507
Implements: blueprint unshelve-to-host
Change-Id: I7efc8f0b0ef159e16cefee761bff5d7e90d0c427
The code has not been used
since If0161a89877f19f24e91d780cf227fdc48e7e860 .
Change-Id: I106404f9d12814fec2ec2bf16cdd100834085912
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
Add support microversion 2.78 which adds server topology
information in the output of the following new command:
nova server-topology
Depends-on: https://review.opendev.org/#/c/621476/
Change-Id: I6467d52d2528a37348458baf4842b571a97f3ed2
Implements: blueprint show-server-numa-topology
This patch adds a new parameter ``--availability-zone`` to ``nova
unshelve`` command. This can help users to specify an ``availability_zone``
to unshelve a shelve offloaded server from 2.77 microversion.
Depends-On: https://review.opendev.org/#/c/663851/
Implements: blueprint support-specifying-az-when-restore-shelved-server
Change-Id: I8bce8f430bc54f03bacc105e37fc8b3bbf2432c2
This patch adds a new parameter ``--reason`` to ``nova lock``
command and ``--locked`` filtering/sorting parameter to
``nova list`` command. This can help users to provide a reason
when locking the server and to filter/sort instances based on their
locked or value from 2.73 microversion.
Implements blueprint add-locked-reason
Depends-On: https://review.opendev.org/#/c/648662/
Change-Id: I438e6db2dd5000ba388d0a0f1c8ab74b96b47a71
This reverts commit eff607ccef.
There was no apparent need for the change being reverted since
user can list all servers by specifying --limit=1 when running
the nova list command.
The change introduced a problem whereby the first pass to
list instances from the server would get up to
[api]/max_limit (default 1000) results and then call again
with a marker. If the last instance in the list (the marker)
is corrupted in the instance_mappings table in the API DB
by not having an associated cell mapping, listing instances
will always fail with a MarkerNotFound error even though
the CLI user is not passing a marker nor specifying
--limit=-1. The corrupted instance mapping record resulting
in the MarkerNotFound error is something else that should
be fixed on the server side (and likely result in a 500) but
the change in behavior of the CLI makes it always fail
if you hit this even if you're not passing a marker.
Change-Id: Ibb43f500a74733b85bd3242592d36985bfb45856
Closes-Bug: #1773945
Output of `nova list` command contained only `max_limit` entries even
when there were more. The list needs to be obtained in multiple
requests and the paging loop was terminated prematurely.
Change-Id: I4194e6d5e34ecc0ac704851c08bb895e223aa850
Closes-Bug: 1743532
os-volumes_boot is an old clone of /servers and is not documented in the
API docs. POST to /servers.
Change-Id: If0161a89877f19f24e91d780cf227fdc48e7e860
This adds support for microversion 2.45 which changes the response
on the createImage and createBackup server action APIs to return
the image_id for the created snapshot image in a json dict in the
response body rather than in a Location header (which is gone in
microversion >= 2.45).
Since the 'nova backup' command was not printing out the created
image ID before, that is also added in this microversion.
Part of blueprint remove-create-image-location-header-response
Change-Id: Id48aa7b14e2d25008287549b04db437ca9c3f548
In previous patch we switched to use SessionClient in all cases. It means that all
HTTPClient code is redundant now.
Change-Id: I5a0da970fd82c79db3d88f1b49279133bbdba639
Since all authentication plugins should be stored in Keystone, there is no
need to share responsibility for authentication stuff with Keystone team.
Let's use convinient and the right way to use keystone - keystone sessions.
We have own adapter for it - novaclient.client.Session which can be used in
100% cases of novaclient usage. Let's create session object if it is not
transmitted via arguments and get rid of novaclient.client.HTTPClient
implementation.
NOTE: novaclient.client.HTTPClient and all related code will be removed
separately.
Co-Authored-By: Clenimar Filemon <clenimar@lsd.ufcg.edu.br>
Change-Id: Ibb99fdafbf02b3e92f1a5d04d168151b3400b901
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
This microversion allows to create/delete/update
server tags and to search servers by tags.
Implements: blueprint tag-instances
Change-Id: I66b6d4a763c507335f27a425bc3d4c2aae377c00
microversion v2.25 will change parameter of os-migrateLive, this patch
adds supports to that changes.
os-migrateLive will abandon disk_over_commit and the default value of
block_migration will be set to `auto`
Depends-on: Ibb0d50f0f7444028ef9d0c294aea41edf0024b31
Implements: blueprint making-live-migration-api-friendly
Change-Id: I01b22593724616bc0a7793c509ecabf095d6927d
Add return-request-id-to-caller function to
'Server' resource and 'ServerManager'.
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/servers.py
Co-authored-by: Ankit Agrawal <ankit11.agrawal@nttdata.com>
Change-Id: I8c2d3abcebba7823f42e2f27356e73bc6d7ade42
Implements: blueprint return-request-id-to-caller
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
This patch adds a loop to servers list, which makes calls to API side until
all resources will be listed.
Also, there are several functional tests are added with checks of markers
and limit.
Change-Id: Ic030a68867781cca25e723ab51986d87ecd3ab2e
Methods tests.v1_1.fakes.FakeHTTPClient.post_servers_1234_action
and tests.fixture_data.servers.V1.post_servers_1234_action
contain a set of same asserts. These asserts moved to method
check_server_actions. This method is shared between
post_servers_1234_action methods.
Some almost equal asserts are grouped.
Change-Id: I2643e77fe30400d462731bbc57351460fb28dc92
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