Hi Dustin,

On 07/24/2013 01:35 AM, Schoenbrun, Dustin wrote:
> Hey Michael,
> 
> I had a question about what the best way of getting all hosts within a data 
> center was using the oVirt Java API. Currently, we've been doing a "reverse 
> lookup" from all
> hosts present in the oVirt Engine to see what clusters they're in and then 
> finding out what data center the cluster belongs to. Thanks in advance, 
> Michael!

Almost all root collections (such as hosts in your case), supports querying 
using
very same engine search dialect, so actually you can go to UI, combine query,
(use auto-completion) and use it in SDK, e.g:

List<Host> hosts = api.getHosts().list("datacenter = mydatacenter", null, null);

hope it helps.

> 
> -- Dustin
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
_______________________________________________
Engine-devel mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-devel

Reply via email to