Search in sources :

Example 56 with ActionInfo

use of org.opendaylight.genius.mdsalutil.ActionInfo in project genius by opendaylight.

the class ActionLoadIpToSpaTest method generateAction.

@Test
public void generateAction() {
    ActionInfo actionInfo = new ActionLoadIpToSpa(IP_ADDRESS);
    assertEquals("new ActionLoadIpToSpa(0, \"" + IP_ADDRESS + "\")", generator.getExpression(actionInfo));
}
Also used : ActionInfo(org.opendaylight.genius.mdsalutil.ActionInfo) Test(org.junit.Test)

Example 57 with ActionInfo

use of org.opendaylight.genius.mdsalutil.ActionInfo in project genius by opendaylight.

the class ActionLoadMacToShaTest method generateAction.

@Test
public void generateAction() {
    ActionInfo actionInfo = new ActionLoadMacToSha(new MacAddress(MAC_ADDRESS));
    assertEquals("new ActionLoadMacToSha(0, new MacAddress(\"" + MAC_ADDRESS + "\"))", generator.getExpression(actionInfo));
}
Also used : ActionInfo(org.opendaylight.genius.mdsalutil.ActionInfo) MacAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress) Test(org.junit.Test)

Example 58 with ActionInfo

use of org.opendaylight.genius.mdsalutil.ActionInfo in project genius by opendaylight.

the class ActionMoveSourceDestinationIpv6Test method generateAction.

@Test
public void generateAction() {
    ActionInfo actionInfo = new ActionMoveSourceDestinationIpv6();
    assertEquals("new ActionMoveSourceDestinationIpv6", generator.getExpression(actionInfo));
}
Also used : ActionInfo(org.opendaylight.genius.mdsalutil.ActionInfo) Test(org.junit.Test)

Example 59 with ActionInfo

use of org.opendaylight.genius.mdsalutil.ActionInfo in project genius by opendaylight.

the class ActionNxLoadInPortTest method generateAction.

@Test
public void generateAction() {
    ActionInfo actionInfo = new ActionNxLoadInPort(VALUE);
    assertEquals("new ActionNxLoadInPort(0, " + VALUE + "bi)", generator.getExpression(actionInfo));
}
Also used : ActionInfo(org.opendaylight.genius.mdsalutil.ActionInfo) Test(org.junit.Test)

Example 60 with ActionInfo

use of org.opendaylight.genius.mdsalutil.ActionInfo in project genius by opendaylight.

the class ActionInfoBuilderTest method learnActionValuesMatrix.

@Test
@Ignore("Needs to be rewritten")
public void learnActionValuesMatrix() {
    ActionInfo actionInfo = new ActionLearn(1, 2, 3, BigInteger.valueOf(4), 5, (short) 6, 7, 8, Arrays.asList(new ActionLearn.CopyFromValue(2, 3, 4), new ActionLearn.OutputToPort(4, 5)));
    assertEquals("(new ActionInfoBuilder => [" + System.lineSeparator() + "    actionType = ActionType.learn" + System.lineSeparator() + "    actionValues = #[" + System.lineSeparator() + "        \"1\"," + System.lineSeparator() + "        \"2\"," + System.lineSeparator() + "        \"3\"," + System.lineSeparator() + "        \"4\"," + System.lineSeparator() + "        \"5\"," + System.lineSeparator() + "        \"6\"," + System.lineSeparator() + "        \"7\"," + System.lineSeparator() + "        \"8\"" + System.lineSeparator() + "    ]" + System.lineSeparator() + "    actionValuesMatrix = #[" + System.lineSeparator() + "        #[" + System.lineSeparator() + "            \"COPY_FROM_VALUE\"," + System.lineSeparator() + "            \"2\"," + System.lineSeparator() + "            \"3\"," + System.lineSeparator() + "            \"4\"" + System.lineSeparator() + "        ]," + System.lineSeparator() + "        #[" + System.lineSeparator() + "            \"OUTPUT_TO_PORT\"," + System.lineSeparator() + "            \"4\"," + System.lineSeparator() + "            \"5\"" + System.lineSeparator() + "        ]" + System.lineSeparator() + "    ]" + System.lineSeparator() + "]).build()", generator.getExpression(actionInfo));
}
Also used : ActionLearn(org.opendaylight.genius.mdsalutil.actions.ActionLearn) ActionInfo(org.opendaylight.genius.mdsalutil.ActionInfo) Ignore(org.junit.Ignore) Test(org.junit.Test)

Aggregations

ActionInfo (org.opendaylight.genius.mdsalutil.ActionInfo)133 ArrayList (java.util.ArrayList)97 InstructionInfo (org.opendaylight.genius.mdsalutil.InstructionInfo)74 InstructionApplyActions (org.opendaylight.genius.mdsalutil.instructions.InstructionApplyActions)73 MatchInfo (org.opendaylight.genius.mdsalutil.MatchInfo)52 FlowEntity (org.opendaylight.genius.mdsalutil.FlowEntity)39 MatchMetadata (org.opendaylight.genius.mdsalutil.matches.MatchMetadata)33 Test (org.junit.Test)32 ActionNxResubmit (org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit)32 BigInteger (java.math.BigInteger)26 MacAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress)20 MatchInfoBase (org.opendaylight.genius.mdsalutil.MatchInfoBase)17 ActionGroup (org.opendaylight.genius.mdsalutil.actions.ActionGroup)16 InstructionGotoTable (org.opendaylight.genius.mdsalutil.instructions.InstructionGotoTable)15 BucketInfo (org.opendaylight.genius.mdsalutil.BucketInfo)14 ActionNxConntrack (org.opendaylight.genius.mdsalutil.actions.ActionNxConntrack)12 ActionPuntToController (org.opendaylight.genius.mdsalutil.actions.ActionPuntToController)12 ActionSetFieldTunnelId (org.opendaylight.genius.mdsalutil.actions.ActionSetFieldTunnelId)12 CopyOnWriteArrayList (java.util.concurrent.CopyOnWriteArrayList)11 ActionDrop (org.opendaylight.genius.mdsalutil.actions.ActionDrop)9