summaryrefslogtreecommitdiffstats
path: root/v3po/v3po2vpp/src/main/java/io/fd
diff options
context:
space:
mode:
authorJan Srnicek <jsrnicek@cisco.com>2016-10-13 16:58:22 +0200
committerJan Srnicek <jsrnicek@cisco.com>2016-10-13 16:59:45 +0200
commitf7109d63d67c40d9597ffc250cbf27d160a3a424 (patch)
tree69617be480340e9dd3cfc7a6ee9e6a4b9abad36b /v3po/v3po2vpp/src/main/java/io/fd
parent80e0e3524603d9f00393312fa74d226d9551dbfe (diff)
Caching for Ipv4 addresses fixed also for readCurrentAttributes
Caching scope fixed also in specific request logic Added test Change-Id: Ib70a3069cf7620132ae5921ddb21b56fa2f4108b Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
Diffstat (limited to 'v3po/v3po2vpp/src/main/java/io/fd')
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/Ipv4AddressCustomizer.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/Ipv4AddressCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/Ipv4AddressCustomizer.java
index 0cd9032b6..8b1fb86e9 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/Ipv4AddressCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/Ipv4AddressCustomizer.java
@@ -78,8 +78,10 @@ public class Ipv4AddressCustomizer extends FutureJVppCustomizer
final String interfaceName = id.firstKeyOf(Interface.class).getName();
final int interfaceIndex = interfaceContext.getIndex(interfaceName, ctx.getMappingContext());
+ // Key needs to contain interface ID to distinguish dumps between interfaces
+ final String cacheKey = CACHE_KEY + interfaceName;
final Optional<IpAddressDetailsReplyDump> dumpOptional = dumpManager
- .getDump(id, CACHE_KEY, ctx.getModificationCache(), new AddressDumpParams(interfaceIndex, false));
+ .getDump(id, cacheKey, ctx.getModificationCache(), new AddressDumpParams(interfaceIndex, false));
if (!dumpOptional.isPresent() || dumpOptional.get().ipAddressDetails.isEmpty()) {
return;