716 Commits

Author SHA1 Message Date
Jenkins
e8c22cd130 Merge "Encode user data to utf-8 when creating a server" 2012-10-10 16:57:11 +00:00
Jenkins
ccabbe77de Merge "Add simple os-api extension cli extension" 2012-10-10 04:00:52 +00:00
Joshua Harlow
ccc4291c52 Add simple os-api extension cli extension
Add a useful extension that will show you what
openstack api extensions are available for usage
and print out the result into a nice little table.

Useful as a example for others to base contrib/
extensions off of.

Example @ http://paste.openstack.org/show/20989/

Change-Id: I5b72f5ea73c00f1c1a0f09f670d744c820e05837
2012-10-09 13:31:27 -07:00
Jenkins
c8696a59e3 Merge "Raises Exception on improper Auth Configuration" 2012-10-04 22:52:20 +00:00
Jenkins
6a8630867f Merge "Add missing port-id usage info." 2012-10-04 21:47:10 +00:00
Stef T
a9a66ae7a7 Raises Exception on improper Auth Configuration
Addresses bug 1061848.

Basically, this bug comes about from not properly
setting up the auth_system for novaclient. In this
case, an exception of EndPointNotFound is flung.

Change-Id: I12533aefd9d0425dd83e2e4c63f4dd5ff6faae71
2012-10-04 16:33:27 -04:00
Vincent Untz
aa171ca12b Do not prefer ALL_TENANTS environment variable to command line arguments
As pointed out in https://review.openstack.org/#/c/13708/ command line
arguments should have higher priority.

Also, do not fail if the environment variable is not representing an
int.

Change-Id: Ie6cd5b2d6aae47236ba0fe6d594d0c8095e9e422
2012-09-28 12:45:06 +02:00
Vincent Untz
81c01e535c Encode user data to utf-8 when creating a server
This is needed for data that we don't read from IO directly, since we're
base64-encoding the user data, and this requires ther user data to not
be of the unicode type.

We're being tolerant, as we'll accept user data that is already in a str
object.

Fixes: bug 1049161
Change-Id: I4320670de564c8029c7aef14da2492c6f8752efe
2012-09-28 11:58:37 +02:00
Vincent Untz
c01fae7370 Add --all-tenants option to volume-list
The list and secgroup-list commands have this option, and
nova-volume/cinder respect this search option too nowadays.

Change-Id: Ie95432727dec9702e09a0ce314bf418f6a36b799
2012-09-26 14:57:18 +02:00
Jenkins
cdebf729b0 Merge "Show volume and snapshot data on create" 2.9.0 2012-09-21 21:56:06 +00:00
Vishvananda Ishaya
02d3aaddf2 Show volume and snapshot data on create
nova volume-create and nova volume-snapshot-create do not display
the data returned from the api.  This makes it difficult to find
the id of of the newly created object.

Fixes bug 1053432

Change-Id: Ie25566f4e7d05d98421a5ea9e75521d40282a40d
2012-09-20 16:59:35 +00:00
Jenkins
e01c25bdb1 Merge "expose os-networks extension to CLI" 2012-09-20 05:07:48 +00:00
Jenkins
fb7c3ad9e7 Merge "Work around httplib2 tunnelling bug" 2012-09-19 16:05:53 +00:00
Jenkins
99f1da1201 Merge "Show POST in debug with curl." 2012-09-19 15:48:04 +00:00
Jenkins
746ea00f15 Merge "Make region case insensitive." 2012-09-19 15:46:00 +00:00
Alessandro Pilotti
bfb0f70f40 Fixes setup compatibility issue on Windows
Fixes Bug #1052161

"python setup.py build" fails on Windows due to a hardcoded shell path:
/bib/sh

Change-Id: I34f58ea09317c0be6ac23c5d9591bc83bc78782b
2012-09-18 00:05:27 +03:00
Trey Morris
55dd9aeb63 allow empty network list to be requested
Change-Id: I776a429fb62e335e458f45466f0c362e1270e319
2012-09-17 14:21:32 -05:00
Mark McLoughlin
aaa38ce0e5 Work around httplib2 tunnelling bug
Fixes bug #1051007

httplib2 defaults to using HTTP CONNECT tunnelling even for plain HTTP
connections. This is problematic with proxies configured to only allow
tunnelling to port 443. This is the default configuration for squid.

Hack around the problem by forcing httplib2 to use the HTTP_NO_TUNNEL
proxy type which disables tunnelling except for port 443.

Change-Id: I59cd95ed74a9bb795779fc38fbc0935266cc8b22
2012-09-16 13:42:19 +01:00
Jenkins
eb20c5ad6e Merge "Add support for all-tenants search opt to secgroup-list" 2012-09-14 16:41:53 +00:00
Eoghan Glynn
fc2d622bac Add support for all-tenants search opt to secgroup-list
Related to bug 1046054.

Once I6157e408 lands, we will be respecting the all-tenants search option
in the security groups retrieval API. Hence the CLI should be capable of
adding this option when appropriate.

Change-Id: If1217a5ffc7316e4661326c38da9b2956424ab05
2012-09-14 16:17:05 +01:00
Vishvananda Ishaya
df542ab43e expose os-networks extension to CLI
Change-Id: Ia62a9333ec6f0d8b9178fae0313e94cae043f84b
2012-09-14 05:12:27 +00:00
Eric Harney
5cdc584efd Add support for Unicode secgroup names
Fixes bug 934081.

Previously, manipulating secgroups with Unicode names would fail
in _get_secgroup, due to the command-line argument being a raw
byte string, and the secgroup name from cs.security_groups.list()
being a Unicode string.  This causes a UnicodeWarning and the
"if secgroup == s.name" test to fail for the desired secgroup, so
secgroup-add-rule and secgroup-delete would fail.

This change converts them to byte strings for comparison, fixing
these commands.

Likewise, error messages containing Unicode secgroup names would
fail to print. (i.e. "Security group <x> already exists")

Change-Id: Ie90cb49b8f11e3283fe509e95a8e9fd468cc9892
2012-09-13 15:14:40 -04:00
Jenkins
40cb8ef833 Merge "Makes handling of nic args more robust" 2012-09-12 22:01:05 +00:00
Yunhong, Jiang
3dd0393fbb Support flavor extra specs in nova client
Add flavor extra specs so that user can list/set/unset
extra specs in nova client

blueprint extra-specs-in-nova-client

Change-Id: I6ad7293e29764648c79943c4d05f3a09931af411
Signed-off-by: Yunhong, Jiang <yunhong.jiang@intel.com>
2012-09-12 20:26:26 +08:00
Major Hayden
247b53022b Optionally faster 'nova show'
Running show against an instance UUID calls for the
instance/flavor/image data. This patch allows --minimal
to be passed and the extra lookups will be skipped.

Change-Id: I76e9ac58a67b7cb595ca08c173ec9758119b46ae
2012-09-11 16:07:54 -05:00
Vishvananda Ishaya
59a9578c3c Makes handling of nic args more robust
Legacy users of novaclient may not pass all of the new nic args,
so this patch only passes them on if they are set.

Fixes bug 1044231

Change-Id: I1c8323a3a09613ad4e8dfcc1dfe379dbda50f125
2012-09-11 05:46:28 +00:00
Jenkins
aa9d973503 Merge "Show instances built from deleted snapshots" 2012-09-10 18:24:34 +00:00
Major Hayden
5611025190 Show instances built from deleted snapshots
novaclient current throws an image not found error when you use the 'show'
command against an instance that was built from a snapshot which was
subsequently deleted.

Change-Id: If950b4582d0af9947c30fb24eea78a0829edecf3
2012-09-10 10:36:17 -05:00
Andrew Laski
8cff1a20bc Add ConnectionRefused exception.
When novaclient gets a Connection Refused it now presents that as a
ConnectionRefused exception with appropriate information rather than as
an HTTP exception.  Addresses bug 1047078.

vagrant@precise64:/opt/stack/python-novaclient$ nova image-list
ERROR: ConnectionRefused: '[Errno 111] Connection refused'

Change-Id: Iebf4d78a524004d5e79d2219b35f90fbd38ee690
2012-09-07 16:04:54 -04:00
Jenkins
d6f767f8a3 Merge " Add the image_id arg to volume create" 2012-09-07 12:47:48 +00:00
Jenkins
671afc344c Merge "Add -X to DELETE and PUT in debug mode" 2012-09-06 22:35:02 +00:00
Jenkins
dfa1c71e91 Merge "Fix PEP8 issues." 2.8.0 2012-09-06 20:22:50 +00:00
Jenkins
66ea8f9bfb Merge "Fix usage-list date range to use UTC time" 2012-09-05 21:58:31 +00:00
Mark McLoughlin
f2d2e4cb06 Fix usage-list date range to use UTC time
Fixes bug #1045456

The date range in Nova's os-simple-tenant-usage is expected to be in UTC
time since launch/termination dates are stored in the DB in UTC time and
we use the client supplied parameters to query DB without conversion.

Switch from using datetime.today() to datetime.utcnow() to fix the issue.

Add a test for the default date range.

Import timeutils from openstack-common so we can control the return value
of utcnow() in the tests.

Change-Id: Iac77e3a4cc9561714d1492c54cef931f9764531e
2012-09-03 20:13:31 +01:00
Chmouel Boudjnah
03a5650cb2 Show POST in debug with curl.
- When debugging with switch --debug display show the POST request directly
  in the curl command line making easy to copy and paste.

Change-Id: Id62ef2c32a3e9d492dd2d34c4bd7575bda10eb0f
2012-08-30 19:52:16 +02:00
Sulochan Acharya
46a87dc875 Fixes doc string and string formatting
A small change to fix a doc sting mistake and a string formatting
error on floatingIP. Fixes bug 1043906.

Change-Id: I212e317efb81afdb450fd79f16552fd393e86bd9
2012-08-30 10:49:40 -05:00
Ollie Leahy
e8b6aae14a Add the image_id arg to volume create
This fixes bug 1042158 and is a port of
    Josh Durgin's fix to python-cinderclient

    Patch set 2, remove unnecessary secondary option for
    image_id

Change-Id: If028f784f1c6de9b47705cb580711849d1c00060
2012-08-30 13:47:43 +01:00
Chmouel Boudjnah
0e7df4c9fc Make region case insensitive.
- Match region in case insensitive way.

Change-Id: I4d97372e7804acd6b735275ed279b78332ba4eef
2012-08-29 13:16:50 +02:00
lrqrun
9754f1daa8 Fix PEP8 issues.
Fix some pep8 issues in doc/source/conf.py make the code looks pretty.

Change-Id: I7cc284a0155d531d3890941f8c62c04f54d1a2d6
2012-08-29 13:36:55 +08:00
Joe Gordon
ee2405d642 Add -X to DELETE and PUT in debug mode
Fix bug 1042914

Change-Id: I3cded071c12dce0f7eb93b39d5942f0602bd77ba
2012-08-28 12:26:39 -07:00
Jenkins
3a8942562d Merge "Implement project specific flavors API, client bindings" 2012-08-27 20:23:39 +00:00
Jenkins
6de710fa18 Merge "Change '_' to '-' in options" 2012-08-27 20:22:56 +00:00
Jenkins
6e6e8060d4 Merge "Adding --version option" 2012-08-27 20:12:17 +00:00
Jenkins
2a7dd867fa Merge "Add nosehtmloutput as a test dependency." 2012-08-27 20:11:52 +00:00
Jenkins
b52e3bef72 Merge "split req and response logging this allows capture of timestamps prior to and after request for timing also did some pep8 1.3 cleanup while I was in there" 2012-08-27 20:10:20 +00:00
Jenkins
f0929b0ebb Merge "Implement network calls in nova client" 2012-08-27 20:05:18 +00:00
unicell
f160a20fd9 Implement project specific flavors API, client bindings
blueprint project-specific-flavors

This change implements client bindings for the project specific flavor API in following change
https://review.openstack.org/#/c/11270/

Change-Id: Id8d559985f9369f53926e63ee5f5ce23a051e25b
2012-08-27 22:38:36 +08:00
Yaguang Tang
f391591713 Add missing port-id usage info.
Change-Id: I3e5de32265512c0f692bda6d322c95be0d1b8851
2012-08-27 16:05:22 +08:00
Jenkins
ae431aba0d Merge "Added -nic port-id=<port_uuid_in_qunatum> support" 2012-08-25 02:06:07 +00:00
Dean Troyer
9101741960 Change '_' to '-' in options
This changes every command-line option with a '_' in its name
and changes them to '-'.  The old option names are maintained
for backward compatibility but are no longer in the help text.

BP command-options

Note: there is a dodgy hack in novaclient/shell.py to handle
usage-list's --end option that conflicts with --endpoint-type
if --endpoint_type is also present for backward compatibility.
If --endpoint_type is not added to the parser it works.  Go figure.
Better solutions that do not break backward compatibility are welcome.

Rebased due to https://review.openstack.org/11072 merging.
Note: --availability_zone changed to --availability-zone with no
backward compatability since this s a new option.

Change-Id: I09ab546659be0a0d3f0eadb22ab5e13fac2f059d
2012-08-24 15:22:44 -05:00