use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.MappingKeepAlive in project lispflowmapping by opendaylight.
the class LispSouthboundHandler method createMappingKeepAlive.
private MappingKeepAlive createMappingKeepAlive(final MapRegisterCacheValue value) {
MappingKeepAliveBuilder mappingKeepAliveBuilder = new MappingKeepAliveBuilder();
mappingKeepAliveBuilder.setMapRegisterCacheMetadata(value.getMapRegisterCacheMetadata());
return mappingKeepAliveBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.MappingKeepAlive in project lispflowmapping by opendaylight.
the class LispMappingServiceTest method onMappingKeepAliveTest.
/**
* Tests {@link LispMappingService#onMappingKeepAlive} method.
*/
@Test
public void onMappingKeepAliveTest() {
final MappingKeepAlive mappingKeepAlive = Mockito.mock(MappingKeepAlive.class);
Mockito.when(mappingKeepAlive.getMapRegisterCacheMetadata()).thenReturn(getDefaultMapRegisterCacheMetadata());
lispMappingService.onMappingKeepAlive(mappingKeepAlive);
Mockito.verify(mappingService).refreshMappingRegistration(IPV4_EID_1, null, TIMESTAMP);
Mockito.verify(mappingService).refreshMappingRegistration(IPV4_EID_2, null, TIMESTAMP);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.MappingKeepAlive in project lispflowmapping by opendaylight.
the class LispMappingService method onMappingKeepAlive.
@Override
public void onMappingKeepAlive(MappingKeepAlive notification) {
final MapRegisterCacheMetadata cacheMetadata = notification.getMapRegisterCacheMetadata();
for (EidLispAddress eidLispAddress : cacheMetadata.getEidLispAddress()) {
final Eid eid = eidLispAddress.getEid();
final XtrId xtrId = cacheMetadata.getXtrId();
final Long timestamp = cacheMetadata.getTimestamp();
LOG.debug("Update map registration for eid {} with timestamp {}", LispAddressStringifier.getString(eid), timestamp);
mapService.refreshMappingRegistration(eid, xtrId, timestamp);
}
}
Aggregations