use of org.openkilda.rulemanager.action.PushVlanAction in project open-kilda by telstra.
the class SingleTableIngressYRuleGeneratorTest method buildTransformActionsOneSwitchFullPortInSingleVlanOutTest.
@Test
public void buildTransformActionsOneSwitchFullPortInSingleVlanOutTest() {
Flow flow = buildFlow(ONE_SWITCH_PATH, 0, OUTER_VLAN_ID_2);
SingleTableIngressYRuleGenerator generator = buildGenerator(ONE_SWITCH_PATH, flow, VLAN_ENCAPSULATION);
List<Action> transformActions = generator.buildTransformActions(0, FEATURES);
List<Action> expectedActions = newArrayList(new PushVlanAction(), SetFieldAction.builder().field(Field.VLAN_VID).value(OUTER_VLAN_ID_2).build());
assertEquals(expectedActions, transformActions);
}
use of org.openkilda.rulemanager.action.PushVlanAction in project open-kilda by telstra.
the class SingleTableIngressYRuleGeneratorTest method buildTransformActionsVlanEncapsulationFullPortTest.
@Test
public void buildTransformActionsVlanEncapsulationFullPortTest() {
Flow flow = buildFlow(PATH, 0, 0);
SingleTableIngressYRuleGenerator generator = buildGenerator(PATH, flow, VLAN_ENCAPSULATION);
List<Action> transformActions = generator.buildTransformActions(0, FEATURES);
List<Action> expectedActions = newArrayList(new PushVlanAction(), SetFieldAction.builder().field(Field.VLAN_VID).value(TRANSIT_VLAN_ID).build());
assertEquals(expectedActions, transformActions);
}
use of org.openkilda.rulemanager.action.PushVlanAction in project open-kilda by telstra.
the class MultiTableIngressYRuleGeneratorTest method buildTransformActionsOneSwitchDoubleVlanInDoubleVlanOutTest.
@Test
public void buildTransformActionsOneSwitchDoubleVlanInDoubleVlanOutTest() {
Flow flow = buildFlow(ONE_SWITCH_PATH, OUTER_VLAN_ID_1, INNER_VLAN_ID_1, OUTER_VLAN_ID_2, INNER_VLAN_ID_2);
MultiTableIngressYRuleGenerator generator = buildGenerator(ONE_SWITCH_PATH, flow, VLAN_ENCAPSULATION);
List<Action> transformActions = generator.buildTransformActions(INNER_VLAN_ID_1, FEATURES);
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());
assertEquals(expectedActions, transformActions);
}
use of org.openkilda.rulemanager.action.PushVlanAction in project open-kilda by telstra.
the class MultiTableIngressYRuleGeneratorTest method buildTransformActionsVlanEncapsulationFullPortTest.
@Test
public void buildTransformActionsVlanEncapsulationFullPortTest() {
Flow flow = buildFlow(PATH, 0, 0);
MultiTableIngressYRuleGenerator generator = buildGenerator(PATH, flow, VLAN_ENCAPSULATION);
List<Action> transformActions = generator.buildTransformActions(0, FEATURES);
List<Action> expectedActions = newArrayList(new PushVlanAction(), SetFieldAction.builder().field(Field.VLAN_VID).value(TRANSIT_VLAN_ID).build());
assertEquals(expectedActions, transformActions);
}
use of org.openkilda.rulemanager.action.PushVlanAction in project open-kilda by telstra.
the class MultiTableIngressYRuleGeneratorTest method buildTransformActionsOneSwitchFullPortInDoubleVlanOutTest.
@Test
public void buildTransformActionsOneSwitchFullPortInDoubleVlanOutTest() {
Flow flow = buildFlow(ONE_SWITCH_PATH, 0, 0, OUTER_VLAN_ID_2, INNER_VLAN_ID_2);
MultiTableIngressYRuleGenerator generator = buildGenerator(ONE_SWITCH_PATH, flow, VLAN_ENCAPSULATION);
List<Action> transformActions = generator.buildTransformActions(0, FEATURES);
List<Action> expectedActions = newArrayList(new PushVlanAction(), 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());
assertEquals(expectedActions, transformActions);
}
Aggregations