MatchUtils.createTunnelIDMatch(matchBuilder, new BigInteger(segmentationId));
MatchUtils.createEtherTypeMatch(matchBuilder, new EtherType(Constants.ARP_ETHERTYPE));
- MatchUtils.createArpDstIpv4Match(matchBuilder, new Ipv4Prefix(ipAddress.getHostAddress()));
+ MatchUtils.createArpDstIpv4Match(matchBuilder, MatchUtils.iPv4PrefixFromIPv4Address(ipAddress.getHostAddress()));
// Move Eth Src to Eth Dst
ab.setAction(ActionUtils.nxMoveEthSrcToEthDstAction());
InstructionBuilder ib = new InstructionBuilder();
MatchUtils.createTunnelIDMatch(matchBuilder, new BigInteger(segmentationId));
- MatchUtils.createDstL3IPv4Match(matchBuilder, new Ipv4Prefix(matchAddress.getHostAddress()));
+ MatchUtils.createDstL3IPv4Match(matchBuilder, MatchUtils.iPv4PrefixFromIPv4Address(matchAddress.getHostAddress()));
// Set Dest IP address
- InstructionUtils.createNwDstInstructions(ib, new Ipv4Prefix(rewriteAddress.getHostAddress()));
+ InstructionUtils.createNwDstInstructions(ib, MatchUtils.iPv4PrefixFromIPv4Address(rewriteAddress.getHostAddress()));
ib.setOrder(0);
ib.setKey(new InstructionKey(0));
instructions.add(ib.build());
else
return; //Should not get here. TODO: Other types
- MatchUtils.createDstL3IPv4Match(matchBuilder, new Ipv4Prefix(lbConfig.getVip()));
+ MatchUtils.createDstL3IPv4Match(matchBuilder, MatchUtils.iPv4PrefixFromIPv4Address(lbConfig.getVip()));
MatchUtils.addNxRegMatch(matchBuilder, new MatchUtils.RegMatch(REG_FIELD_A, FIRST_PASS_REGA_MATCH_VALUE));
String flowId = "LOADBALANCER_FORWARD_FLOW1_" + lbConfig.getVip();
else
return; //Should not get here. TODO: Other types
- MatchUtils.createDstL3IPv4Match(matchBuilder, new Ipv4Prefix(vip));
+ MatchUtils.createDstL3IPv4Match(matchBuilder, MatchUtils.iPv4PrefixFromIPv4Address(vip));
MatchUtils.addNxRegMatch(matchBuilder, new MatchUtils.RegMatch(REG_FIELD_A, SECOND_PASS_REGA_MATCH_VALUE),
new MatchUtils.RegMatch(REG_FIELD_B, (long)member.getIndex()));
actionList.add(ab.build());
ab = new ActionBuilder();
- Ipv4Builder ipb = new Ipv4Builder().setIpv4Address(new Ipv4Prefix(member.getIP()));
+ Ipv4Builder ipb = new Ipv4Builder().setIpv4Address(MatchUtils.iPv4PrefixFromIPv4Address(member.getIP()));
ab.setAction(ActionUtils.setNwDstAction(ipb.build()));
ab.setOrder(1);
ab.setKey(new ActionKey(1));
else
return; //Should not get here. TODO: Other types
- MatchUtils.createSrcL3IPv4Match(matchBuilder, new Ipv4Prefix(member.getIP()));
+ MatchUtils.createSrcL3IPv4Match(matchBuilder, MatchUtils.iPv4PrefixFromIPv4Address(member.getIP()));
MatchUtils.createSetSrcTcpMatch(matchBuilder, new PortNumber(member.getPort()));
String flowId = "LOADBALANCER_REVERSE_FLOW_" + vip + "_" + member.getIP();
List<Action> actionList = Lists.newArrayList();
ActionBuilder ab = new ActionBuilder();
- Ipv4Builder ipb = new Ipv4Builder().setIpv4Address(new Ipv4Prefix(vip));
+ Ipv4Builder ipb = new Ipv4Builder().setIpv4Address(MatchUtils.iPv4PrefixFromIPv4Address(vip));
ab.setAction(ActionUtils.setNwSrcAction(ipb.build()));
ab.setOrder(0);
ab.setKey(new ActionKey(0));
InstructionBuilder ib = new InstructionBuilder();
MatchUtils.createTunnelIDMatch(matchBuilder, new BigInteger(segmentationId));
- MatchUtils.createDstL3IPv4Match(matchBuilder, new Ipv4Prefix(matchAddress.getHostAddress()));
+ MatchUtils.createDstL3IPv4Match(matchBuilder,
+ MatchUtils.iPv4PrefixFromIPv4Address(matchAddress.getHostAddress()));
// Set Dest IP address
- InstructionUtils.createNwDstInstructions(ib, new Ipv4Prefix(rewriteAddress.getHostAddress()));
+ InstructionUtils.createNwDstInstructions(ib,
+ MatchUtils.iPv4PrefixFromIPv4Address(rewriteAddress.getHostAddress()));
ib.setOrder(0);
ib.setKey(new InstructionKey(0));
instructions.add(ib.build());