Commit Graph

20 Commits

Author SHA1 Message Date
Brian Waldon 0f628b19cb Add pagination to v1 image-list
* Use recursive generator function to make subsequent requests
  to the v1 detailed images resource
* 'limit' continues to act as the absolute limit of images to return
  from a list call
* 'page_size' indicates how many images to ask for in each subsequent
  pagination request
* Expose --page-size through the cli
* Convert v1 images tests to use strict url comparison
* Drop strict_url_check from FakeAPI kwargs - now the functionality
  is always active and tests must directly match fixture urls
* Fix bug 1024614

Change-Id: Ifa7874d88360e03b5c8aa95bfb9d5e6dc6dc927e
2012-07-19 13:26:37 -07:00
Brian Waldon 49bc6f94f2 Add --is-public to image-create
This moves image-create closer to image-update by adding
--is-public and hiding the help output of --public. The
--public option will be removed once devstack no longer
depends on it.

Fix bug 1023632

Change-Id: I2c58655ba56eef1fa486246618c4fb5bd3c6c8cf
2012-07-13 08:12:45 -07:00
Brian Waldon b7f476e211 Translate is_protected to protected
When creating or updating an image, translate the 'is_protected'
argument into the proper 'protected' image attribute.

Fix bug 1023653

Change-Id: Icfe6c38e4fda098ce3f90fd94c8fbbc18be2f4a8
2012-07-11 16:37:28 -07:00
Brian Waldon d8433ee40a Change --protected to --is-protected in create
Make image-create match image-update when specifying a specific
value for 'protected'.

Fix bug 1023650

Change-Id: I02ddeb59c1f6882b206279a71f7af8889ce4602c
2012-07-11 16:28:24 -07:00
Brian Waldon db1fabed11 Properly map boolean-like arguments to True/False
--is-public and --is-protected are now evaluated as True and False

Fix bug 1023652

Change-Id: Ife2313770eebc176e7744711956aed20f16576a5
2012-07-11 16:25:13 -07:00
Brian Waldon cf8613e76d Preserve image properties on update
* By default, image properties should not be deleted on image update.
* A user can specify --purge-props through the CLI or purge_props
  as a keyword argument to ImageManager.update to override the default
  behavior and force properties to be deleted.
* Fixes bug 1022758

Change-Id: Ib079378cb765552fc29a66913aefbbcd934d2065
2012-07-09 21:03:46 -07:00
Brian Waldon 0e8ab72357 Add --file to image-update and correct bad name
* Add the --file option to the image-update action, as it was left out
  of a previous patch
* Additionally, change a bad reference (args.fields) to args.file
* Fix bug 1022750

Change-Id: Idde127ec3f138f718d671b2133d50debec26236e
2012-07-09 15:25:10 -07:00
Brian Waldon a1691ddc10 Allow image filtering by custom properties
A user can filter a list of images by passing in a 'properties'
sub-dictionary inside of the 'filters' keyword argumen to
ImageManager.list(). The same functionality can be used through
the CLI through the use of one or more'--property-filter' options.

Related to bp glance-client-parity.

Change-Id: I7d119174d83faa894dde557e1944289de296a02c
2012-07-04 15:49:41 -07:00
Brian Waldon e7db533bc0 Expand v1 image-list filters
Add comparison filters for the v1 image-list command: --name,
--status, --container-format, --disk-format.

Related to bp glance-client-parity.

Change-Id: I27377764ea5543a4bef593f0a731b09a914a9265
2012-07-04 15:24:08 -07:00
Brian Waldon 9aad246f0e Add size filtering to image-list action
Add --size-min and --size-max options to image-list to
represent the size_min and size_max filters passed to
the ImageManager.list method.

Related to bp glance-client-parity

Change-Id: Icb5458c3ed26ea754cff6360b741b3af99d1beb5
2012-07-04 14:24:38 -07:00
Adam Gandelman 2713ca1bdc Allow image upload from local file to v1 API
Allow an image to be read from a local file as an alternative to
stdin (which remains the default).

Change-Id: I81070ded9c505df7924c4efd5ae54cf3c0fa534d
2012-07-03 10:52:37 -07:00
Dean Troyer 877f144013 Add fields to image-list
Fields were missing from image-list that were present in the old index:
  'Disk Format', 'Container Format', 'Size'

Change-Id: Ia86caec1938560c56292c0f3028ee48e774d0057
2012-04-24 20:33:30 -07:00
Brian Waldon 9829db1c07 Fixing pep8 errors
Change-Id: I7c0ffb5626ee030fca7daf8ae10cb17e221e2133
2012-04-03 20:48:40 -07:00
Brian Waldon c72e4dd2b5 image membership management works 2012-04-03 17:39:32 -07:00
Brian Waldon b87b1b5086 Adding support for passing image data through cli 2012-04-03 17:01:48 -07:00
Brian Waldon d191262413 Image update works 2012-04-03 16:00:49 -07:00
Brian Waldon d5bb951e5f More complete image creation 2012-04-03 14:43:04 -07:00
Brian Waldon 59e586ed94 Adding image-create action 2012-04-03 10:01:08 -07:00
Brian Waldon ca8434f2c3 Image members bones 2012-04-02 15:44:43 -07:00
Brian Waldon c530de6389 Basic get/list operations work
* 'glance image-list' and 'glance image-show' work
* Set up tests, pep8, venv
2012-03-26 22:48:48 -07:00