use of org.onosproject.net.behaviour.PipelineTraceable in project onos by opennetworkinglab.
the class OfdpaPipelineTraceableTest method testOfdpaL2BroadEmpty.
/**
* Test failure due l2 flood group with no buckets for ofdpa.
*/
@Test
public void testOfdpaL2BroadEmpty() {
PipelineTraceableInput pipelineInput = new PipelineTraceableInput(new PipelineTraceablePacket(IN_L2_BROAD_UNTAG_PACKET), OFDPA_CP, getDataPlaneEntities(OFDPA_DRIVER, L2_BROAD_EMPTY_OFDPA));
PipelineTraceable pipelineTraceable = setUpOfdpa();
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_OFDPA);
assertThat(chains.size(), is(1));
assertNull(hitChain.outputPort());
assertThat(hitChain.hitChain().size(), is(4));
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 testOvsOfdpaPuntIP.
/**
* Test punt ip for ovs-ofdpa.
*/
@Test
public void testOvsOfdpaPuntIP() {
PipelineTraceableInput pipelineInput = new PipelineTraceableInput(new PipelineTraceablePacket(IN_PUNT_IP_PACKET), OFDPA_CP, getDataPlaneEntities(OVS_OFDPA_DRIVER, PUNT_IP_OVS_OFDPA));
PipelineTraceable pipelineTraceable = setUpOvsOfdpa();
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_IP_OVS_OFDPA);
assertThat(chains.size(), is(1));
assertNotNull(hitChain.outputPort());
assertThat(hitChain.outputPort().port(), is(PortNumber.CONTROLLER));
assertThat(hitChain.hitChain().size(), is(7));
assertEquals(IN_PUNT_IP_PACKET, hitChain.egressPacket().packet());
assertFalse(hitChain.isDropped());
assertEquals(chains.get(0), hitChain.hitChain());
}
use of org.onosproject.net.behaviour.PipelineTraceable in project onos by opennetworkinglab.
the class OfdpaPipelineTraceableTest method testOvsOfdpaPuntLldp.
/**
* Test punt lldp for ovs-ofdpa.
*/
@Test
public void testOvsOfdpaPuntLldp() {
PipelineTraceableInput pipelineInput = new PipelineTraceableInput(new PipelineTraceablePacket(IN_PUNT_LLDP_PACKET), OFDPA_CP, getDataPlaneEntities(OVS_OFDPA_DRIVER, PUNT_LLDP_OVS_OFDPA));
PipelineTraceable pipelineTraceable = setUpOvsOfdpa();
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_OVS_OFDPA);
assertThat(chains.size(), is(1));
assertNotNull(hitChain.outputPort());
assertThat(hitChain.outputPort().port(), is(PortNumber.CONTROLLER));
assertThat(hitChain.hitChain().size(), is(7));
assertEquals(IN_PUNT_LLDP_PACKET, hitChain.egressPacket().packet());
assertFalse(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());
}
use of org.onosproject.net.behaviour.PipelineTraceable in project onos by opennetworkinglab.
the class OfdpaPipelineTraceableTest method testOfdpaL2BridingNotOrdered.
/**
* Test l2 bridging with l2 interface group that has actions not in order for ofdpa.
*/
@Test
public void testOfdpaL2BridingNotOrdered() {
PipelineTraceableInput pipelineInput = new PipelineTraceableInput(new PipelineTraceablePacket(IN_L2_BRIDG_UNTAG_PACKET), OFDPA_CP, getDataPlaneEntities(OFDPA_DRIVER, L2_BRIDG_NOT_ORDERED_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(L2_BRIDG_NOT_ORDERED_OFDPA);
assertThat(chains.size(), is(1));
assertNotNull(hitChain.outputPort());
assertThat(hitChain.outputPort().port(), is(OUT_PORT));
assertThat(hitChain.hitChain().size(), is(4));
assertEquals(IN_L2_BRIDG_UNTAG_PACKET, hitChain.egressPacket().packet());
assertFalse(hitChain.isDropped());
assertEquals(chains.get(0), hitChain.hitChain());
}
Aggregations