Search in sources :

Example 21 with PipelineTraceable

use of org.onosproject.net.behaviour.PipelineTraceable in project onos by opennetworkinglab.

the class OfdpaPipelineTraceableTest method testOvsOfdpaL2BroadEmpty.

/**
 * Test failure due l2 flood group with no buckets for ovs-ofdpa.
 */
@Test
public void testOvsOfdpaL2BroadEmpty() {
    PipelineTraceableInput pipelineInput = new PipelineTraceableInput(new PipelineTraceablePacket(IN_L2_BROAD_UNTAG_PACKET), OFDPA_CP, getDataPlaneEntities(OVS_OFDPA_DRIVER, L2_BROAD_EMPTY_OVS_OFDPA));
    PipelineTraceable pipelineTraceable = setUpOvsOfdpa();
    PipelineTraceableOutput pipelineOutput = pipelineTraceable.apply(pipelineInput);
    assertNotNull(pipelineOutput);
    assertThat(pipelineOutput.hitChains().size(), is(1));
    assertThat(pipelineOutput.result(), is(PipelineTraceableResult.NO_GROUP_MEMBERS));
    PipelineTraceableHitChain hitChain = pipelineOutput.hitChains().get(0);
    assertNotNull(hitChain);
    List<List<DataPlaneEntity>> chains = getHitChains(L2_BROAD_EMPTY_OVS_OFDPA);
    assertThat(chains.size(), is(1));
    assertNull(hitChain.outputPort());
    assertThat(hitChain.hitChain().size(), is(6));
    assertEquals(OUT_L2_BROAD_EMPTY, hitChain.egressPacket().packet());
    assertTrue(hitChain.isDropped());
    assertEquals(chains.get(0), hitChain.hitChain());
}
Also used : PipelineTraceable(org.onosproject.net.behaviour.PipelineTraceable) List(java.util.List) PipelineTraceableOutput(org.onosproject.net.PipelineTraceableOutput) PipelineTraceableHitChain(org.onosproject.net.PipelineTraceableHitChain) PipelineTraceableInput(org.onosproject.net.PipelineTraceableInput) PipelineTraceablePacket(org.onosproject.net.PipelineTraceablePacket) Test(org.junit.Test)

Example 22 with PipelineTraceable

use of org.onosproject.net.behaviour.PipelineTraceable in project onos by opennetworkinglab.

the class OfdpaPipelineTraceableTest method testOfdpaPuntLldp.

/**
 * Test punt lldp for ovs-ofdpa.
 */
@Test
public void testOfdpaPuntLldp() {
    PipelineTraceableInput pipelineInput = new PipelineTraceableInput(new PipelineTraceablePacket(IN_PUNT_LLDP_PACKET), OFDPA_CP, getDataPlaneEntities(OFDPA_DRIVER, PUNT_LLDP_OFDPA));
    PipelineTraceable pipelineTraceable = setUpOfdpa();
    PipelineTraceableOutput pipelineOutput = pipelineTraceable.apply(pipelineInput);
    assertNotNull(pipelineOutput);
    assertThat(pipelineOutput.hitChains().size(), is(1));
    assertThat(pipelineOutput.result(), is(PipelineTraceableResult.SUCCESS));
    PipelineTraceableHitChain hitChain = pipelineOutput.hitChains().get(0);
    assertNotNull(hitChain);
    List<List<DataPlaneEntity>> chains = getHitChains(PUNT_LLDP_OFDPA);
    assertThat(chains.size(), is(1));
    assertNotNull(hitChain.outputPort());
    assertThat(hitChain.outputPort().port(), is(PortNumber.CONTROLLER));
    assertThat(hitChain.hitChain().size(), is(4));
    assertEquals(IN_PUNT_LLDP_PACKET, hitChain.egressPacket().packet());
    assertFalse(hitChain.isDropped());
    assertEquals(chains.get(0), hitChain.hitChain());
}
Also used : PipelineTraceable(org.onosproject.net.behaviour.PipelineTraceable) List(java.util.List) PipelineTraceableOutput(org.onosproject.net.PipelineTraceableOutput) PipelineTraceableHitChain(org.onosproject.net.PipelineTraceableHitChain) PipelineTraceableInput(org.onosproject.net.PipelineTraceableInput) PipelineTraceablePacket(org.onosproject.net.PipelineTraceablePacket) Test(org.junit.Test)

Aggregations

PipelineTraceable (org.onosproject.net.behaviour.PipelineTraceable)22 List (java.util.List)20 Test (org.junit.Test)20 PipelineTraceableHitChain (org.onosproject.net.PipelineTraceableHitChain)20 PipelineTraceableInput (org.onosproject.net.PipelineTraceableInput)20 PipelineTraceableOutput (org.onosproject.net.PipelineTraceableOutput)20 PipelineTraceablePacket (org.onosproject.net.PipelineTraceablePacket)20 DefaultDriverData (org.onosproject.net.driver.DefaultDriverData)2 DriverData (org.onosproject.net.driver.DriverData)2