use of org.openkilda.model.FlowPath in project open-kilda by telstra.
the class EgressRuleGeneratorTest method buildVlanMultiTableOuterVlanEgressRuleTest.
@Test
public void buildVlanMultiTableOuterVlanEgressRuleTest() {
FlowPath path = buildPath(true);
Flow flow = buildFlow(path, OUTER_VLAN_ID, 0);
EgressRuleGenerator generator = buildGenerator(path, flow, VLAN_ENCAPSULATION);
List<SpeakerData> commands = generator.generateCommands(SWITCH_2);
ArrayList<Action> expectedApplyActions = Lists.newArrayList(SetFieldAction.builder().field(Field.VLAN_VID).value(OUTER_VLAN_ID).build(), new PortOutAction(new PortNumber(PORT_NUMBER_4)));
assertEgressCommands(commands, OfTable.EGRESS, VLAN_ENCAPSULATION, expectedApplyActions);
}
use of org.openkilda.model.FlowPath in project open-kilda by telstra.
the class EgressRuleGeneratorTest method buildVlanMultiTableOuterInnerVlanEqualsTransitEgressRuleTest.
@Test
public void buildVlanMultiTableOuterInnerVlanEqualsTransitEgressRuleTest() {
FlowPath path = buildPath(true);
Flow flow = buildFlow(path, OUTER_VLAN_ID, VLAN_ENCAPSULATION.getId());
EgressRuleGenerator generator = buildGenerator(path, flow, VLAN_ENCAPSULATION);
List<SpeakerData> commands = generator.generateCommands(SWITCH_2);
ArrayList<Action> expectedApplyActions = Lists.newArrayList(new PushVlanAction(), SetFieldAction.builder().field(Field.VLAN_VID).value(OUTER_VLAN_ID).build(), new PortOutAction(new PortNumber(PORT_NUMBER_4)));
assertEgressCommands(commands, OfTable.EGRESS, VLAN_ENCAPSULATION, expectedApplyActions);
}
use of org.openkilda.model.FlowPath in project open-kilda by telstra.
the class EgressRuleGeneratorTest method buildVxlanMultiTableFullPortEgressRuleTest.
@Test
public void buildVxlanMultiTableFullPortEgressRuleTest() {
FlowPath path = buildPath(true);
Flow flow = buildFlow(path, 0, 0);
EgressRuleGenerator generator = buildGenerator(path, flow, VXLAN_ENCAPSULATION);
List<SpeakerData> commands = generator.generateCommands(SWITCH_2);
ArrayList<Action> expectedApplyActions = Lists.newArrayList(new PopVxlanAction(ActionType.POP_VXLAN_NOVIFLOW), new PortOutAction(new PortNumber(PORT_NUMBER_4)));
assertEgressCommands(commands, OfTable.EGRESS, VXLAN_ENCAPSULATION, expectedApplyActions);
}
use of org.openkilda.model.FlowPath in project open-kilda by telstra.
the class EgressRuleGeneratorTest method buildVxlanMultiTableOuterVlanEgressRuleTest.
@Test
public void buildVxlanMultiTableOuterVlanEgressRuleTest() {
FlowPath path = buildPath(true);
Flow flow = buildFlow(path, OUTER_VLAN_ID, 0);
EgressRuleGenerator generator = buildGenerator(path, flow, VXLAN_ENCAPSULATION);
List<SpeakerData> commands = generator.generateCommands(SWITCH_2);
ArrayList<Action> expectedApplyActions = Lists.newArrayList(new PopVxlanAction(ActionType.POP_VXLAN_NOVIFLOW), new PushVlanAction(), SetFieldAction.builder().field(Field.VLAN_VID).value(OUTER_VLAN_ID).build(), new PortOutAction(new PortNumber(PORT_NUMBER_4)));
assertEgressCommands(commands, OfTable.EGRESS, VXLAN_ENCAPSULATION, expectedApplyActions);
}
use of org.openkilda.model.FlowPath in project open-kilda by telstra.
the class EgressRuleGeneratorTest method buildVlanMultiTableOuterVlanEqualsTransitEgressRuleTest.
@Test
public void buildVlanMultiTableOuterVlanEqualsTransitEgressRuleTest() {
FlowPath path = buildPath(true);
Flow flow = buildFlow(path, VLAN_ENCAPSULATION.getId(), 0);
EgressRuleGenerator generator = buildGenerator(path, flow, VLAN_ENCAPSULATION);
List<SpeakerData> commands = generator.generateCommands(SWITCH_2);
ArrayList<Action> expectedApplyActions = Lists.newArrayList(new PortOutAction(new PortNumber(PORT_NUMBER_4)));
assertEgressCommands(commands, OfTable.EGRESS, VLAN_ENCAPSULATION, expectedApplyActions);
}
Aggregations