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
quota-show and quota-defaults not work because 'SessionClient'
object has no attribute 'tenant_id'. Try to get project_id
from auth_ref when cs.client is SessionClient instance.
Change-Id: Ic125a99ba34e911485868454c3c7531a34eabdc9
Closes-Bug: #1407388
The docstrings refer to instance passwords as the admin password, root
password, or simply as "password". That makes documentation difficult to
understand. I've cleaned things up where appropriate.
I did not change the 'root-password' command in this patch, im planning
to do that in a separate patch.
Cleaning that up to have everything
refer to the instance password as "admin password" for clarity.
Change-Id: I421edcaf18bf8536d5e43f71db6e868868154be3
The lock command allows you to block the actions
on the server for the non-admin users. Improving
the help so that api users understands better
what locking a server implies.
Change-Id: Ibccdd672587c4dc9570b86f0132a64204fe9b5c2
Closes-Bug: #1366279
Hypervisor stats was being called from the Hypervisors class, which means that
the statistics were being modeled as if they were a single Hypervisor. This
mostly worked, except that the stats didn't have an id field so a call to
__repr__() (implicitly called by print, or in the REPL) would throw an
AttributeError.
This patch creates a new class HypervisorStats which models a collection of
statistics about hypervisors. So you can now call:
nc.hypervisor_stats.statistics()
The old call of
nc.hypervisors.statistics()
is left for backward compatibility but just calls into the new method.
Change-Id: Ia31aacb95b1d517dab3ad38763d6448715bab68e
Closes-bug: 1370415
Currently nova floating-ip-list doesn't show the ip's id,
though the id is return from the server.
This patch adds the 'Id' column.
Change-Id: I8680fb6344bf8f6862a476cdb95c936a5fbab965
Closes-bug: #1404091
For each server, nova list --all-tenants will now display
its corresponding tenant ID as well.
Change-Id: I586d6c5bbb15ebb5df25dc4fa849ac4d5af149e9
Closes-bug: #1403431
Adds sorting support to the 'nova list' command.
--sort <key>[:<direction>]
The --sort parameter is comma-separated and is used to specify
one or more sort keys and directions. The direction defaults to
'desc' for each sort key and the user can supply 'asc' to
override.
Partially implements: blueprint nova-pagination
Change-Id: I635e017c7f9ab61812333983bfecccd6fce8d394
To remove aliases for `arg` and `env` functions in novaclient.utils,
we should use `arg` and `env` directly from cliutils in novaclients modules.
This is the first stage: change usage in novaclient.v1_1.shell
Change-Id: I237f0473844de49db8a4b141a9a71603c9ac76a7
This changeset enables support for Keystone V3 authentication
on the Nova CLI. This provides consistency between using
novaclient as the Nova CLI and using it as a library
as the Keystone V3 support already exists for the libary usecase.
The bulk of the change surrounds the use of the keystoneclient
session object for authentication, retriving the service catalog,
and HTTP connection/session management.
Co-Authored-By: Morgan Fainberg <morgan.fainberg@gmail.com>
Change-Id: Iece9f41320a8770176c7eeb5acd86be4d80cc58f
If passing metadata with "--meta" option, the metadata is stored into
meta_data.json file on the metadata server like:
$ curl http://169.254.169.254/openstack/latest/meta_data.json
{
"hostname": "vm01.novalocal",
"meta": {"key01": "value01", "key02": "value02"},
"name": "vm01",
[..]
}
This patch fixes the help comment.
Change-Id: I7359d4c2b0aec6d5d07be7938d0000ca23c93ff0
This change defines do_action_on_many function as a helper to run an
action on many resources (like nova delete).
Change-Id: I1c45d11a520703c57e3ac1923d94ec5f864f266b
The server rescue call supports passing a password and an image,
however novaclient does not have options to support this. This commit
adds these options and updates the related unit tests to support the
change.
Change-Id: I14c878c0027f8206671ee001ba5195f94f842314
Previously deleting valid/invalid security
group rules was throwing the error of
"AttributeError". With this fix, now both
types of security group rules can be deleted.
Change-Id: I253c2742efe69ee41976c88ca2775189bc5bde0d
Closes-Bug: #1163469
Module gettextutils from oslo-incubator was graduated to separate
library (oslo.i18n) and removed from repository, so we should use
new library.
Change-Id: I15d36ac5a2bb88b332ffa38d29488b75c55a20a9
I came across the "nova scrub" command today. Someone was reporting
that it did not delete everything they expected it to. It only
deletes networks and security groups associated with the project, so
update the help text to make that more clear.
Change-Id: Id769018787cc73d52ab5fc93196e69bc0ec785ea
Currently hypervisor-list only shows 'ID' and 'Hypervisor hostname',
but in fact nova server response also contains 'state' and 'status'
attributes, it's better to show all the attributes.
Change-Id: I97cd18a8451dc515c5fb19841f11d0e85bd0b484
Closes-Bug: #1376664
Module `novaclient.utils` contains a lot of functions which are
presented in modules from common code.
* service_type -> novaclient.openstack.common.cliutils.service_type
* get_service_type -> novaclient.openstack.common.cliutils.get_service_type
* pretty_choice_list ->
novaclient.openstack.common.cliutils.pretty_choice_list
* import_class -> oslo.utils.importutils.importclass
* HookableMixin -> novaclient.openstack.common.apiclient.base.HookableMixin
Change-Id: Ia6cac058da12c852d92f26875a66ae31cc4c63d4
Adds "--user" as a search option to the list command.
Also since seach by tenant or user also needs all_tenants=1 add
this to the seach options automatically instead of making users
remember to add it
Change-Id: Icc828080b400aecdb320b721c569992677848cc6
The description field to the Nova API for secgroup
create is not optional. This enforces the supplying
of the description field in novaclient as the Nova
call will fail if it is not supplied.
v3 version does not need to be updated as it was never
changed.
Change-Id: I6fc823990190b935a8e1214efc8c3ac3a0941abf
Closes-Bug: 1367121
Makes the quota-delete tenant_id parameter required rather than
optional. Currently if not supplied it will pass 'None' as the tenant id
to the Nova API. It will be silently ignored (at least until
https://review.openstack.org/120971 has merged after which it will fail)
and no quota will be deleted.
Change-Id: I3ad8f36e92ed9ac54bf892f329ce3feb56f01be5
Closes-Bug: 1367127
As reported by users, we end up displaying duplicate security groups
on multi nic vms using neutron. Let's not do that.
Also add security group listing to the v3 client to make it
consistent.
Change-Id: I0a983aac08aaeacf3c2aef5aae49f64265fe78c5
Closes-Bug: #1331307