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());
}
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());
}
Aggregations