EC2 API: DescribeTags wildcards not working
Bug #1205099 reported by
Burt Holzman
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://
"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: | added: ec2 |
Changed in nova: | |
assignee: | nobody → Burt Holzman (holzman) |
status: | New → In Progress |
Changed in nova: | |
milestone: | none → havana-3 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | havana-3 → 2013.2 |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/38697 github. com/openstack/ nova/commit/ 92120d3247b239a 2a54e60407a271b 531b533151
Committed: http://
Submitter: Jenkins
Branch: master
commit 92120d3247b239a 2a54e60407a271b 531b533151
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-DescribeT ags.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: Ie9cac182faabf5 0fc0d40480db39a 46a7e97fbec