Search in sources :

Example 1 with VmOverheadCalculatorImpl

use of org.ovirt.engine.core.bll.utils.VmOverheadCalculatorImpl in project ovirt-engine by oVirt.

the class CPUPolicyUnitTest method setUp.

@Before
public void setUp() {
    SlaValidator slaValidator = new SlaValidator();
    slaValidator.setVmOverheadCalculator(new VmOverheadCalculatorImpl());
    cpuPolicyUnit.setSlaValidator(slaValidator);
    vm = new VM();
    vm.setCpuPerSocket(2);
    vm.setNumOfSockets(2);
    vdsWithInvalidCpuInfo = new VDS();
    vdsWithInvalidCpuInfo.setId(Guid.newGuid());
    vdsWithInvalidCpuInfo.setCpuCores(0);
    vdsWithInvalidCpuInfo.setCpuThreads(0);
    vdsWithCores = new VDS();
    vdsWithCores.setId(Guid.newGuid());
    vdsWithCores.setCpuCores(2);
    vdsWithCores.setCpuThreads(4);
    cluster = new Cluster();
    cluster.setId(Guid.newGuid());
}
Also used : VDS(org.ovirt.engine.core.common.businessentities.VDS) VM(org.ovirt.engine.core.common.businessentities.VM) Cluster(org.ovirt.engine.core.common.businessentities.Cluster) VmOverheadCalculatorImpl(org.ovirt.engine.core.bll.utils.VmOverheadCalculatorImpl) SlaValidator(org.ovirt.engine.core.bll.scheduling.SlaValidator) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 SlaValidator (org.ovirt.engine.core.bll.scheduling.SlaValidator)1 VmOverheadCalculatorImpl (org.ovirt.engine.core.bll.utils.VmOverheadCalculatorImpl)1 Cluster (org.ovirt.engine.core.common.businessentities.Cluster)1 VDS (org.ovirt.engine.core.common.businessentities.VDS)1 VM (org.ovirt.engine.core.common.businessentities.VM)1