EC2 API: DescribeTags wildcards not working

Bug #1205099 reported by Burt Holzman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Burt Holzman

Bug Description

The EC2 API supports glob-style wildcards in filters.

http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeTags.html

"You can use wildcards in a filter value. An asterisk (*) matches zero or more characters, and a question mark (?) matches exactly one character. You can escape special characters using a backslash (\) before the character. For example, a value of \*amazon\?\\ searches for the literal string *amazon?\."

Tags: ec2
tags: added: ec2
Changed in nova:
assignee: nobody → Burt Holzman (holzman)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/38697
Committed: http://github.com/openstack/nova/commit/92120d3247b239a2a54e60407a271b531b533151
Submitter: Jenkins
Branch: master

commit 92120d3247b239a2a54e60407a271b531b533151
Author: Burt Holzman <email address hidden>
Date: Thu Jul 25 00:54:32 2013 -0500

    Support EC2 API wildcards for DescribeTags filters

    The EC2 API supports glob-style wildcards in filters.

    From http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeTags.html:

    "You can use wildcards in a filter value. An asterisk (*) matches zero or more characters, and
    a question mark (?) matches exactly one character. You can escape special characters using a
    backslash (\) before the character. For example, a value of \*amazon\?\\ searches for the literal
    string *amazon?\."

    This patch converts the glob-style regex to a python regex and uses re.match to do the rest. The
    approach to the conversion was taken from the python fnmatch library.

    Fixes bug #1205099

    Change-Id: Ie9cac182faabf50fc0d40480db39a46a7e97fbec

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-3 → 2013.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.