summaryrefslogtreecommitdiff
path: root/glanceclient/v1/client.py
Commit message (Collapse)AuthorAgeFilesLines
* Add versions list functionwangxiyuan2015-11-101-0/+2
| | | | | | | | | This patch add a function to query the Glance API versions. DocImpact Change-Id: I21eeaee3db4ae23f608b68bb319772ac612975b4 Closes-bug: #1511180
* Add support for setting Accept-Language headerFrode Nordahl2015-10-141-0/+2
| | | | | | DocImpact Closes-Bug: 1480529 Change-Id: I35a37d55edb700a5993bd5cc352335a87a15e47a
* Import only modules and update tox.iniCindy Pallares2015-06-171-4/+4
| | | | | | | | | As stated in the OpenStack Hacking Guidelines, it is prefered that only modules should be imported. Also updated tox.ini to ignore opestack/common among others. Change-Id: I2f0a603c31052eadee581c11880c0ec6bd392829
* Make glanceclient accept a session objectJamie Lennox2015-06-111-4/+3
| | | | | | | | | | | To make this work we create a different HTTPClient that extends the basic keystoneclient Adapter. The Adapter is a standard set of parameters that all clients should know how to use like region_name and user_agent. We extend this with the glance specific response manipulation like loading and sending iterables. Implements: bp session-objects Change-Id: Ie8eb4bbf7d1a037099a6d4b272cab70525fbfc85
* Don't accept *args for clientJamie Lennox2015-03-281-2/+2
| | | | | | | The HTTPClient object that we are passing *args to does not accept any args. Don't accept them from the main client interface. Change-Id: I473bb64be95e058375ebd1e55d4bda4168c3c430
* Don't require version to create Client instanceFlavio Percoco2014-12-091-3/+4
| | | | | | | | | | | | | | | | | | We currently require a version to always be passed to discover the client version that should be loaded. However, this information is commonly present in the URL instead. The current behavior forces consumers of the library to keep the required version around and/or to strip it themselves from the URL. This patch relaxes that requirement by making the version a keyword and requesting instead an endpoint to be passed. The patch gives priority to the version in the endpoint and falls back to the keyword if the later is not present. Follow-up patches will improve this code making it interact a bit more with the endpoint's catalog. Closes-bug: #1395714 Change-Id: I4ada9e724ac4709429e502b5a006604ca0453f61
* Replace old httpclient with requestsAmalaBasha2014-07-101-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This review implements blueprint python-request and replaces the old http client implementation in favor of a new one based on python-requests. Major changes: * raw_request and json_request removed since everything is now being handled by the same method "_request" * New methods that match HTTP's methods were added: - get - put - post - head - patch - delete * Content-Type is now being "inferred" based on the data being sent: - if it is file-like object it chunks the request - if it is a python type not instance of basestring then it'll try to serialize it to json - Every other case will keep the incoming content-type and will send the data as is. * Glanceclient's HTTPSConnection implementation will be used if no-compression flag is set to True. Co-Author: Flavio Percoco<flaper87@gmail.com> Change-Id: I09f70eee3e2777f52ce040296015d41649c2586a
* Handle endpoints with versions consistentlyStuart McLaren2014-01-221-2/+4
| | | | | | | | | | | | | | | | | When using the cli the Glance client wraps the endpoint in a 'strip version' function. This means that endpoints of the following forms can both be used: https://region-x.images.example.com:443/v1 https://region-x.images.example.com:443 When calling the client library directly (as Ceilometer does) however only endpoints of the second form work. The cli and library should handle the two cases consistently. Addresses bug 1243276. Change-Id: Ice7b581fee32540a7057ba47433a10166a3caed2
* Merge "Fix and enable gating on H306"Jenkins2013-12-231-1/+1
|\
| * Fix and enable gating on H306Dirk Mueller2013-12-161-1/+1
| | | | | | | | | | | | H306 - module imports should be in alphabetical order Change-Id: I1f8fc25b0e6ca23c21c90bda420f42a45141c2e2
* | Replace inheritance hierarchy with compositionAndrey Kurilin2013-12-091-4/+4
|/ | | | | | | | | In the process of unification of the clients code we should use composition to allow easier replacement with common HTTPClient. Related to blueprint common-client-library-2 Change-Id: I5addc38eb2e2dd0be91b566fda7c0d81787ffa75
* Replace OpenStack LLC with OpenStack FoundationZhiQiang Fan2013-09-201-1/+1
| | | | | Change-Id: I38dcbcf1a6c8efe540fcf5f29e782cb3826e583d Fixes-Bug: #1214176
* Start using Pyflakes and HackingDirk Mueller2013-06-221-1/+1
| | | | | | | | | | Instead of globally ignoring pyflakes and hacking warnings, only blacklist those that trigger very frequently so far, in order to clean them up in followup commits. Fix and start gating on the rest already. Change-Id: Ied7c7250061e3bf379e8286e8ce3b9e4af817faf
* SSL Certificate ValidationBrian Waldon2012-08-041-3/+2
| | | | | | | | | | | 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
* Refactor http request/response loggingBrian Waldon2012-07-291-5/+0
| | | | | | | | | | Using the --debug flag or the GLANCECLIENT_DEBUG env var, a user will see http requests and responses in great detail. Requests are formed into proper curl commands while responses are printed just as they would as if the curl request provided were executed. Response bodies will not be printed if they are application/octet-stream. Change-Id: I9c9c5d6ec9f481091c944e596d073da3739795b6
* Adds support for --insecure.Michael Basnight2012-05-241-2/+3
| | | | | | fixes lp#1004281. Change-Id: I464e39515a7172bfb72921a92f46d31baac466d8
* Image members bonesBrian Waldon2012-04-021-0/+2
|
* Basic get/list operations workBrian Waldon2012-03-261-0/+38
* 'glance image-list' and 'glance image-show' work * Set up tests, pep8, venv