Commit Graph

133 Commits

Author SHA1 Message Date
Andrey Kurilin cc62efef41 Remove code related to V3
Since V3 API is not supported, code related to it should be removed.

Discussion in mailing:
http://lists.openstack.org/pipermail/openstack-dev/2014-December/052095.html

Change-Id: Iac5c5e6d81479cbeb8bf10cfcda1cc5617680de8
2014-12-03 14:11:39 +02:00
Eugeniya Kudryashova 545d60402f Fix E128 failures in novaclient/v3
E128 continuation line under-indented for visual indent

Change-Id: Id2b8bcc44e6835ac17d989928a4c54979637cd75
2014-11-18 17:21:30 +02:00
Jenkins 99a4439947 Merge "Support using the Keystone V3 API from the Nova CLI" 2014-11-18 01:52:42 +00:00
Jenkins 6f873cf9d7 Merge "Add limits to V3 and improve limits formatting in shell" 2014-11-13 16:34:00 +00:00
David Hu 8597a0c234 Support using the Keystone V3 API from the Nova CLI
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
2014-11-11 21:04:20 -08:00
Phil Day ae8eadc451 Add limits to V3 and improve limits formatting in shell
Adds support for the limits API to the v3 client.

Also improve the formatting of absolute-limits from

+-------------------------+-------+
| Name                    | Value |
+-------------------------+-------+
| maxServerMeta           | 128   |
| maxPersonality          | 5     |
| maxImageMeta            | 128   |
| maxPersonalitySize      | 10240 |
| maxTotalRAMSize         | 51200 |
| maxSecurityGroupRules   | 20    |
| maxTotalKeypairs        | 100   |
| totalRAMUsed            | 512   |
| maxSecurityGroups       | 10    |
| totalFloatingIpsUsed    | 0     |
| totalInstancesUsed      | 1     |
| totalSecurityGroupsUsed | 1     |
| maxTotalFloatingIps     | 10    |
| maxTotalInstances       | 2     |
| totalCoresUsed          | 1     |
| maxTotalCores           | 20    |
+-------------------------+-------+

to

+--------------------+------+-------+
| Name               | Used | Max   |
+--------------------+------+-------+
| Cores              | 1    | 20    |
| FloatingIps        | 0    | 10    |
| ImageMeta          | -    | 128   |
| Instances          | 1    | 2     |
| Keypairs           | -    | 100   |
| Personality        | -    | 5     |
| PersonalitySize    | -    | 10240 |
| RAM                | 512  | 51200 |
| SecurityGroupRules | -    | 20    |
| SecurityGroups     | 1    | 10    |
| ServerMeta         | -    | 128   |
+--------------------+------+-------+

Change-Id: I93a456b402aeba8e39480567edb090cbb1898d16
2014-11-07 10:51:06 +00:00
Andrey Kurilin 3065afd6c0 Enable check for E129
E129 visually indented line with same indent as next logical line

Change-Id: I438bf0d9de7f61ab65e753169c9a8007e84b215a
2014-10-23 14:28:57 +00:00
Andrey Kurilin ae6c39397e Enable check for E127
E127 continuation line over-indented for visual indent

Change-Id: I9dfd489565ee2d1469b2048a930c3a8384dd245d
2014-10-23 14:28:50 +00:00
Andrey Kurilin 8de2237cc4 Enable check for E126
E126 continuation line over-indented for hanging indent

Change-Id: Id64edce8278d96c1b2d4a6ca536e9fc8fbef478c
2014-10-23 17:28:25 +03:00
Andrey Kurilin dc09cf27e3 Port to use oslo.i18n
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
2014-10-16 01:19:48 +03:00
Russell Bryant e82b46bb93 Clarify "nova scrub" help text
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
2014-10-08 15:21:28 -04:00
Jenkins 1621c93cfa Merge "Live migrate each instance from one host to other hosts" 2014-09-22 15:37:39 +00:00
Andrey Kurilin d03014cdb0 Use common code instead of novaclient.utils
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
2014-09-19 16:56:13 +03:00
Jenkins a6dc7fc43e Merge "Add support for the server group quotas" 2014-09-17 17:05:08 +00:00
Jenkins ce115063bb Merge "Don't display duplicated security groups" 2014-09-16 03:44:24 +00:00
Ala Rezmerita a400b58d03 Live migrate each instance from one host to other hosts
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
2014-09-15 06:36:07 +00:00
Cyril Roelandt 730fa4d0b2 Add support for the server group quotas
Implements: blueprint server-group-quotas
Change-Id: I440d460d227f4447c2b960b6343b8fe1f6cbd3fb
2014-09-12 18:25:24 +00:00
Chris Yeoh 4bd0c389c0 quota delete tenant_id parameter should be required
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
2014-09-12 21:07:39 +09:30
Sean Dague 3d68063809 Don't display duplicated security groups
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
2014-09-12 06:47:03 -04:00
Jenkins 7377b42482 Merge "Use oslo.utils" 2014-09-08 17:39:25 +00:00
Jenkins 146fe804a8 Merge "Adding cornercases for set_metadata" 2014-08-28 11:11:49 +00:00
Andrey Kurilin 392148c7ef Use oslo.utils
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
2014-08-28 12:17:22 +03:00
Jenkins 25d3d66cc1 Merge "Add filtering by service to hosts list command" 2014-08-25 22:02:27 +00:00
Jenkins 74bb2ce0be Merge "Adding Nova Client support for auto find host APIv3" 2014-08-21 23:24:57 +00:00
Jenkins b6b21ac61d Merge "Enable several checks and do not check docs/source/conf.py" 2014-08-21 16:14:51 +00:00
Jenkins cd4428885b Merge "Allow selecting the network for doing the ssh with" 2014-08-21 16:08:41 +00:00
Leandro I. Costantino b3da3ebf97 Adding Nova Client support for auto find host APIv3
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>
2014-08-19 15:33:57 +00:00
Michal Dulko 3fa04e6d2d Add filtering by service to hosts list command
This commit adds --service-name option to host-list command allowing
user to filter hosts by service.

DocImpact
Closes-Bug: 1224763
Change-Id: Ic67deb3af7ddbe23c14fa38ae180d43ab484b78f
2014-08-19 13:21:00 +02:00
Zhengguang 3955440ef2 Fix the return code of the command "delete"
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
2014-08-07 02:27:23 -04:00
Christian Berendt 33058cbe8e Enable several checks and do not check docs/source/conf.py
* 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
2014-08-05 22:18:14 +02:00
Jenkins 43754f519a Merge "Filter endpoints by region whenever possible" 2014-07-30 17:02:04 +00:00
Jaroslav Henner ff4af92b6d Allow selecting the network for doing the ssh with
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
2014-07-29 13:20:52 +02:00
Jenkins 873c55470e Merge "Edits on help strings" 2014-07-27 10:40:17 +00:00
Joe Gordon 4d2586716a Enable H233
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
2014-07-25 19:20:38 +02:00
Andreas Jaeger 8ec2a29d30 Edits on help strings
Improve help strings for consistency. Fix wording, typos,
capitalization and add "." as appropriate.

Change-Id: I376f6d0269aee8dd0e67ffab6386eac2139844ab
2014-07-16 18:33:25 +02:00
ozg 3b8f009700 Adding multiple server support to nova reset-state
Adding support specifying multiple servers to nova reset-state in
a single invocation.

Change-Id: I7add0c26b0e59b31751de7a60ebdde3f568b3354
Closes-Bug: #1314217
2014-07-10 10:16:57 -04:00
Jenkins ddb9749599 Merge "Fix listing of Server in floating-ip-list" 2014-07-04 19:47:29 +00:00
Laurens Van Houtven 6ee0b28e64 Filter endpoints by region whenever possible
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
2014-06-27 16:25:00 +02:00
Jenkins b21d677568 Merge "Add way to specify key-name from environ" 2014-07-19 01:11:09 +00:00
zhangtralon f10d8b60c8 Fixes typo in error message of do_network_create
'eith' is inappropriate

Change-Id: I12b219bd5869d2194d7a8c3495e51e0ead4a64c9
2014-07-18 11:01:53 +08:00
vagrant 2b54bbc8bb add disk bus and device type to volume attach
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
2014-06-24 18:27:43 +00:00
Jenkins 37f02bde12 Merge "Look for all accessible flavors by default, not just public ones" 2014-06-24 11:07:11 +00:00
Dirk Mueller a3d0057da9 Fix listing of Server in floating-ip-list
Add a translation from instance_id to server_id to accommodate
for the adjusted user output.

Closes-Bug: #1324857

Change-Id: Ifaa15f6907b5efae7431eb1741b7fae4b3540a8c
2014-06-23 20:38:43 -07:00
Daniel P. Berrange d17253b29a Look for all accessible flavors by default, not just public ones
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
2014-06-19 12:35:43 +01:00
ChangBo Guo(gcb) 88d0b6f2d9 Enable F841
F841 detects local variable is assigned to but never used.
This commit fix the violations and enable F841 in gate.

Change-Id: I52419f5e17db70e511ff2d4d61c85458c958e9c3
2014-06-19 09:49:05 +08:00
Matt Riedemann bdbc3afc51 Remove quota-class-* commands from v3 shell
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
2014-06-17 12:42:20 -07:00
liyingjun 7be7d88342 Fixes wrong value description for volume-detach
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
2014-06-13 10:44:46 +08:00
Jenkins 939cf46efe Merge "Change help message for volume-update" 2014-06-14 06:18:04 +00:00
neetu 762bf69c36 Adding cornercases for set_metadata
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
2014-06-11 11:42:18 -05:00
Jenkins 47774a2edc Merge "Change help for --poll option in Nova commands" 2014-06-10 06:43:52 +00:00