Bug 1258873 - It is not possible to delete events using RHQ CLI
Summary: It is not possible to delete events using RHQ CLI
Keywords:
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: CLI
Version: 4.12
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1258870
TreeView+ depends on / blocked
 
Reported: 2015-09-01 12:42 UTC by bkramer
Modified: 2022-03-31 04:28 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description bkramer 2015-09-01 12:42:45 UTC
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 05:56:29 UTC
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 09:15:44 UTC
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.