Search in sources :

Example 66 with ActionInfo

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

the class ActionSetFieldEthernetDestinationTest method generateAction.

@Test
public void generateAction() {
    ActionInfo actionInfo = new ActionSetFieldEthernetDestination(new MacAddress(MAC_ADDRESS));
    actionInfo.buildAction();
    assertEquals("new ActionSetFieldEthernetDestination(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 67 with ActionInfo

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

the class ActionSetFieldEthernetSourceTest method generateAction.

@Test
public void generateAction() {
    ActionInfo actionInfo = new ActionSetFieldEthernetSource(new MacAddress(MAC_ADDRESS));
    actionInfo.buildAction();
    assertEquals("new ActionSetFieldEthernetSource(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 68 with ActionInfo

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

the class ActionSetIcmpTypeTest method generateAction.

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

Example 69 with ActionInfo

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

the class ActionSetSourceIpTest method generateAction.

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

Example 70 with ActionInfo

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

the class ActionSetSourceIpv6Test method generateAction.

@Test
public void generateAction() {
    ActionInfo actionInfo = new ActionSetSourceIpv6(IP_ADDRESS);
    assertEquals("new ActionSetSourceIpv6(0, new Ipv6Prefix(\"" + IP_ADDRESS + "/" + IP_MASK + "\"))", generator.getExpression(actionInfo));
}
Also used : ActionInfo(org.opendaylight.genius.mdsalutil.ActionInfo) 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