Bug 536319 - (RHQ-682) add support for substring matching on bracketed expressions
add support for substring matching on bracketed expressions
Status: CLOSED NEXTRELEASE
Product: RHQ Project
Classification: Other
Component: Inventory (Show other bugs)
1.0.1
All All
medium Severity medium (vote)
: ---
: ---
Assigned To: Joseph Marques
Jeff Weiss
http://jira.rhq-project.org/browse/RH...
: SubFeature
Depends On:
Blocks: RHQ-399
  Show dependency treegraph
 
Reported: 2008-07-16 14:43 EDT by Joseph Marques
Modified: 2014-11-09 17:50 EST (History)
1 user (show)

See Also:
Fixed In Version: 1.1
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Joseph Marques 2008-07-16 14:43:00 EDT
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 13:45:42 EDT
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 15:57:20 EDT
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 16:14:40 EST
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.