use of org.onosproject.lisp.msg.types.LispAfiAddress in project onos by opennetworkinglab.
the class LispNatLcafAddressTest method setup.
@Before
public void setup() {
NatAddressBuilder builder1 = new NatAddressBuilder();
short msUdpPortNumber1 = 80;
short etrUdpPortNumber1 = 100;
LispIpv4Address globalEtrRlocAddress1 = new LispIpv4Address(IpAddress.valueOf("192.168.1.1"));
LispIpv4Address msRlocAddress1 = new LispIpv4Address(IpAddress.valueOf("192.168.1.2"));
LispIpv4Address privateEtrRlocAddress1 = new LispIpv4Address(IpAddress.valueOf("192.168.1.3"));
LispIpv4Address rtrRloc11 = new LispIpv4Address(IpAddress.valueOf("10.1.1.1"));
LispIpv4Address rtrRloc12 = new LispIpv4Address(IpAddress.valueOf("10.1.1.2"));
List<LispAfiAddress> rtrRlocs1 = ImmutableList.of(rtrRloc11, rtrRloc12);
address1 = builder1.withLength((short) 0).withMsUdpPortNumber(msUdpPortNumber1).withEtrUdpPortNumber(etrUdpPortNumber1).withGlobalEtrRlocAddress(globalEtrRlocAddress1).withMsRlocAddress(msRlocAddress1).withPrivateEtrRlocAddress(privateEtrRlocAddress1).withRtrRlocAddresses(rtrRlocs1).build();
NatAddressBuilder builder2 = new NatAddressBuilder();
sameAsAddress1 = builder2.withLength((short) 0).withMsUdpPortNumber(msUdpPortNumber1).withEtrUdpPortNumber(etrUdpPortNumber1).withGlobalEtrRlocAddress(globalEtrRlocAddress1).withMsRlocAddress(msRlocAddress1).withPrivateEtrRlocAddress(privateEtrRlocAddress1).withRtrRlocAddresses(rtrRlocs1).build();
NatAddressBuilder builder3 = new NatAddressBuilder();
short msUdpPortNumber2 = 81;
short etrUdpPortNumber2 = 101;
LispIpv4Address globalEtrRlocAddress2 = new LispIpv4Address(IpAddress.valueOf("192.168.2.1"));
LispIpv4Address msRlocAddress2 = new LispIpv4Address(IpAddress.valueOf("192.168.2.2"));
LispIpv4Address privateEtrRlocAddress2 = new LispIpv4Address(IpAddress.valueOf("192.168.2.3"));
LispIpv4Address rtrRloc21 = new LispIpv4Address(IpAddress.valueOf("10.1.2.1"));
LispIpv4Address rtrRloc22 = new LispIpv4Address(IpAddress.valueOf("10.1.2.2"));
List<LispAfiAddress> rtrRlocs2 = ImmutableList.of(rtrRloc21, rtrRloc22);
address2 = builder3.withLength((short) 0).withMsUdpPortNumber(msUdpPortNumber2).withEtrUdpPortNumber(etrUdpPortNumber2).withGlobalEtrRlocAddress(globalEtrRlocAddress2).withMsRlocAddress(msRlocAddress2).withPrivateEtrRlocAddress(privateEtrRlocAddress2).withRtrRlocAddresses(rtrRlocs2).build();
}
Aggregations