Bug 1267569 - Setting multiple expressions needs to be changed
Setting multiple expressions needs to be changed
Status: CLOSED CURRENTRELEASE
Product: JBoss Operations Network
Classification: JBoss
Component: Documentation (Show other bugs)
JON 3.2.3
Unspecified Unspecified
medium Severity medium
: post-GA
: JON 3.3.8
Assigned To: Tyler Kelly
Mike Foley
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-30 08:22 EDT by Jochen Cordes
Modified: 2017-08-25 00:59 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Build Name: 23082, Writing JBoss ON Command-Line Scripts-3.3-3.3 Build Date: 02-07-2015 05:49:06 Topic ID: 44213-753246 [Latest]
Last Closed: 2017-08-25 00:59:52 EDT
Type: Bug
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 Jochen Cordes 2015-09-30 08:22:24 EDT
Title: Creating and Editing Dynagroups

Describe the issue:

In "Example 12.9. Creating a Dynagroup" at https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Operations_Network/3.3/html/Writing_JON_Command-Line_Scripts/sect-Resources_and_Groups.html#Creating_and_Editing_Dynagroups multiple expressions are set via

dynaGroupDef.setExpression("resource.type.name=Linux");
dynaGroupDef.setExpression("resource.type.category=Platform");
dynaGroupDef.setExpression("resource.availability=UP");

However, this does not work and only the last expression is taken. Looking at the source code of org.rhq.core.domain.resource.group.GroupDefinition it turns out that the expressions need to be separated by "\n", so it should look like

dynaGroupDef.setExpression("resource.type.name=Linux\nresource.type.category=Platform\nresource.availability=UP");


Suggestions for improvement:


Additional information:

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