commit | 0c49b607a1548ba47532f798b136e444a97a2a99 | [log] [tgz] |
---|---|---|
author | Deepa Vaddireddy <dvaddire@partner.ciena.com> | Thu Jun 02 12:19:07 2016 +0530 |
committer | Gerrit Code Review <gerrit@onlab.us> | Thu Jun 16 20:47:56 2016 +0000 |
tree | 3b2cd82f3181c51f9c2ce7b162284adcf935181d | |
parent | 2f4883d75bda4730fba28fe067418811f29257db [diff] [blame] |
Fix for JIRA ONOS-4620. Whenever networkconfiguration is deleted even the queued will be removed Change-Id: I8d7f1a873af90cf86ea34f1a2b1585ef4c3e46e4
diff --git a/core/store/dist/src/main/java/org/onosproject/store/config/impl/DistributedNetworkConfigStore.java b/core/store/dist/src/main/java/org/onosproject/store/config/impl/DistributedNetworkConfigStore.java index 87148a8..7a812c9 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/config/impl/DistributedNetworkConfigStore.java +++ b/core/store/dist/src/main/java/org/onosproject/store/config/impl/DistributedNetworkConfigStore.java
@@ -284,6 +284,24 @@ configs.remove(key(subject, configKey)); } + @Override + public <S> void clearConfig(S subject) { + ImmutableSet.copyOf(configs.keySet()).forEach(k -> { + if (Objects.equals(subject, k.subject) && delegate != null) { + configs.remove(k); + } + }); + } + + @Override + public <S> void clearConfig() { + ImmutableSet.copyOf(configs.keySet()).forEach(k -> { + if (delegate != null) { + configs.remove(k); + } + }); + } + /** * Produces a config from the specified subject, config class and raw JSON. *