use of org.openkilda.rulemanager.action.GroupAction in project open-kilda by telstra.
the class IngressMirrorRuleGeneratorTest method buildIngressActionsOneSwitchFullPortInSingleVlanOutTest.
@Test
public void buildIngressActionsOneSwitchFullPortInSingleVlanOutTest() {
Flow flow = buildFlow(MULTI_TABLE_ONE_SWITCH_PATH, 0, 0, OUTER_VLAN_ID_2, 0);
IngressMirrorRuleGenerator generator = buildGenerator(MULTI_TABLE_ONE_SWITCH_PATH, flow, VLAN_ENCAPSULATION);
List<Action> transformActions = generator.buildIngressActions(getEndpoint(flow), GROUP_ID);
List<Action> expectedActions = newArrayList(new PushVlanAction(), SetFieldAction.builder().field(Field.VLAN_VID).value(OUTER_VLAN_ID_2).build(), new GroupAction(GROUP_ID));
assertEquals(expectedActions, transformActions);
}
use of org.openkilda.rulemanager.action.GroupAction in project open-kilda by telstra.
the class IngressMirrorRuleGeneratorTest method buildSingleTableIngressActionsOneSwitchFullPortInFullPortOutTest.
@Test
public void buildSingleTableIngressActionsOneSwitchFullPortInFullPortOutTest() {
Flow flow = buildFlow(SINGLE_TABLE_ONE_SWITCH_PATH, 0, 0, 0, 0);
IngressMirrorRuleGenerator generator = buildGenerator(SINGLE_TABLE_ONE_SWITCH_PATH, flow, VLAN_ENCAPSULATION);
List<Action> transformActions = generator.buildIngressActions(getEndpoint(flow), GROUP_ID);
List<Action> expectedActions = newArrayList(new GroupAction(GROUP_ID));
assertEquals(expectedActions, transformActions);
}
use of org.openkilda.rulemanager.action.GroupAction in project open-kilda by telstra.
the class IngressMirrorRuleGeneratorTest method buildIngressActionsOneSwitchDoubleVlanInSingleVlanOutTest.
@Test
public void buildIngressActionsOneSwitchDoubleVlanInSingleVlanOutTest() {
Flow flow = buildFlow(MULTI_TABLE_ONE_SWITCH_PATH, OUTER_VLAN_ID_1, INNER_VLAN_ID_1, OUTER_VLAN_ID_2, 0);
IngressMirrorRuleGenerator generator = buildGenerator(MULTI_TABLE_ONE_SWITCH_PATH, flow, VLAN_ENCAPSULATION);
List<Action> transformActions = generator.buildIngressActions(getEndpoint(flow), GROUP_ID);
List<Action> expectedActions = newArrayList(SetFieldAction.builder().field(Field.VLAN_VID).value(OUTER_VLAN_ID_2).build(), new GroupAction(GROUP_ID));
assertEquals(expectedActions, transformActions);
}
use of org.openkilda.rulemanager.action.GroupAction in project open-kilda by telstra.
the class IngressMirrorRuleGeneratorTest method buildSingleTableIngressActionsOneSwitchFullPortInSingleVlanOutTest.
@Test
public void buildSingleTableIngressActionsOneSwitchFullPortInSingleVlanOutTest() {
Flow flow = buildFlow(SINGLE_TABLE_ONE_SWITCH_PATH, 0, 0, OUTER_VLAN_ID_2, 0);
IngressMirrorRuleGenerator generator = buildGenerator(SINGLE_TABLE_ONE_SWITCH_PATH, flow, VLAN_ENCAPSULATION);
List<Action> transformActions = generator.buildIngressActions(getEndpoint(flow), GROUP_ID);
List<Action> expectedActions = newArrayList(new PushVlanAction(), SetFieldAction.builder().field(Field.VLAN_VID).value(OUTER_VLAN_ID_2).build(), new GroupAction(GROUP_ID));
assertEquals(expectedActions, transformActions);
}
use of org.openkilda.rulemanager.action.GroupAction in project open-kilda by telstra.
the class IngressMirrorRuleGeneratorTest method buildIngressActionsOneSwitchDoubleVlanInDoubleVlanOutTest.
@Test
public void buildIngressActionsOneSwitchDoubleVlanInDoubleVlanOutTest() {
Flow flow = buildFlow(MULTI_TABLE_ONE_SWITCH_PATH, OUTER_VLAN_ID_1, INNER_VLAN_ID_1, OUTER_VLAN_ID_2, INNER_VLAN_ID_2);
IngressMirrorRuleGenerator generator = buildGenerator(MULTI_TABLE_ONE_SWITCH_PATH, flow, VLAN_ENCAPSULATION);
List<Action> transformActions = generator.buildIngressActions(getEndpoint(flow), GROUP_ID);
List<Action> expectedActions = newArrayList(SetFieldAction.builder().field(Field.VLAN_VID).value(INNER_VLAN_ID_2).build(), new PushVlanAction(), SetFieldAction.builder().field(Field.VLAN_VID).value(OUTER_VLAN_ID_2).build(), new GroupAction(GROUP_ID));
assertEquals(expectedActions, transformActions);
}
Aggregations