use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.rloc.container.RlocBuilder in project lispflowmapping by opendaylight.
the class Ipv6BinarySerializer method deserializeRlocData.
@Override
protected Rloc deserializeRlocData(ByteBuffer buffer) {
RlocBuilder rb = new RlocBuilder();
rb.setAddressType(Ipv6BinaryAfi.class);
rb.setVirtualNetworkId(null);
rb.setAddress(new Ipv6BinaryBuilder().setIpv6Binary(deserializeData(buffer)).build());
return rb.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.rloc.container.RlocBuilder in project lispflowmapping by opendaylight.
the class MacSerializer method deserializeRlocData.
@Override
protected Rloc deserializeRlocData(ByteBuffer buffer) {
RlocBuilder rb = new RlocBuilder();
rb.setAddressType(MacAfi.class);
rb.setVirtualNetworkId(null);
rb.setAddress(new MacBuilder().setMac(deserializeData(buffer)).build());
return rb.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.rloc.container.RlocBuilder in project lispflowmapping by opendaylight.
the class SourceDestKeySerializer method deserializeLcafRlocData.
@Override
protected Rloc deserializeLcafRlocData(ByteBuffer buffer, byte res2, short length, LispAddressSerializerContext ctx) {
RlocBuilder rb = new RlocBuilder();
rb.setAddressType(SourceDestKeyLcaf.class);
rb.setVirtualNetworkId(null);
rb.setAddress(deserializeData(buffer, ctx));
return rb.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.rloc.container.RlocBuilder in project lispflowmapping by opendaylight.
the class MappingServiceIntegrationTest method testRecievingNonProxyOnXtrPort.
public void testRecievingNonProxyOnXtrPort() throws SocketTimeoutException, SocketException, Throwable {
cleanUP();
configLispPlugin.shouldListenOnXtrPort(true);
notificationCalled = false;
final String eid = "10.10.10.10/32";
String rloc = "127.0.0.3";
int port = LispMessage.XTR_PORT_NUM;
RlocBuilder rb = new RlocBuilder();
rb.setAddressType(ApplicationDataLcaf.class);
rb.setVirtualNetworkId(null);
rb.setAddress(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.ApplicationDataBuilder().setApplicationData(new ApplicationDataBuilder().setAddress(new SimpleAddress(new IpAddress(new Ipv4Address(rloc)))).setLocalPortLow(new PortNumber(port)).build()).build());
Rloc adLcaf = rb.build();
final MapRequest mapRequest = createNonProxyMapRequest(eid, adLcaf);
((LispMappingService) lms).getNotificationService().registerNotificationListener(new XtrRequestMappingListener() {
@Override
public void onXtrRequestMapping(XtrRequestMapping notification) {
assertEquals(((Ipv4Prefix) mapRequest.getEidItem().get(0).getEid().getAddress()).getIpv4Prefix().getValue(), eid);
notificationCalled = true;
LOG.warn("notification arrived");
}
});
sendMapRequest(mapRequest, port);
for (int i = 0; i < MAX_NOTIFICATION_RETRYS; i++) {
if (notificationCalled) {
return;
} else {
LOG.warn("notification hasn't arrived, sleeping...");
Thread.sleep(500);
}
}
fail("Notification hasn't arrived");
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.rloc.container.RlocBuilder in project lispflowmapping by opendaylight.
the class MappingServiceIntegrationTest method testNonProxyOtherPort.
public void testNonProxyOtherPort() throws SocketTimeoutException, SocketException {
cleanUP();
String rloc = "127.0.0.3";
int port = 4350;
RlocBuilder rb = new RlocBuilder();
rb.setAddressType(ApplicationDataLcaf.class);
rb.setVirtualNetworkId(null);
rb.setAddress(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.lisp.address.address.ApplicationDataBuilder().setApplicationData(new ApplicationDataBuilder().setAddress(new SimpleAddress(new IpAddress(new Ipv4Address(rloc)))).setLocalPortLow(new PortNumber(port)).build()).build());
Rloc adLcaf = rb.build();
LOG.info("testNonProxyOtherPort:" + LispAddressStringifier.getString(adLcaf));
sendProxyMapRequest(rloc, port, adLcaf);
}
Aggregations