Search in sources :

Example 1 with DefaultReferralRecordBuilder

use of org.onosproject.lisp.msg.protocols.DefaultLispReferralRecord.DefaultReferralRecordBuilder in project onos by opennetworkinglab.

the class DefaultLispMapReferralTest method getReferralRecord.

private LispReferralRecord getReferralRecord() {
    ReferralRecordBuilder builder = new DefaultReferralRecordBuilder();
    LispIpv4Address ipv4Locator = new LispIpv4Address(IpAddress.valueOf(IP_ADDRESS));
    return builder.withRecordTtl(100).withIsAuthoritative(true).withIsIncomplete(false).withMapVersionNumber((short) 1).withMaskLength((byte) 0x01).withAction(LispMapReplyAction.NativelyForward).withEidPrefixAfi(ipv4Locator).build();
}
Also used : LispIpv4Address(org.onosproject.lisp.msg.types.LispIpv4Address) ReferralRecordBuilder(org.onosproject.lisp.msg.protocols.LispReferralRecord.ReferralRecordBuilder) DefaultReferralRecordBuilder(org.onosproject.lisp.msg.protocols.DefaultLispReferralRecord.DefaultReferralRecordBuilder) DefaultReferralRecordBuilder(org.onosproject.lisp.msg.protocols.DefaultLispReferralRecord.DefaultReferralRecordBuilder)

Example 2 with DefaultReferralRecordBuilder

use of org.onosproject.lisp.msg.protocols.DefaultLispReferralRecord.DefaultReferralRecordBuilder in project onos by opennetworkinglab.

the class DefaultLispReferralRecordTest method setup.

@Before
public void setup() {
    ReferralRecordBuilder builder1 = new DefaultReferralRecordBuilder();
    LispIpv4Address ipv4Address1 = new LispIpv4Address(IpAddress.valueOf(IP_ADDRESS1));
    record1 = builder1.withRecordTtl(100).withIsAuthoritative(true).withIsIncomplete(false).withMapVersionNumber((short) 1).withMaskLength((byte) 0x01).withAction(LispMapReplyAction.NativelyForward).withEidPrefixAfi(ipv4Address1).build();
    ReferralRecordBuilder builder2 = new DefaultReferralRecordBuilder();
    sameAsRecord1 = builder2.withRecordTtl(100).withIsAuthoritative(true).withIsIncomplete(false).withMapVersionNumber((short) 1).withMaskLength((byte) 0x01).withAction(LispMapReplyAction.NativelyForward).withEidPrefixAfi(ipv4Address1).build();
    ReferralRecordBuilder builder3 = new DefaultReferralRecordBuilder();
    LispIpv4Address ipv4Address2 = new LispIpv4Address(IpAddress.valueOf(IP_ADDRESS2));
    record2 = builder3.withRecordTtl(200).withIsAuthoritative(false).withIsIncomplete(true).withMapVersionNumber((short) 2).withMaskLength((byte) 0x02).withAction(LispMapReplyAction.Drop).withEidPrefixAfi(ipv4Address2).build();
}
Also used : LispIpv4Address(org.onosproject.lisp.msg.types.LispIpv4Address) ReferralRecordBuilder(org.onosproject.lisp.msg.protocols.LispReferralRecord.ReferralRecordBuilder) DefaultReferralRecordBuilder(org.onosproject.lisp.msg.protocols.DefaultLispReferralRecord.DefaultReferralRecordBuilder) DefaultReferralRecordBuilder(org.onosproject.lisp.msg.protocols.DefaultLispReferralRecord.DefaultReferralRecordBuilder) Before(org.junit.Before)

Aggregations

DefaultReferralRecordBuilder (org.onosproject.lisp.msg.protocols.DefaultLispReferralRecord.DefaultReferralRecordBuilder)2 ReferralRecordBuilder (org.onosproject.lisp.msg.protocols.LispReferralRecord.ReferralRecordBuilder)2 LispIpv4Address (org.onosproject.lisp.msg.types.LispIpv4Address)2 Before (org.junit.Before)1