summaryrefslogtreecommitdiff
path: root/glanceclient/v2/shell.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Adds support for Glance Tasks calls"Jenkins2014-10-161-0/+65
|\
| * Adds support for Glance Tasks callsFei Long Wang2014-09-221-0/+65
| | | | | | | | | | | | | | | | | | | | Add tasks operations on client side to support task create, list all and show. DocImpact Implement blueprint async-glance-workers Change-Id: Ib4b8e347a8a47817e3b427c8ba024e8c32f65155
* | Merge "CLI image-update gives a wrong help on '--tags' param"0.14.1Jenkins2014-09-191-1/+1
|\ \ | |/ |/|
| * CLI image-update gives a wrong help on '--tags' paramZhi Yan Liu2014-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The help message tells end user image-update interface accepts 'tags' param and could be used to update tag of image [0], but actually it could trigger an 400 exception [1] due to wrong PATCH calls, and the correct way is to use image-tag-update interface [2] as designed. [0] glance image-update <IMG_ID> --tags <TAG_VALUE> [1] 400 Bad Request Invalid JSON pointer for this resource: '/tags/0' (HTTP 400) [2] glance image-tag-update <IMG_ID> <TAG_VALUE> Change-Id: Iaa8041779510192dc08f7b898b8a1beda29a6398 Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
* | Support for Metadata Definitions Catalog API0.14.0Pawel Koniszewski2014-09-031-0/+386
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | API calls and shell commands added in this patch: - CRUD for metadefs namespaces; - CRUD for metadefs objects; - CRUD for metadefs properites; - CRD for metadefs resource types and resource type associations. Change-Id: I6d15f749038e8fd24fc651f0b314df5be7c673ef Implements: blueprint metadata-schema-catalog-support Co-Authored-By: Facundo Maldonado <facundo.n.maldonado@intel.com> Co-Authored-By: Michal Dulko <michal.dulko@intel.com> Co-Authored-By: Lakshmi N Sampath <lakshmi.sampath@hp.com> Co-Authored-By: Pawel Koniszewski <pawel.koniszewski@intel.com>
* | Enable F841ChangBo Guo(gcb)2014-07-091-2/+1
|/ | | | | | | F841 detects local variable is assigned to but never used. This commit fixes the violations and enables F841 in gate. Change-Id: Ic4dcac2733dfe334009327ac17aa3952cafaa63a
* Merge "Add support for location parameters in v2 commands"Jenkins2014-06-171-13/+49
|\
| * Add support for location parameters in v2 commandsDavid Koo2014-06-161-13/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently glanceclient's v2 commands don't support modification operations on an image's location attribute - the argparse specification for the location attribute of the image-update command causes the image id argument to be included in list of locations and so the command parsing fails (because it causes the image id to appear to be missing). Furthermore even if the 'locations' argument were to be accepted by argparse (e.g. by changing the argument specs and using --id to specify the image id) the command would still fail because the arguments are passed directly to the schema which expects the value of the 'locations' argument to be a valid dictionary (there is nobody to convert the argument string to a python dictionary that the schema expects). This commit adds the following location related commands to glanceclient: --location-add: Add a new location to the list of image locations. --location-delete: Remove an existing location from the list of image locations. --location-update: Update the metadata of existing location. The glanceclient.v2.images.Controller class has been agumented with three new methods to support the commands listed above: - add_location - delete_locations - update_location The server has not been modified, i.e. all location related API requests are passed to the server via HTTP PATCH requests and handled by the server's image update function. The v2 'image' and 'shell' related tests have also been supplemented. Note that in order to use these options the server must be first configured to expose location related info to the clients (i.e. 'show_multiple_locations' must be set to 'True"). I also added a mailmap entry for myself. DocImpact Closes-bug: #1271452 Co-Author: David Koo (koofoss) <david.koo@huawei.com> Change-Id: Id1f320af05d9344645836359758e4aa227aafc69
* | Merge "progress flag not supported in v2 API"Jenkins2014-06-171-2/+7
|\ \ | |/ |/|
| * progress flag not supported in v2 APIwanghong2014-04-161-2/+7
| | | | | | | | | | | | | | | | Currently only download method supports --progress flag in v2 API. This patch let upload method in v2 API support this flag too. Change-Id: I1d22379c320adb47a2178697e546413b9257f987 Closes-Bug: #1286265
* | fixed typos found by RETF rulesChristian Berendt2014-05-051-1/+1
|/ | | | | | rules are avaialble at https://en.wikipedia.org/wiki/Wikipedia:AutoWikiBrowser/Typos Change-Id: I70245e5ddf342762eb76d8e2e74b6363767726ef
* Merge "Improve help strings"Jenkins2014-03-161-14/+14
|\
| * Improve help stringsAndreas Jaeger2014-02-261-14/+14
| | | | | | | | | | | | | | | | Make help strings consistent to use "." at end of string. Fix capitalization of API in one help string. Change-Id: I7cc5289d881c5e58aad9c69b4668584cdeb0b376
* | Replace file with open, which is Python 3 compatibleAlex Gaynor2014-02-131-1/+1
|/ | | | Change-Id: I471ae9b372f88a508d4654b1a18c6da90397a828
* Add support for image size in v2 api uploadEdward Hope-Morley2014-02-031-1/+6
| | | | | | | | | | | | Some backend stores e.g. RBD, will fail if told to create an image without a valid size (RBD will fail to write to a zero-size image). Here we add support to allow the image size to be provided when doing an upload. The result is that the upload content-length will be set if available either from checking the supplied file object or as provided by user. Closes-Bug: 1220197 Change-Id: Ia1f2ea5680a139750d931591949b3e0058148b4b
* Python 3: use six.iteritems() instead of iteritems()Yassine Lamgarchal2014-01-091-3/+5
| | | | | | | six.iteritems() replaces dictionary.iteritems() on Python 2 and dictionary.items() on Python 3. Change-Id: Ie5efa65c0a992e8136087a7b78ab8e8ce967326e
* Get better format for long lines with PrettyTableFei Long Wang2014-01-061-1/+3
| | | | | | | | | | | | | Based on current implement, the cli output format will be bad if the lines are too long. This issue can be fixed by setting 'max_width'. However, there is a bug against it, see https://code.google.com/p/prettytable/source/browse/trunk/CHANGELOG?r=85 line 3. So the requirements.txt is updated as well. docImpact Fixes bug 1251283 Change-Id: I0d4192ad9d10a3d6d47a8319463a5edb57719a68
* Merge "Replace OpenStack LLC with OpenStack Foundation"Jenkins2013-11-151-1/+1
|\
| * Replace OpenStack LLC with OpenStack FoundationZhiQiang Fan2013-09-201-1/+1
| | | | | | | | | | Change-Id: I38dcbcf1a6c8efe540fcf5f29e782cb3826e583d Fixes-Bug: #1214176
* | Add CLI for V2 image create, update, and uploadeddie-sheffield2013-10-021-0/+84
|/ | | | | | | | | | | | | | | Provides command line support for image-create, image-update, and image-upload using the Glance V2 API. This includes building help text for create and update based on the image jsonschema as fetched from the server. Also fixes bug caused by default warlock patch generation not matching what Glance expects when updating a core property which had not originally been set when the image was created. Related to bp glance-client-v2 Change-Id: I841f9e3d05802f4b794cb6f4849abe03ff0324d9
* Enable query image by tagFei Long Wang2013-08-281-1/+3
| | | | | | | | | | This patch will enable Glance client to query images by user defined tags. Implement bp image-query-by-tag Implement bp glance-client-v2 Change-Id: I6f54630c5b7c9c567d85485ad4289284e5486814
* Show a pretty progressbar when uploading and downloading an image.mouad benchchaoui2013-08-081-0/+5
| | | | | | | | | | | | Add a new module that contain generic wrapper for file and iterator, which are used to wrap image to upload and the request body iterator in upload and download cases repectively, to show and advance a pretty progress bar when this laters are consumed, The progress bar is triggered by adding a --progress command line argument to commands: image-create, image-download or image-update. Change-Id: I2ba42fd0c58f4fa087adb568ec3f08246cae3759 bug fix: LP#1112309 blueprint: progressbar-when-uploading
* Merge "Expose checksum index image property in client"Jenkins2013-07-171-1/+3
|\
| * Expose checksum index image property in clientamalaba2013-07-121-1/+3
| | | | | | | | | | | | | | Implement checksum image index property in the python-glanceclient Change-Id: If1426b7938457014ef27a86d3902d53854161627 Implements: blueprint index-using-checksum-image-property
* | Enable client V2 to update/delete tags for a given image.Venkatesh Sampath2013-07-021-0/+28
|/ | | | | | | | | Added the CLI option image-tag-update to associate a tag to an image via API V2. Added the CLI option image-tag-delete to delete a tag associated with an image via API V2. Related to bp glance-client-v2 Change-Id: I76060e1982223770a6c2c0bd9376d568af0df456
* 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
* Image Members for glance v2 apiiccha-sethi2013-05-091-0/+56
| | | | | | | | | Lists, creates, deletes, updates image members using glance v2 api. Related to bp glance-api-v2-image-members Change-Id: Ic018a265a1676bb0a5638a55e70a527ce6b447fc
* Implements filters: visibility, owner, member_status.Brian Rosmaita2013-03-081-1/+12
| | | | | | | | Includes tests. Related to bp glance-api-v2-image-members Change-Id: Ic48f54639fec4dc9b48819a8ffb1f0097001894c
* Replace SchemaNotFound with HTTPNotFoundBrian Waldon2013-02-221-1/+1
| | | | | | Fixes bug 1131682 Change-Id: I615acbef0411677cae5d30262702babd900c0c81
* Adds image-delete functionality.Anita Kuno2013-01-291-0/+6
| | | | Change-Id: Ic10433f6eb484a4760f3e61f040e903e86b95d91
* Update command descriptionsBrian Waldon2012-08-211-1/+1
| | | | | | | | 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 V2 to download imagesLars Gellrich2012-08-091-0/+11
| | | | | | | | | | 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
* Add pagination to v2 image-listBrian Waldon2012-07-131-1/+6
| | | | | | | | | | | | | | | | | * Use a recursive generator function to iterate over the image container. The presence of next links are indicators to continue pagination while their value drives the location of the next page. * A user can pass in --page-size on the command line, or page_size when using the controller directly, to control how many images are requested with each subsequent paginated request. Default page size is 20. * Add a flag (strict_url_check) for the FakeAPI class to control whether it chops off query params when trying to match a request to a fixture. * Related to bp glance-client-v2. Change-Id: Ib98e912a7af0bb570b4fd738733edd9b837d1a12
* Prevent links from being printed in v2 CLIBrian Waldon2012-07-131-0/+2
| | | | | | | | | | Nobody wants to see links in a human interface. This prevents the file, access, self and schema links from being printed when calling image-show or explain. Related to bp glance-client-v2 Change-Id: Ib98e912a7af0bb570b4fd738733edd9b837d1a11
* Add support for viewing a single image through v2Brian Waldon2012-07-131-0/+7
| | | | | | | | * Add image-create command * Add tests for Image model, Controller.get, and Controller.list * Related to bp glance-client-v2 Change-Id: Ib98e912a7af0bb570b4fd738733edd9b837d1a06
* Rewrite link parsing for finding v2 schemasBrian Waldon2012-07-131-4/+10
| | | | | | | | | | | | | | | | What we called 'links' are no longer returned in a container of objects, they are top-level entity attribtues. This fixes the parsing of the entities to look in the correct place when trying to locate a specific schema. Add a helper for printing to stderr and exiting with a non-zero exit code. Map 'name' to 'Attribute' when explaining a schema. Related to bp glance-client-v2 Change-Id: Ib98e912a7af0bb570b4fd738733edd9b837d1a05
* Add 'explain' command to v2 that describes schemasBrian Waldon2012-06-071-0/+8
| | | | | | | | | At its core, this is adding the ability to finx a schema through published links and convert it to a usable object. Related to bp glance-client-v2 Change-Id: I7b38ad091c6b0ad80197eb789503cf73989893e5
* Add minimal support for the v2 APIBrian Waldon2012-06-041-0/+23
This only allows you to run image-list, but sets up a framework that we can use to fill in the rest of the v2 functionality. * Related to bp glance-client-v2 Change-Id: I8827e36fdcf79fe402990a6d05898ec00cbd54c6