Search in sources :

Example 1 with PendingResourceManager

use of org.ovirt.engine.core.bll.scheduling.pending.PendingResourceManager in project ovirt-engine by oVirt.

the class HugePagesFilterPolicyUnitTest method setUp.

@Before
public void setUp() {
    host1 = new VDS();
    host1.setId(Guid.newGuid());
    host1.setHugePages(new ArrayList<>());
    vm = new VM();
    vm.setId(Guid.newGuid());
    vm.setVmMemSizeMb(1024);
    otherVm = new VM();
    otherVm.setId(Guid.newGuid());
    pendingResourceManager = new PendingResourceManager();
}
Also used : VDS(org.ovirt.engine.core.common.businessentities.VDS) VM(org.ovirt.engine.core.common.businessentities.VM) PendingResourceManager(org.ovirt.engine.core.bll.scheduling.pending.PendingResourceManager) Before(org.junit.Before)

Example 2 with PendingResourceManager

use of org.ovirt.engine.core.bll.scheduling.pending.PendingResourceManager in project ovirt-engine by oVirt.

the class EvenDistributionWeightPolicyUnitTest method mockPolicyUnit.

protected <T extends EvenDistributionWeightPolicyUnit> T mockPolicyUnit(Class<T> unitType) throws Exception {
    final T policyUnit = unitType.getConstructor(PolicyUnit.class, PendingResourceManager.class).newInstance(null, new PendingResourceManager());
    policyUnit.setSlaValidator(slaValidator);
    return spy(policyUnit);
}
Also used : PolicyUnit(org.ovirt.engine.core.common.scheduling.PolicyUnit) PendingResourceManager(org.ovirt.engine.core.bll.scheduling.pending.PendingResourceManager)

Aggregations

PendingResourceManager (org.ovirt.engine.core.bll.scheduling.pending.PendingResourceManager)2 Before (org.junit.Before)1 VDS (org.ovirt.engine.core.common.businessentities.VDS)1 VM (org.ovirt.engine.core.common.businessentities.VM)1 PolicyUnit (org.ovirt.engine.core.common.scheduling.PolicyUnit)1