Determining "top-level importsl" using the REST interface
Heiko W.Rupp
hrupp at redhat.com
Sun Jun 23 10:08:54 UTC 2013
Hey,
Am 22.06.2013 um 23:40 schrieb Joseph McIsaac:
> Using the RHQ administration service, a list of Top Level Imports -- Servers can be selected for a given platform. The question that I have is, using the REST interface to RHQ, and selecting JSON as the response format, how can I either request the top level imports for a given platform, or interrogate the properties of the child resources of a platform to filter out the top level imports?
With top level imports, you mean servers in that show up in the discovery queue?
If so, in RHQ 4.8 (*) you can tell the api to limit the resources to be servers in state NEW, which are those
in the discovery queue:
GET /rest/resource?status=NEW&category=SERVER
See e.g. https://github.com/rhq-project/samples/blob/master/rest-api/python/import.py
If you want to find only SERVER type resources that have a PLATFORM as parent,
then you are currently limited to retrieve all servers and then filter the top-level ones
client side.
That is a good idea for an enhancement in 4.9 (*). Would you like to contribute a patch?
Heiko
*) RHQ 4.8 will be released soon (this week).
--
Reg. Adresse: Red Hat GmbH, Technopark II, Haus C,
Werner-von-Siemens-Ring 14, D-85630 Grasbrunn
Handelsregister: Amtsgericht München HRB 153243
Geschaeftsführer: Mark Hegarty, Charlie Peters, Michael Cunningham, Charles Cachera
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.fedorahosted.org/pipermail/rhq-devel/attachments/20130623/3fd30da4/attachment.sig>
More information about the rhq-devel
mailing list