Bug 1001499 - RFE - Add resource info in Alert definition call [NEEDINFO]
RFE - Add resource info in Alert definition call
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: REST (Show other bugs)
4.7
Unspecified Unspecified
unspecified Severity unspecified (vote)
: ---
: RHQ 4.9
Assigned To: Heiko W. Rupp
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-27 03:33 EDT by vlad crc
Modified: 2014-03-26 04:31 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-03-26 04:31:45 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
hrupp: needinfo? (vlad.craciunoiu)


Attachments (Terms of Use)

  None (edit)
Description vlad crc 2013-08-27 03:33:04 EDT
The REST-API doesn't export any information about the resource the definition is applied on. This is a showstopper because when importing in the target server it is needed to get the resource somehow (which means by name, IDs being obviously different).

So is needed that the call "GET /alert/definition/{id}" to return also
- resource name
- resource type name / plugin
- maybe resource id (this is not needed for import but somebody may use it for some other purpose)
Comment 1 Heiko W. Rupp 2013-08-28 09:19:29 EDT
Would you be able to provide a patch?
Comment 2 Heiko W. Rupp 2013-09-02 11:50:19 EDT
Actually that information was supposed to be present - not in the payload, but in the links, so you can follow that link to get all the information.

Unfortunately the links were missing. I've added them in master 5ecac79512693

$ curl -u rhqadmin:rhqadmin -i http://localhost:7080/rest/alert/definition/10021.json
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Pragma: No-cache
Cache-Control: no-cache
Expires: Thu, 01 Jan 1970 01:00:00 CET
ETag: 3b020d
Content-Type: application/json
Transfer-Encoding: chunked
Date: Mon, 02 Sep 2013 15:29:01 GMT

{"id":10021,
 "name":"test","enabled":true,"priority":"MEDIUM",
 "recoveryId":0,"conditionMode":"ANY","conditions":[{"category":"AVAILABILITY","id":10041,"threshold":null,"option":null,"triggerId":null,"comparator":null,"measurementDefinition":0,"name":"AVAIL_GOES_DOWN"}],
 "notifications":[],
 "dampeningCategory":"NONE","dampeningCount":0,"dampeningPeriod":0,
 "dampeningUnit":null,
  "links":[{"coregui":{"href":"http://localhost:7080/coregui/#Resource/10001/Alerts/Definitions/10021"}},
  {"resource":{"href":"http://localhost:7080/rest/resource/10001"}}]}
Comment 3 Heiko W. Rupp 2014-03-26 04:31:45 EDT
Bulk closing now that 4.10 is out.

If you think an issue is not resolved, please open a new BZ and link to the existing one.

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