use of org.onosproject.lisp.msg.types.lcaf.LispTeRecord.TeRecordBuilder in project onos by opennetworkinglab.
the class LispTeLcafAddressTest method setup.
@Before
public void setup() {
TeAddressBuilder builder1 = new TeAddressBuilder();
TeRecordBuilder recordBuilder1 = new TeRecordBuilder();
LispIpv4Address rtrRloc1 = new LispIpv4Address(IpAddress.valueOf("192.168.1.1"));
recordBuilder1.withIsLookup(false);
recordBuilder1.withIsRlocProbe(false);
recordBuilder1.withIsStrict(false);
recordBuilder1.withRtrRlocAddress(rtrRloc1);
LispTeRecord record1 = recordBuilder1.build();
TeRecordBuilder recordBuilder2 = new TeRecordBuilder();
LispIpv4Address rtrRloc2 = new LispIpv4Address(IpAddress.valueOf("192.168.1.2"));
recordBuilder2.withIsLookup(false);
recordBuilder2.withIsRlocProbe(true);
recordBuilder2.withIsStrict(false);
recordBuilder2.withRtrRlocAddress(rtrRloc2);
LispTeRecord record2 = recordBuilder2.build();
builder1.withTeRecords(ImmutableList.of(record1, record2));
address1 = builder1.build();
TeAddressBuilder builder2 = new TeAddressBuilder();
TeRecordBuilder recordBuilder3 = new TeRecordBuilder();
recordBuilder3.withIsLookup(false);
recordBuilder3.withIsRlocProbe(false);
recordBuilder3.withIsStrict(false);
recordBuilder3.withRtrRlocAddress(rtrRloc1);
LispTeRecord record3 = recordBuilder3.build();
TeRecordBuilder recordBuilder4 = new TeRecordBuilder();
recordBuilder4.withIsLookup(false);
recordBuilder4.withIsRlocProbe(true);
recordBuilder4.withIsStrict(false);
recordBuilder4.withRtrRlocAddress(rtrRloc2);
LispTeRecord record4 = recordBuilder4.build();
builder2.withTeRecords(ImmutableList.of(record3, record4));
sameAsAddress1 = builder2.build();
TeAddressBuilder builder3 = new TeAddressBuilder();
TeRecordBuilder recordBuilder5 = new TeRecordBuilder();
LispIpv4Address rtrRloc3 = new LispIpv4Address(IpAddress.valueOf("192.168.2.1"));
recordBuilder5.withIsLookup(true);
recordBuilder5.withIsRlocProbe(false);
recordBuilder5.withIsStrict(true);
recordBuilder5.withRtrRlocAddress(rtrRloc3);
LispTeRecord record5 = recordBuilder5.build();
TeRecordBuilder recordBuilder6 = new TeRecordBuilder();
LispIpv4Address rtrRloc4 = new LispIpv4Address(IpAddress.valueOf("192.168.2.2"));
recordBuilder6.withIsLookup(true);
recordBuilder6.withIsRlocProbe(true);
recordBuilder6.withIsStrict(true);
recordBuilder6.withRtrRlocAddress(rtrRloc4);
LispTeRecord record6 = recordBuilder6.build();
builder3.withTeRecords(ImmutableList.of(record5, record6));
address2 = builder3.build();
}
Aggregations