use of org.onosproject.net.PipelineTraceableOutput 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