Bug 1273898

Summary: JON CLI deleteEventsForContext has signature which does not match remote usage.
Product: [JBoss] JBoss Operations Network Reporter: Prachi <pyadav>
Component: CLIAssignee: Michael Burman <miburman>
Status: CLOSED WONTFIX QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: unspecified    
Version: JON 3.3.4CC: fbrychta, spinder
Target Milestone: ---   
Target Release: JON 3.3.6   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-02 15:15:12 UTC 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:

Description Prachi 2015-10-21 13:22:15 UTC
Description of problem:

JON CLI "deleteEventsForContext" has signature which does not match  remote usage.

it accepts EntytiContext and List<Integer> ids. This signature is not consistent with the rest of remote APIs.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:

var criteria=EntityCriteria();
EventManager.findEventsByCriteria(criteria);
event= EventManager.findEventsByCriteria(criteria);
var eventDetail=event.get(0);
eventDetail.id                                                                                    
15554

EventManager.deleteEventsForContext(EntityContext.forResource(10003),15554);(not working)
EventManager.deleteEventsForContext(EntityContext.forResource(10003),eventDetail.id); (not working)

Actual results:


Expected results:

It should delete the events

Additional info:

deleteEventsForContext has unfortunately signature which does not match (enough) remote usage.

it accepts EntytiContext and List<Integer> ids. This signature is not consistent with the rest of remote APIs.

We can test like this:

var list = java.util.ArrayList()
list.add(new java.lang.Integer(10054))

EventManager.deleteEventsForContext(EntityContext.forResource(10003), list)


However, this is not user friendly which would accept int... ids etc.

Comment 1 Filip Brychta 2015-10-22 14:44:03 UTC
*** Bug 1273900 has been marked as a duplicate of this bug. ***