822 Commits

Author SHA1 Message Date
Jenkins
f510d8fd6f Merge "Deprecate --tenant option from flavor-access-list" 2016-05-23 14:17:43 +00:00
Matt Riedemann
1fd68964ea Deprecate --tenant option from flavor-access-list
The --tenant option in the flavor-access-list command was
never implemented and filtering by tenant is not supported
in the REST API for os-flavor-access, so to avoid confusion
this change deprecates the command line option.

It also removes the cruft that was in the python API code
so that only 'flavor' is allowed. This it not a backward
incompatible change since list() still takes kwargs and still
raises a NotImplementedError for anything in kwargs but
'flavor'.

Change-Id: I2c36376674f3a7caf5967a16ac0152f17d9fc906
Closes-Bug: #1582284
2016-05-18 14:10:42 -04:00
Kevin_Zheng
8030879330 Name and AZ should as be optional param on aggregate-update
'name' should be an optional parameter not required
on aggregate-update, so we can update 'availability_zone' only.

Change-Id: I778ab7ec54a376c60f19dcc89fe62fcab6e59e42
Closes-bug: #1280118
2016-05-18 11:08:58 +08:00
xiexs
dceb77ff44 Clean the duplicated columns for "nova network-list"
If we specify --fields with default columns name, then there will
be an additional column which is absolutely redundant, we need to
check for such case.

Also do the same for "nova list"

Co-Authored-By: ZhiQiang Fan <aji.zqfan@gmail.com>

Change-Id: Ife0a62d2d77aee261ce39c30d3a89ba97a253dae
Closes-Bug: #1574424
2016-04-29 05:53:02 +08:00
Gleb Stepanov
a47850b093 Decorate FakeHTTPClient with versions
Remove api_version check from get_servers_1234_migrations method
and substitute it by api_version.wraps decorator.

Change-Id: Iea780ae92bece4e2013778485d244123251e9dcc
2016-04-22 18:32:10 +03:00
Jenkins
d00a473238 Merge "Deprecate image list/show/delete/update CLIs/APIs" 2016-04-13 16:02:17 +00:00
Matt Riedemann
a602e59806 Deprecate image list/show/delete/update CLIs/APIs
This deprecates all of the image CLIs/python API bindings that use
the Nova os-images API which is a proxy to the Glance v1 API.

This will emit a warning each time a deprecated CLI/API is used and also
updates the help docs for the deprecated CLIs and docstrings for APIs.

The plan is to do a release once this is merged so people start seeing
it and then we'll actually remove the deprecated CLIs/APIs in the first
python-novaclient release after the Nova server 15.0.0 'O' release.

Depends-On: Iff5fb3180855de7adb3399f6be16bedc8543b4ec

Change-Id: I3f60cc7f4c6e27861c4a84b925d573f35f1a1848
2016-04-12 11:57:57 -04:00
Andrey Kurilin
d133a664ae Make functional tests work with v3 keystone
This patch adds support of v3 keystone to novaclient's functional tests.

Closes-Bug: 1568527

Change-Id: Iff5fb3180855de7adb3399f6be16bedc8543b4ec
2016-04-12 17:24:41 +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
Jenkins
9d9cb2a0aa Merge "Fix ServerGroup.NAME_ATTR" 2016-04-05 10:50:09 +00:00
Jenkins
4b57352a54 Merge "[tests] initialize client objects inside setUp" 2016-04-04 17:30:19 +00:00
Jenkins
0193797fcf Merge "Remove deprecated volume(snapshot) commands/bindings" 2016-04-04 17:30:08 +00:00
Jenkins
7897740f28 Merge "Add default values for domain related options" 2016-04-04 14:55:41 +00:00
Andrey Kurilin
e458fab8ef Add default values for domain related options
Keystone V3 requires that the options os_user_domain_id/os_user_domain_name
and os_project_domain_id/os_project_domain_name be set. These options do not
have default values and novaclient will fail if they are not set by user.

This patch adds default values for os_project_domain_id and
os_user_domain_id in case of Keystone V3 env.
This is consistent with what the OpenStack CLI does.

Also, two functional tests are added to check authentication via
Keystone V2 and V3.

Partial-Bug: #1522402

Change-Id: Ieb41a7fbf24107f7250ef34218604fba96531195
2016-04-04 10:57:41 +00:00
Matt Riedemann
a425702689 Remove deprecated volume(snapshot) commands/bindings
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
2016-04-03 14:05:05 -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
Rui Chen
51306fc4c9 Fix ServerGroup.NAME_ATTR
Finding by specify server group name failed in ServerGroupsManager.find(),
ServerGroup.NAME_ATTR is "server_group_name" currently, but NAME_ATTR
should be "name", because only "name" attribute exists in ServerGroup
object, not "server_group_name".

Change-Id: Id6b7676d14e6283d856a069da5ff287dc3228386
Closes-Bug: #1563301
2016-04-01 10:02:11 +00:00
Jenkins
8c204ac1a2 Merge "Handle error response for webob>=1.6.0" 2016-03-30 12:59:24 +00:00
Jenkins
d9e8e364e0 Merge "Fix host-evacuate-live for 2.25 microversion" 2016-03-29 19:52:22 +00:00
Jenkins
5f6d731f93 Merge "aggregate-details changed to aggregate-show" 2016-03-25 19:03:50 +00: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
92bbae6d09 Use keystoneclient python bindings for testing
The keystone CLI has been deprecated for a long time
in favor of python-openstackclient and
Icbe15814bc4faf33f513f9654440068795eae807 finally removes
the CLI from python-keystoneclient. This will be in the 3.0
release of python-keystoneclient.

tempest-lib is using the keystone CLI and the novaclient
functional tests are using tempest-lib (which is also
deprecated now).

This change removes the usage of the keystone CLI from
python-keystoneclient via tempest-lib and replaces it
with simply using the keystone v2 python bindings from
the client.

Change-Id: I557acefbf363304ce24ac81566bb651cbfe09176
2016-03-23 20:12:59 -04:00
Jenkins
2d353f2879 Merge "Overwrite Usage class's get() function" 2016-03-21 14:03:12 +00:00
Jenkins
a4d2d0ce83 Merge "Add changes-since support when list servers" 2016-03-21 14:03:06 +00:00
Jenkins
b154a4828b Merge "Validate shutdown value of --block-device" 2016-03-21 13:59:48 +00:00
abhishek.talwar
bf68a0cf10 aggregate-details changed to aggregate-show
To show details of aggregate, we have
aggregate-details command. But all other
commands to show details of any resource
is *-show like flavor-show, keypair-show etc.

So changed the command to aggregate-show.

Change-Id: If4875833a27382a6f3193ec55d6d4cb1852249fd
Closes-Bug: #1552646
2016-03-21 12:44:16 +05:30
Matt Riedemann
fa377e7fca Handle error response for webob>=1.6.0
WebOb change https://github.com/Pylons/webob/pull/230 changed
the way in which the error response body is formatted such that
it's no longer a nested dict. So we have to handle both the
old convention of an error message key to the response body error
dict and the new way with just the error body dict.

This was reported upstream:

https://github.com/Pylons/webob/issues/235

But given this was apparently implemented as a long-overdue change
in WebOb the behavior is not likely to change.

Change-Id: If653a247d842786d2824b4b3a5c0cde1383ed7ab
Closes-Bug: #1559072
2016-03-18 19:22:03 -04:00
Balazs Gibizer
f6bcac4772 Validate shutdown value of --block-device
The shutdown value of the --block-device parameter was stated to
to be either 'remove' or 'preserve' but the code only coverted
everything to False that was not equal to 'remove'.

This patch adds strict validation that rejects values other than
'remove' or 'preserve'.

Closes-bug: #1558157
Change-Id: I89a6c4fe90ec4d8155f4a7b93006d1972654a223
2016-03-16 17:51:00 +01:00
Kevin_Zheng
7cefdd36a6 Add changes-since support when list servers
Nova API supports change-since filter when list servers:
https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/servers.py#L325-L331
but in python-novaclient we don't.
This patch  add the support for change-since when list servers.

Closes-bug: #1551591

depends-on: Ic2f239f634f917a5771b0401a5073546c710c036

Change-Id: I27f2d1e33a56d357e247111b338c93861716cfee
2016-03-16 17:56:21 +08:00
Cao ShuFeng
680320169b Remove additional 'timeout' element
Remove additional 'timeout' element from trigger crash dump test and
rename _wait_for_nmi to _assert_nmi so that we get at least one
'assert' for each test.

Change-Id: I70372a8c725827ee9b5285ed92ca06b35eb0edbc
Closes-bug: 1554306
2016-03-08 10:25:22 +08:00
Jenkins
17be772404 Merge "Return a less dramatic message for public flavors." 2016-03-08 01:35:48 +00:00
Jenkins
bfac3c6d55 Merge "Remove unused code in tests/unit/v2/fakes.py" 2016-03-07 21:31:09 +00:00
Jenkins
58356df3d9 Merge "Remove console expectation from NMI tests" 2016-03-07 17:48:26 +00:00
Sven Anderson
c2ec89d285 Return a less dramatic message for public flavors.
Getting the access list of a public flavor bails out with a dramatic
error message, suggesting that something is broken.  This changes the
message to an unagitated "Access list not available for public
flavors."

Change-Id: I432496c24b23de8fa58de93f2cbed8bed1d540b1
2016-03-07 11:35:27 +01:00
Takashi NATSUME
a571ebd72a Remove unused code in tests/unit/v2/fakes.py
TrivialFix
Change-Id: I9c089f50f0b48bb7f41af9c4d6fbb8355d668a74
2016-03-07 06:52:33 +00:00
Cao ShuFeng
3a538f6d86 Overwrite Usage class's get() function
base.Resource's get function will call its manager's get() function
with one parameter. However UsageManager's get function takes three
parameters.

Change-Id: I958a55c4d52cec4d1177371b788b3cf788098a6c
Closes-bug: 1552616
2016-03-06 04:21:02 +00:00
Ken'ichi Ohmichi
471e08a4d4 Remove console expectation from NMI tests
The original tests expect the server console contains a message
  "Uhhuh. NMI received for unknown reason"
but the expectation is wrong because this message is fallback one
when disabling crash dump, that means the test expects the crash
dump is disable. That is not the purpose of this NMI feature.

In addition, this message is output on x86 cpu architecture only
because the message is implemented in
  https://github.com/torvalds/linux/blob/master/arch/x86/kernel/nmi.c#L304
So if we use the other cpu architectures on the test, this test will
fail.

Let's remove the expectation from the tests.

Change-Id: I62fe2e00433fd216def25d99a2f20d17b988fb84
Closes-Bug: #1553597
2016-03-06 06:47:54 +09: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
Jenkins
f9360ae6d4 Merge "Provide user with coherent interface to get request_ids" 2016-03-02 13:05:05 +00:00
Jenkins
d56c95de40 Merge "[microversion] Bump to 2.25" 2016-03-02 12:15:34 +00:00
Eli Qiao
ae598280ac [microversion] Bump to 2.25
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
2016-03-02 17:24:17 +08:00
Jenkins
32a28f8040 Merge "Support for abort an ongoing live migration" 2016-03-01 22:00:25 +00:00
Jenkins
3a3a5c8ac6 Merge "Add two server-migration commands and bump migration-list command" 2016-03-01 15:11:12 +00:00
Andrea Rosa
77e50cc91b Support for abort an ongoing live migration
In Nova API microversion 2.24 there is a new operation which allows to
abort a running live migration.

This change is to enable this feature at the client side implementing a
new method to call the new nova API:
nova live-migration-abort <server_id> <migration_id>

Implements blueprint: abort-live-migration

Depends-On: I1ff861e54997a069894b542bd764ac3ef1b3dbb2

Change-Id: Ic2ead126e0cf48aa54a083e97cb9d1303a5a9bbd
2016-03-01 13:43:33 +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
Jenkins
eb461f082b Merge "Add a way to discover only contrib extensions" 2016-03-01 00:48:38 +00:00
Jenkins
6a8df59254 Merge "Functional tests for trigger-crash-dump (microversion 2.17)" 2016-02-25 17:59:29 +00:00
Jenkins
a36df7e63f Merge "Support for forcing live migration to complete" 2016-02-25 17:40:00 +00:00
Jenkins
91a7084067 Merge "[microversions] Enable 2.21" 2016-02-25 17:37:44 +00:00
Pawel Koniszewski
62c76301a2 Support for forcing live migration to complete
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
2016-02-25 13:59:11 +00:00