summaryrefslogtreecommitdiff
path: root/glanceclient
Commit message (Collapse)AuthorAgeFilesLines
* Rename --backend to --storeAbhishek Kekane2019-05-142-43/+43
| | | | | | | | As a part of vocabulary correction renamed --backend parameter to --store. Modfied corresponding tests as well. bp:multi-store-vocabulary-correction Change-Id: I3dc115f5f0f3c4edcca0209e139aa3d1d816357c
* Merge "Embed validation data when adding location"Zuul2019-03-073-10/+34
|\
| * Embed validation data when adding locationimacdonn2018-10-243-10/+34
| | | | | | | | | | | | | | | | Add support for embedding of checksum, os_hash_algo and os_hash_value when adding a location to an image. Depends-On: https://review.openstack.org/597648 Change-Id: Ibbe2f2bb226f52cc6b2ab591913b1797d2b086c0
* | Remove redundant information from error messagebhagyashris2019-03-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently user get redundant HTTP error code in error message. Removed redundant HTTP error code from the message. For Example: Error message display when user trying to get the non existing image: $ glance image-show f433471a-53a8-4d31-bf8f-f0b6b594dfc Error message: 404 Not Found: No image found with ID f433471a-53a8-4d31-bf8f-f0b6b594dfc (HTTP 404) After this fix: HTTP 404 Not Found: No image found with ID f433471a-53a8-4d31-bf8f-f0b6b594dfc Closes-Bug: #1598714 Change-Id: I33971a2a16416c8538158299325471c2a69dbb3e
* | Add image-list filter for multihashBrian Rosmaita2019-01-173-1/+72
| | | | | | | | | | | | | | | | | | | | | | This was missed when multihash support was added to the glanceclient. The os_hash_value is an indexed field in the API. Includes a release note. Closes-bug: #1788271 Change-Id: Ibfe28b8c644967b7e0295dfd3f55c3ae1b0cbb2d
* | Merge "Show the backend store info"2.15.0Zuul2018-11-152-0/+92
|\ \
| * | Show the backend store infoLiang Fang2018-11-082-0/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running "glance -v image-list" there's no store info listed, so user cannot know the type of the backend. This patch added an new option "--include-stores" and is to add the store id to the output of "glance image-list --include-stores". The final output may like: +-----+------+-------------+-----+----------+--------+-----+------+ | ID | Name | Disk_format | ... | Size | Status |Owner|Stores| +-----+------+-------------+-----+----------+--------+-----+------+ | xxx | img1 | raw | ... | 10737418 | active | xxx | ceph | | xxx | img2 | raw | ... | 5086345 | active | xxx | file | +-----+------+-------------+-----+----------+--------+-----+------+ Change-Id: If86ef714c3aa03ce43ef29f26892f431f4766560 Co-authored-by: Jack Ding <jack.ding@windriver.com> Signed-off-by: Liang Fang <liang.a.fang@intel.com>
* | | Don't quote colon in HTTP headersimacdonn2018-11-012-2/+12
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the introduction of quoting of header content in https://review.openstack.org/568698, the 'x-image-meta-location' header has been broken, because urllib.quote() is really intended to be applied to only the path section of a URL, but in this case, it gets applied to the entire URL, and catches the colon that separates the scheme from the remainder of the URL. This change adds the colon to the list of characters that should not get quoted. Since a colon can be directly represented in ASCII, this should not invalidate the previous change. Change-Id: I76a1c9a361b6c9f6eb95ae766b8c3bcf2267703a Closes-Bug: #1788942
* | Use "multihash" for data download validationBrian Rosmaita2018-09-077-24/+353
|/ | | | | | | | | | | | When the Glance "multihash" is available on an image, the glanceclient should use it instead of MD5 to validate data downloads. For cases in which the multihash specifies an algorithm not available to the client, an option is added to the image-download command that will allow fallback to the legacy MD5 checksum verification. Change-Id: I4ee6e5071eca08d3bbedceda2acc170e7ed21a6b Closes-bug: #1788323
* Skip quote '=' for token headerwangxiyuan2018-07-262-4/+5
| | | | | | | | | | If the token is encoded by base64, it may contain '=' char as well. We should skip quoting it. Change-Id: I1ca63d251fa366f0e8e58128d45b729a2489b65c Partial-Bug: #1783290
* Merge "Do not quote '+' for token header"Zuul2018-07-252-13/+18
|\
| * Do not quote '+' for token headerwangxiyuan2018-07-252-13/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The token in request header may contain url char, such as '+', if quote it, '+' will change to '%2B' which will lead to 401 error. Our CI doesn't notice this bug because Keystone use fernet token which doesn't contain url char by default. But token format in keystone is plugable, some out-tree token formats may contain url char (for example, PKI/PKIZ token). So we should skip quote token to avoiding information changing. Closes-bug: #1783290 Change-Id: I5aa71b3e2b9b19581e46ccf8a80eda5d637f17d1
* | Add support for hide old imagesAbhishek Kekane2018-07-253-15/+171
|/ | | | | | | | Added --hidden argument to list, create and update call. Related to blueprint hidden-images Change-Id: I1f2dcaa545c9da883186b20a96a70c7df994b994
* Merge "Unit tests for multi-store support"Zuul2018-07-251-0/+232
|\
| * Unit tests for multi-store supportAbhishek Kekane2018-07-241-0/+232
| | | | | | | | | | | | Related to blueprint multi-store Change-Id: Ib22cc5fd4eee0326c307abb236ef31a39edfa6a6
* | Merge "Add multi-store support"Zuul2018-07-253-11/+113
|\ \ | |/
| * Add multi-store supportAbhishek Kekane2018-07-243-11/+113
| | | | | | | | | | | | | | | | | | | | | | | | Added multi-store support. User can now use '--backend' option to pass desired store while creating, uploading or importing image to speific store backend. Added new command 'stores-info' which will return available stores information to the user. Related to blueprint multi-store Change-Id: I7370094fc4ed47205b5a86a18b22aaa7b9457e5b
* | Merge "Add support for multihash"Zuul2018-07-243-3/+95
|\ \
| * | Add support for multihashAbhishek Kekane2018-07-233-3/+95
| |/ | | | | | | | | | | Related to blueprint multihash Change-Id: Iff4a5fe224b5d47255d7f23f65bbc08468f47f02
* | image-list: add checksum algorithm descriptionChen Hanxiao2018-07-241-1/+1
|/ | | | | | | | We use MD5 for checksum, add this description in cli helps. Change-Id: I3469b0dface63f4684ad39421eee4c2a2de4d80b Signed-off-by: Chen Hanxiao <chenhx@certusnet.com.cn>
* Replace 'raise StopIteration' with 'return'Dougal Matthews2018-06-291-1/+1
| | | | | | | | | | With PEP 479, the behaviour of StopIteration is changing. Raising it to stop a generator is considered incorrect and from Python 3.7 this will cause a RuntimeError. The PEP recommends using the return statement. More details: https://www.python.org/dev/peps/pep-0479/#examples-of-breakage Change-Id: Ia067940066a5666926dcf61136b03d721a87666e
* update shell tests to not rely on the serialization order of a dictDoug Hellmann2018-06-071-8/+8
| | | | | | | | | Under python 3 with ordering randomized we cannot depend on the JSON output matching exactly. Instead we de-serialize the data structure that was written and compare the structures, which will always match. Change-Id: I134b62413a7cde25f3efda6a2452c1e3d11d41d0 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
* Image show: print human readable string when the virtual size is unknownCyril Roelandt2018-05-312-0/+40
| | | | | | | | | Currently, when the virtual size of an image is not known, "None" is displayed. To a regular user, it feels like a programming error. We try and make things clearer by using a "human readable" string instead. Change-Id: Id7b8799356857d9bc58cc8a3677024fe1a7f4f56 Partial-Bug: #1665037
* Merge "Removes unicode 'u' response from "glance image-tag-update""Zuul2018-05-182-0/+67
|\
| * Removes unicode 'u' response from "glance image-tag-update"Abijitha Nadagouda2018-02-022-0/+67
| | | | | | | | | | | | | | | | | | | | | | "glance image-tag-update" command returns unicoded response for lists. Therefore it requires print_list method from util class to handle such case. Added unicode_key_value_to_string() method to remove extra 'u' from lists and dictionaries. This fix is inspired from cinderclient's implementation. Change-Id: I16a04e8d34f7629f72fe389456001ca1db9335ea Closes-bug: #1534046
* | Handle HTTP headers per RFC 8187Brian Rosmaita2018-05-172-5/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to RFC 8187, HTTP headers should use 7-bit ASCII encoding. The glanceclient was encoding them as UTF-8, which can leave the 8th bit nonzero when representing unicode, and which presents problems for any recipient following the standard and decoding the headers as ASCII. This change requires keystoneauth1 3.6.2, which has a fix for a bug that made it unable to handle bytes in headers. The dependency is a patch bumping the keystoneauth1 version in upper-constraints. Depends-on: https://review.openstack.org/#/c/569138/ Change-Id: I0d14974126fcb20e23a37347f4f1756c323cf2f5 Closes-bug: #1766235
* | Merge "Split glanceclient functional tests"Zuul2018-04-126-16/+75
|\ \
| * | Split glanceclient functional testsBrian Rosmaita2018-03-286-16/+75
| |/ | | | | | | | | | | | | | | | | | | | | | | Prepare for the Image API v1 to be removed from glance during Rocky by splitting the functional tests that hit v1 from the tests that hit v2. Introduce a new job that runs the functional-v1 tests against a devstack running glance stable/queens, and configure this job for both check and gate for the glanceclient. The v2 functional tests continue to be run for both check and gate against a devstack running glance master. Change-Id: Ifa98ada26a84e4cca3ea8c98173f61a6174cca27
* | Merge "Update local copy of image schema for 2.6"Zuul2018-04-112-2/+6
|\ \
| * | Update local copy of image schema for 2.6Brian Rosmaita2018-04-082-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | Update the local copy of the image schema to reflect Image API 2.6. Change-Id: Ib0e56027927880d0fa198ffd8ea4b57e39f9d0fe Closes-bug: #1762044 Depends-on: https://review.openstack.org/#/c/559501/
* | | Merge "Make image-import fail faster"Zuul2018-04-092-18/+240
|\ \ \
| * | | Make image-import fail fasterBrian Rosmaita2018-04-042-18/+240
| |/ / | | | | | | | | | | | | | | | | | | | | | Add checks to image-import command so that it provides better user feedback in failure situations. Change-Id: I8b6b32c3d1d1a745aa68ff8dc629419dff9bb130 Closes-bug: #1758718
* | | Merge "Fix python 3.6 escape char warning"Zuul2018-04-091-1/+1
|\ \ \ | |/ / |/| |
| * | Fix python 3.6 escape char warningEric Harney2017-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | In python 3.6, escape sequences that are not recognized in string literals issue DeprecationWarnings. Convert these to raw strings. Change-Id: I508a9147b932e219069eeee756bcbc43c7e961c5
* | | Make image-create-via-import fail fasterBrian Rosmaita2018-04-042-36/+545
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add checks to the image-create-via-import commmand so that it provides better user feedback and doesn't begin the import workflow unless the input has a chance of succeeding. Preserves backward compatibility with the current image-create command by (1) allowing an image record only to be created when no import-method is specified AND no data is supplied, and (2) doing the glance-direct workflow when no import- method is specified AND data is provided. Also adds the ability for the import-method to be set as an env var OS_IMAGE_IMPORT_METHOD. Change-Id: I0a225f5471a9311217b5d90ebb5fd415c369129a Closes-bug: #1758149
* | | Fix intermittent v2 shell unit test failuresBrian Rosmaita2018-03-291-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The do_image_download code has a check to make sure that there's a place to put the data (either filename or stdout redirect) before initiating the download. The location of this check was moved by change I841bebeda38814235079429eca0b1e5fd2f04dae to happen at the beginning of the function. The two intermittently failing tests do not explicitly address the check condition, and as a result the tests do exit early, but before they can check what they're supposed to be testing. Closes-bug: #1759951 Change-Id: I3c85bb358f669504b364d55618c21382b7a2a66b
* | | Merge "Remove usage of ordereddict"Zuul2018-03-261-4/+1
|\ \ \
| * | | Remove usage of ordereddictDirk Mueller2018-03-081-4/+1
| | |/ | |/| | | | | | | | | | | | | | | | This was only needed for Python < 2.7, but glanceclient's setup.cfg already declares compatibility only with 2.7. Change-Id: I80d42abf5dd5565da424a90a93545ba82ef7a58d
* | | Merge "Update properties URL"Zuul2018-03-221-1/+1
|\ \ \
| * | | Update properties URLBrian Rosmaita2018-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Help text for some image properties (architecture, os_distro) is pulled from the glanceclient's local version of the image schema. The URL for those property definitions has gotten out of sync with Glance. This patch updates the URL to be the same as that given in the Glance image-schema response. Change-Id: I4e46e78525fe5c00e031a98c47cacc17e5693d53 Closes-bug: #1757918
* | | | Check for container,disk_format on web-downloadBrian Rosmaita2018-03-222-1/+41
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | Fail image-create-via-import requests for the web-download import method that don't include values for container_format or disk_format. Closes-bug: #1757927 Change-Id: Ic5c81916823ff32f2dbddd32b40e825de0697dc9
* | | Add support for web-download import methodPranaliD2018-03-215-6/+83
|/ / | | | | | | | | | | | | | | | | | | | | | | | | This change adds support for 'web-download' import method to 'image-import' and 'create-image-via-import' call. To use this 'web-download' import method, user needs to pass --uri option 'a valid uri to external image to import in glance' to 'image-import' and 'create-image-via-imaport' calls. Co-authored-by: Pranali Deore <pdeore@redhat.com> Co-authored-by: Erno Kuvaja <jokke@usr.fi> Change-Id: I0e1d18844f64723608288de473e97710798eb602
* | Remove deprecated ssl optionsRui Yuan Dou2018-01-172-23/+0
| | | | | | | | | | | | | | | | Old deprecated ssl options block the new keystoneauth parser get the correct value, should be removed. Change-Id: Ie080f9a8fa7f4407b1fcbb7fb7c763152c5ec295 Closes-Bug: 1697163
* | Compare against 'RequestIdProxy.wrapped'Stephen Finucane2018-01-022-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | Due to the 'glanceclient.common.utils.add_req_id_to_object' decorator, an instance of 'glanceclient.common.utils.RequestIdProxy' is returned for most calls in glanceclient. If we wish to compare to None, we have to compare the contents of this wrapper and not the wrapper itself. Unit tests are updated to highlight this. Change-Id: I7dadf32d37ac2bda33a92c71d5882e9f23e38a82 Closes-Bug: #1736759
* | Revise functional testing README fileBrian Rosmaita2017-12-151-8/+17
| | | | | | | | | | | | Clarifies the location of clouds.yaml for functional testing. Change-Id: Ib0b8e84579bca72e791229752df14542358e21b7
* | Migrate dsvm functional test jobs to project repoBrian Rosmaita2017-12-141-46/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Migrate legacy dsvm functional test jobs for python-glanceclient to the project repository as zuul3 jobs using the devstack functional base job. Co-authored-by: Monty Taylor <mordred@inaugust.com> Co-authored-by: Brian Rosmaita <rosmaita.fossdev@gmail.com> Needed-By: I0b974bf60da6bafabeb037a75ac10654e2a6406c Needed-By: I0271a1430843ef546e991a7a3c4b572b3e404963 Depends-On: I84de60181cb88574e341ff83cd4857cce241f2dd Change-Id: I1977ee0d348645987107c2efb5b454d7f8b81adf
* | Add domain info to functional test clientsBrian Rosmaita2017-12-111-1/+5
| | | | | | | | | | | | | | Keystone wants domain info, so pass it on. Change-Id: Ie99f79b61e5f8d469695fa19ad99d919fa23ae8e Closes-bug: #1737583
* | Merge "image-create-via-import fails with ValueError"Jenkins2017-08-241-1/+4
|\ \
| * | image-create-via-import fails with ValueErrorAbhishek Kekane2017-08-241-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CLI image-create-via-import fails with ValueError. The reason is create command returns RequestIdWrapper object and not image and response. Further it fails with AttributeError: 'Namespace' object has no attribute 'import_method'. The reason is do_import_image() call requires 'import_method' as input which is not provided at the moment. Change-Id: Ic4c4d1f3c5d290b584840e8f9047fb53611a5748 Closes-bug: #1711511
* | | Merge "Fix image-import call"Jenkins2017-08-241-1/+1
|\ \ \ | |/ / |/| |