Bug 536319 (RHQ-682)

Summary: add support for substring matching on bracketed expressions
Product: [Other] RHQ Project Reporter: Joseph Marques <jmarques>
Component: InventoryAssignee: Joseph Marques <jmarques>
Status: CLOSED NEXTRELEASE QA Contact: Jeff Weiss <jweiss>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0.1CC: dajohnso
Target Milestone: ---Keywords: SubFeature
Target Release: ---   
Hardware: All   
OS: All   
URL: http://jira.rhq-project.org/browse/RHQ-682
Whiteboard:
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: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 536002    

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