Bug 1258873 - It is not possible to delete events using RHQ CLI
It is not possible to delete events using RHQ CLI
Status: NEW
Product: RHQ Project
Classification: Other
Component: CLI (Show other bugs)
4.12
Unspecified Unspecified
unspecified Severity unspecified (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks: 1258870
  Show dependency treegraph
 
Reported: 2015-09-01 08:42 EDT by bkramer
Modified: 2015-10-26 05:15 EDT (History)
3 users (show)

See Also:
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: ---


Attachments (Terms of Use)

  None (edit)
Description bkramer 2015-09-01 08:42:45 EDT
Description of problem:

Methods: 

    ** int deleteEventsForContext(Subject subject, EntityContext context, List<Integer> eventIds);
    ** int purgeEventsForContext(Subject subject, EntityContext context);

are not exposed in EventManagerRemote so it is not possible to delete events using RHQ CLI.

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

How reproducible:
Always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 1 Josejulio 2015-10-24 01:56:29 EDT
I tried on master [1] and it seems that these methods are already exposed on the RHQ CLI.

---
$ ./rhq-cli.sh -u rhqadmin -p rhqadmin
./rhq/modules/enterprise/remoting/cli/target/rhq-remoting-cli-4.14.0-SNAPSHOT/bin/..
RHQ Enterprise Remote CLI 4.14.0-SNAPSHOT
Logging in with default host: [localhost]
Logging in with default port: [7080]
Remote server version is: 4.14.0-SNAPSHOT (86bbcd5)
Login successful
$ ec = EntityContext.forResource(10001); 
rhqadmin@localhost:7080$ EventManager.

deleteEventsForContext           findEventsByCriteria             getSeverityBuckets
getSeverityBucketsForAutoGroup   getSeverityBucketsForCompGroup   purgeEventsForContext
toString
rhqadmin@localhost:7080$ EventManager.deleteEventsForContext(ec,

int deleteEventsForContext(EntityContext, List)
rhqadmin@localhost:7080$ EventManager.purgeEventsForContext(ec)
5
---

Is already fixed or Am I missing something?

[1] https://github.com/rhq-project/rhq/tree/86bbcd55209661e48beefc987dc3532142267930
Comment 2 bkramer 2015-10-26 05:15:44 EDT
According to https://github.com/rhq-project/rhq/commit/5419181f4 (see: https://bugzilla.redhat.com/show_bug.cgi?id=1258870#c4) - this has been done in RHQ 4.13  - so RHQ 4.14 will contain the change.

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