use of org.openkilda.rulemanager.action.PopVlanAction in project open-kilda by telstra.
the class EgressMirrorRuleGeneratorTest method buildVlanSingleTableFullPortEgressMirrorRuleTest.
@Test
public void buildVlanSingleTableFullPortEgressMirrorRuleTest() {
FlowPath path = buildPathWithMirror(false);
Flow flow = buildFlow(path, 0, 0);
EgressMirrorRuleGenerator generator = buildGenerator(path, flow, VLAN_ENCAPSULATION);
List<SpeakerData> commands = generator.generateCommands(SWITCH_2);
assertEquals(2, commands.size());
FlowSpeakerData egressCommand = getCommand(FlowSpeakerData.class, commands);
GroupSpeakerData groupCommand = getCommand(GroupSpeakerData.class, commands);
ArrayList<Action> expectedApplyActions = Lists.newArrayList(new PopVlanAction(), new GroupAction(GROUP_ID));
assertEgressCommand(egressCommand, OfTable.INPUT, VLAN_ENCAPSULATION, expectedApplyActions, groupCommand.getUuid());
assertGroupCommand(groupCommand);
}
use of org.openkilda.rulemanager.action.PopVlanAction in project open-kilda by telstra.
the class EgressMirrorRuleGeneratorTest method buildVlanMultiTableFullPortEgressMirrorRuleTest.
@Test
public void buildVlanMultiTableFullPortEgressMirrorRuleTest() {
FlowPath path = buildPathWithMirror(true);
Flow flow = buildFlow(path, 0, 0);
EgressMirrorRuleGenerator generator = buildGenerator(path, flow, VLAN_ENCAPSULATION);
List<SpeakerData> commands = generator.generateCommands(SWITCH_2);
assertEquals(2, commands.size());
FlowSpeakerData egressCommand = getCommand(FlowSpeakerData.class, commands);
GroupSpeakerData groupCommand = getCommand(GroupSpeakerData.class, commands);
ArrayList<Action> expectedApplyActions = Lists.newArrayList(new PopVlanAction(), new GroupAction(GROUP_ID));
assertEgressCommand(egressCommand, OfTable.EGRESS, VLAN_ENCAPSULATION, expectedApplyActions, groupCommand.getUuid());
assertGroupCommand(groupCommand);
}
use of org.openkilda.rulemanager.action.PopVlanAction in project open-kilda by telstra.
the class MultiTableIngressYRuleGeneratorTest method buildTransformActionsOneSwitchDoubleVlanInFullPortOutTest.
@Test
public void buildTransformActionsOneSwitchDoubleVlanInFullPortOutTest() {
Flow flow = buildFlow(ONE_SWITCH_PATH, OUTER_VLAN_ID_1, INNER_VLAN_ID_1, 0, 0);
MultiTableIngressYRuleGenerator generator = buildGenerator(ONE_SWITCH_PATH, flow, VLAN_ENCAPSULATION);
List<Action> transformActions = generator.buildTransformActions(INNER_VLAN_ID_1, FEATURES);
List<Action> expectedActions = newArrayList(new PopVlanAction());
assertEquals(expectedActions, transformActions);
}
use of org.openkilda.rulemanager.action.PopVlanAction in project open-kilda by telstra.
the class MultiTableIngressYRuleGeneratorTest method buildTransformActionsVxlanEncapsulationDoubleVlanTest.
@Test
public void buildTransformActionsVxlanEncapsulationDoubleVlanTest() {
Flow flow = buildFlow(PATH, OUTER_VLAN_ID_1, INNER_VLAN_ID_1);
MultiTableIngressYRuleGenerator generator = buildGenerator(PATH, flow, VXLAN_ENCAPSULATION);
List<Action> transformActions = generator.buildTransformActions(INNER_VLAN_ID_1, FEATURES);
List<Action> expectedActions = newArrayList(new PopVlanAction(), buildPushVxlan());
assertEquals(expectedActions, transformActions);
}
use of org.openkilda.rulemanager.action.PopVlanAction in project open-kilda by telstra.
the class EgressRuleGeneratorTest method buildVlanMultiTableFullPortEgressRuleTest.
@Test
public void buildVlanMultiTableFullPortEgressRuleTest() {
FlowPath path = buildPath(true);
Flow flow = buildFlow(path, 0, 0);
EgressRuleGenerator generator = buildGenerator(path, flow, VLAN_ENCAPSULATION);
List<SpeakerData> commands = generator.generateCommands(SWITCH_2);
ArrayList<Action> expectedApplyActions = Lists.newArrayList(new PopVlanAction(), new PortOutAction(new PortNumber(PORT_NUMBER_4)));
assertEgressCommands(commands, OfTable.EGRESS, VLAN_ENCAPSULATION, expectedApplyActions);
}
Aggregations