Separate MappingService from LispMappingService 25/26725/4
authorFlorin Coras <fcoras@cisco.com>
Sat, 5 Sep 2015 13:09:19 +0000 (15:09 +0200)
committerFlorin Coras <fcoras@cisco.com>
Fri, 11 Sep 2015 23:50:20 +0000 (01:50 +0200)
commit78b9f322c2928eff268bae179b8f30f47f91734f
treeb8433c1478edd18b4fb2d51dfd9966582c281a78
parent2e7cccb45518cdef37d2d0d5472c8e4f5045d11d
Separate MappingService from LispMappingService

This is the last in a series of patches meant to enable independent
caching of northbound and southbound mapping registrations and
better modularize mappingservice.implementation. In
particular, with this patch we separate the MappingService, that
coordinates the storage and quick retrieval of mappings, from the
LispMappingService, which implements the LISP specific
MapServer/MapResolver behavior for southbound clients by leveraging the
previous service. To this end, apart from inheriting the RPC API,
MappingService also implements a new Java API that may be consumed as a
SAL service.

Functionally, the MappingService acts an API dispatcher that coordinates
and acts as container for all objects in charge of i) saving and
updating md-sal datastore stored mappings/keys ii) monitoring md-sal
datastore mapping/key updates and pushing them to the in memory
mapping-system iii) in memory mapping-system, which consists of a set of
mappings caches and a simple (for now) querying policy.

Other notable changes:
- declutter the MapServer/Resolver Java API hierarchy and update
  IFlowMapping API
- update ILispDAO and the HashMapDb to support the introduction of
  'virtual' tables. So we now have a Table->SubTable hierarchy and
  SubTables can be nested recursively.
- added IMapCache interface and 3 types of map-caches:
    o) flat: for flat addresses
    o) simple: for flat and IP addresses. It supports longes prefix
       matching for IPs.
    o) multi-table: for flat, IP and multi-level addresses (SourceDest
       LCAF for now). For IP and multi-level addresses longest prefix
       matching is supported.
- update unit and integration tests

Change-Id: I2532b04a9693f86c3ba87eddc982725fd12a429f
Signed-off-by: Florin Coras <fcoras@cisco.com>
59 files changed:
.gitignore
mappingservice/api/src/main/java/org/opendaylight/lispflowmapping/interfaces/dao/ILispDAO.java
mappingservice/api/src/main/java/org/opendaylight/lispflowmapping/interfaces/dao/ILispTypeConverter.java [deleted file]
mappingservice/api/src/main/java/org/opendaylight/lispflowmapping/interfaces/dao/SubKeys.java
mappingservice/api/src/main/java/org/opendaylight/lispflowmapping/interfaces/lisp/IFlowMapping.java
mappingservice/api/src/main/java/org/opendaylight/lispflowmapping/interfaces/lisp/IGeneralMapResolver.java [deleted file]
mappingservice/api/src/main/java/org/opendaylight/lispflowmapping/interfaces/lisp/IGeneralMapServer.java [deleted file]
mappingservice/api/src/main/java/org/opendaylight/lispflowmapping/interfaces/lisp/IGenericMapResolver.java [new file with mode: 0644]
mappingservice/api/src/main/java/org/opendaylight/lispflowmapping/interfaces/lisp/IGenericMapServer.java [new file with mode: 0644]
mappingservice/api/src/main/java/org/opendaylight/lispflowmapping/interfaces/lisp/ILispAuthentication.java [moved from mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/authentication/ILispAuthentication.java with 91% similarity]
mappingservice/api/src/main/java/org/opendaylight/lispflowmapping/interfaces/lisp/IMapNotifyHandler.java
mappingservice/api/src/main/java/org/opendaylight/lispflowmapping/interfaces/lisp/IMapRequestResultHandler.java
mappingservice/api/src/main/java/org/opendaylight/lispflowmapping/interfaces/lisp/IMapResolver.java [deleted file]
mappingservice/api/src/main/java/org/opendaylight/lispflowmapping/interfaces/lisp/IMapResolverAsync.java
mappingservice/api/src/main/java/org/opendaylight/lispflowmapping/interfaces/lisp/IMapServer.java [deleted file]
mappingservice/api/src/main/java/org/opendaylight/lispflowmapping/interfaces/lisp/IMapServerAsync.java
mappingservice/api/src/main/java/org/opendaylight/lispflowmapping/interfaces/mapcache/IMapCache.java [new file with mode: 0644]
mappingservice/api/src/main/java/org/opendaylight/lispflowmapping/interfaces/mapcache/IMappingSystem.java [new file with mode: 0644]
mappingservice/api/src/main/java/org/opendaylight/lispflowmapping/interfaces/mappingservice/IMappingService.java [new file with mode: 0644]
mappingservice/api/src/main/yang/mappingservice.yang
mappingservice/implementation/src/main/config/default-config.xml
mappingservice/implementation/src/main/java/org/opendaylight/controller/config/yang/config/lfm/mappingservice/impl/LispMappingServiceModule.java [new file with mode: 0644]
mappingservice/implementation/src/main/java/org/opendaylight/controller/config/yang/config/lfm/mappingservice/impl/LispMappingServiceModuleFactory.java [new file with mode: 0644]
mappingservice/implementation/src/main/java/org/opendaylight/controller/config/yang/config/lfm/mappingservice/impl/MappingServiceModule.java [new file with mode: 0644]
mappingservice/implementation/src/main/java/org/opendaylight/controller/config/yang/config/lfm/mappingservice/impl/MappingServiceModuleFactory.java [new file with mode: 0644]
mappingservice/implementation/src/main/java/org/opendaylight/controller/config/yang/config/lfm_mappingservice/impl/LfmMappingServiceModule.java [deleted file]
mappingservice/implementation/src/main/java/org/opendaylight/controller/config/yang/config/lfm_mappingservice/impl/LfmMappingServiceModuleFactory.java [deleted file]
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/LispMappingService.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/MappingService.java [moved from mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/LfmMappingDatabaseRpc.java with 55% similarity]
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/MappingSystem.java [new file with mode: 0644]
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/authentication/LispAuthenticationFactory.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/authentication/LispAuthenticationUtil.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/authentication/LispMACAuthentication.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/authentication/LispNoAuthentication.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/lisp/AbstractLispComponent.java [deleted file]
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/lisp/MapResolver.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/lisp/MapServer.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/mapcache/FlatMapCache.java [new file with mode: 0644]
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/mapcache/MultiTableMapCache.java [moved from mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/mapcache/TopologyMapCache.java with 51% similarity]
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/mapcache/SimpleMapCache.java [new file with mode: 0644]
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/mdsal/AuthenticationKeyDataListener.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/mdsal/DataStoreBackEnd.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/mdsal/MappingDataListener.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/util/DSBEInputUtil.java [new file with mode: 0644]
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/util/InstanceIdentifierUtil.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/util/LispNotificationHelper.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/util/MSNotificationInputUtil.java [new file with mode: 0644]
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/util/RPCInputConvertorUtil.java
mappingservice/implementation/src/main/yang/lfm-mappingservice-impl.yang [deleted file]
mappingservice/implementation/src/main/yang/mappingservice-impl.yang [new file with mode: 0644]
mappingservice/implementation/src/test/java/org/opendaylight/lispflowmapping/implementation/lisp/MapResolverTest.java
mappingservice/implementation/src/test/java/org/opendaylight/lispflowmapping/implementation/lisp/MapServerTest.java
mappingservice/implementation/src/test/java/org/opendaylight/lispflowmapping/implementation/lisp/MappingServiceTest.java [new file with mode: 0644]
mappingservice/inmemorydb/src/main/java/org/opendaylight/lispflowmapping/inmemorydb/HashMapDb.java
mappingservice/integrationtest/src/test/java/org/opendaylight/lispflowmapping/integrationtest/MappingServiceIntegrationTest.java
mappingservice/neutron/src/main/java/org/opendaylight/lispflowmapping/neutron/ILispNeutronService.java
mappingservice/neutron/src/main/java/org/opendaylight/lispflowmapping/neutron/LispNeutronPortHandler.java
mappingservice/neutron/src/main/java/org/opendaylight/lispflowmapping/neutron/LispNeutronService.java
mappingservice/neutron/src/main/java/org/opendaylight/lispflowmapping/neutron/LispUtil.java