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
Remove api_version check from get_servers_1234_migrations method
and substitute it by api_version.wraps decorator.
Change-Id: Iea780ae92bece4e2013778485d244123251e9dcc
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
We can use novaclient/utils directly and get rid
of openstack/common folder.
This is the first part.
Change-Id: Iaec234fbcf4d0f8c7e8f2175eae11d3083a62090
Partial-Bug: #1551603
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
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
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
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
If command has arguments with one name, but for different versions(see an
example below), both arguments will be displayed. This patch fixes this
issue.
Example of arguments:
@cliutils.args("name",
help="Name of a good action.",
start_version="2.1",
end_version="2.20")
@cliutils.args("name",
help="Name of a very good action.",
start_version="2.21")
def do_something_good(cs, args):
pass
Example of helpoutput before patch:
Positional arguments:
<name> Name of a good action. (Supported by API versions '2.0' - '2.20')
<name> Name of a very good action. (Supported by API versions '2.21' -
'2.latest')
Change-Id: I59f155675e2aae642a5b90cb70008eb5647ffe79