Commit Graph

188 Commits

Author SHA1 Message Date
Jenkins e40580b77a Merge "Make image sizes more readable for humans" 2012-11-19 18:56:52 +00:00
Jenkins 882c13ab8c Merge "Set useful boolean flag metavars" 2012-11-19 18:52:55 +00:00
Jenkins 0192e14d56 Merge "added --version as new parameter" 2012-11-19 18:48:11 +00:00
Christian Berendt b24832c22a Make image sizes more readable for humans
By introducing the parameter --human-readable for several functions
(image-list, image-show, image-update, image-create) it's possible
to convert the size in bytes to something more readable like
9.309MB or 1.375GB.

Change-Id: I4e2654994361dcf330ed6d681dbed73388f159cb
2012-11-19 10:15:19 -08:00
Brian Waldon 0e90f8ef23 Set useful boolean flag metavars
The boolean flags --is-protected and --is-public now
communicate that they must be set to True or False.

Fixes bug 1056501.

Change-Id: I23094ea556eb71d6eb977a64c171119738ed792b
2012-11-19 09:08:50 -08:00
Jenkins 1899ac2963 Merge "Unpin keystoneclient dependency" 2012-11-17 00:57:15 +00:00
Vishvananda Ishaya 8d81623d5f Unpin keystoneclient dependency
The new 0.2.0 keystoneclient was released with no api changes, and
glanceclients dependency breaks gating so unpin it.

Change-Id: I9cbe2ebb462005ebfea3b7a0e68ca39069a0765f
2012-11-16 16:37:03 -08:00
Jenkins c6b9712482 Merge "Fixes bug on Windows related to a wrong API url" 2012-11-15 21:18:44 +00:00
Alessandro Pilotti 6c201e63ea Fixes bug on Windows related to a wrong API url
Fixes Bug #1079323

python-glanceclient (latest repository code) fails on Windows due to a
malformed API url. This error is due to the usage of os.path.normpath(),
which should not be used for URLs as it swaps "/" with "\" on Windows.

The fix consists in using posixpath.normpath().
Please see also https://bugs.launchpad.net/nova/+bug/1077125 and related
commit.

Change-Id: Iaa643bd579963ad9ffbf10674973cbca75d435ac
2012-11-15 20:31:10 +02:00
Andre Naehring 00eff28f28 Enhance --checksum help with algorithm
Fixes bug 1056499.

Added a line to the help text of --checksum which enhances the help text
to show what checksum algorithm is expected.

Change-Id: Ie6604022dd9f398c639afe647b2d94b5179dbb61
2012-11-14 15:37:31 +01:00
Christian Berendt e20ff23158 added --version as new parameter
fixes bug 1056504
Change-Id: Ib28e3941006b46553001d7895d5ddf4b0f9c540d
2012-11-13 12:02:14 +01:00
Alessandro Pilotti 16aafa728e Fixes setup compatibility issue on Windows
Fixes Bug #1052161

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

setup.py updated using openstack-common/update.py

Change-Id: If0ae835aeada8769e46dddf4f3c2f2edfdfbc5fe
2012-11-05 18:19:13 +02:00
Jenkins a8e88aa340 Merge "Allow deletion of multiple images through CLI" 2012-10-25 02:23:49 +00:00
Sulochan Acharya 8b2c227f27 Allow deletion of multiple images through CLI
Add nargs to argparse for image-delete command to
allow muliple (optional) positional image-id arguments.
For example:
image-delete xxx aaa yyy will delete valid images
xxx and yyy and print error message for invalid image
aaa. Also with --verbose you can see some extra text
on delete request for each image.

Fixes bug1056498.

Change-Id: I6e804700ed24d16f90ec92569c0893cad4aaa26f
2012-10-24 06:06:50 -05:00
Jenkins 256dcbae1c Merge "Fixes shell command for member-delete" 2012-10-24 02:53:46 +00:00
Sulochan Acharya 1e14e82c81 Fixes shell command for member-delete
Fixes the member-delete cli command and string formatting for
dry-run option.
Fixes bug1064320

Change-Id: I338f03d53da5c9b7656ae4d1335de9623b774dd8
2012-10-23 08:15:55 -05:00
Doug Hellmann c420fa10fe Add OpenStack trove classifier for PyPI
Add trove classifier to have the client listed among the
other OpenStack-related projets on PyPI.

Change-Id: I2bb290f529fd2cd08d0093f495074d8e1683d91f
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
2012-10-22 18:43:53 -04:00
Jenkins 9004ee40df Merge "Display acceptable disk/container formats in help text" 2012-10-13 02:54:09 +00:00
Jenkins 3576336cb9 Merge "Handle create/update of images with unknown size" 2012-10-13 02:17:31 +00:00
Stuart McLaren 556082cd66 Implement blueprint ssl-connect-rework
Use pyOpenSSL for HTTPS connections.

This allows:

* Neater loading of system CA files
* Optional disabling of SSL compression

The performance gain from disabling SSL compression is significant
in cases where the image being uploaded/downloaded is in an already
compressed format (eg qcow2).

Related to bp ssl-connect-rework.

Change-Id: I0568b6c95c5fc7b8eafdbd0284e24c453660a55a
2012-10-08 13:51:41 +00:00
Stuart McLaren 727aadbc25 Handle create/update of images with unknown size
It may not be possible to know in advance the total
size of image data which is to be uploaded, for example
if the data is being piped to stdin.

To handle this we use HTTP Transfer-Encoding: chunked
and do not set any image size headers.

Various subtly different cases needed to be handled for
both image-create and image-update, including:

 * input from named pipe
 * piped input of zero size
 * regular file of zero length

Fix for bug 1056220.

Change-Id: I0c7f0a64d883e058993b954a1c465c5b057f2bcf
2012-10-08 11:16:18 +00:00
Brian Waldon b5d46e2e0d Display acceptable disk/container formats in help text
Fixes bug #1056497

This patch provides more information in the help text. Originally the text
provided the trivial definitions of the arguments disk_format and
container_format. This patch updates the text to display the acceptable
formats.

Change-Id: I893b52c9f72a34c75e8bea522820863592300302
2012-10-04 06:28:41 -07:00
Brian Waldon cdc06d9fdb Simplify http(s) connection instantiation
The endpoint parsing and connection instantiation code was too
complicated and easily broken. This assigns human-readable names to
instance variables and breaks up the parsing into more understandable
chunks.

Fixes bug 1060316.

Change-Id: I5c5236f90d88b9e797cf0a476aabe8cc7cfa1cc9
2012-10-03 14:10:11 -07:00
Brian Waldon 11e6aadf19 Add happy path tests for ResponseBodyIterator
Change-Id: I5e971b57a0591752e7fca76d0df78ce139308db5
2012-10-02 09:19:37 -07:00
Diego Parrilla ff3060c067 Use full URI path from Glance endpoint in HTTP requests
Fixes bug 1052846

Now the connection uses host, port and path to connect to Glance. So proxied connections to Glance are allowed.

Change-Id: I53a890e6532adb8168961d1d09f938bf439e895c
2012-09-21 10:00:02 +02:00
Jenkins e140dbb0c7 Merge "Fixes glance add / update / image-create / image-update on Windows" 2012-09-18 20:44:58 +00:00
Stuart McLaren cdc94af297 Typo in image-create help page
The image-create help page reversed the DISK_FORMAT
and CONTAINER_FORMAT metavars.

Fixes bug 1051968.

Change-Id: I385cb0912ad87a62fd10742b5da23a5ea8bc9bb8
2012-09-17 13:43:08 +00:00
Alessandro Pilotti 91896ff518 Fixes glance add / update / image-create / image-update on Windows
Fixes Bug #1050345

The image upload hangs if the file contains a byte with value 0x1A (EOF), due to
the fact that the file or stdin streams are treated as text and not
binary streams. This fix sets the proper binary mode.

Change-Id: I3425cb9729a8da4d1b73fbfba06fd6f2c7e8833e
2012-09-13 19:09:11 +03:00
Vincent Untz 902bff79bb Fix weird "None" displayed on some errors
logging.exception() should only be called from an exception handler,
which is not the case here.

Part of bug 1050260.

Change-Id: I591a68c458cd733c04cea7d2d640afdbb7dd19f6
2012-09-13 11:12:00 +02:00
Andrew Laski 8cee48b1dd Make ConnectionRefused error more informative.
When the server refuses the connection the error message displayed now
lists the endpoint that refused the connection.

Fixes: bug 1043067
Change-Id: I62797106732bbb6eec8c99e491fd38850ad58ff8
2012-09-12 16:51:55 -04:00
Brian Waldon 3f67c461da Document remaining bug for v0.5.1
Change-Id: I97144b22e2040441e6507ff1810ab7a3da9b1ae2
2012-09-10 18:25:20 -07:00
Brian Waldon 522317784a Update docs for v0.5.1 release
Change-Id: I377caf14379ebffe3bbc70c67e9378fc0ebcea95
2012-09-10 16:53:32 -07:00
Jenkins 92d87c0f7c Merge "Specified Content-Length in update request header" 2012-09-10 23:38:06 +00:00
Jenkins ff972fb02f Merge "Catches HTTP 300 while printing responses" 2012-09-10 23:36:21 +00:00
Brian Rosmaita 2f1e0299e8 Corrects URI to display hostname, port properly
Fixes bug 1035931

Change-Id: I1b4e8a226c21d137b24bc5b75299bcf4ab4efefb
2012-09-10 19:27:54 +00:00
isethi 5acd5a6a4a Catches HTTP 300 while printing responses
If glance v1 api is not enabled, and a request is made to it,
it gives a KeyError. This patch catches the 300 error and
displays error message.

Fixes bug 1046607

Change-Id: I0009a5deca3b5dd5ccaeaea90feee21274bfe090
2012-09-10 16:22:45 +00:00
Stuart McLaren 61b359efa8 get_connection should raise httplib.InvalidURL
In http.py the exception raised in get_connection
should be httplib.InvalidURL rather than httplib.InvalidUrl.

Fix for bug 1048698.

Change-Id: I7f18321fe7d8669b3b95bf823273ee8ae6961661
2012-09-10 15:00:21 +00:00
Jenkins def324ec52 Merge "Fix PEP8 issues." 2012-09-10 15:20:46 +00:00
lrqrun 61567bad1e Fix PEP8 issues.
Fix some pep8 issues in doc/source/conf.py  make the code looks pretty.

Change-Id: I44f8152de76ae217d1dd81c9c0c1b1e075ec8792
2012-09-10 10:42:22 +08:00
Unmesh Gurjar 30d8e1b97c Specified Content-Length in update request header
While uploading a Volume to an image, the HTTPConnection's request method does
not set the Content-Length header (since the volume file is a sym link i.e. the
os.fstat call returns a st_size of 0). This causes Volume uploads to Glance
fail (since the image data is ignored as no content-length is specified).
Therefore setting the Content-Length from update( ) method if the image data is
provided.

Fixes LP: #1045824

Change-Id: If259fc5a338e3e90214a52b773132ed901691c0f
2012-09-06 00:41:08 -07:00
Mark McLoughlin 7402590255 Sync importutils changes from openstack-common
Syncs the following changes from stable/folsom:

 769ec65 Don't trap then re-raise ImportError.
 8c74b37 Improve exception from importutils.import_class().
 1fb2361 add import_object_ns function

Change-Id: Ib6046181ec4712702c30c8a8e938fc9a21b1a594
2012-09-05 12:57:30 +01:00
Jenkins e233f66ecd Merge "Add nosehtmloutput as a test dependency." 2012-08-22 00:52:33 +00:00
Brian Waldon 1e8cf7102f Update release notes for v0.5.0
Change-Id: Icc8e1d9a4a06448b27afe6e4bb0976eee20dcc83
2012-08-21 16:44:42 -07:00
Jenkins 01ec6d942d Merge "Update command descriptions" 2012-08-21 23:07:57 +00:00
Jenkins 575c591e4b Merge "Update pip-requires with warlock<2." 2012-08-21 23:07:23 +00:00
Jenkins 156e6f949d Merge "Enable client V1 to download images" 2012-08-21 23:06:30 +00:00
Clark Boylan df7b82d2f2 Add nosehtmloutput as a test dependency.
Adding nosehtmloutput as a test dependency allows nose to output its
results to an html file. This will be used by Jenkins to save logs on
a different server.

Change-Id: Ib7f07dbe7e81d17d42a191a664c7f844f58fcb94
2012-08-21 14:34:22 -07:00
Brian Waldon 5069d66d51 Update command descriptions
Several commands did not have descriptions or the descriptions
they had were insufficient. This adds mission descriptions
and fattens up those that were too lean.

Change-Id: I091ae70cdae5d3f72f273519d88873cb5392ba3b
2012-08-21 13:13:09 -07:00
Dan Prince 27350e50e0 Update pip-requires with warlock<2.
Allow warlock to be used up to version 2 (the next
major version of the library).

Change-Id: I0c5a47f9ebfa0145dfab7310a22982d5d8e9aa52
2012-08-17 11:50:33 -04:00
Lars Gellrich c24fc93142 Enable client V1 to download images
Added the CLI option image-download to download an image via API V1.
Based on commit 137b3cf975

Related to bp glance-client-v2

Change-Id: Ie587e208ad7433e468798cd9b1846b4a21e1c4ec
2012-08-16 14:25:08 +00:00