Bug 958922 - RFE: support for passing plugin config when creating child resources
Summary: RFE: support for passing plugin config when creating child resources
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: REST
Version: 4.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: RHQ 4.11
Assignee: Libor Zoubek
QA Contact: Mike Foley
URL:
Whiteboard:
: 1076052 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-02 16:43 UTC by Libor Zoubek
Modified: 2015-11-02 00:43 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-07-21 10:13:52 UTC
Embargoed:


Attachments (Terms of Use)

Description Libor Zoubek 2013-05-02 16:43:10 UTC
Description of problem:

Currently our REST API allows creating a resource, but there is no way to pass configuration for such resource. If I try to create such resource (i.e. Network Interface on AS7 Server) it get's created, but does not appear in Child History and it's kind of broken (configuration fails to be loaded, I am not able to delete such resource)

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

How reproducible: always


Steps to Reproduce:
1. have RHQ with imported AS7 Standalone server (ID 123456)
2. run 
curl -v --data "{\"resourceName\":\"testnetifaceX\",\"typeName\":\"Network Interface\",\"pluginName\":\"JBossAS7\",\"parentId\":123456}" -H "Content-Type: application/json" -H "Accept: application/json" --anyauth -u rhqadmin:rhqadmin http://127.0.0.1:7080/rest/resource

  
Actual results:

REST API returns new resource, resource is created in inventory. This creation does not appear to history.

When I open Inventory tab of this new resource, UI reports 

The following connection settings have invalid values: [Path]. The values must be corrected before the settings can be saved.

I am not able to delete such resource with error:

java.lang.IllegalArgumentException: Delete for [null] failed: JBAS014739: No handler for remove at address [], rolled-back=true
	at org.rhq.modules.plugins.jbossas7.BaseComponent.deleteResource(BaseComponent.java:333)

Expected results:


Additional info:

Comment 1 Libor Zoubek 2014-03-14 09:32:45 UTC
*** Bug 1076052 has been marked as a duplicate of this bug. ***

Comment 2 Heiko W. Rupp 2014-03-24 16:42:31 UTC
Pull request #5 merged to master as 69439e8d5014983ed9ab439dad7d72295beda612
https://github.com/rhq-project/rhq/commit/69439e8d5014983ed9ab439dad7d72295beda612

Comment 3 Heiko W. Rupp 2014-07-21 10:13:52 UTC
Bulk closing of RHQ 4.11 issues, now that RHQ 4.12 is out.

If you find an issue with those, please open a new BZ, linking to the old one.


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