6 Commits

Author SHA1 Message Date
Nobuto Murata
860639a548 Support --community in openstack image list
"--community" was added to "image create" and "image set" previously,
but was missed in "image list".

Change-Id: I959fdd7f67ae62c8326659ce52389228152ec019
Story: 2001925
Task: 14453
2018-07-24 22:48:01 +00:00
Imtiaz Chowdhury
1bd2bf67da Fixes image api URL endpoint for certain scenario
openstackclient fails to get image list when the image api endpoint
has 'v2' substring in the URL. Instead of checking whether the api
endpoint URL terminates with '/v2', the current logic is checking
whether 'v2' appears anywhere in the endpoint string.

This issue was discovered on a production setup where certain
server names had 'v2' in their names. For example, when a hostname
is gopher.dev20.com, the image list APIs fail.

This commit updates the unit test to reflect this scenario. Without
the change in openstackclient/api/image_v2.py, all the unit tests
fail.

Co-Authored-By: sergio.carvalho@workday.com
Change-Id: I26b85afd646938272dbabe8e045b337b7df58c7d
Closes-Bug: 1652827
2017-01-04 18:14:10 +00:00
Yang Hongyang
8b17a1fa5b Trivial: Update image_list v2 docs
This api doc is clearly copied from v1, we should update it to reflact v2 API.
Added 'shared' param description.

Change-Id: I73d36e3a2a0448c28edab788a9340fd46177f8ef
2016-03-01 18:48:09 +08:00
Monty Taylor
59727ba2f9 Don't hack the image url
It's actually breaking usage against HP Public Cloud.

Change-Id: Ic172786c6d1272798b768078a0bcf246f8d64ca8
2015-03-05 20:58:23 -06:00
Dean Troyer
61a40343fd Add filter to image list
* Hides previously broken --page-size option
* Adds --property to image list for filtering on properties
* Adds Visibility, Protected, Owner, Properties/Tags to --long output
* Adds api.utils.simple_filter() for selecting matches out of a list
  of objects
* Adds tests for all of the above
* Updates image docs

There are additional filtering options to be added in later reviews.

Change-Id: I32feff0ad61aae749b33621c817658d7dc90c3aa
Closes-bug: 1401902
2015-01-27 19:17:35 -06:00
Dean Troyer
1ecf1bee2d Begin low-level API for Image v1 and v2
image list for v1 and v2:
* Add --public|--private to command parsers
* Implement local public/private filtering for v1 image_list()
* Pass public/private filter to server for v2 image_list()

Change-Id: Ie7c24ea2d1bf2b3b1b7fa342eb45fee45894634d
2015-01-20 17:01:23 -06:00