Red Hat Bugzilla – Bug 1110434
Remote AlertDefinitionManager API does not handle template or group level definitions correctly
Last modified: 2014-12-15 06:36:19 EST
When testing Bug 738799 it was noted that the failure occurred when the template removal was performed via the GUI but not via REST.
This led to the discovery that the GUI was going through the correct "local" SLSBs for the level of alert definition being dealt with: template/group/resource. But REST, like the CLI or any other remote client was using the only published remote API: AlertDefinitionManagerRemote.
The public API for enable/disable/remove of alert definitions was basically treating everything as a resource-level alert definition. So, the API calls above, if called at the template or group level, were not affecting all of the resource-level children.
After some discussion it was decided that in fact these methods should handle any alert definition and do the right thing. The other option was to open up remote APIs/REST endpoints specific to each level of alert definition. This option was rejected for both usability and maintenance reasons, keeping the exposed API smaller and more flexible is preferred.
Author: Jay Shaughnessy <email@example.com>
Date: Tue Jun 17 12:17:15 2014 -0400
- Repair the AlertDefinitionManagerRemote API such that enable/disable/remove
methods operate on any combination of template,group or resource level
- Properly jdoc the remote API methods, and improve some locals jdoc as well
- Improve the transactioning to avoid a single umbrella transaction when
invoking the API on multiple group and/or template alert definitions.
- Convert GUI to use the enhanced remote API methods to benefit from
the transactioning improvments and to shrink the generated Async API.
- Improve i-test to use remote api and ensure child, resource-level
alert defs are being handled properly.
- fix a problem with authz on alert template viewing. It should not
require MANAGE_SETTINGS to view alert defs via getAlertDefinitionById().
- fix a long-standing bug where child alert-defs of templates or groups were
not properly detached at remove-time of the parent, which could cause
GUI failures when visiting the resource-level alert definitions.
- remove some unused named queries from AlertDefinition
Bulk close of items fixed in RHQ 4.12
If you think this is not solved, then please open a *new* BZ and link to this one.