Search in sources :

Example 1 with VDCCapacities

use of com.emc.storageos.model.vpool.VDCCapacities in project coprhd-controller by CoprHD.

the class VirtualDataCenterCapacityService method getZoneCapacities.

/**
 * List all VirtualPool capacities under the zone grouped by varray
 *
 * @brief List VirtualPool capacities in the zone
 * @return List of VirtualPool capacities
 */
@GET
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@CheckPermission(roles = { Role.SYSTEM_ADMIN, Role.SYSTEM_MONITOR })
public VDCCapacities getZoneCapacities() {
    VDCCapacities zoneCap = new VDCCapacities();
    zoneCap.setArrayCapacities(new ArrayList<VirtualArrayVirtualPoolCapacity>());
    // get all varray ids
    final List<URI> ids = _dbClient.queryByType(VirtualArray.class, true);
    for (URI id : ids) {
        zoneCap.getArrayCapacities().add(getVirtualArrayVirtualPoolCapacities(id));
    }
    return zoneCap;
}
Also used : URI(java.net.URI) VDCCapacities(com.emc.storageos.model.vpool.VDCCapacities) VirtualArrayVirtualPoolCapacity(com.emc.storageos.model.vpool.VirtualArrayVirtualPoolCapacity) Produces(javax.ws.rs.Produces) GET(javax.ws.rs.GET) CheckPermission(com.emc.storageos.security.authorization.CheckPermission)

Aggregations

VDCCapacities (com.emc.storageos.model.vpool.VDCCapacities)1 VirtualArrayVirtualPoolCapacity (com.emc.storageos.model.vpool.VirtualArrayVirtualPoolCapacity)1 CheckPermission (com.emc.storageos.security.authorization.CheckPermission)1 URI (java.net.URI)1 GET (javax.ws.rs.GET)1 Produces (javax.ws.rs.Produces)1