summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Updated from global requirementsliberty-eol1.1.2stable/libertyOpenStack Proposal Bot2016-07-141-1/+1
| | | | Change-Id: I39b5662f9fdc42eb1e209aaafbfbbb9346c6daea
* Add upper constraints to glanceclientNiall Bunting2016-06-212-1/+67
| | | | | | | | | | | | | | | | | | This will force pip install to use the upper-constraints.txt specified version of pip modules. When you don't do this, you are out on the bleeding edge and become unstable everytime some python library in the world changes in a way that you don't expect. The script is needed because it cleans up the conflicting entry that corresponds to the client before applying it to source based installation. NOTE(tonyb): Use the stable/liberty branch fof the upper-constraints.txt file Change-Id: I8f168fde04bf9e421d9a39e91a041512bf4f2b79 Closes-Bug: 1563038 cherry-picked from commit 8585bd60325e7d9b08aa6043afc00fb83d2b2356
* Get endpoint if os_image_url is not setNiall Bunting2016-05-242-17/+87
| | | | | | | | | | If env['OS_IMAGE_URL'] is not set then None is returned. This is then used ignoring the endpoint_type, service_type and region_name. This patch will use those values if the endpoint is None. Change-Id: I76cc527b05d2be75d3dbc33123a0d71be97fe25c Closes-bug: #1579768 (cherry picked from commit a862196cfb7f7323b1864b4c1660c39850487a64)
* Updated from global requirementsOpenStack Proposal Bot2016-05-151-1/+1
| | | | Change-Id: I0d11c4e88640ed9525d414a7903e9e625dab2458
* Updated from global requirementsOpenStack Proposal Bot2016-04-291-1/+1
| | | | Change-Id: Ie1688247137fed81eb563d799042de2049dac186
* Merge "Fix the download error when the image locations are blank" into ↵1.1.1Jenkins2016-03-093-2/+16
|\ | | | | | | stable/liberty
| * Fix the download error when the image locations are blankLong Quan Sha2016-03-093-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the image locations are blank, glance client will get a http response with no content, glance client should show user no data could be found, instead of processing the blank response body that will lead to exception. Glance client will also get a 204 response when an image is in a queued state (this is true for 'master' and liberty/kilo/juno based servers). Closes-Bug: #1472449 Co-Authored-by: Stuart McLaren <stuart.mclaren@hp.com> Change-Id: I5d3d02d6aa7c8dd054cd2933e15b4a26e91afea1 (cherry picked from commit 44d0b02c67ce7926f40377d9367a0f61124ed26d)
* | Merge "Use session when not specified token or endpoint" into stable/libertyJenkins2016-03-092-116/+94
|\ \
| * | Use session when not specified token or endpointDarja Shakhray2016-03-092-116/+94
| |/ | | | | | | | | | | | | | | | | | | | | When no token or endpoint, it creates a session and from there taken the necessary values. This commit proposes to transfer a session in such cases. This will avoid unnecessary actions and some of the problems. Change-Id: Idc874b6c01e915e52904604d59e8e0b460e71621 Partial-bug: #1519546 (cherry picked from commit bda34034eb74023ffb1edf4a0c26aa574da0926d)
* | Merge "Remove self from image-create/image-update" into stable/libertyJenkins2016-03-091-2/+3
|\ \
| * | Remove self from image-create/image-updateNiallBunting2016-03-091-2/+3
| |/ | | | | | | | | | | | | | | | | | | | | Self is not meant to exist as it is a READ ONLY property, that is not meant to exist as something the user can change. Backport for liberty. Closes-bug: 1496024 Change-Id: I28fd51a4cbef40fc7c90999fe8121611c7f89f21 (cherry picked from commit b396e73e73fa1c351d0a8fd106fe4e8d50379658)
* | Skip schema validation on GET /v2/images/%sNicolas Simonds2016-03-042-9/+6
|/ | | | | | | | | | | | | These are server-generated, not user-generated, and schema validation should not be necessary. Rework a unit test that enforces this; bad data should be blocked at ingest, not blocked on reads. Co-authored-by: Stuart McLaren <stuart.mclaren@hp.com> Change-Id: Ib1926fec0e858b6eed43c7931a6d6c3a1708e70e Closes-Bug: 1501046 (cherry picked from commit 214dbffc926bfe94145607d5f293734b81a1827d)
* Merge "Fix image-download to stdout on Python 3.x" into stable/libertyJenkins2016-01-191-1/+4
|\
| * Fix image-download to stdout on Python 3.xAndy Botting2015-12-221-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | Glance image-download to stdout fails on Python3 due to sys.stdout.write not allowing bytes to be written directly. A good description of the issue is listed at http://bugs.python.org/issue18512 Closes-Bug: #1528083 Change-Id: I2963914e2e0744410267b5735ff77939413916d4 (cherry picked from commit 3caeb4504e7f96130f904356bf45f93fcd7834c6)
* | Merge "Remove broken try/except workaround for old requests" into stable/libertyJenkins2015-12-241-5/+1
|\ \ | |/ |/|
| * Remove broken try/except workaround for old requestsMonty Taylor2015-12-151-5/+1
| | | | | | | | | | | | | | | | | | Not only is this code broken on the requests we require on distro-provided requests, it's not needed anymore. Remove it. Closes-bug: 1526254 Change-Id: I47a07bf9910f118392785fc20e015f036a2e8a7c
* | Updated from global requirementsOpenStack Proposal Bot2015-12-161-1/+1
|/ | | | Change-Id: I57a2c92a9cd33b44b49d83288b0921f39f8c379c
* Updated from global requirementsOpenStack Proposal Bot2015-11-241-1/+1
| | | | Change-Id: Ie5319a0923397472e585602a27756782eb4a63a0
* Fix the missing help descripiton of "image-create"wangxiyuan2015-11-121-0/+2
| | | | | | | | | Now, when use "glance help" to show the help message, the description of 'image-create' is missing. Change-Id: I748209222c540e0024580dccac850ea465d176b4 Closes-bug: #1510340 (cherry picked from commit dfcb468c1da3513d18da39969ef55bd22bc6685b)
* Updated from global requirementsOpenStack Proposal Bot2015-10-191-1/+1
| | | | Change-Id: I9765b0bbc478b3ab5edc288f643cd8120d50a27e
* Merge "Use the subcomand parsed args instead of the base" into stable/libertyJenkins2015-10-152-10/+28
|\
| * Use the subcomand parsed args instead of the baseFlavio Percoco2015-10-142-10/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass the subcomand's arguments instead of the base ones to the endpoint creation call when quering the `/versions` endpoint. Passing the wrong arguments will end in the auth_requirement not being identified and an error 'Expected Endpoint' will be raised as no endpoint will be gotten from keystone. This patch also removes an unnecessary mock in the test code related to this fix. Closes-bug: #1504058 Change-Id: I46088130b9175798e3719e43f48dc474fbc8a251 (cherry picked from commit 36937bbf6300a468f0eb1da5461c2edeb8d47a44)
* | Updated from global requirementsOpenStack Proposal Bot2015-10-131-1/+1
|/ | | | Change-Id: Ia7f8d1377732e75982713d0ef03d2e637cb46c5e
* Merge "Updated from global requirements" into stable/libertyJenkins2015-09-303-3/+3
|\
| * Updated from global requirementsOpenStack Proposal Bot2015-09-293-3/+3
| | | | | | | | Change-Id: Ia8ec9e5acd29df68e2689361aec8422026d62d43
* | Merge "Fix human readable when size is None" into stable/libertyJenkins2015-09-292-1/+4
|\ \ | |/ |/|
| * Fix human readable when size is NoneStuart McLaren2015-09-282-1/+4
| | | | | | | | | | | | | | | | If an image size is null don't stack trace when listing. Change-Id: Iba18470edbe032d1d01380372d57fa17adef5f7e Closes-bug: 1495632 (cherry picked from commit 3d3d8296c490caa4d1f3a0607818a9c2af752233)
* | Add check Identity validate when get schemasTakeaki Matsumoto2015-09-291-0/+3
|/ | | | | | | | | | | | | Glance client don't check Identity validate when get schemas. So when you exec "glance image-create" with invalid credentials in glance-api.conf, it returns "unrecognized arguments: --foo". It is difficult to debug such message. This change makes invalid credentials error clear. Change-Id: Ib641333cd8d51f459df70306a1eeda250ada5ca1 Closes-Bug: 1467719 (cherry picked from commit b9eee5ee3209f78c9e4e86bce896876c3dbcf247)
* No auth when token and endpoint are passedFlavio Percoco2015-09-252-11/+25
| | | | | | | | | | | | | | The latest change to the auth_required logic introduced a bug were even when the token and endpoint were passed, authentication was being required. This patch fixes that issue and makes sure that authentication is not required when these 2 arguements are present. Closes-bug: #1499540 Change-Id: I4c9c15ba526378970da5461511ed922d42c5a9f9 (cherry picked from commit c31c1365573d10bd09afad47ca1974af3e50b5eb)
* Don't get the image before deleting itFlavio Percoco2015-09-232-7/+6
| | | | | | | | | | | The client currently downloads the image metadata to check if it's deleted or not. This logic belongs to the server and it's already implemented there. Instead of getting the image, send the delete request and catch the 404 error, which is already raised by the server. Change-Id: I1e6ef42340f8e380ff99b9d6ca7ea416e0eebfbc Closes-bug: #1496305 (cherry picked from commit b8a881f5ea89514d715e61b632bc3081a0dde2c6)
* Update .gitreview for stable/libertyDoug Hellmann2015-09-211-0/+1
| | | | Change-Id: I42c88f604bfcee49b151777528d5ce718e14a435
* Change next version in docs1.1.0Erno Kuvaja2015-09-141-1/+1
| | | | | | | As stated by Doug we need to release 1.1.0 instead of 1.0.1 https://review.openstack.org/#/c/222716/ Change-Id: Ifb24361a1d5a5270c6b3173ba28409addfec19b0
* Merge "Fix the remove property logic in V2"Jenkins2015-09-141-1/+1
|\
| * Fix the remove property logic in V2Cindy Pallares2015-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | The check used to verify if there are any properties to remove in the V2 image-update command will always execute even if there are no properties to remove due to the fact that it checks if remove_prop is not None, when it is actually a list and not a None value. Closes-Bug: #1475053 Change-Id: Ia36e945b880de3514c73073a392bdb7dde13cf84
* | Merge "1.0.1 Release notes"Jenkins2015-09-111-0/+26
|\ \
| * | 1.0.1 Release notesErno Kuvaja2015-09-111-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f6712f5 Print the reverting back to v1 to stderr 2c7da7c Invalid output running the command 'glance image-show <image_id>' 5026774 Don't make `help` require auth parameters 75ec903 check for None value in utils.safe_header f0b30f4 Updated from global requirements 1322fbc Consider `--os-token` when using v2 47423eb Check if v2 is available and fallback 90b7dc4 Update path to subunit2html in post_test_hook 1e2274a Password should be prompted once Change-Id: I70329b9596421a4d8c0c953c19759a96f29c8b0d
* | | Merge "Fixes CLI client called without subcommands"Jenkins2015-09-112-2/+10
|\ \ \
| * | | Fixes CLI client called without subcommandsErno Kuvaja2015-09-112-2/+10
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If CLI client is called without any subcommands or arguments it will fail with """'Namespace' object has no attribute 'command'""". This is coming from the getattr which does not have alternate value specified. Closes-Bug: #1494259 Change-Id: I461f0d4a91f3af2224bafc14a88572a8e4a3c051
* | | Merge "Updates default --sort behaviour"Jenkins2015-09-101-3/+4
|\ \ \ | |/ / |/| |
| * | Updates default --sort behaviourJake Yip2015-09-091-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When querying against a Juno glance-registry, we found that having the --sort option defaulting to 'name:asc" results in querying the registry with additional SQL parameters like the following: WHERE image_properties_2.name = :name_1 AND image_properties_2.value = :value_1 as a result of handling the newer 'sort' filter. This results in a blank list being returned as the output of glance image-list. This patch sets the --sort-key and --sort-dir instead of --sort when neither --sort-key nor --sort-dir are specified, so as to maintain backwards compatibility with Juno glance-registry. Change-Id: I8bd64cca7f1b7abdbabf4c09e3dbbcb4044e51b4 Closes-bug: #1492887
* | | Merge "Invalid output running the command 'glance image-show <image_id>'"Jenkins2015-09-101-0/+5
|\ \ \
| * | | Invalid output running the command 'glance image-show <image_id>'David Sariel2015-09-091-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Running the command returns the string 'id' and fails on exception. In function _image_meta_from_headers the meta variable was not properly set because key was not lowercased. Converting key to lowercase solves the problem. NOTE: this is a compatibility fix for urllib3 >= 1.11 Closes-Bug: #1487645 Co-Authored-by: Flavio Percoco <flavio@redhat.com> Change-Id: I1b0b327163577585becb5e762536058d21dc1c98
* | | | Print the reverting back to v1 to stderrErno Kuvaja2015-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Printing to stderr to fix the download issue. Change-Id: I2916bb100ac451378db82291855078f2b37466bd Closes-Bug: #1488914
* | | | Don't make `help` require auth parametersFlavio Percoco2015-09-092-40/+56
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `help` command was behaving a bit funky. This patch re-orders the code a bit so that the `help` command will be parsed at the very beginning before running other commands and checks. It also allows to get help without downloading/checking schemas and without requiring auth credentials (previously required by the schema operations). Change-Id: Ib7b10d4d80f15e6b75bb8644d7d916bef09413d6 Closes-bug: #1490457
* | | Merge "Consider `--os-token` when using v2"Jenkins2015-09-083-32/+40
|\ \ \
| * | | Consider `--os-token` when using v2Flavio Percoco2015-09-043-32/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `_cache_schemas` call currently forces authentication even when the `auth_token` and `os_image_url` are passed. Instead of handling forced authentications, let the client use the passed arguments and authenticate only once if needed. This was not caught by the existing tests because the call to `_cache_schemas` was mocked. Change-Id: I93cec9a68cafc0992d14dab38114d03e25f1e5da Closes-bug: #1490462
* | | | Merge "Check if v2 is available and fallback"Jenkins2015-09-084-21/+70
|\ \ \ \ | |/ / / | | / / | |/ / |/| |
| * | Check if v2 is available and fallbackFlavio Percoco2015-09-044-21/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have a basic implementation for a fallback mechanism that will use v1 rather than v2 when downloading schema files from glance-api fails. However, this is not sound. If the schemas are cached already, we won't check if v2 is available and fail to fallback. This patch fixes the aforementioned issue by getting the list of available versions from the server only when the API versions was not explicitly specified through the CLI. That is, for all commands that don't pass `--os-image-api-version 2`, we'll check v2's availability and we'll fallback to v1 if it isn't available. This patch also changes how we handle `/versions` calls in the client. The server has been, incorrectly, replying to requests to `/version` with a 300 error, which ended up in the client re-raising such exception. While I think 300 shouldn't raise an exception, I think we should handle that in a spearate patch. Therefore, this patch just avoids raising such exception when `/version` is explicitly called. This fallback behaviour and the check on `/versions` will be removed in future versions of the client. The later depends on this bug[0] being fixed. [0] https://bugs.launchpad.net/glance/+bug/1491350 Closes-bug: #1489381 Change-Id: Ibeba6bc86db2a97b8a2b4bd042248464cd792e5e
* | | Merge "check for None value in utils.safe_header"Jenkins2015-09-082-1/+16
|\ \ \
| * | | check for None value in utils.safe_headerDavid Edery2015-09-082-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case that a sensetive header (that should be obscured by its SHA1 hash) is None, the safe_header throws an exception which fails the calling process and by that may harm the functionality. Change-Id: I56944a382fd546eba0a6dd6d6b1cecf83b1dc106 Closes-Bug: #1491311