summaryrefslogtreecommitdiff
path: root/glanceclient
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Simplify human-readable size output"Jenkins2012-11-191-2/+5
|\
| * Simplify human-readable size outputBrian Waldon2012-11-191-2/+5
| | | | | | | | | | | | | | | | * Limit human-readable sizes to a single decimal * Drop trailing zero * Step one suffix further in the case of a size being 1024 Change-Id: I2eb8ac0571d3d08b52f62155912863870573a37c
* | Merge "Make image sizes more readable for humans"Jenkins2012-11-192-4/+34
|\ \ | |/
| * Make image sizes more readable for humansChristian Berendt2012-11-192-4/+34
| | | | | | | | | | | | | | | | | | 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
* | Merge "Set useful boolean flag metavars"Jenkins2012-11-191-4/+4
|\ \
| * | Set useful boolean flag metavarsBrian Waldon2012-11-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "added --version as new parameter"Jenkins2012-11-193-23/+23
|\ \ \ | |/ / |/| |
| * | added --version as new parameterChristian Berendt2012-11-133-23/+23
| |/ | | | | | | | | fixes bug 1056504 Change-Id: Ib28e3941006b46553001d7895d5ddf4b0f9c540d
* | Merge "Fixes bug on Windows related to a wrong API url"Jenkins2012-11-151-2/+2
|\ \
| * | Fixes bug on Windows related to a wrong API urlAlessandro Pilotti2012-11-151-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Enhance --checksum help with algorithmAndre Naehring2012-11-141-1/+2
|/ | | | | | | | | 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
* Fixes setup compatibility issue on WindowsAlessandro Pilotti2012-11-052-47/+61
| | | | | | | | | | | 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
* Merge "Allow deletion of multiple images through CLI"Jenkins2012-10-251-3/+18
|\
| * Allow deletion of multiple images through CLISulochan Acharya2012-10-241-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Fixes shell command for member-deleteSulochan Acharya2012-10-231-5/+5
|/ | | | | | | | Fixes the member-delete cli command and string formatting for dry-run option. Fixes bug1064320 Change-Id: I338f03d53da5c9b7656ae4d1335de9623b774dd8
* Merge "Display acceptable disk/container formats in help text"Jenkins2012-10-131-6/+12
|\
| * Display acceptable disk/container formats in help textBrian Waldon2012-10-041-6/+12
| | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Handle create/update of images with unknown size"Jenkins2012-10-133-14/+43
|\ \
| * | Handle create/update of images with unknown sizeStuart McLaren2012-10-083-14/+43
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Implement blueprint ssl-connect-reworkStuart McLaren2012-10-083-48/+97
|/ | | | | | | | | | | | | | | | | 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
* Simplify http(s) connection instantiationBrian Waldon2012-10-031-19/+29
| | | | | | | | | | | 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
* Use full URI path from Glance endpoint in HTTP requestsDiego Parrilla2012-09-211-2/+4
| | | | | | | | 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
* Merge "Fixes glance add / update / image-create / image-update on Windows"Jenkins2012-09-181-10/+18
|\
| * Fixes glance add / update / image-create / image-update on WindowsAlessandro Pilotti2012-09-131-10/+18
| | | | | | | | | | | | | | | | | | | | 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
* | Typo in image-create help pageStuart McLaren2012-09-171-2/+2
| | | | | | | | | | | | | | | | | | The image-create help page reversed the DISK_FORMAT and CONTAINER_FORMAT metavars. Fixes bug 1051968. Change-Id: I385cb0912ad87a62fd10742b5da23a5ea8bc9bb8
* | Fix weird "None" displayed on some errorsVincent Untz2012-09-131-1/+1
|/ | | | | | | | | logging.exception() should only be called from an exception handler, which is not the case here. Part of bug 1050260. Change-Id: I591a68c458cd733c04cea7d2d640afdbb7dd19f6
* Make ConnectionRefused error more informative.Andrew Laski2012-09-121-1/+2
| | | | | | | | When the server refuses the connection the error message displayed now lists the endpoint that refused the connection. Fixes: bug 1043067 Change-Id: I62797106732bbb6eec8c99e491fd38850ad58ff8
* Merge "Specified Content-Length in update request header"Jenkins2012-09-101-2/+2
|\
| * Specified Content-Length in update request headerUnmesh Gurjar2012-09-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Catches HTTP 300 while printing responses"Jenkins2012-09-102-0/+12
|\ \
| * | Catches HTTP 300 while printing responsesisethi2012-09-102-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Corrects URI to display hostname, port properlyBrian Rosmaita2012-09-101-4/+7
|/ / | | | | | | | | | | Fixes bug 1035931 Change-Id: I1b4e8a226c21d137b24bc5b75299bcf4ab4efefb
* | get_connection should raise httplib.InvalidURLStuart McLaren2012-09-101-1/+1
|/ | | | | | | | | In http.py the exception raised in get_connection should be httplib.InvalidURL rather than httplib.InvalidUrl. Fix for bug 1048698. Change-Id: I7f18321fe7d8669b3b95bf823273ee8ae6961661
* Sync importutils changes from openstack-commonMark McLoughlin2012-09-051-2/+17
| | | | | | | | | | 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
* Merge "Update command descriptions"Jenkins2012-08-213-2/+8
|\
| * Update command descriptionsBrian Waldon2012-08-213-2/+8
| | | | | | | | | | | | | | | | 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
* | Enable client V1 to download imagesLars Gellrich2012-08-161-0/+11
|/ | | | | | | | | Added the CLI option image-download to download an image via API V1. Based on commit 137b3cf975d73437943e100065c76b83acfa7dd3 Related to bp glance-client-v2 Change-Id: Ie587e208ad7433e468798cd9b1846b4a21e1c4ec
* Ensure v1 'limit' query parameter works correctly.0.4.2Brian Lamar2012-08-151-2/+4
| | | | | | | | | | | The tests were present but were not asserting list results. page_size was overriding the absolute limit so limits were not working if they were less than the page_size. Fixes bug 1037233 Change-Id: If102824212e3846bc65d3f7928cf7aa2e48aaa63
* Allow 'deleted' to be passed through image update0.4.1Brian Waldon2012-08-131-1/+5
| | | | | | | | | | The legacy client allowed users to pass 'deleted' through an update call. This is breaking some clients of this library because they expect to be be able to still do that. Fixes bug 1036315 Change-Id: I9ae20a5e4579240c7d5e86316d6d1e927755dbf5
* Cast is_public, protected, deleted to boolBrian Waldon2012-08-131-0/+5
| | | | | | | | | To keep a consistent view of an image, is_public, protected, and deleted need to be cast to a bool when being parsed from headers. Fix bug 1036299 Change-Id: I2730a0f2d705d26ebc0ba883e99c1caf44d70b51
* Return known int values as int, not strBrian Waldon2012-08-131-5/+15
| | | | | | | | | Cast size, min_ram, min_disk to integers before returning them to the user from the v1 API. Fixes bug 1036297 Change-Id: Ib1e2a3bf931e433b6311cc8a1a5219168b50be97
* Use system CA certificate fileStuart McLaren2012-08-132-3/+22
| | | | | | | | When SSL is being used and the --ca-file option is not specified use an available system CA file to verify the server's certificate. Change-Id: Id5c9fda6fd9bd05cde3c2a9160a6e72cef086a44
* socket errors and timeouts should be CommunicationErrors0.4.0Chris Behrens2012-08-101-6/+6
| | | | | | Also include extra information about socket errors within the exceptions. Change-Id: I9464a484460d40be5727e18ca6f057df9076766e
* Handle communication failures cleanlyBrian Waldon2012-08-102-9/+31
| | | | | | | | | | Expand exceptions to cover more failures cases. This adds CommunicationFailure to represent any failures while attempting to communicate with the remote endpoint. This also adds a new base exception class BaseException which should be used for all non-HTTP related failures. Change-Id: Ie3e1d45c520d816a3f491a85fde94a6c4edf295e
* Merge "Client-side SSL Connection"Jenkins2012-08-102-0/+30
|\
| * Client-side SSL ConnectionBrian Waldon2012-08-042-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | This allows a user to pass a cert and a key to use in HTTPS connections. The flags --cert-file and --key-file are added to the CLI. Addiionally, update the debug curl logging to print --cacert and -k when ca_file and insecure are set. Related to bp glance-client-parity. Change-Id: Ibaea51419a903afb7939a6b5b848f7a6667893bf
* | Merge "SSL Certificate Validation"Jenkins2012-08-104-25/+86
|\ \ | |/
| * SSL Certificate ValidationBrian Waldon2012-08-044-25/+86
| | | | | | | | | | | | | | | | | | | | | | This adds support for validation of ssl certs returned by remote servers over SSL. The --ca-file param represents the CA cert used to sign the remote server's cert. Use --insecure if the remote server is using a self-signed cert or you don't have the CA cert. Related to bp glance-client-parity Change-Id: I45253a6e2d88da599addfcc464571e62ae920166
* | Enable client V2 to download imagesLars Gellrich2012-08-094-5/+77
| | | | | | | | | | | | | | | | | | | | Added the CLI option image-download to download an image via API V2. Added utility function to save an image. Added common iterator to validate the checksum. Related to bp glance-client-v2 Change-Id: I0247f5a3462142dc5e9f3dc16cbe00c8e3d42f42
* | Refactor HTTP-related exceptionsBrian Waldon2012-08-081-88/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Refactor helper function that builds the map of http status codes to local http exceptions - now we don't have to explicitly list every single exception name * Add several exceptions to represent http status codes that were not previously represented * Improve consistency of exceptions naming by prepending 'HTTP' to necessary exception names * Use HTTPException instead of ClientException * Deprecate old http exceptions (those that aren't prefixed with HTTP) * Deprecate ClientException * Deprecate unused NoTokenLookupException and EndpointNotFound * Add test module to spot-check the from_response helper Change-Id: Ibc7fef9e2a5b24bd001d183d377901f302d650a9