Bug 790169

Summary: Provide example CLI scripts to automate importing of new/uncommitted resources
Product: [Other] RHQ Project Reporter: Larry O'Leary <loleary>
Component: CLIAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: low Docs Contact:
Priority: medium    
Version: 4.2CC: hrupp, lakagwu
Target Milestone: ---   
Target Release: RHQ 4.4.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-30 14:42:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Example showing importing of all discovered resources
none
Example showing importing of resources of specific type (JBoss AS Server) none

Description Larry O'Leary 2012-02-13 20:03:04 UTC
A very common use-case in RHQ is to import new resources into inventory. For example, agents are running on all the managed platforms but when a new server resource is added, an administrator has to manually navigate to the UI and add it. It would be ideal that in some systems/environments, the discovery of these new servers should result in them being automatically added to inventory. 

We should provide a complete example/sample implementation of a CLI script which performs that action. The user could then leverage this script as part of other automation tasks within their RHQ system or utilize such an example to better understand how to interact with the inventory system/manager in the RHQ remote client API.

Comment 1 Larry O'Leary 2012-02-13 20:08:13 UTC
Created attachment 561658 [details]
Example showing importing of all discovered resources

An example script provided as part of Knowledge Base solution https://access.redhat.com/kb/docs/DOC-52008 which will import all discovered resources

Comment 2 Larry O'Leary 2012-02-13 20:09:43 UTC
Created attachment 561659 [details]
Example showing importing of resources of specific type (JBoss AS Server)

An example script showing how to import all discovered resources of the type JBoss AS Server.

Comment 3 Mike Foley 2012-02-27 17:12:50 UTC
triage 2/27/2012 mfoley, asantos, crouch, loleary

Comment 4 Lami Akagwu 2012-08-10 14:29:39 UTC
Since https://bugzilla.redhat.com/show_bug.cgi?id=784361 us fixed I assumed this was also addressed for JON 3.0.1
Or is it the case that the scripts attached to this bugzilla will be made available in JON 4.0

Comment 5 Larry O'Leary 2012-08-10 15:10:20 UTC
Lami, actually I think this may have made it into JON 3.1 already. Can you confirm the documentation provides the expected example: http://docs.redhat.com/docs/en-US/JBoss_Operations_Network/3.1/html/Dev_Writing_JON_Command-Line_Scripts/ar03.html#autoimport?

Comment 6 Lami Akagwu 2012-08-30 11:17:02 UTC
I can confirm the CLI scripts are in JON 3.1 already.
Are there any plans to provide API examples in 4.0 ? I have a customer asking about this

Comment 7 Larry O'Leary 2012-08-30 14:39:26 UTC
The CLI scripts are the API examples. The CLI is using the remote API. There are no plans at this time to add additional examples.

Comment 8 Larry O'Leary 2012-08-30 14:42:10 UTC
Because the examples requested by this bug report have been included in RHQ 4.4, I am closing this bug as complete. If other examples are required, please create a new bug report containing the request.

Comment 9 Heiko W. Rupp 2013-09-10 07:49:36 UTC
Correcting target release