Search in sources :

Example 6 with MapVnicsContext

use of org.ovirt.engine.core.bll.exportimport.vnics.MapVnicsContext in project ovirt-engine by oVirt.

the class MatchUserMappingToOvfVnicTest method testFindMappingEntryNotFound.

@Test
public void testFindMappingEntryNotFound() {
    VmNetworkInterface vnic = new VmNetworkInterface();
    vnic.setNetworkName("not" + NETWORK_NAME);
    vnic.setVnicProfileName(VNIC_PROFILE2_NAME);
    MapVnicsContext ctx = new MapVnicsContext();
    ctx.setUserMappings(externalVnicProfileMappings);
    ctx.setOvfVnics(singletonList(vnic));
    underTest.handle(ctx);
    assertEquals(null, ctx.getMatched().get(vnic));
}
Also used : MapVnicsContext(org.ovirt.engine.core.bll.exportimport.vnics.MapVnicsContext) VmNetworkInterface(org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface) Test(org.junit.Test)

Aggregations

MapVnicsContext (org.ovirt.engine.core.bll.exportimport.vnics.MapVnicsContext)6 Test (org.junit.Test)5 VmNetworkInterface (org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface)5