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
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
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
Using the existing server live_migrate api, this new feature,
adds the ability for admins to live-migrate all running instances
from one host to other hosts. The patch implements the feature
for Nova API V2 and API V3.
Co-Authored-By: Cédric Soulas <cedric.soulas@cloudwatt.com>
Change-Id: Ie8dd1b66fb8eaefa6ff38752b1e4f46bab145820
Implements: blueprint host-servers-live-migrate
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
Modules `strutils`, `timeutils` and `network_utils` from common code are
graduated in `oslo.utils`, so we can:
1. remove `novaclient.openstack.common.network_utils` and use
`oslo.utils.netutils` instead.
2. use `oslo.utils.encodeutils` and `oslo.utils.strutils` instead of
`novaclient.openstack.common.strutils`.
3. use `oslo.utils.timeutils` instead of
`novaclient.openstack.common.timeutils`.
Additional information:
- modules `importutils`, `strutils` and `timeutils` from
`novaclient.openstack.common` cannot be removed, because:
- importutils is used by apiclient and jsonutils;
- strutils is used by apiclient, cliutils and jsonutils;
- timeutils is used by jsonutils
- additional check for `safe_encode` in Py3 is required, since
If91a866d864a22d28a352152beff4c7406a27b7b was merged.
Change-Id: Ib8d79d9c85af4916e87a76a1a67a13488ddaa111
Adding nova client functionality to use the auto find
destination host for evacuate.
This change makes the target host optional
on evacuate command.
Partial Implements: blueprint find-host-and-evacuate-instance
Change-Id: I40619b8d1eea6ae44ed5e43fb50ce2c1862686d6
Co-Authored-By: Juan M. Olle <juan.m.olle@intel.com>
This commit adds --service-name option to host-list command allowing
user to filter hosts by service.
DocImpact
Closes-Bug: 1224763
Change-Id: Ic67deb3af7ddbe23c14fa38ae180d43ab484b78f
Currently, the command delete return a zero if it failed for any
of servers, the return code should be a nonzero.
Change-Id: If7009fdeb5a60fe2e357bcc447313cbdb7b2ff39
Closes-Bug: #1339647
* E265 block comment should start with '# '
* H302 import only modules
Do not check docs/source/conf.py. The file is imported from the
cookiecutter template.
Documented why checks are ignored and if they should be enabled
in the future.
Change-Id: I367064ecaa6d1fd9d918f7ce003303e2db660647
Previously, nova ssh was searching for network types: public and
private, which seems to be incorrect (fixed and floating seems to be
correct), causing that this command has probably never worked.
This commit fixes the above and adds an option for selecting the network
to use, which is helpful when there are more networks for the VM.
Change-Id: I01ea6cee725c0feaacab60975c3792b0ac1305e9
Closes-Bug: #1227694
Closes-Bug: #1343991
H233 (and H402) were temporarily disabled as part of the migration to
hacking 0.9. This patch fixes all H233 issues and re-enables
gating on them.
H402 has been removed in hacking
(I9426644fa708e9d5563abe04dc4ad656dbeb3656) so leave this one off as its
going away anyway.
Change-Id: Iae8f132c66c5e345dc2e9c2464f67609887c1475
Improve help strings for consistency. Fix wording, typos,
capitalization and add "." as appropriate.
Change-Id: I376f6d0269aee8dd0e67ffab6386eac2139844ab
Adding support specifying multiple servers to nova reset-state in
a single invocation.
Change-Id: I7add0c26b0e59b31751de7a60ebdde3f568b3354
Closes-Bug: #1314217
Previously, the endpoints command just returned the first endpoint. This
was not very useful; people expected to see the endpoints in the region
they specified. This patch does the following:
- If there's only one endpoint, use that.
- If there's a specific one for your region, use that.
- If there isn't, warn, and show the other ones.
Closes-Bug: #1256009
Change-Id: I70b82bdffb9b2e3da415a3bb941bcff287e39789
This change adds the optional parameters: disk bus and device type
to the volume-attach command for the V3 API.
DocImpact
Closes-Bug: #1303875
Change-Id: I4fd07726887d08e5b669139b559bdb2c2d21826e
Add a translation from instance_id to server_id to accommodate
for the adjusted user output.
Closes-Bug: #1324857
Change-Id: Ifaa15f6907b5efae7431eb1741b7fae4b3540a8c
The Nova server will restrict unprivileged user accounts to just
public images, while allowing administrator accounts access to
all. The Nova client shouldn't force the flavor name lookup to
be restricted to just public images, since that breaks the ability
to the flavor name when booting an instance
Fixes bug #1327212
Change-Id: I949aec52660242249b8cba51d77bfdc1acaf31d2
F841 detects local variable is assigned to but never used.
This commit fix the violations and enable F841 in gate.
Change-Id: I52419f5e17db70e511ff2d4d61c85458c958e9c3
Commit 1b15b23b0a629e00913a40c5def42e5ca887071c removed the
os-quota-class-sets v3 API from Nova in Icehouse. This change removes
the corresponding client code.
Closes-Bug: #1331095
Change-Id: Iaa2f4063e0f671da5a54ff89d0f1c1780a2687c4
The description of the <volume> argument is not proper, the <volume>
argument is indeed "ID of the volume". “Attachment ID" is the internal
term of nova/cinder. So change description 'Attachment ID of the
volume.' to 'ID of the volume to detach.'
Change-Id: I262d72f6f676e260a58d45b750dbd60fc7c3dcf5
Closes-bug: 1321073
Aggregate_set_metadata leaves users confused because it currently
does not check for duplicate key=value parameters for addition
or a missing key for deletion. All that user sees is that "metadata has been updated"
more details in bug1292572
This patch checks for above mentioned corner cases and informs users when and why
there was no change made in above corner cases
Adding better testcases also.
Closes-Bug: #1292572
Change-Id: I820d793ac44680295df8b2a3f58a0834f7019875