Bug 535440 - (RHQ-2135) Add substring function to groupby clause on group definition
Add substring function to groupby clause on group definition
Status: CLOSED WONTFIX
Product: RHQ Project
Classification: Other
Component: Resource Grouping (Show other bugs)
unspecified
All All
low Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
http://jira.rhq-project.org/browse/RH...
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-08 17:18 EDT by Charles Crouch
Modified: 2015-02-01 18:25 EST (History)
2 users (show)

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


Attachments (Terms of Use)

  None (edit)
Description Charles Crouch 2009-06-08 17:18:00 EDT
What I'd like to be able to do is specify the following

groupby resource.name.substring(0,3)
resource.type.plugin = JBossAS
resource.type.name = JBossAS Server

which would return me a set of groups where each group contains JBAS instances whose names started with the same three characters. 
This would be useful in environments where strong naming conventions are used and people want to group together resources which have similar, but not identical names.

Could potentially use a regex method instead that relied on matching capturing groups, e.g. a potentially more flexible version of first example

groupby resource.name.regex("^(.{3})") 
resource.type.plugin = JBossAS
resource.type.name = JBossAS Server


 ^(.{3}) is meant to capture the first 3 characters of the name (pseudo-regex :-)) , this could be evaluated for every resource then those resources with the same capture would be put in the same group.
Comment 1 Red Hat Bugzilla 2009-11-10 15:58:31 EST
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-2135

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