use of org.onosproject.lisp.msg.types.LispIpv4Address in project onos by opennetworkinglab.
the class LispNonceLcafAddressTest method testConstruction.
@Test
public void testConstruction() {
LispNonceLcafAddress nonceLcafAddress = address1;
LispIpv4Address ipv4Address = new LispIpv4Address(IpAddress.valueOf(IP_ADDRESS_1));
assertThat(nonceLcafAddress.getNonce(), is(NONCE_1));
assertThat(nonceLcafAddress.getAddress(), is(ipv4Address));
}
use of org.onosproject.lisp.msg.types.LispIpv4Address in project onos by opennetworkinglab.
the class LispNonceLcafAddressTest method setup.
@Before
public void setup() {
NonceAddressBuilder builder1 = new NonceAddressBuilder();
LispIpv4Address ipv4Address1 = new LispIpv4Address(IpAddress.valueOf(IP_ADDRESS_1));
address1 = builder1.withNonce(NONCE_1).withAddress(ipv4Address1).build();
NonceAddressBuilder builder2 = new NonceAddressBuilder();
sameAsAddress1 = builder2.withNonce(NONCE_1).withAddress(ipv4Address1).build();
NonceAddressBuilder builder3 = new NonceAddressBuilder();
LispIpv4Address ipv4Address2 = new LispIpv4Address(IpAddress.valueOf(IP_ADDRESS_2));
address2 = builder3.withNonce(NONCE_2).withAddress(ipv4Address2).build();
}
use of org.onosproject.lisp.msg.types.LispIpv4Address in project onos by opennetworkinglab.
the class DefaultLispReferralTest method setup.
@Before
public void setup() {
ReferralBuilder builder1 = new DefaultReferralBuilder();
LispIpv4Address ipv4Address1 = new LispIpv4Address(IpAddress.valueOf(IP_ADDRESS1));
referral1 = builder1.withPriority((byte) 0x01).withWeight((byte) 0x01).withMulticastPriority((byte) 0x01).withMulticastWeight((byte) 0x01).withLocalLocator(true).withRlocProbed(false).withRouted(true).withLocatorAfi(ipv4Address1).build();
ReferralBuilder builder2 = new DefaultReferralBuilder();
sameAsReferral1 = builder2.withPriority((byte) 0x01).withWeight((byte) 0x01).withMulticastPriority((byte) 0x01).withMulticastWeight((byte) 0x01).withLocalLocator(true).withRlocProbed(false).withRouted(true).withLocatorAfi(ipv4Address1).build();
ReferralBuilder builder3 = new DefaultReferralBuilder();
LispIpv4Address ipv4Address2 = new LispIpv4Address(IpAddress.valueOf(IP_ADDRESS2));
referral2 = builder3.withPriority((byte) 0x02).withWeight((byte) 0x02).withMulticastPriority((byte) 0x02).withMulticastWeight((byte) 0x02).withLocalLocator(false).withRlocProbed(true).withRouted(false).withLocatorAfi(ipv4Address2).build();
}
use of org.onosproject.lisp.msg.types.LispIpv4Address in project onos by opennetworkinglab.
the class DefaultLispReferralTest method testConstruction.
@Test
public void testConstruction() {
LispReferral referral = referral1;
LispIpv4Address ipv4Address = new LispIpv4Address(IpAddress.valueOf(IP_ADDRESS1));
assertThat(referral.getPriority(), is((byte) 0x01));
assertThat(referral.getWeight(), is((byte) 0x01));
assertThat(referral.getMulticastPriority(), is((byte) 0x01));
assertThat(referral.getMulticastWeight(), is((byte) 0x01));
assertThat(referral.isLocalLocator(), is(true));
assertThat(referral.isRlocProbed(), is(false));
assertThat(referral.isRouted(), is(true));
assertThat(referral.getLocatorAfi(), is(ipv4Address));
}
Aggregations