use of org.openkilda.rulemanager.SpeakerData 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.rulemanager.SpeakerData 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.rulemanager.SpeakerData 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);
}
use of org.openkilda.rulemanager.SpeakerData in project open-kilda by telstra.
the class EgressRuleGeneratorTest method buildVxlanMultiTableOuterInnerVlanEgressRuleTest.
@Test
public void buildVxlanMultiTableOuterInnerVlanEgressRuleTest() {
FlowPath path = buildPath(true);
Flow flow = buildFlow(path, OUTER_VLAN_ID, INNER_VLAN_ID);
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(INNER_VLAN_ID).build(), 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.rulemanager.SpeakerData in project open-kilda by telstra.
the class EgressRuleGeneratorTest method buildVlanSingleTableOuterVlanEgressRuleTest.
@Test
public void buildVlanSingleTableOuterVlanEgressRuleTest() {
FlowPath path = buildPath(false);
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.INPUT, VLAN_ENCAPSULATION, expectedApplyActions);
}
Aggregations