Separate authentication key in-memory storage 15/49715/5
authorLorand Jakab <lojakab@cisco.com>
Wed, 21 Dec 2016 15:50:09 +0000 (17:50 +0200)
committerLorand Jakab <lojakab@cisco.com>
Tue, 17 Jan 2017 18:46:49 +0000 (20:46 +0200)
commit5b8739354f150859480636f941eba94c712a8032
treea12acb1439fe2eb7aae6f2f6d07a23f7b84fd59c
parent8d372647d7fe962743cf92ff6d01913fcb4e4eae
Separate authentication key in-memory storage

Authentication key operations (add/get/remove) are part of the IMapCache
interface, so all map-caches implement them, even though we only really
use them in SimpleMapCache. This makes map-caches less "general", in the
sense that they need to be aware of the AuthenticationKey type, and we
have unused code.

This patch creates a new IAuthKeyDb interface and the AuthKeyDb class
implementing it, which contains only the authentication key operations.
The MappingSystem and the LispSouthBoundPlugin are switched to the new
implementation.

This is a prerequisite for a full solution to bug 7272, by making it
possible to remove all sub-keys when removing a mapping, leaving the
RadixTrie in a consistent state. It also makes a proper implementation
for the newly introduced remove-all-operational-content RPC, since
deleting all operational content should delete all southbound mappings,
but not authentication keys, which are now in the same in-memory
structures.

Checked system tests, all passing.

Change-Id: I9536dbccb06d486e205f8a15e9e8ac3fa1c53fcc
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
26 files changed:
mappingservice/api/src/main/java/org/opendaylight/lispflowmapping/interfaces/mapcache/IAuthKeyDb.java [new file with mode: 0644]
mappingservice/api/src/main/java/org/opendaylight/lispflowmapping/interfaces/mapcache/IMapCache.java
mappingservice/api/src/main/java/org/opendaylight/lispflowmapping/interfaces/mapcache/IMappingSystem.java
mappingservice/api/src/main/java/org/opendaylight/lispflowmapping/interfaces/mappingservice/IMappingService.java
mappingservice/api/src/main/java/org/opendaylight/lispflowmapping/interfaces/mappingservice/IMappingServiceShell.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/MappingService.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/MappingServiceShell.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/MappingSystem.java
mappingservice/implementation/src/test/java/org/opendaylight/lispflowmapping/implementation/MappingSystemTest.java
mappingservice/mapcache/src/main/java/org/opendaylight/lispflowmapping/mapcache/AuthKeyDb.java [new file with mode: 0644]
mappingservice/mapcache/src/main/java/org/opendaylight/lispflowmapping/mapcache/FlatMapCache.java
mappingservice/mapcache/src/main/java/org/opendaylight/lispflowmapping/mapcache/MultiTableMapCache.java
mappingservice/mapcache/src/main/java/org/opendaylight/lispflowmapping/mapcache/SimpleMapCache.java
mappingservice/mapcache/src/test/java/org/opendaylight/lispflowmapping/mapcache/AuthKeyDbTest.java [new file with mode: 0644]
mappingservice/mapcache/src/test/java/org/opendaylight/lispflowmapping/mapcache/FlatMapCacheTest.java
mappingservice/mapcache/src/test/java/org/opendaylight/lispflowmapping/mapcache/MultiTableMapCacheTest.java
mappingservice/mapcache/src/test/java/org/opendaylight/lispflowmapping/mapcache/SimpleMapCacheTest.java
mappingservice/shell/src/main/java/org/opendaylight/lispflowmapping/shell/LispAddKey.java
mappingservice/shell/src/main/java/org/opendaylight/lispflowmapping/shell/LispKeys.java [new file with mode: 0644]
mappingservice/shell/src/main/java/org/opendaylight/lispflowmapping/shell/LispMappings.java
mappingservice/shell/src/main/resources/OSGI-INF/blueprint/blueprint.xml
mappingservice/southbound/src/main/java/org/opendaylight/lispflowmapping/southbound/LispSouthboundPlugin.java
mappingservice/southbound/src/main/java/org/opendaylight/lispflowmapping/southbound/lisp/AuthenticationKeyDataListener.java
mappingservice/southbound/src/main/java/org/opendaylight/lispflowmapping/southbound/lisp/LispSouthboundHandler.java
mappingservice/southbound/src/test/java/org/opendaylight/lispflowmapping/southbound/lisp/AuthenticationKeyDataListenerTest.java
mappingservice/southbound/src/test/java/org/opendaylight/lispflowmapping/southbound/lisp/LispSouthboundServiceTest.java