825 Commits

Author SHA1 Message Date
Sean McCully
0614ae75f6 ClientExceptions should include url and method
Fixes Bug 1103557.
novaclient abstracts out http request from user/client
making it unknown to user what root cause behind nova client
exceptions being raised. By including url and method in exception
handling, this allows user to handle accordingly.

Change-Id: I1a509bb932b3fd029bd0870ab699a39e21da19bb
2013-01-23 11:33:42 -06:00
Daniel P. Berrange
5b8099cd0e Add support for get_spice_console RPC API
Add the new get_spice_console API mirroring the impl of
the existing get_vnc_console support.

Blueprint: libvirt-spice
Change-Id: Id549de57ebbed95dc01749838ed539b3b47efc8b
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-01-17 16:33:26 +00:00
Vishvananda Ishaya
020ff909cc Implement get password for novaclient
This will download and decrypt a base64 encoded encrypted password
from the os-server-password extension. It depends on the user
having openssl installed, but if there is an error of any kind it
will print out the encoded and encrypted password instead.

It also implements clear_password which will delete the password
so it can no longer be retrieved.

Change-Id: I2c4e6c3f03b70dc98d6d339381648a6058f46e21
2013-01-15 13:00:02 -08:00
Jenkins
24087862c7 Merge "Fix a couple of broken shell tests" 2013-01-15 19:53:14 +00:00
Jenkins
0295fca1a2 Merge "Update hosts API action calls (startup etc.)" 2013-01-15 19:53:12 +00:00
Jenkins
38fb9743e0 Merge "When logging request include request data" 2013-01-15 19:53:10 +00:00
Jenkins
fe7d791993 Merge "Add support for instance evacuate." 2013-01-15 19:53:06 +00:00
Jenkins
c9e8666111 Merge "Fix the help text of add-fixed-ip" 2013-01-15 19:53:02 +00:00
Jenkins
6daef75d50 Merge "Move from untitest2 to testtools." 2013-01-15 19:16:11 +00:00
Matt Dietz
dffd415fba Adds tenant network support to the client
Modifies novaclient, changing the existing networks implementation to a
more appropriate os-admin-networks namespace, and supplements with a
tenant-base network extenion that lives under the os-networks namespace
as a Nova API extension. Also removes from the duplicately named network
test methods.

Implements: blueprint tenant-networks

Change-Id: I54c9f017b86fc413f1646c7bded8cebd94f6a287
2013-01-15 18:07:05 +00:00
Jenkins
7b124b8872 Merge "Update functionality of coverage extension." 2013-01-14 19:40:48 +00:00
Matthew Treinish
6f580661f6 Update functionality of coverage extension.
Change If1aa25fc7237e9bb5100d2a4a8e560f0a68eba61 adds additional
functionality to the coverage extension. Mainly returning the
data file path for the 'stop' action and adding support for
generating html reports. This commit adds support for this new
functionality.

Change-Id: Icd147350d5c038f6b9c8063e77a75370eb8422e9
2013-01-14 10:27:06 -05:00
Vishvananda Ishaya
020de7cebc Fix a couple of broken shell tests
Pyflakes picked up a couple of duplicated names. Rename the one
that is correct and delete the incorrect one.

Change-Id: Id4af1269a030be5a725bbbbcf3400341b09fddc3
2013-01-11 14:57:57 -08:00
Alessio Ababilov
b5f3307e80 Update hosts API action calls (startup etc.)
These calls are now implemented as normal
POST os-hosts/{host_name}/action requests.

Change-Id: I8cd401e3b4e552c6787d1f984041ad3c345e6eca
2013-01-11 23:33:24 +04:00
Andrew Laski
207969f6cd When logging request include request data
When the --debug flag is used it should print out the body of a POST
request.  It did that previously but the kwargs dict used for the
request stopped using 'body' which is what the logging relied on.  This
changes it to use 'data' which is a string representation of what was in
'body'.

Bug 1098241

Change-Id: I82f36e59b459706d9d5a3a38563a45c80e84c6e2
2013-01-10 11:20:07 -05:00
Kravchenko Pavel
9e319ece37 Add support for instance evacuate.
This adds support for server evacuation from failed host.
Adds CLI command:

nova evacuate <server> <host> [--password pwd] [--on-shared-storage]

Depends on the approval of change:
https://review.openstack.org/#change,17991

Change-Id: Icd91c0484b2db532861e23163d043737ad04117a
2013-01-07 18:46:59 +02:00
Jenkins
4410339a45 Merge "Unify Manager._update behaviour" 2013-01-04 18:02:46 +00:00
Nikola Dipanov
2d3e0d949e Fix the help text of add-fixed-ip
Makes the help text of the add-fixed-ip less confusing by pointing out
that the IP address is taken from the given network and assigned to the
server.

Change-Id: Iaf4641f65a5872ee70273d5b972ff5da0ddd7b1d
2013-01-04 17:03:08 +01:00
Monty Taylor
53aee5cf4b Move from untitest2 to testtools.
Use testtools as the base testclass. Use fixtures library for managing
fixtures.

Part of blueprint grizzly-testtools

Change-Id: Iac5af286b988787acf7049344641aadf140b9398
2013-01-03 11:58:13 -08:00
Jenkins
e31023fee1 Merge "Update README.rst" 2013-01-03 19:29:57 +00:00
Lorin Hochstein
eb7c3907d1 Update README.rst
Update the README to remove PENDING links to non-existent docs, and
to remove Rackspace-specific references.

Change-Id: I08311e0da3d181c3817573be93f6eed6e15e3812
2012-12-31 16:32:03 -05:00
Alessio Ababilov
6307310466 Unify Manager._update behaviour
Now _update call usually returns an instance of self.resource_class.
This simplifies the code and makes novaclient closer to keystoneclient.

Also, update hosts and services API according to changes on nova.
(If50a6b6e20f9b3fe66d486bb9b15d3eb4b62daf9).

Change-Id: I447e49e5fce0afba8a9c1a5df6dfa7200cc93e18
2012-12-23 14:50:38 +02:00
Ken'ichi Ohmichi
4cf314b2ec Fix some usage messages of 'nova volume-*'
'nova volume-show', 'nova volume-delete', 'nova volume-snapshot-show'
and 'nova volume-snapshot-delete' can be specified by ID or name as
the argument.
But that is not described on the usage messages.
This patch fixes the usage messages.

Fixes bug 1093172

Change-Id: I3dcdd2aca923e9304efd9ea7b467d5b81cd642a7
2012-12-23 05:11:06 +09:00
Yaguang Tang
fba20df12c add num_instances option for nova boot.
fix bug #1092475.

Change-Id: I584b27c1f24c6a5183a2289e77580f204db2e4db
2012-12-22 00:34:16 +08:00
Dean Troyer
aa1df04bad Use requests module for HTTP/HTTPS
* Implement correct certificate verification
* Add --os-cacert
* Rework tests for requests

Pinned requests module to < 1.0 as 1.0.2 is now current in pipi
as of 17Dec2012.

Blueprint: tls-verify

Change-Id: I9a25a94c8dfcaf483c4c8328439809d65cf10b38
2012-12-20 13:04:46 -06:00
Jenkins
ac2ed549e5 Merge "Specify some arguments by name." 2012-12-20 18:08:29 +00:00
Jenkins
c946fd2b84 Merge "Fix find for alphanumeic flavor id/name" 2012-12-20 18:05:28 +00:00
Jenkins
c81931226d Merge "Add support for the coverage extension." 2012-12-20 17:38:49 +00:00
Rohan Rhishikesh Kanade
9937419888 Fix find for alphanumeic flavor id/name
Fixes LP bug #1089299

Change-Id: Ia9cc756b85096532acfc9ecacd1330de8a765fba
2012-12-20 03:14:39 -08:00
Eoghan Glynn
e6e22dbe77 Make --tenant a required arg for quota-show
Fixes LP 1088519

Previously, novaclient was incorrectly defaulting to the tenant name
as the tenant ID when retrieving quota thresholds via the os-quota-sets
API extension, in an apparent attempt to default to the current tenant
if no specific tenant is explicitly requested.

As a result, the default quotas were always returned, regardless of
whether there were specific overridden quotas for this tenant.

We now require that the --tenant option is always specified for the
quota-show verb, as a sensible default isn't always possible
(because the tenant ID may be opaque to the client, for example when
the auth token is cached in the keyring from a previous call out to
keystone - now the tenant ID is of course generally embedded in the
nova publicURL retrieved from the service catalog, but that is not
guaranteed to be the case, i.e. I don't think we can safely make
assumptions about that URL format).

This change also makes the quota-show verb more consistent with the
quota-update verb, which currently requires that the tenant is
always explicitly specified.

Change-Id: I1706ad993059e70ca0e2f3bcf7b1d06cbcc39f2d
2012-12-19 20:07:41 +00:00
Matthew Treinish
c59de35be2 Add support for the coverage extension.
This adds support for the coverage extension and also adds 3
CLI commands to interact with coverage:

nova coverage-start

nova coverage-stop

nova coverage-report

'nova coverage-report' has a required '--filename' argument
which gives the filename for the generated report files.

Change-Id: I9cb002b0e32cfe5572878d2c8436270663c0ae96
2012-12-19 10:08:34 -05:00
Ken'ichi Ohmichi
eaf3c366c3 Specify some arguments by name.
'nova boot', 'nova flavor-key', 'nova flavor-show' and the other subcommands
can be specified by a flavor name also.
But 'nova flavor-delete' and 'nova list --flavor' cannot, also 'nova list
--image' cannot be specified by a image name.
I feel it is user-friendly that a user can specify arguments by name.

By this patch, a user can do it like the following.

Before appying this patch:
 $ nova flavor-delete m1.tiny
 ERROR: Flavor m1.tiny could not be found. (HTTP 404) (Request-ID: req-af2c049f-1b77-42cf-a9ed-a3914626bc83)
 $
 $ nova list --flavor m1.tiny
 ERROR: Flavor could not be found (HTTP 422) (Request-ID: req-dbfd5df2-77d7-4a71-a3e6-b1f7fd25b96c)
 $
 $ nova list --image cirros-0.3.0-x86_64-uec

 $

After appying this patch:
 $ nova flavor-delete m1.tiny
 $
 $ nova list --flavor m1.tiny
 +--------------------------------------+--------+--------+------------------+
 | ID                                   | Name   | Status | Networks         |
 +--------------------------------------+--------+--------+------------------+
 | 2f003e0e-bfdf-4f56-bdf9-276732e640a0 | test01 | ACTIVE | private=10.0.0.2 |
 +--------------------------------------+--------+--------+------------------+
 $
 $ nova list --image cirros-0.3.0-x86_64-uec
 +--------------------------------------+--------+--------+------------------+
 | ID                                   | Name   | Status | Networks         |
 +--------------------------------------+--------+--------+------------------+
 | 2f003e0e-bfdf-4f56-bdf9-276732e640a0 | test01 | ACTIVE | private=10.0.0.2 |
 +--------------------------------------+--------+--------+------------------+
 $

Fixes bug 1091814

Change-Id: Ic7f6ce76608a448dea3c151bc349391fbf3fa456
2012-12-19 04:43:07 +09:00
Jenkins
8d3650048a Merge "Add optional argument to include reservations in os-used-limits" 2012-12-14 15:14:11 +00:00
Jenkins
df8db07495 Merge "Add nova client support for nova-manage agent command" 2012-12-13 16:10:21 +00:00
Jenkins
e2c549e066 Merge "Makes the OS_NO_CACHE env variable work again" 2012-12-13 00:38:59 +00:00
Vishvananda Ishaya
80a72e1a92 Makes the OS_NO_CACHE env variable work again
The commit to replace --os-no-cache with --os-no-cache works fine
with the cli options, but the env variable is stored in os_cache
which has the opposite of the intended effect. This patch converts
the variable to a bool and then inverts it before it stores it
in os_cache. This makes it work properly again.

Fixes bug 1089696

Change-Id: Iea12806603ecdc39c6475ad4d6f867ebb1e01633
2012-12-12 15:59:13 -08:00
Julie Pichon
35b18965e4 Add optional argument to include reservations in os-used-limits
Fixes bug #1089271

Change-Id: I01a3823a4f4b1045e4f8e35f749fc9233bef4489
2012-12-12 21:26:10 +00:00
Jenkins
3928f7e80b Merge "Fix argument checking method for 'nova list --flavor' command." 2012-12-12 18:32:30 +00:00
ivan-zhu
08d0c05013 Add nova client support for nova-manage agent command
This add four CLI (agent-list/agent-create/agent-delete/agent-modify)
in nova-client

so we can use:
'nova agent-list' like 'nova-manage agent list' with one optional
parameter. Show a list of all agent-builds. Filter by hypervisor.
The difference between the two commands is that 'nova agent-list'
will display the id of the agent build, 'nova-manage agent list'
will not.

'nova agent-create' like 'nova-manage agent create'. It will create
a agent build.

'nova agent-delete id' will delete the agent-build with specific id.

'nova agent-modfiy' will update the version, url, md5hash of the agent
build with specific id.

This patch depends on https://review.openstack.org/#/c/15831/
Implements one workitem of blueprint apis-for-nova-manage

Change-Id: Ic7589077d130efa5abc77252bd79addcaea483c8
2012-12-12 22:43:17 +08:00
Dan Prince
e483455a12 Adds --os-cache to replace old --no-cache.
Deprecates the old --no-cache option in favor of --os-cache.

The old CLI args (--no_cache and --no-cache) and ENV option
(OS_NO_CACHE) are still supported but no longer show up
in help.

The new option for --os-cache can also be set via the OS_CACHE ENV
variable... which now defaults to False. This should be much more user friendly.

Fixes LP Bug #1087776.

Change-Id: I3cea089c7e11ce75f22c2d7f3242b02b80441323
2012-12-11 12:58:37 -05:00
Jenkins
f37bbae5f6 Merge "Adds support for security group/rules quotas." 2012-12-11 17:55:03 +00:00
Jenkins
fe2ea846bb Merge "Fix a wrong substition for '-h' in bash completion" 2012-12-11 17:28:07 +00:00
Jenkins
409314d918 Merge "add host-update help info param." 2012-12-11 17:27:47 +00:00
Dan Prince
cf70a2d6f6 Adds support for security group/rules quotas.
Updates novaclient's quota and quota_class handlers to support
the security_groups and security_group_rules quotas that are now in
Nova.

Fixes LP Bug #1084682.

Change-Id: I04d90681d535124d7d497e06e8c1ea4f2cb8f4f4
2012-12-11 12:18:56 -05:00
Jenkins
6795ad1ab2 Merge "Fixed nics param ignored when bdm is specified" 2012-12-11 17:10:36 +00:00
Jenkins
1c5d52b2d5 Merge "Adds support for key_pairs quota." 2012-12-11 16:44:34 +00:00
Jenkins
64b4676c6b Merge "Adds support for injected_file_path_bytes quota." 2012-12-11 16:44:11 +00:00
Jenkins
cdb2b5e142 Merge "Adds nova client support for nova-manage network command" 2012-12-11 16:29:16 +00:00
Jenkins
6c1a0ca5bd Merge "Adds nova client support for nova-manage floating command" 2012-12-11 14:12:04 +00:00
Jenkins
1378ddd443 Merge "Add nova client support for nova-manage account scrub command" 2012-12-11 14:03:30 +00:00