Commit Graph

31 Commits

Author SHA1 Message Date
Takashi NATSUME 8eb7d1c5cc Remove deprecated novaclient.v2.contrib modules
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
2019-02-07 15:00:36 +09:00
libing 736ed310ac Remove log translations
Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.

See:
http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html
http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html

Change-Id: I4c8c83315897c7e64b05402c233b0fa67eb03a6e
2017-03-25 14:03:26 +08:00
Matt Riedemann ac7c96690f Remove deprecated tenant network APIs
These were deprecated in Newton:

aaebeb05a0

Since this is the last of the deprecated contrib extensions,
we can also deprecate the 'only_contrib' parameter from the
novaclient.client.discover_extensions method.

Change-Id: Ie2e3fdc4e044f6eb304724d16a7d0f1f7ba705fd
2017-03-20 16:36:58 -04:00
Matt Riedemann dee51a0163 Remove deprecated baremetal CLIs and APIs
These were all deprecated in Newton with change:

87c1b5311b

So now we can remove them.

Change-Id: Ic74a989b8a6565cc52ab82440fab8605a4b78e6b
2017-03-20 15:33:23 -04:00
Matt Riedemann adf7d1e48c Remove deprecated network-related resource commands
In Newton we deprecated the various network-related resource
commands which were either for nova-network or were proxy
APIs to Neutron, because of the 2.36 microversion which deprecated
those APIs.

This removes the deprecated commands. Because of the size of this
change, the deprecated python API binding removals will come in a
separate change.

Change-Id: I6ecca49e7208f9dc0969bf377930a729c4b407b8
2017-02-23 08:56:27 -05:00
Radomir Dopieralski 1dcd83012b ListExtResource given in place of ListExtManager
This patch makes it use ListExtManager again.

Change-Id: I00ef7107cdf027c747806c4e5037c05b60312e21
Closes-bug: #1658963
2017-01-24 15:57:09 +01:00
Kevin_Zheng aeec4d11b2 Fix "Message object do not support addition".
In the 7.0.0 Novaclient release we added some warning
log about user should using "endpoint_type" rather than
"interface" when init novaclient:
https://github.com/openstack/python-novaclient/blob/master/novaclient/client.py#L312-L327

https://github.com/openstack/python-novaclient/blob/master/novaclient/client.py#L249-L272

This is now causing a lot jenkins failures acroos projects
that is using novaclient with enable_lazy set to False.
As in this kind of scenario the warning message is a message
object instead of unicode sting and it cannot be added:
http://git.openstack.org/cgit/openstack/oslo.i18n/tree/oslo_i18n/_message.py#n227

and "Message object do not support addition" will raise.

Related Jenkins Error:
Ceilometer:
http://logs.openstack.org/29/333129/3/check/gate-ceilometer-python27-ubuntu-xenial/bd125e7/

Closes-bug: #1652414
Change-Id: I11a490f759fdac9707c1321c9659da2605196a94
2017-01-08 00:21:53 +00:00
Andrey Kurilin f834711d2f Move all extensions from contrib dir
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
2016-11-30 18:00:05 +00:00
Matt Riedemann 4215e3fd2f Cap baremetal python APIs at 2.35
The 2.36 microversion makes the baremetal APIs return a 404
so rather than get that back, this change wraps the baremetal
python API methods so they are capped at 2.35. Using them
after that version will raise VersionNotFoundForAPIMethod.

Related to blueprint deprecate-api-proxies

Change-Id: Icc9fc7ce2e2115ce101d95c37024223d1d650fa2
2016-08-19 15:07:32 -04:00
Dan Smith aaebeb05a0 Deprecate all the nova-network functions in the python API
Per the plan, this marks all nova-network-related functions as
deprecated for removal.

Change-Id: I511793cd9a01669e77e1ae5ecb391ce937477309
2016-08-19 09:41:03 -07:00
Matt Riedemann 578c39865d Deprecate network-* commands and clamp to microversion 2.35
This introduces a helper to clamp the client microversion to 2.35,
which is the last version to support the network proxy. We print a
deprecation warning if those commands are used, and mark them as
deprecated in the help text.

This is a network-specific user-friendly bit of sugar to make sure
that nova-network users aren't cut out before we actually drop the
support for it on the server side.

Note that quotas and limits are special because only the network
related resources in those are not returned with 2.36. So this
change handles 2.36 separately for quota-update and
quota-class-update, and deprecates the network resource quota
update arguments for <2.35 as an indication those are going away.

As expected, several of the functional tests have to be updated
to work with the new world that is microversion 2.36.

Related to blueprint deprecate-api-proxies

Co-Authored-By: Matt Riedemann <mriedem@us.ibm.com>

Change-Id: Id68c2dbef29b201aa7c8ef9417432feb5596529a
2016-08-19 09:30:29 -07:00
Sean Dague 87c1b5311b Deprecate baremetal API and CLI interfaces
Nova has a very bad read only baremetal proxy, which we will be
deprecating and removing. This signals this in our client.

Co-Authored-By: Jim Rollenhagen <jim@jimrollenhagen.com>
Change-Id: Icf479c29c0c43d91871f49fe4b71266954b0c3f7
2016-07-14 17:44:33 -04:00
Sylvain Bauza c649678991 Add support for microversion 2.30
Now the os-migrateLive API supports a new body argument called 'force' which
helps the operators to bypass the scheduler call in case they provide a host.

Also modifies the host_evacuate_live helper method in the contrib tree to make
sure operators also have the force flag in case they need it for a global call.

Change-Id: Id7fcd88ad060390ac6d1a21510d84363ed643957
Implements: blueprint check-destination-on-migrations-newton
2016-06-22 09:40:40 +02:00
Sylvain Bauza 1aa042e0cb Add support for microversion 2.29
Now the os-evacuate API supports a new body argument called 'force' which
helps the operators to bypass the scheduler call in case they provide a host.

Also modifies the host_evacuate helper method in the contrib tree to make sure
operators also have the force flag in case they need it for a global call.

Change-Id: I5272e9809a7d8be482e87548c6a3b11186c5d1e1
Partially-Implements: blueprint check-destination-on-migrations-newton
2016-06-22 09:40:33 +02:00
sampathP fc90f825f4 Fix nova host-evacuate for v2.14
From API micro version 2.14, evacuate does not need onSharedStorage
flag. This patch check the API micro version and set/ignore the
onSharedStorage flag before call evacuate for each instance.

Closes-Bug: #1581336
Change-Id: I825653d66f94d36a945b8240ec52285827423375
2016-05-25 09:53:42 +09:00
Andrey Kurilin fd23ff9000 Use common find_server from v2.shell
- extend v2.shell._find_server with raise_if_notfound param
- reuse v2.shell._find_server for instance_action extension
- fix instance-action-list on v2.21 (it was unable to work
  with deleted instances)

Change-Id: I7b538124c6ab0ee00164822b324aaf2d37c8c2af
2016-04-14 12:05:57 +03:00
Matt Riedemann 0634a38cdc Remove busted baremetal CLIs and API bindings
The os-baremetal-nodes compute API does not proxy
baremetal node create/delete or interface add/remove
requests to Ironic, so there is no point in even
having CLIs or python bindings for these operations
in the client.

There isn't a point in deprecating these since they
are already unusable, so let's just remove them.

Change-Id: Id5dd7fbddff87e506460904e352713ae777a8073
Closes-Bug: #1566535
2016-04-05 17:32:20 -04:00
Matt Riedemann 90fbbb2956 Fix host-evacuate-live for 2.25 microversion
Change I01b22593724616bc0a7793c509ecabf095d6927d made the
live_migrate() method in the ServerManager conditional on the
API version requested. This broke the host-evacuate-live
command which is calling ServerManager.live_migrate() directly
with one too many arguments for the v2.25 version of the method.

This updates the host-evacuate-live shell to behave like the
live-migration method and be aware of the API version when
calling the live_migrate() method.

Related to blueprint making-live-migration-api-friendly

Change-Id: I4dbeb6ebe03f03799b706be2d787d21484b5c664
Closes-Bug: #1561938
2016-03-25 14:00:59 -04:00
Matt Riedemann d8e2f0c1a4 Make it clear that host-servers-migrate is a cold migration
Let's be clear in the help text that host-servers-migrate is
a cold migration since we have similar sounding commands
host-evacuate and host-evacuate-live (which is not actually
evacuate, it's live migration).

Change-Id: I17ee230fc1c29369c40492523c9d97d25f7ee023
2016-03-07 16:01:22 -05:00
Kevin_Zheng 93913c84b6 Use novaclient/utils directly and remove openstack/common (1/4)
We can use novaclient/utils directly and get rid
of openstack/common folder.

This is the first part.

Change-Id: Iaec234fbcf4d0f8c7e8f2175eae11d3083a62090
Partial-Bug: #1551603
2016-03-03 01:23:34 +00:00
ShaoHe Feng e0c7d2c673 Add two server-migration commands and bump migration-list command
1. Add two new commands
Add nova client server-migration-list and server-migration-show

2. Bump and old command
Add migration_type field for migration-list command

Partially implements blueprint live-migration-progress-report

Depends-On: Ia92ecbe3c99082e3a34adf4fd29041b1a95ef21e

Change-Id: I071198fa9ba0699383bdebf4fab54714a435e6c3
2016-03-01 12:27:54 +00:00
Andrey Kurilin cd88097ff5 [microversions] Enable 2.21
2.21 - The os-instance-actions API now returns information from deleted
       instances.

Change-Id: Iff514e4fa9135207c6f8e32e444d45b1b61d8c7c
2016-02-24 20:57:34 +02:00
Takashi NATSUME 9f10d7d0b0 Add return-request-id-to-caller function(4/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/contrib/assisted_volume_snapshots.py
* novaclient/v2/contrib/baremetal.py
* novaclient/v2/contrib/cells.py
* novaclient/v2/contrib/instance_action.py
* novaclient/v2/contrib/list_extensions.py
* novaclient/v2/contrib/migrations.py
* novaclient/v2/contrib/server_external_events.py
* novaclient/v2/contrib/tenant_networks.py

Co-authored-by: Ankit Agrawal <ankit11.agrawal@nttdata.com>
Change-Id: I58ec61eb585d145cb7d638bcb690b3ebee0461e9
Implements: blueprint return-request-id-to-caller
2016-01-28 11:23:36 +00:00
jichenjc 6791a8be69 Allow restore command with name param
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
2016-01-23 22:06:48 +08:00
Jenkins 1a8937a6cc Merge "Wrong usage of "a/an"" 2016-01-04 13:32:55 +00:00
hgangwx 2283b46a2f Wrong usage of "a/an"
Wrong usage of "a/an" in the messages:
"It will be deprecated after an suitable deprecation"
"Delete metadata from an server"
"Get a list of actions performed on an server"
"based on an requests response"
"Get a aggregate by name or ID"

Should be:
"It will be deprecated after a suitable deprecation"
"Delete metadata from a server"
"Get a list of actions performed on a server"
"based on a requests response"
"Get an aggregate by name or ID"

Totally 5 occurrences in python-novaclient base code.

Change-Id: Iabe764f8b547b39431deb34221266695e0e79fa9
2015-12-30 15:05:50 +08:00
Andreas Jaeger 8f320313f3 Fix help strings
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
2015-12-28 08:10:44 +01:00
Artom Lifshitz 3d9c01b2d3 Option to specify max servers for live evacuate
The current behaviour of live evacuate is to naively request that all
servers on the hypervisor be evacuated. The more VMs are migrated
simultaneously, the more bandwidth is required. Once a certain number
of migrating VMs is reached, there is not enough bandwidth to cope
with the rate at which they dirty their memory. The migrations will
thus never complete.

The correct solution to this would be a whole lot of work on the Nova
side. As a stopgap measure, this patch introduces a --max-servers
option to host-evacuate-live. With this option, the user can control
the number of VMs that are live-migrated at the same time, thus
allowing the user to avoid the dirty memory scenario described above.

Change-Id: I17bad5f3253d6657fc1e6610159fc8e3921e6ea4
2015-09-02 17:13:47 +00:00
Pavel Kholkin 5f3f52e7db Fix description of parameters in nova-client functions
Resolved issues in python-novaclient code like
Function 'func_name' does not have a parameter 'param_name'

TrivialFix

Change-Id: I87cfd346ed8d7dd45bc4dc96bc89c576b5145711
2015-02-27 16:56:28 +03:00
Haiwei Xu dfc752d725 Change commands name from net-* to tenant-network-*
Currently the commands of os-tenant-network API use net-*
which may confuse users sometime. This patch changes commands
to tenant-network-*, and marks net-* commands as DEPRECATED.

Closes-Bug: #1152862
Change-Id: I8c3a0be08763a6f626d7fc7cf84811ac61ccc526
2015-02-13 17:47:18 +09: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