Search in sources :

Example 1 with ResourceQuery

use of com.vmware.ops.api.model.resource.ResourceQuery in project flowgate by vmware.

the class TestVROPS method getHostSystemResources.

public List<ResourceDto> getHostSystemResources() {
    ResourcesClient rClient = client.resourcesClient();
    ResourceQuery rq = new ResourceQuery();
    rq.setAdapterKind(new String[] { "VMWARE" });
    rq.setResourceKind(new String[] { "HostSystem" });
    return rClient.getResources(rq, null).getResourceList();
}
Also used : ResourcesClient(com.vmware.ops.api.client.controllers.ResourcesClient) ResourceQuery(com.vmware.ops.api.model.resource.ResourceQuery)

Example 2 with ResourceQuery

use of com.vmware.ops.api.model.resource.ResourceQuery in project flowgate by vmware.

the class MetricClient method getHostSystemsResources.

public List<ResourceDto> getHostSystemsResources() {
    ResourceQuery rq = new ResourceQuery();
    rq.setAdapterKind(new String[] { VROConsts.ADPTERKIND_VMARE_KEY });
    rq.setResourceKind(new String[] { VROConsts.RESOURCEKIND_HOSTSYSTEM_KEY });
    List<ResourceDto> resources = resourcesClient.getResources(rq, null).getResourceList();
    return resources;
}
Also used : ResourceQuery(com.vmware.ops.api.model.resource.ResourceQuery) ResourceDto(com.vmware.ops.api.model.resource.ResourceDto)

Aggregations

ResourceQuery (com.vmware.ops.api.model.resource.ResourceQuery)2 ResourcesClient (com.vmware.ops.api.client.controllers.ResourcesClient)1 ResourceDto (com.vmware.ops.api.model.resource.ResourceDto)1