Description of problem: I tried to create alert with notification of type "Resource operations" and found out it's not correctly rendered by REST API. It's also very likely that notification of above type calling an operation requiring any parameter will not work. Version-Release number of selected component (if applicable): JON 3.2.0.GA How reproducible: always Steps to Reproduce: 1. create alert definition with notification type "Resource Operations", choose "Specific Resource", pick one, select an operation with parameters and fill parameter values (e.g RHQ Agent and "Get plugin Info" operation) 2. query REST API and verify that it renders your new alert definition with "same amount of information" GET $RHQ_SERVER:7080/rest/alert/definitions.json?full=true Actual results: API returns {"id":10052,"senderName":"Resource Operations","config":{"selection-mode":"SPECIFIC","selection-specific-resource-id":"10004","operation-definition-id":"10419"}} Expected results: inputs for selected operation are missing. Additional info:
in master commit dad83f3ab84e87e67b4c58d2ce7477a2a782e485 Author: Libor Zoubek <lzoubek> Date: Wed Aug 6 15:23:08 2014 +0200 Bug 1041393 - alert notification of type Resource operations is not correctly rendered by API AlertNotificationRest extended with extraConfig field where we now output notification extra config (in case of Resource Operations alert sender, it's input parameters for operation) With this commit we now also properly render alert notification config (simple property types mapped correctly to JSON/XML, not "just" string values) This commit fixes ConfigurationHelper#configurationToMap which transforms Configuration to generic Map, now it can work without Configuration Definition - as a fall-back it maps all simple properties to string values.
branch: release/jon3.3.x link: https://github.com/rhq-project/rhq/commit/41a68bdf6 time: 2014-08-06 18:25:07 +0200 commit: 41a68bdf6fbac4a7270c654f878513ca4221c8d5 author: Libor Zoubek - lzoubek message: Bug 1041393 - alert notification of type Resource operations is not correctly rendered by API AlertNotificationRest extended with extraConfig field where we now output notification extra config (in case of Resource Operations alert sender, it's input parameters for operation) With this commit we now also properly render alert notification config (simple property types mapped correctly to JSON/XML, not "just" string values) This commit fixes ConfigurationHelper#configurationToMap which transforms Configuration to generic Map, now it can work without Configuration Definition - as a fall-back it maps all simple properties to string values. (cherry picked from commit dad83f3ab84e87e67b4c58d2ce7477a2a782e485) Signed-off-by: Jirka Kremser <jkremser>
Moving to ON_QA as available to test in the following brew build: https://brewweb.devel.redhat.com//buildinfo?buildID=379025
i am seeing 404 when trying to view any alert definitions thru the rest api JBWEB000065: HTTP Status 404 - /alert/definitions.json JBWEB000309: type JBWEB000067: Status report JBWEB000068: message /alert/definitions.json JBWEB000069: description JBWEB000124: The requested resource is not available. JBoss Web/7.4.8.Final-redhat-4
ignore comment #4. pilot error