Bug 536319 (RHQ-682) - add support for substring matching on bracketed expressions
Summary: add support for substring matching on bracketed expressions
Keywords:
Status: CLOSED NEXTRELEASE
Alias: RHQ-682
Product: RHQ Project
Classification: Other
Component: Inventory
Version: 1.0.1
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: ---
Assignee: Joseph Marques
QA Contact: Jeff Weiss
URL: http://jira.rhq-project.org/browse/RH...
Whiteboard:
Depends On:
Blocks: RHQ-399
TreeView+ depends on / blocked
 
Reported: 2008-07-16 18:43 UTC by Joseph Marques
Modified: 2014-11-09 22:50 UTC (History)
1 user (show)

Fixed In Version: 1.1
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Joseph Marques 2008-07-16 18:43:00 UTC
today, the expression:

resource.parent.trait[<some_trait>].startsWith = <some_value>

bombs with the error:

"Syntax error in your group definition: Trait name '[<some_trait>].startsWith' must be contained within '[' and ']' characters"

the same happens if the "trait" expression token is replaced with "pluginConfiguration" and "resourceConfiguration".  the substring matching should be supported regardless of which subexpression precedes it.

Comment 1 Joseph Marques 2008-08-11 17:45:42 UTC
rev1217 - fix tokenization routine so that substring comparison methods (startsWith, endsWith, contains) work with bracketed expressions; 
add unit test method to verify proper operation of tokenization routine;
added another unit test method to verify proper output of expression translation of bracketed expressions with substring comparisons; 

Comment 2 Jeff Weiss 2008-08-20 19:57:20 UTC
rev1250, Verified expressions like the following evaluate correctly:

resource.trait[Trait.hostname].startsWith = dev
resource.trait[Trait.hostname].endsWith = com
resource.trait[Trait.hostname].contains = dev16

Comment 3 Red Hat Bugzilla 2009-11-10 21:14:40 UTC
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-682
This bug is duplicated by RHQ-708



Note You need to log in before you can comment on or make changes to this bug.