use of com.emc.storageos.model.vdc.VirtualDataCenterList in project coprhd-controller by CoprHD.
the class VirtualDataCenterService method getVirtualDataCenters.
/**
* Get Virtual Data Centers
* @brief List VDC names and IDs
* @return
*/
@GET
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
public VirtualDataCenterList getVirtualDataCenters() {
VirtualDataCenterList vdcList = new VirtualDataCenterList();
List<URI> ids = _dbClient.queryByType(VirtualDataCenter.class, true);
Iterator<VirtualDataCenter> iter = _dbClient.queryIterativeObjects(VirtualDataCenter.class, ids);
while (iter.hasNext()) {
vdcList.getVirtualDataCenters().add(toNamedRelatedResource(iter.next()));
}
return vdcList;
}
use of com.emc.storageos.model.vdc.VirtualDataCenterList in project coprhd-controller by CoprHD.
the class InternalVdcServiceClient method listVdc.
/**
* List all vdc uuid
*
* @return
*/
public VirtualDataCenterList listVdc() {
WebResource rRoot = createRequest(INTERNAL_VDC_ROOT);
VirtualDataCenterList resp = null;
try {
resp = addSignature(rRoot).get(VirtualDataCenterList.class);
} catch (UniformInterfaceException e) {
_log.warn("could not list vdc. Err:{}", e);
}
return resp;
}
Aggregations