Bug 974501

Summary: Its possible to create a dynaGroup definition without expression via CLI
Product: [JBoss] JBoss Operations Network Reporter: Filip Brychta <fbrychta>
Component: CLIAssignee: Jirka Kremser <jkremser>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: JON 3.2CC: hrupp, jkremser, loleary
Target Milestone: DR04   
Target Release: JON 3.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
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: 880819    

Description Filip Brychta 2013-06-14 09:50:56 UTC
Description of problem:
Its possible to pass null or empty string as a expression during creation of dynaGroup definition. Dynagroup definition is created without expression. This is not possible via GUI.

Version-Release number of selected component (if applicable):
Version: 4.8.0-SNAPSHOT
Build Number: 7b31b01

How reproducible:
Always

Steps to Reproduce:
1. ./rhq-cli.sh -p rhqadmin -u rhqadmin
2. dynaGroupDef.setExpression(null);  // or empty string ("") or don't use this setter at all
3. GroupDefinitionManager.createGroupDefinition(dynaGroupDef)

Actual results:
no exception and definition is created without expression

Expected results:
Exception with informative message (i.e. expression is required) is thrown and definition is not created.

Comment 1 Mike Foley 2013-07-02 15:19:56 UTC
moved to JON 3.3 per 7/2/2013 meeting with crouch, larry, heiko, foley

Comment 2 Jirka Kremser 2013-07-10 15:11:18 UTC
branch:  master
link:    http://git.fedorahosted.org/cgit/rhq/rhq.git/commit/?id=627c48a7a
time:    2013-07-10 17:10:25 +0200
commit:  627c48a7a18a03d9a91032a32c1833d4fcbae86a
author:  Jirka Kremser - jkremser
message: [BZ 974501] - Its possible to create a dynaGroup definition without
         expression via CLI - check whether expression is null of an
         empty string

Comment 3 Simeon Pinder 2013-08-26 15:36:22 UTC
Moving to ON_QA as available for testing in latest 3.2.x ALPHA 58 build:

https://brewweb.devel.redhat.com//buildinfo?buildID=291947

Comment 4 Filip Brychta 2013-08-27 15:24:53 UTC
Verified on 
Version: 3.2.0.ALPHA_QA
Build Number: 10b0467:adad71f