All modules of novaclient.v2.contrib have been removed.
The 'only_contrib' parameter for the
'novaclient.client.discover_extensions' method is no longer valid.
Change-Id: I6da83057dda1f27afe98a2412bc0815f100f34a4
Currently we can get instance usage audit logs via Nova API,
and the docs also update for it. It is necessary to add that
to our client and CLI.
This patch adds the following command.
nova instance-usage-audit-log [--before <before>]
Co-Authored-by: Takashi Natsume <natsume.takashi@lab.ntt.co.jp>
Change-Id: I4ef8e40c322f1768ee1b5e01e9681cab0e2804bd
The add-fixed-ip, remove-fixed-ip, floating-ip-associate,
floating-ip-disassociate, and virtual-interface-list CLIs
and related python API bindings were deprecated in the 9.0.0
release in Pike via change Ie76283962c375b735f30ccb3053db07cf2330de2.
This removes the CLIs and related python API bindings and will go
into the 10.0.0 release.
Change-Id: Icb667973c65d26395db660b1c7b919550db66d08
These were all deprecated in the 9.0.0 release in Pike
via change I79091edf5a2569e49e79deba312456fdcdee09e1 and
can now be removed. This will go into the 10.0.0 release.
Change-Id: I85a287ff2666c2dcdcbbc8fd6c2e285176f7a67a
These were all deprecated in the 9.0.0 release in Pike
via change I329ee0e5fcf068ea7e54b99fbaf94a524647f660
and we can remove them now. This will go into 10.0.0.
Change-Id: Ia90a49112847e365fcdaf581dc9ee32f9a20fd85
The certs CLIs and python API bindings were deprecated
in release 9.0.0 in Pike via change:
If3e1e40947a8ad3f665f6a96d46de8cef6a2a190
We can safely remove them now and we'll do a major version
release for this.
Change-Id: I91a49b03e4d3c661ef6072962fac416f2dc37d0b
This is a partial revert of the previous patch. The inline setup of
the logger ends up causing issues when this is consumed by other
libraries that want control over the logger.
Closes-Bug: #1697452
This reverts commit 9a272014167390217351dd5a60f50f518f4ae600.
Change-Id: I1d61d4952aef1039e72a2aac629cb13a6a15d7b2
client.logger.warning if reached, will give
this error "No handlers could be found for
logger "novaclient.v2.client"".
Fixed by using warnings.warn() and corrected
root cause by adding appropriate handlers.
Change-Id: I60c8a023cff92f8b6f37a4a14b6193c3efaa19a8
Closes-Bug: #1688507
These were deprecated in Newton:
aaebeb05a03e34281a091dc6dfc4672b01cdfbbb
The 'find network' convenience helper when
booting a server only works with neutron now,
and assumes the 'network' endpoint is in the
service catalog.
The functional tests are changed to use
python-neutronclient for listing and finding
the network to use. At this point, we don't
have any nova-network CI jobs that will work
with novaclient, so the non-voting mitaka
nova-network job is also being removed in change
I63b36fb8acc5c9a273e6adcb271df16d0f71031e.
As noted in the release note, the only remaining
pure nova-network CLI/API that will work is for
listing virtual interfaces, which is only implemented
for nova-network within Nova. The functional tests
for this API are removed since we don't have any
nova-network CI jobs that will test it besides
unit tests. Long-term we'll likely deprecate the
os-virtual-interfaces API as well and replace it with
the os-interface API.
Change-Id: I8c520100a0016eed3959619c71dae037ebd72939
These were deprecated in Newton:
aaebeb05a03e34281a091dc6dfc4672b01cdfbbb
The floating IP fixtures and GET API methods in the
manager are still used for testing the addFloatingIP
and removeFloatingIP server operations, so the manager
is moved to the test_servers module.
Change-Id: I2138e43160772c7c896bc5e93195a8169ebfe6c3
These were deprecated in Newton:
aaebeb05a03e34281a091dc6dfc4672b01cdfbbb
The SecurityGroup resource object is left
since the list-secgroup command and
list_security_group servers API code
still uses that object. The
/servers/{server_id}/os-security-groups API
is a proxy to Neutron but was not deprecated
in microversion 2.36 so it's not yet deprecated
here in the client.
Change-Id: I6fa14f43d48f1e035ef54bd2d0078506f0c6d6e0
These were deprecated in Newton:
aaebeb05a03e34281a091dc6dfc4672b01cdfbbb
Apparently we did not have any tests for this code.
Change-Id: I33c18433e57941b26a4abd290b3cd03994d26327
These were all deprecated in Newton with change:
87c1b5311b2e641564305a4753b989b6498775b1
So now we can remove them.
Change-Id: Ic74a989b8a6565cc52ab82440fab8605a4b78e6b
We deprecated the image proxy commands and APIs in Newton
due to the 2.36 microversion. We said after Ocata 15.0.0 we
would remove these, which we can do now in Pike.
Note that the list() method on the ImageManager has to be
moved to the GlanceManager since we still need to list images
for the --image-with option on the boot command. The _match_image
method in the shell has to be updated for a glance v2 response
where custom metadata properties are flat in the image body.
This needs to be released with a major version bump.
Change-Id: I2d9fd0243d42538bd1417a42357c17b09368d2a5
HttpClient will be deprecated soon and SessionClient will be used by default.
To not break integration novaclient with other project at the step of moving
from HTTPClient, SessionClient should have similar interface.
Change-Id: I855ccc5160dc7628f4550e93bf133adf8263aace
This is the last variable which is redundant in case of SessionClient.
After this patch we will be able to use SessionClient in 100% usecases.
Change-Id: I102ba25eee7434cb66ea6efbf9ec4ab310d0957a
We need cert, project_domain_id, project_domain_name, user_domain_id,
user_domain_name arguments to constract SessionClient in proper way.
These variables will be used in further patches
Change-Id: I44416de7f4dc18916aecb6884158b416e696227e
Meaning of project_id (argument of novaclient.client) was not clear.
In different cases, it can be tenant/project id or name (in terms of
Keystone).
* tenant_id - this variable is deprecated now and project_id should be
used instead;
* project_id - meaning of this variable is clarified now and it expects
Project ID (in terms of keystone) now.
Change-Id: Ie3fc6b50260203c0debe8664bb87a7d72fb645d7
"password" term is more clear. Resolves FIXME from the code:
FIXME(comstud): Rename the api_key argument above when we
know it's not being used as keyword argument
Change-Id: I39f810a181b119591cf017eded71356a437a8c0a
* there are two terms in openstack which describes the same thing:
bypass_url and endpoint_override
* endpoint_override is more wide term. It is used in Keystone)
* since not all openstack folks knows that bypass_url and endpoint_override
are the same, bypass_url (variable which was used in novaclient) was not
transmitted to SessionClient
NOTE: name of variable in inner class HTTPClient was not changed, since
this class will be abandoned soon.
Change-Id: I2d45820c01851b271de8ea66e0d59ec494040c04
Arguments 'extenstions' and 'no_cache' were not transmitted to
'_construct_http_client' method. They are redundant
Change-Id: Ibe0f874e510eef7cc28fcee87b0083c7febd5161
We have a lot of arguments in several Clients methods. Reviewing their
changes is a hard task, so let's sort them to simplify reviews.
Change-Id: Ie78773fd92017fbc4631d0fc6ae9da2e15935537
All extensions from novaclient.v2.contrib should be not be extensions in
case of api version >=2.0;<=3.0 (historically, they are turned on by default
for cli layer), so let's move it from contrib dir and turn on by default.
Change-Id: I4ef4e44cf970947dad33110ce658a133e4f2893e
The support for non-keystone auth systems and plugins
was deprecated with 1f11840dd84f3570330d1fcd53d1e8eea5ff7922
back in the 3.1.0 release in mitaka.
Now that we're working on shoring up the support for
keystone auth sessions in the client and eventually moving
to remove support for the non-session HTTPClient, we should
also remove the support to load non-keystone auth plugins.
The whole concept of non-keystone auth systems/plugins is
a legacy artifact and is a barrier to interoperability which
is a goal of nova and OpenStack in general.
Change-Id: Ia649db257c416ca054977812ecb3f1a8044fa584
When instantiating novaclient with kwargs or named attributes, the 'password'
field is duplicated due to an overwrite on the __init__ method of Client v2.
This patch pops out the password field when it's passed and no api_key is
provided.
Co-Authored-By: Pavel Kholkin <pkholkin@mirantis.com>
Closes-bug: #1511417
Change-Id: Id8310eccef5f0f9a2983e25dd35541d1eb0efe86
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
The 2.36 microversion deprecates the nova proxy APIs for looking up a
network from neutron. The CLI will lookup a network by name for
booting a server as a convenience.
Over 90% of clouds now have neutron. We use a service catalog lookup
to assume that neutron is available, and if not fall back to our
proxy. This should mostly shield people from the 2.36 transition.
To test this we add support in our fake client for the neutron network
lookup. Comments were also left about some cleanups we should do in
other parts of the shell testing for net lookup.
Related to blueprint deprecate-api-proxies
Change-Id: I4f809de4f7efb913c814f132f5b3482731c588c5
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
The direct use of novaclient.v2.client.Client was deprecated long time ago
(2.29.0 release of novaclient, which relates to Liberty release of OpenStack).
It is time to move from warning message to an exception. It will allow us to
change novaclient.v2.client.Client interface and keep compatible stuff to
novaclient.client.Client.
Change-Id: I6e6c6eebcf7992d553a2f85f57b8c2ede0cc8311
Related-Bug: #1493576
Add the function to log 'x-openstack-request-id' or
'x-compute-request-id' in each API call.
If the caller (e.g. heat) uses oslo.log,
the caller's request id in oslo.context and
the callee's request id can be output in the same
log message (same line).
Change-Id: I29312ce278ecfae41a688a0ddf76c24cfa0eaf6b
Implements: blueprint log-request-id
23f13437dd64496fcbc138bbaa9b0ac615a3cf23 deprecated the
purely volume or volume-snapshot related CLIs and python
API bindings during Kilo. python-cinderclient should be
used for the python API bindings now, and python-openstackclient
should be used for the CLI for those operations.
The alternate_service_type context manager is also removed
since it was only used for proxying through to the volume API
endpoint.
Since the proxy for creating volumes is removed, we have to
add python-cinderclient for testing the volume attachment
CLIs/APIs that are left intact.
Change-Id: I09a6501603667350f49b1b1fa130353a6d5272a2
Direct initialization of versioned clients is restricted, but we tries to
decrease the number of possible bugs and issues, so default value for
api_version was added to v2.Client .
Let's set it to 2.1, since 2.0 is too old API version.
Change-Id: If127f858f7f670a090a57267f46a69ea4c056cce
In API microversion 2.22 in Nova there is new ServerMigrations resource
that allows opertators to force on-going live migration to complete:
https://review.openstack.org/#/c/245921/
This patch implements new method in python-novaclient to take advantage
of the new API:
nova live-migration-force-complete <instance_id/name> <migration_id>
Change-Id: I823c20b4e0c7b63e905f564a7dff13d3fb314a26
Implements blueprint pause-vm-during-live-migration
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 [a-f] files under novaclient/v2
folder.
As there are lot of violations and cannot be fixed in single patches,
So separating those in multiple patches for easy review.
Change-Id: Ibe5afef349d1be6d70903e06bee402ca30738ea1
Partial-Bug: #1521899
`novaclient.v2.client.Client` class should use V2.0 API by default, if
api_version argument is empty.
Change-Id: Id44a68f5d52f6f6055c3abe520bb916329552d09
A lot of project uses incorrect import of versioned novaclient client obj
(i.e. novaclient.v2.client.Client). It leads to unability to change
interface of such inner classes.
This patch updates docs to include warning note and add warning message to
`novaclient.v2.client.Client` object.
Change-Id: Ifeba391716d3d51d6a75a53cad405e1ec595e27b
Related-Bug: #1493576
Compute API version will be transmitted to API side via
X-OpenStack-Nova-API-Version header, if minor part of version is presented.
New module "novaclient.api_versions" was added as storage for all api versions
related functions, classes, variables and etc.
`novaclient.api_versions.APIVersion` class is similar to
`nova.api.openstack.api_version_request.APIVersionRequest`. The main
difference relates to compare methods(method `cmp` is missed from Py3) and
processing "latest" version.
Related to bp api-microversion-support
Change-Id: I0e6574ddaec11fdd053a49adb6b9de9056d0fbac