Commit Graph

14 Commits

Author SHA1 Message Date
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
Gábor Antal ce184797f0 Use more specific asserts in tests
I changed asserts with more specific assert methods.
e.g.: from assertTrue(sth == None) to assertIsNone(*) or
assertTrue(isinstance(inst, type)) to assertIsInstace(inst, type) or
assertTrue(not sth) to assertFalse(sth).

The code gets more readable, and a better description will be shown on fail.

Change-Id: I8be876e0d2a1ea5d6f8454ca973e2d874d10283d
2016-12-06 09:43:12 +01: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
Takashi NATSUME 917690ea45 Fix import statement order
Fix import statement order to comply with
OpenStack Style Guidelines(*1).

*1: http://docs.openstack.org/developer/hacking/#import-order-template

TrivialFix
Change-Id: Ifca8ff3326bf90713a38da34850d5bbf19c5af7b
2016-11-24 15:00:01 +09:00
Takashi NATSUME c255efbd97 Remove unused test code
TrivialFix
Change-Id: Ieb6f6e1400de2846ee3c333feb465a2b5e2bc9cf
2016-11-22 20:12:32 +09:00
Andrey Kurilin 65c1fbae70 Store api_version object in one place
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
2016-08-18 18:36:40 +03: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
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
Andrey Kurilin 7d8db71964 [tests] initialize client objects inside setUp
All tests from contrib dir inizialize fakeclient at module level.
It is bad practice and we should do preparatory steps at setUp method.

Change-Id: I2dd2988cd015d1dfb576fe004cb9461b02b55db3
2016-04-01 19:23:33 +03: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
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
Chaozhe.Chen 14f63647e9 Test: Clean v2 client userwarning
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
2016-01-12 12:05:50 +08: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