use of org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface in project ovirt-engine by oVirt.
the class VfSchedulerImplTest method hostNicNotHaveNetworkInSriovConfig.
@Test
public void hostNicNotHaveNetworkInSriovConfig() {
VmNetworkInterface vnic = mockVnic(true);
initHostWithOneVfsConfig(Collections.singletonList(vnic), 5, false, false, false, true);
assertHostNotValid(Collections.singletonList(vnic), Collections.singletonList(vnic.getName()));
}
use of org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface in project ovirt-engine by oVirt.
the class VfSchedulerImplTest method hostNotHaveSriovNics.
@Test
public void hostNotHaveSriovNics() {
VmNetworkInterface vnic = mockVnic(true);
assertHostNotValid(Collections.singletonList(vnic), Collections.singletonList(vnic.getName()));
}
use of org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface in project ovirt-engine by oVirt.
the class VfSchedulerImplTest method multipleVfsConfigsCommon.
private void multipleVfsConfigsCommon(boolean firstValid) {
VmNetworkInterface vnic = mockVnic(true);
HostNicVfsConfig hostNicVfsConfig1 = new HostNicVfsConfig();
updateVfsConfig(hostNicVfsConfig1, vnic, firstValid, false, firstValid);
HostNicVfsConfig hostNicVfsConfig2 = new HostNicVfsConfig();
updateVfsConfig(hostNicVfsConfig2, vnic, !firstValid, false, !firstValid);
mockVfsConfigsOnHost(Arrays.asList(hostNicVfsConfig1, hostNicVfsConfig2));
assertHostValid(Collections.singletonList(vnic));
}
use of org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface in project ovirt-engine by oVirt.
the class VfSchedulerImplTest method hostNicHaveTwoFreeVfOneShouldBeDirectlyPassthrough.
@Test
public void hostNicHaveTwoFreeVfOneShouldBeDirectlyPassthrough() {
VmNetworkInterface vnic = mockVnic(true);
List<HostDevice> vfs = initHostWithOneVfsConfig(Collections.singletonList(vnic), 2, true, false, false, true, false, true);
HostDevice freeVf = vfs.get(0);
mockVfDirectlyAttached(false, freeVf);
expectedVnicToVfMap.put(vnic.getId(), freeVf.getDeviceName());
assertHostValid(Collections.singletonList(vnic));
}
use of org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface in project ovirt-engine by oVirt.
the class VfSchedulerImplTest method hostNicHaveOneFreeVfWhichShouldBeDirectlyPassthrough.
@Test
public void hostNicHaveOneFreeVfWhichShouldBeDirectlyPassthrough() {
VmNetworkInterface vnic = mockVnic(true);
initHostWithOneVfsConfig(Collections.singletonList(vnic), 1, true, false, false, true, false, true);
assertHostNotValid(Collections.singletonList(vnic), Collections.singletonList(vnic.getName()));
}
Aggregations