Bug 790169 - Provide example CLI scripts to automate importing of new/uncommitted resources
Summary: Provide example CLI scripts to automate importing of new/uncommitted resources
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: CLI
Version: 4.2
Hardware: All
OS: All
medium
low vote
Target Milestone: ---
: RHQ 4.4.0
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-13 20:03 UTC by Larry O'Leary
Modified: 2018-11-30 21:36 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-30 14:42:10 UTC


Attachments (Terms of Use)
Example showing importing of all discovered resources (1.16 KB, text/javascript)
2012-02-13 20:08 UTC, Larry O'Leary
no flags Details
Example showing importing of resources of specific type (JBoss AS Server) (1.71 KB, text/javascript)
2012-02-13 20:09 UTC, Larry O'Leary
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Legacy) 52008 0 None None None Never

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


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