Merge "image/v2: support multiple property filters"
This commit is contained in:
		@@ -515,7 +515,8 @@ class ListImage(command.Lister):
 | 
			
		||||
            '--property',
 | 
			
		||||
            metavar='<key=value>',
 | 
			
		||||
            action=parseractions.KeyValueAction,
 | 
			
		||||
            help=_('Filter output based on property'),
 | 
			
		||||
            help=_('Filter output based on property '
 | 
			
		||||
                   '(repeat option to filter on multiple properties)'),
 | 
			
		||||
        )
 | 
			
		||||
        parser.add_argument(
 | 
			
		||||
            '--name',
 | 
			
		||||
@@ -643,8 +644,7 @@ class ListImage(command.Lister):
 | 
			
		||||
                marker = page[-1]['id']
 | 
			
		||||
 | 
			
		||||
        if parsed_args.property:
 | 
			
		||||
            # NOTE(dtroyer): coerce to a list to subscript it in py3
 | 
			
		||||
            attr, value = list(parsed_args.property.items())[0]
 | 
			
		||||
            for attr, value in parsed_args.property.items():
 | 
			
		||||
                api_utils.simple_filter(
 | 
			
		||||
                    data,
 | 
			
		||||
                    attr=attr,
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,6 @@
 | 
			
		||||
---
 | 
			
		||||
features:
 | 
			
		||||
  - |
 | 
			
		||||
    The ``image list`` command now properly filters images on multiple
 | 
			
		||||
    ``--property`` options.
 | 
			
		||||
    [Bug `2004290 <https://storyboard.openstack.org/#!/story/2004290>`_]
 | 
			
		||||
		Reference in New Issue
	
	Block a user