Search in sources :

Example 1 with VirtualPoolCapacity

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

the class VirtualDataCenterCapacityService method getVirtualArrayVirtualPoolCapacities.

private VirtualArrayVirtualPoolCapacity getVirtualArrayVirtualPoolCapacities(URI vArrayId) {
    VirtualArrayVirtualPoolCapacity vArrayCap = new VirtualArrayVirtualPoolCapacity();
    vArrayCap.setId(vArrayId);
    vArrayCap.setVpoolCapacities(new ArrayList<VirtualPoolCapacity>());
    URIQueryResultList resultList = new URIQueryResultList();
    _dbClient.queryByConstraint(ContainmentConstraint.Factory.getVirtualArrayVirtualPoolConstraint(vArrayId), resultList);
    Iterator<URI> vPoolIterator = resultList.iterator();
    int c = 0;
    while (vPoolIterator.hasNext()) {
        URI vPoolId = vPoolIterator.next();
        VirtualPool vPool = _permissionsHelper.getObjectById(vPoolId, VirtualPool.class);
        vArrayCap.getVpoolCapacities().add(getVirtualPoolCapacities(vArrayId, vPool));
        c++;
    }
    logger.info("{} vpool in varray {}", c, vArrayId);
    return vArrayCap;
}
Also used : VirtualPoolCapacity(com.emc.storageos.model.vpool.VirtualPoolCapacity) VirtualArrayVirtualPoolCapacity(com.emc.storageos.model.vpool.VirtualArrayVirtualPoolCapacity) VirtualPool(com.emc.storageos.db.client.model.VirtualPool) URI(java.net.URI) VirtualArrayVirtualPoolCapacity(com.emc.storageos.model.vpool.VirtualArrayVirtualPoolCapacity) URIQueryResultList(com.emc.storageos.db.client.constraint.URIQueryResultList) ContainmentConstraint(com.emc.storageos.db.client.constraint.ContainmentConstraint)

Example 2 with VirtualPoolCapacity

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

the class VirtualDataCenterCapacityService method getVirtualPoolCapacities.

private VirtualPoolCapacity getVirtualPoolCapacities(URI vArrayId, VirtualPool vPool) {
    VirtualPoolCapacity vPoolCap = new VirtualPoolCapacity();
    vPoolCap.setId(vPool.getId());
    vPoolCap.setCapacity(CapacityUtils.getCapacityForVirtualPoolAndVirtualArray(vPool, vArrayId, _dbClient, _coordinator));
    return vPoolCap;
}
Also used : VirtualPoolCapacity(com.emc.storageos.model.vpool.VirtualPoolCapacity) VirtualArrayVirtualPoolCapacity(com.emc.storageos.model.vpool.VirtualArrayVirtualPoolCapacity)

Aggregations

VirtualArrayVirtualPoolCapacity (com.emc.storageos.model.vpool.VirtualArrayVirtualPoolCapacity)2 VirtualPoolCapacity (com.emc.storageos.model.vpool.VirtualPoolCapacity)2 ContainmentConstraint (com.emc.storageos.db.client.constraint.ContainmentConstraint)1 URIQueryResultList (com.emc.storageos.db.client.constraint.URIQueryResultList)1 VirtualPool (com.emc.storageos.db.client.model.VirtualPool)1 URI (java.net.URI)1