use of org.opendaylight.genius.mdsalutil.ActionInfo in project genius by opendaylight.
the class ActionInfoBuilderTest method groupActionWithSingleIntegerInStringValue.
@Test
public void groupActionWithSingleIntegerInStringValue() {
ActionInfo actionInfo = new ActionGroup(123);
assertEquals("(new ActionGroupBuilder => [" + System.lineSeparator() + " groupId = 123L" + System.lineSeparator() + "]).build()", generator.getExpression(actionInfo));
}
use of org.opendaylight.genius.mdsalutil.ActionInfo in project genius by opendaylight.
the class ActionInfoBuilderTest method groupActionWithSingleIntegerInStringValueWithActionKey.
@Test
public void groupActionWithSingleIntegerInStringValueWithActionKey() {
ActionInfo actionInfo = new ActionGroup(69, 123);
assertEquals("(new ActionGroupBuilder => [" + System.lineSeparator() + " groupId = 123L" + System.lineSeparator() + "]).build()", generator.getExpression(actionInfo));
}
use of org.opendaylight.genius.mdsalutil.ActionInfo in project genius by opendaylight.
the class ActionInfoBuilderTest method set_field_tunnel_idActionWithBigActionValuesWithActionKey.
@Test
public void set_field_tunnel_idActionWithBigActionValuesWithActionKey() {
ActionInfo actionInfo = new ActionSetFieldTunnelId(69, BigInteger.valueOf(123));
assertEquals("new ActionSetFieldTunnelId(69, 123bi)", generator.getExpression(actionInfo));
}
use of org.opendaylight.genius.mdsalutil.ActionInfo in project genius by opendaylight.
the class ActionInfoImmutableTest method actionInfoActionKeyDoesNotMagicallyChangeOnFlowEntityGetFlowBuilder.
@Test
public void actionInfoActionKeyDoesNotMagicallyChangeOnFlowEntityGetFlowBuilder() {
FlowEntityBuilder flowEntityBuilder = new FlowEntityBuilder().setDpnId(BigInteger.valueOf(123L)).setTableId((short) 1).setPriority(2).setFlowName("TEST-NAME").setFlowId("TEST-ID").setCookie(BigInteger.valueOf(110100480L));
ActionInfo actionInfo = new ActionNxConntrack(27, 1, 0, 0, (short) 255);
List<ActionInfo> actionInfos = new ArrayList<>();
actionInfos.add(actionInfo);
flowEntityBuilder.addInstructionInfoList(new InstructionApplyActions(actionInfos));
FlowEntity flowEntity = flowEntityBuilder.build();
assertEquals(27, ((InstructionApplyActions) flowEntity.getInstructionInfoList().get(0)).getActionInfos().get(0).getActionKey());
flowEntity.getFlowBuilder();
assertEquals(27, ((InstructionApplyActions) flowEntity.getInstructionInfoList().get(0)).getActionInfos().get(0).getActionKey());
flowEntity.getFlowBuilder();
assertEquals(27, ((InstructionApplyActions) flowEntity.getInstructionInfoList().get(0)).getActionInfos().get(0).getActionKey());
}
use of org.opendaylight.genius.mdsalutil.ActionInfo in project genius by opendaylight.
the class ActionSetDestinationIpTest method generateAction.
@Test
public void generateAction() {
ActionInfo actionInfo = new ActionSetDestinationIp(IP_ADDRESS);
assertEquals("new ActionSetDestinationIp(0, new Ipv4Prefix(\"" + IP_ADDRESS + "/" + IP_MASK + "\"))", generator.getExpression(actionInfo));
}
Aggregations