use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetFieldCase in project genius by opendaylight.
the class ActionSetSourceIpTest 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.getIpv4Source());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetFieldCase in project genius by opendaylight.
the class ActionSetSourceIpv6Test 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 Ipv6Match);
Ipv6Match ipv6Match = (Ipv6Match) actionCase.getSetField().getLayer3Match();
assertEquals(new Ipv6Prefix(IP_ADDRESS + "/" + IP_MASK), ipv6Match.getIpv6Source());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetFieldCase in project genius by opendaylight.
the class ActionSetTcpDestinationPortTest method verifyAction.
private void verifyAction(Action action) {
assertTrue(action.getAction() instanceof SetFieldCase);
SetFieldCase actionCase = (SetFieldCase) action.getAction();
assertNotNull(actionCase.getSetField().getLayer4Match());
assertTrue(actionCase.getSetField().getLayer4Match() instanceof TcpMatch);
TcpMatch tcpMatch = (TcpMatch) actionCase.getSetField().getLayer4Match();
assertEquals(PORT, tcpMatch.getTcpDestinationPort().getValue().intValue());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetFieldCase in project genius by opendaylight.
the class ActionSetUdpSourcePortTest method verifyAction.
private void verifyAction(Action action) {
assertTrue(action.getAction() instanceof SetFieldCase);
SetFieldCase actionCase = (SetFieldCase) action.getAction();
assertNotNull(actionCase.getSetField().getLayer4Match());
assertTrue(actionCase.getSetField().getLayer4Match() instanceof UdpMatch);
UdpMatch tcpMatch = (UdpMatch) actionCase.getSetField().getLayer4Match();
assertEquals(PORT, tcpMatch.getUdpSourcePort().getValue().intValue());
}
Aggregations