Search in sources :

Example 6 with VmInterfaceManager

use of org.ovirt.engine.core.bll.network.VmInterfaceManager in project ovirt-engine by oVirt.

the class VmDeviceUtils method canPlugInterface.

private boolean canPlugInterface(VmNic iface, VmBase vmBase) {
    ReadMacPool macPool = macPoolPerCluster.getMacPoolForCluster(vmBase.getClusterId());
    VmInterfaceManager vmIfaceManager = new VmInterfaceManager();
    if (vmIfaceManager.tooManyPluggedInterfaceWithSameMac(iface, macPool)) {
        vmIfaceManager.auditLogMacInUseUnplug(iface, vmBase.getName());
        return false;
    } else {
        return true;
    }
}
Also used : ReadMacPool(org.ovirt.engine.core.bll.network.macpool.ReadMacPool) VmInterfaceManager(org.ovirt.engine.core.bll.network.VmInterfaceManager)

Aggregations

VmInterfaceManager (org.ovirt.engine.core.bll.network.VmInterfaceManager)6 VmNic (org.ovirt.engine.core.common.businessentities.network.VmNic)2 Guid (org.ovirt.engine.core.compat.Guid)2 ReadMacPool (org.ovirt.engine.core.bll.network.macpool.ReadMacPool)1 VnicProfileHelper (org.ovirt.engine.core.bll.network.vm.VnicProfileHelper)1 VmNetworkInterface (org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface)1 EngineMessage (org.ovirt.engine.core.common.errors.EngineMessage)1