Bug 535440 (RHQ-2135) - Add substring function to groupby clause on group definition
Summary: Add substring function to groupby clause on group definition
Keywords:
Status: CLOSED WONTFIX
Alias: RHQ-2135
Product: RHQ Project
Classification: Other
Component: Resource Grouping
Version: unspecified
Hardware: All
OS: All
low
medium
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL: http://jira.rhq-project.org/browse/RH...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-06-08 21:18 UTC by Charles Crouch
Modified: 2015-02-01 23:25 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-05-05 21:03:52 UTC
Embargoed:


Attachments (Terms of Use)

Description Charles Crouch 2009-06-08 21:18:00 UTC
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 20:58:31 UTC
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.