Extending Nova CLI to support forcing service to be set/unset as down,
as specified in blueprint mark-host-down.
Depends-On: I612582ba7b70bb6d167aa68bdfc47faa3b7b85ed
Depends-On: I39f1a84c100726f87a4dc464dd9922d66efdb53f
Implements: blueprint support-force-down-service
Change-Id: I2b80ac32a95fe80363b4ad95d8d89fff097935a3
Adds new parameter --key-type for novaclient for creating x509
certificates as keypairs. If no --key-type is specified, a ssh
keypair is created, for backwards compatibility.
Adds 'Type' column for keypair-list, displaying the keypair type.
This commit will have to merge after:
https://review.openstack.org/#/c/140313
Depends-On: I215662f2f92a01921a866c3218031787a9eaf915
Implements: blueprint keypair-x509-certificates
Co-Authored-By: Andrey Kurilin <andr.kurilin@gmail.com>
Co-Authored-By: Alex Xu <hejie.xu@intel.com>
Change-Id: I12bb13e24b660ffb6da0e5be275acbba7453d011
It would be nice to use "latest" version of api by default.
Related to bp api-microversion-support
Change-Id: Ife981c87d32011f01fcbdf871071a9d8273ebb92
This patch adds version discovery when user request with latest version.
The latest version means the most recently version between server and
client.
Related to bp api-microversion-support
Co-Authored-By: Alex Xu <hejie.xu@intel.com>
Change-Id: I0b7a95e77371aef6e349bf54b5dd6ce6c6d2732c
Add method wait_for_volume_status to base.py to deduplicate code
in test_instances.py and test_volumes_api.py.
Removed volume_id_from_cli_create function as obsolete.
Change-Id: I44e35e181515923a677b336ed48bc705cf673134
When novaclient isn't using a session from keystoneclient, it needs to
set reasonable TCP Keep-Alive values otherwise the operating system
defaults may cause the client to hang for hours before a connection will
time out. Using keystoneclient's adpater (which sets good defaults) will
allow us to not have to maintain this adapter here and to benefit from
their defaults.
Closes-bug: 1477275
Related-bug: 1323862
Depends-On: Ibd53ae2d4d2455db0ebc9951e5c764befc57850f
Change-Id: I1924bd96eb1a4bac5d57a5cc5d5461acb3f7f5ac
When use command '--poll' to show progress, if the object's staus change
into 'deleted' for some reason, it will lead a endless loop.Becasue there
is no check about 'deleted' status.
For example, when use 'image-create --poll' to create a vm's snapshoot,
if glance's quota is small than the snapshoot, the image will be deleted.
Change-Id: I028e3064b3371f87873d74494c39255775a2c818
Closes-bug:#1470047
get_current returns the current endpoint's API version info.
Related to bp api-microversion-support
Co-Authored-By: Alex Xu <hejie.xu@intel.com>
Change-Id: I36e84680c578a88d5c274f8ca24ecd18d1f3a179
New decorator "novaclient.api_versions.wraps" replaces original method with
substitution. This substitution searches for methods which desire specified
api version.
Also, this patch updates novaclient shell to discover versioned methods and
arguments.
Related to bp api-microversion-support
Co-Authored-By: Alex Xu <hejie.xu@intel.com>
Change-Id: I1939c19664e58e2def684380d64c465dc1cfc132
The table doesn't display right when there are multiple line in
result data. Fixes this by replace "\r" with "".
Change-Id: Ia3ca4146f17c3ae097a2aad0092c25f6807fcbab
Closes-bug: #1476462
all references to `root password` have been changed to `admin password`
but the `root-password` command remained. This changes it to
`set-password` which is less ambiguous and consistent with existing
commands `clear-password` and `get-password`
Change-Id: I8683e4ecd4d9294989eb3d8d27d1fb75c16b261b
This bug was occurred in cell mode.
In cell mode, compute node's id was not identified by integer type. It
was formatted with "path!to!cell@ID".
Therefore we can't using the id of hypervisor-list output.
For example,
> nova hypervisor-list
+----------------+--------------------------+-------+---------+
| ID | Hypervisor hostname | State | Status |
+----------------+--------------------------+-------+---------+
| region!child@1 | vagrant-ubuntu-trusty-64 | up | enabled |
+----------------+--------------------------+-------+---------+
Change-Id: Iba0cc1993f67351b11d034f372d7a5b98dc017f0
Closes-Bug: 1475973
When debug logging is enabled, set the log level of iso8601 to WARNING
to effectively silence its logging.
Change-Id: I17d7e6d5776b2369a2f8c42fd88f6c6790ad1b80
Closes-bug: #1441639
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
Issue found with mock 1.1.3:
Because of the test inheritance test_keypair_import is getting called
3 times. It appears that the mock for open builtins is getting torn
down after it's first use, and not correctly built again on subsequent calls.
In the gate, this is a race, because we have 3 tests and 8 workers,
and this will only fail if 2 or more of the tests happen to be
allocated to the same worker. This can be reproduced locally with:
tox -e py27 -- --concurrency=1
Converting this to the context manager usage of mock appears to
resolve the issue.
Co-Authored-By: Sean Dague <sean@dague.net>
Related-Bug: https://github.com/testing-cabal/mock/issues/280
Change-Id: I9a87375d2eb6c7cf7b9124b2095a5a4bcc8e7bf3
Current hypervisor-show <hostname> command does not properly list
when there is a long list of cpu info feature. The long list of
cpu info feature has comma-separated values.
Because of this user is not able to read the print out properly.
print_dict() has been changed to show a list with comma-separated
values properly.
Change-Id: Icc53439cecd3b5eee2340267a0447ce209d7b653
Closes-Bug: #1466435
Most places resolve id of input parameter as 'base.getid'
and in the beginning of _boot function it resolves image id
with such method. But in fixed place it tries to get id directly
from object. But code that uses novaclient directly(without shell)
falls in this place because it passes string with id to image parameter.
Change-Id: Ib90e4ffa3b7835f6648a62eddf7f7b87b5ab0f7e
The nova server liberty version is changing from 2015.2 to 12.0.0 and
the 2016.1 'M' release will be 13.0.0 so update the deprecation warnings
in the docs and code using those versions.
Depends on nova change 192406.
Change-Id: I6a35fa0dda798fad93b804d00a46af80f08d475c
Changes include:
e782594 Add last_request_id only if it is not none
18bf5ca Fix usage of NotFound exception in apiclient.base
3bc8231 deprecate apiclient package
Depends-On: Ia83ef6136da1c551ea947679dc546a0d7ad2f876
Change-Id: I0b5917c657d6adc3d34229b14833a5224c168e07
This reverts commit 02328d33373479b33f4fee8112d47c1ae29e8bd4.
As per the comments on the support all-tenants in floatingips-list
spec [1], this patch reverts the --all-tenants flag from
python-novaclient since support has been reverted out of Nova more
than a year ago.
[1] https://review.openstack.org/#/c/171389/
Change-Id: I2d6566ecf59d307e3ea117b3b20dc918c758b63e
Since commit 22569f218e4ca461da4e50dfc686adae6a44d2ba functional
testing credentials are managed by os-cloud-config. This change
adds a sample config to help developers run functional tests locally.
Change-Id: I16d1cb9a8bcaf18dda26af596652564b190cbe93
On my production system, when using client version 3, an exception is
raised with an incomplete message as the installed novaclient is
failing to find the bundled client versions. This commit creates a new
_get_available_client_versions() method and moves the client version
searching from get_client_class() into it.
We also update __get_available_client_versions() to pass
pkgutil.iter_modules the full path to novaclient rather than
'novaclient', which is what actually resolves the issue here.
Lastly, we add a single test to ensure that
__get_available_client_versions() does not return an empty list.
Change-Id: I07ce414863e833c72e50ad8cf1824054cfb41457
Closes-Bug: #1463809