use of org.onosproject.mapping.addresses.MappingAddress in project onos by opennetworkinglab.
the class LispAsAddressTest method testConstruction.
@Test
public void testConstruction() {
LispAsAddress address = address1;
MappingAddress ma = MappingAddresses.ipv4MappingAddress(IP_ADDRESS_1);
assertThat(address.getAsNumber(), is(AS_NUMBER_1));
assertThat(address.getAddress(), is(ma));
}
use of org.onosproject.mapping.addresses.MappingAddress in project onos by opennetworkinglab.
the class LispListAddressTest method setUp.
@Before
public void setUp() {
MappingAddress ipv4Addr1 = MappingAddresses.ipv4MappingAddress(IPV4_ADDRESS_1);
MappingAddress ipv6Addr1 = MappingAddresses.ipv6MappingAddress(IPV6_ADDRESS_1);
address1 = new LispListAddress.Builder().withIpv4(ipv4Addr1).withIpv6(ipv6Addr1).build();
sameAsAddress1 = new LispListAddress.Builder().withIpv4(ipv4Addr1).withIpv6(ipv6Addr1).build();
MappingAddress ipv4Addr2 = MappingAddresses.ipv4MappingAddress(IPV4_ADDRESS_2);
MappingAddress ipv6Addr2 = MappingAddresses.ipv6MappingAddress(IPV6_ADDRESS_2);
address2 = new LispListAddress.Builder().withIpv4(ipv4Addr2).withIpv6(ipv6Addr2).build();
}
use of org.onosproject.mapping.addresses.MappingAddress in project onos by opennetworkinglab.
the class LispNatAddressTest method setUp.
@Before
public void setUp() {
MappingAddress ma1 = MappingAddresses.ipv4MappingAddress(IP_ADDRESS_1);
MappingAddress rtr11 = MappingAddresses.ipv4MappingAddress(RTR_ADDRESS_11);
MappingAddress rtr12 = MappingAddresses.ipv4MappingAddress(RTR_ADDRESS_12);
List<MappingAddress> rtrRlocs1 = ImmutableList.of(rtr11, rtr12);
address1 = new LispNatAddress.Builder().withMsUdpPortNumber(MS_UDP_PORT_NUMBER).withEtrUdpPortNumber(ETR_UDP_PORT_NUMBER).withGlobalEtrRlocAddress(ma1).withMsRlocAddress(ma1).withPrivateEtrRlocAddress(ma1).withRtrRlocAddresses(rtrRlocs1).build();
sameAsAddress1 = new LispNatAddress.Builder().withMsUdpPortNumber(MS_UDP_PORT_NUMBER).withEtrUdpPortNumber(ETR_UDP_PORT_NUMBER).withGlobalEtrRlocAddress(ma1).withMsRlocAddress(ma1).withPrivateEtrRlocAddress(ma1).withRtrRlocAddresses(rtrRlocs1).build();
MappingAddress ma2 = MappingAddresses.ipv4MappingAddress(IP_ADDRESS_2);
MappingAddress rtr21 = MappingAddresses.ipv4MappingAddress(RTR_ADDRESS_21);
MappingAddress rtr22 = MappingAddresses.ipv4MappingAddress(RTR_ADDRESS_22);
List<MappingAddress> rtrRlocs2 = ImmutableList.of(rtr21, rtr22);
address2 = new LispNatAddress.Builder().withMsUdpPortNumber(MS_UDP_PORT_NUMBER).withEtrUdpPortNumber(ETR_UDP_PORT_NUMBER).withGlobalEtrRlocAddress(ma2).withMsRlocAddress(ma2).withPrivateEtrRlocAddress(ma2).withRtrRlocAddresses(rtrRlocs2).build();
}
use of org.onosproject.mapping.addresses.MappingAddress in project onos by opennetworkinglab.
the class LispNonceAddressTest method setUp.
@Before
public void setUp() {
MappingAddress ma1 = MappingAddresses.ipv4MappingAddress(IP_ADDRESS_1);
address1 = new LispNonceAddress.Builder().withNonce(NONCE_1).withAddress(ma1).build();
sameAsAddress1 = new LispNonceAddress.Builder().withNonce(NONCE_1).withAddress(ma1).build();
MappingAddress ma2 = MappingAddresses.ipv4MappingAddress(IP_ADDRESS_2);
address2 = new LispNonceAddress.Builder().withNonce(NONCE_2).withAddress(ma2).build();
}
use of org.onosproject.mapping.addresses.MappingAddress in project onos by opennetworkinglab.
the class LispSegmentAddressTest method testConstruction.
@Test
public void testConstruction() {
LispSegmentAddress address = address1;
MappingAddress ma = MappingAddresses.ipv4MappingAddress(IP_ADDRESS_1);
assertThat(address.getInstanceId(), is(INSTANCE_ID_1));
assertThat(address.getAddress(), is(ma));
}
Aggregations