use of org.onosproject.lisp.msg.types.LispIpv4Address in project onos by opennetworkinglab.
the class DefaultLispMapRecordTest method setup.
@Before
public void setup() {
MapRecordBuilder builder1 = new DefaultMapRecordBuilder();
LispIpv4Address ipv4Locator1 = new LispIpv4Address(IpAddress.valueOf(IP_ADDRESS_1));
record1 = builder1.withRecordTtl(100).withIsAuthoritative(true).withMapVersionNumber((short) 1).withMaskLength((byte) 0x01).withAction(LispMapReplyAction.NativelyForward).withEidPrefixAfi(ipv4Locator1).build();
MapRecordBuilder builder2 = new DefaultMapRecordBuilder();
sameAsRecord1 = builder2.withRecordTtl(100).withIsAuthoritative(true).withMapVersionNumber((short) 1).withMaskLength((byte) 0x01).withAction(LispMapReplyAction.NativelyForward).withEidPrefixAfi(ipv4Locator1).build();
MapRecordBuilder builder3 = new DefaultMapRecordBuilder();
LispIpv4Address ipv4Locator2 = new LispIpv4Address(IpAddress.valueOf(IP_ADDRESS_2));
record2 = builder3.withRecordTtl(200).withIsAuthoritative(false).withMapVersionNumber((short) 2).withMaskLength((byte) 0x02).withAction(LispMapReplyAction.Drop).withEidPrefixAfi(ipv4Locator2).build();
}
use of org.onosproject.lisp.msg.types.LispIpv4Address in project onos by opennetworkinglab.
the class DefaultLispMapRegisterTest method getMapRecord.
private LispMapRecord getMapRecord() {
MapRecordBuilder builder1 = new DefaultMapRecordBuilder();
LispIpv4Address ipv4Locator1 = new LispIpv4Address(IpAddress.valueOf(IP_ADDRESS));
return builder1.withRecordTtl(100).withIsAuthoritative(true).withMapVersionNumber((short) 1).withMaskLength((byte) 0x01).withAction(LispMapReplyAction.NativelyForward).withEidPrefixAfi(ipv4Locator1).build();
}
use of org.onosproject.lisp.msg.types.LispIpv4Address in project onos by opennetworkinglab.
the class DefaultLispReferralRecordTest method testConstruction.
@Test
public void testConstruction() {
LispReferralRecord record = record1;
LispIpv4Address ipv4Address1 = new LispIpv4Address(IpAddress.valueOf(IP_ADDRESS1));
assertThat(record.getRecordTtl(), is(100));
assertThat(record.isAuthoritative(), is(true));
assertThat(record.isIncomplete(), is(false));
assertThat(record.getMapVersionNumber(), is((short) 1));
assertThat(record.getMaskLength(), is((byte) 0x01));
assertThat(record.getAction(), is(LispMapReplyAction.NativelyForward));
assertThat(record.getEidPrefixAfi(), is(ipv4Address1));
}
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