Commit Graph

893 Commits

Author SHA1 Message Date
Matt Riedemann f7e2129f88 Remove novaclient.v1_1 module
This reverts commit 036d42d708

Once novaclient 2.34 is released we can merge this and
release as 3.0.0. The dependency is on the 2.34 release
request.

Change-Id: I1e3a8a8079b954fe60371c2d38ec23a10727c408
Depends-On: I4fc044e518a5cc5ea7b309a2824984a7035945bd
2015-10-29 14:04:45 +00:00
Matt Riedemann 036d42d708 Revert "Remove novaclient.v1_1 module"
This reverts commit 0cd58123be

This is a backward incompatible change that is blocking our
ability to release 2.34 for 63c7a57, which was a revert for
another backward incompatible change (2961e82) which slipped
into 2.33.

Once we release 2.34 with the bug fixes, we'll revert this
revert and release that as novaclient 3.0.

Change-Id: If79d37df3e99004897f1bb2d8564d2f1d8aa0978
2015-10-28 21:25:02 +00:00
Andrey Kurilin 0cd58123be Remove novaclient.v1_1 module
A long time ago in a galaxy far far away...this module was deprecated
(see 0a60aae852 for more details) and
it's time to remove it(one full release of deprecation (Liberty) is 
ended).

Also, let's stop testing compute-api-version=1.1 .

Change-Id: I2ce177d8074921a54b4e3d1bfe3b794a80df9358
2015-09-29 11:50:59 +00:00
Andrey Kurilin 0a60aae852 Rename v1_1 to v2
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
2015-02-04 17:40:46 +02:00
Rui Chen 4e76f9590b Fix issue of quota-show and quota-defaults
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
2015-02-03 10:29:04 +08:00
James Penick a5ea58fec9 Refer to the admin password consistently
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
2015-02-02 19:24:47 +00:00
Katie McLaughlin 39dac3140c Update volumes.get() docstring to correctly reflect functionality
The get() command gets a volume based on an id. It does not have
anything to do with deleting a volume, and thus should not be documented
as such.

Change-Id: Id62fb07ddd9024ee02090201ce1b679d4968b168
2015-01-30 16:48:45 +11:00
Jenkins a9223d314e Merge "Adds separate class for Hypervisor Stats" 2015-01-27 02:20:41 +00:00
Jenkins 664608200d Merge "In strings/comments change Ip/ip to IP" 2015-01-22 19:10:41 +00:00
Christian Berendt c58bc211f7 In strings/comments change Ip/ip to IP
The correct short form of "Internet Protocol" is IP.

Change-Id: Ie5412fafbb093e0948970f030e443bed360c71ea
2015-01-17 08:53:26 +01:00
Pedro Navarro 9ee6d696e2 Improving the help of the lock command
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
2015-01-16 09:55:17 +01:00
Jenkins 0f7bf49388 Merge "Directly using base64 encoding for injected files" 2015-01-13 23:30:46 +00:00
Joe Gordon 0eb2e72d38 Move to hacking 0.10
Release notes: http://lists.openstack.org/pipermail/openstack-dev/2015-January/054165.html

Explicitly move everything to new style classes (H238).
http://python3porting.com/preparing.html#use-new-style-classes

Remove deleted hacking rules from tox.ini

Change-Id: If65b0060e6f64a456b4869ef4129ad15aef107fb
2015-01-12 09:40:49 +13:00
Matthew Gilliard b5e36ced8f Adds separate class for Hypervisor Stats
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
2015-01-09 08:45:17 +00:00
Liang Chen f75ea86a2a Directly using base64 encoding for injected files
Binary files cannot be treated as utf-8 byte streams and converted
to plain. Change this back to just using base64 encoding as it was
before commit 8b264fc61d.

Change-Id: I4ef6142676022b2e2f3178e7bfa24ed985fcae2c
Closes-Bug: #1408088
2015-01-07 15:27:53 -05:00
David Kranz 7bced6673c Document unexpected need for --all-tenants when using --tenant
This behavior was changed in v3 but that is now obsolete.

Change-Id: I5e1ce2ab3ac60dc637c4416cbe1be088230c07b6
Related-Bug: #1185290
2015-01-06 09:36:37 -05:00
Jenkins 0dcdfa4222 Merge "Display tenant id with nova list --all-tenants" 2015-01-06 06:04:22 +00:00
Jenkins 2494e0fc6f Merge "Pass kwargs through to the adapter" 2015-01-05 01:28:02 +00:00
Haiwei Xu c8ac6883c3 Add 'Id' column to floating-ip-list
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
2014-12-19 11:49:33 +09:00
Jamie Lennox 003f1ed048 Pass kwargs through to the adapter
A major point of the adapter is that we should be able to add new
arguments to the adapter that are supported automatically by the clients
that support it. This means we have to pass all additional arguments
through to adapter.

Regardless of whether the arguments are passed to the adapter or to the
traditional client the kwargs are explicitly provided so we won't end up
with missing arguments.

Closes-Bug: #1403329
Change-Id: I7303b184875dc296ca855ad89496173c42070879
2014-12-19 11:15:32 +10:00
yamini sardana 5f154636c2 Display tenant id with nova list --all-tenants
For each server, nova list --all-tenants will now display
its corresponding tenant ID as well.

Change-Id: I586d6c5bbb15ebb5df25dc4fa849ac4d5af149e9
Closes-bug: #1403431
2014-12-18 16:13:49 +05:30
Jenkins e422109eb3 Merge "novaclient sort parameters support" 2014-12-16 22:27:36 +00:00
Steven Kaufer 4b530bf9d6 novaclient sort parameters support
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
2014-12-16 18:38:24 +00:00
melanie witt 85e15fe885 pass id to ServerGroupsManager in ServerGroup.delete()
ServerGroup object delete currently fails because the manager object
requires the server group id and is instead passed the server group
object itself (copy-paste error). This patch changes it to pass the
id.

Change-Id: Ic6a4a38157f52343fbb3e75a02d1f7c6bef28d99
Closes-Bug: #1400494
2014-12-10 20:41:16 +00:00
Andrey Kurilin 96a124fae6 Remove aliases for `args` and `env` in utils
To remove aliases for `arg` and `env` functions in novaclient.utils,
we should use `arg` and `env` directly from cliutils in novaclients modules.

This patch removes aliases in `novaclient.utils` and starts using
`args` and `env` from novaclient.openstack.common.cliutils directly.

Change-Id: I4585adae62bc66ad6bc9d19be10d4679bb3dc5a1
2014-12-04 17:22:12 +02:00
Andrey Kurilin 821643e126 Use `arg` and `env` from cliutils: v1_1/shell
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
2014-12-04 17:21:32 +02:00
Eugeniya Kudryashova 75727c2d37 Fix E128 failures in novaclient/v1_1/
E128 continuation line under-indented for visual indent

Change-Id: I93660ef15df87993738c98f8bb1a88cc65f99870
2014-11-18 17:21:30 +02:00
Eugeniya Kudryashova d06a8dbb93 Fix E128 failures in novaclient/v1_1/shell
E128 continuation line under-indented for visual indent

Change-Id: Ibc2e42e4d2070ae666ceef9598269fef576af46b
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 252cd0819a Merge "Allow to start/stop multiple servers" 2014-11-13 16:34:15 +00:00
Jenkins 6f873cf9d7 Merge "Add limits to V3 and improve limits formatting in shell" 2014-11-13 16:34:00 +00:00
Jenkins 525a510b5a Merge "Define helper to run an action on many resources" 2014-11-13 01:10:51 +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
Ken'ichi Ohmichi 57ae6ce955 Fix the help comment about metadata
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
2014-11-06 14:34:47 +09: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
Jenkins cb102e0d18 Merge "Add missing parameters for server rescue" 2014-10-23 11:07:17 +00:00
Cedric Brandily 70172026f1 Allow to start/stop multiple servers
This change allows to pass multiple server names/ids to nova
start/stop.

Change-Id: Ide577a1016de3d09f31c1f6e7b61079380d99060
2014-10-22 18:41:17 +02:00
Cedric Brandily 333d2e7bd9 Define helper to run an action on many resources
This change defines do_action_on_many function as a helper to run an
action on many resources (like nova delete).

Change-Id: I1c45d11a520703c57e3ac1923d94ec5f864f266b
2014-10-22 16:20:30 +02:00
M. David Bennett b6db84c9f8 Add missing parameters for server rescue
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
2014-10-20 14:31:25 -05:00
Amandeep 2d6047ffb4 no way to delete valid/invalid security rule
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
2014-10-20 09:51:12 +05:30
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
Haiwei Xu 9d5164acee Show 'state' and 'status' in hypervisor-list
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
2014-10-03 09:42:57 +09:00
Jenkins 58b539e398 Merge "Fix parameter description in create_server" 2014-09-26 07:57:22 +00:00
Ian Wienand 6bbedd1a13 Fix parameter description in create_server
Make clear the parameter name is "metadata", not "meta" -- this is
confusing at the moment as some other functions do use just "meta" as
their metadata argument.

Change-Id: I2b3ab478e5ad6e885e88bf0471502c9c971e46bd
2014-09-25 10:18:18 +10:00
Andrey Kurilin 8b8aa499e1 Enable check for E123
E123 closing bracket does not match indentation of opening bracket's line

Change-Id: I3f941032efb5ca2ef9a78f865effbf79c8674ebb
2014-09-24 22:44:20 +03:00
Andrey Kurilin d05ae5dcc0 Enable check for E122
E122 continuation line missing indentation or outdented

Change-Id: Ic54714142b3c5aded42d544f296b0ef9a840c282
2014-09-24 22:44:20 +03:00