Package com.abiquo.server.core.common

Examples of com.abiquo.server.core.common.DefaultEntityCurrentUsed


        BigInteger vlan =
            (BigInteger) getSession().createSQLQuery(COUNT_VLAN_RESOURCES)
                .setParameter("datacenterId", datacenterId)
                .setParameter("enterpriseId", enterpriseId).uniqueResult();

        DefaultEntityCurrentUsed used = new DefaultEntityCurrentUsed(cpu.intValue(), ram, hdTot);

        // Storage usage is stored in MB
        used.setStorage(storage == null ? 0 : storage.longValue() * 1024 * 1024);
        used.setPublicIp(publicIps == null ? 0 : publicIps.longValue());
        used.setVlanCount(vlan == null ? 0 : vlan.longValue());
        return used;
    }
View Full Code Here


        BigInteger publicIps =
            (BigInteger) getSession().createSQLQuery(COUNT_PUBLIC_IP_RESOURCES)
                .setParameter("virtualDatacenterId", virtualDatacenterId).uniqueResult();

        DefaultEntityCurrentUsed used = new DefaultEntityCurrentUsed(cpu.intValue(), ram, hdTot);

        // Storage usage is stored in MB
        used.setStorage(storage == null ? 0 : storage.longValue() * 1024 * 1024);
        used.setPublicIp(publicIps == null ? 0 : publicIps.longValue());
        used.setVlanCount(getVLANUsage(virtualDatacenterId).size());

        return used;
    }
View Full Code Here

        Long vlanCount = getVLANUsage(enterpriseId);

        // TODO repository

        // XXX checking null resource utilization (if any resource allocated)
        DefaultEntityCurrentUsed used = new DefaultEntityCurrentUsed(cpu.intValue(), ram, hdTot);

        used.setStorage(storage);
        used.setPublicIp(publiIp);
        used.setVlanCount(vlanCount);

        return used;
    }
View Full Code Here

TOP

Related Classes of com.abiquo.server.core.common.DefaultEntityCurrentUsed

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.