use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.SetFieldCase in project genius by opendaylight.
the class ActionSetDestinationIpTest method verifyAction.
private void verifyAction(Action action) {
assertTrue(action.getAction() instanceof SetFieldCase);
SetFieldCase actionCase = (SetFieldCase) action.getAction();
assertNotNull(actionCase.getSetField().getLayer3Match());
assertTrue(actionCase.getSetField().getLayer3Match() instanceof Ipv4Match);
Ipv4Match ipv4Match = (Ipv4Match) actionCase.getSetField().getLayer3Match();
assertEquals(new Ipv4Prefix(IP_ADDRESS + "/" + IP_MASK), ipv4Match.getIpv4Destination());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.SetFieldCase in project genius by opendaylight.
the class ActionSetFieldEthernetDestinationTest method verifyAction.
private void verifyAction(Action action) {
assertTrue(action.getAction() instanceof SetFieldCase);
SetFieldCase actionCase = (SetFieldCase) action.getAction();
assertNotNull(actionCase.getSetField().getEthernetMatch());
assertNotNull(actionCase.getSetField().getEthernetMatch().getEthernetDestination());
assertEquals(MAC_ADDRESS, actionCase.getSetField().getEthernetMatch().getEthernetDestination().getAddress().getValue());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.SetFieldCase in project genius by opendaylight.
the class ActionSetFieldEthernetSourceTest method verifyAction.
private void verifyAction(Action action) {
assertTrue(action.getAction() instanceof SetFieldCase);
SetFieldCase actionCase = (SetFieldCase) action.getAction();
assertNotNull(actionCase.getSetField().getEthernetMatch());
assertNotNull(actionCase.getSetField().getEthernetMatch().getEthernetSource());
assertEquals(MAC_ADDRESS, actionCase.getSetField().getEthernetMatch().getEthernetSource().getAddress().getValue());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.SetFieldCase in project genius by opendaylight.
the class ActionSetIcmpTypeTest method verifyAction.
private void verifyAction(Action action) {
assertTrue(action.getAction() instanceof SetFieldCase);
SetFieldCase actionCase = (SetFieldCase) action.getAction();
assertNotNull(actionCase.getSetField().getIcmpv4Match());
Icmpv4Match icmpv4Match = actionCase.getSetField().getIcmpv4Match();
assertEquals(TYPE, icmpv4Match.getIcmpv4Type().shortValue());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.SetFieldCase in project genius by opendaylight.
the class ActionSetIcmpv6TypeTest method verifyAction.
private void verifyAction(Action action) {
assertTrue(action.getAction() instanceof SetFieldCase);
SetFieldCase actionCase = (SetFieldCase) action.getAction();
assertNotNull(actionCase.getSetField().getIcmpv6Match());
Icmpv6Match icmpv6Match = actionCase.getSetField().getIcmpv6Match();
assertEquals(TYPE, icmpv6Match.getIcmpv6Type().shortValue());
}
Aggregations