summaryrefslogtreecommitdiff
path: root/glanceclient/v2
diff options
context:
space:
mode:
authorBrian Rosmaita <rosmaita.fossdev@gmail.com>2018-08-21 15:08:56 -0400
committerBrian Rosmaita <rosmaita.fossdev@gmail.com>2019-01-17 14:22:48 -0500
commit4511a445d010345c2bbd41bec303fe6df6312f3c (patch)
tree714187bae0722bea5f7e472c33e33c0433e0cabb /glanceclient/v2
parentc4c92ecb51f4a7b93c1a84d5084006fed15c6945 (diff)
downloadpython-glanceclient-4511a445d010345c2bbd41bec303fe6df6312f3c.tar.gz
Add image-list filter for multihash
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
Diffstat (limited to 'glanceclient/v2')
-rw-r--r--glanceclient/v2/shell.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/glanceclient/v2/shell.py b/glanceclient/v2/shell.py
index 544416a..75c3c0d 100644
--- a/glanceclient/v2/shell.py
+++ b/glanceclient/v2/shell.py
@@ -327,6 +327,9 @@ def do_image_update(gc, args):
action='append', dest='properties', default=[])
@utils.arg('--checksum', metavar='<CHECKSUM>',
help=_('Displays images that match the MD5 checksum.'))
+@utils.arg('--hash', dest='os_hash_value', default=None,
+ metavar='<HASH_VALUE>',
+ help=_('Displays images that match the specified hash value.'))
@utils.arg('--tag', metavar='<TAG>', action='append',
help=_("Filter images by a user-defined tag."))
@utils.arg('--sort-key', default=[], action='append',
@@ -358,7 +361,7 @@ def do_image_update(gc, args):
def do_image_list(gc, args):
"""List images you can access."""
filter_keys = ['visibility', 'member_status', 'owner', 'checksum', 'tag',
- 'os_hidden']
+ 'os_hidden', 'os_hash_value']
filter_items = [(key, getattr(args, key)) for key in filter_keys]
if args.properties: