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] |
Fix for JIRA ONOS-4620. Whenever networkconfiguration is deleted even the queued will be removed Change-Id: I8d7f1a873af90cf86ea34f1a2b1585ef4c3e46e4
diff --git a/core/api/src/main/java/org/onosproject/net/config/NetworkConfigService.java b/core/api/src/main/java/org/onosproject/net/config/NetworkConfigService.java index 064272f..d1d280f 100644 --- a/core/api/src/main/java/org/onosproject/net/config/NetworkConfigService.java +++ b/core/api/src/main/java/org/onosproject/net/config/NetworkConfigService.java
@@ -177,4 +177,19 @@ * @param <S> type of subject */ <S> void removeConfig(String subjectClassKey, S subject, String configKey); + + /** + * Clears the configuration including queued based on the subject. + * If does not exists this call has no effect. + * + * @param subject configuration subject + */ + <S> void removeConfig(S subject); + + /** + * Clears the complete configuration including queued. + * If does not exists this call has no effect. + * + */ + <S> void removeConfig(); }
diff --git a/core/api/src/main/java/org/onosproject/net/config/NetworkConfigStore.java b/core/api/src/main/java/org/onosproject/net/config/NetworkConfigStore.java index d774d3e..62c3ffa 100644 --- a/core/api/src/main/java/org/onosproject/net/config/NetworkConfigStore.java +++ b/core/api/src/main/java/org/onosproject/net/config/NetworkConfigStore.java
@@ -151,4 +151,19 @@ */ <S> void clearQueuedConfig(S subject, String configKey); + /** + * Clears the configuration based on the subject including queued. + * If does not exists this call has no effect. + * + * @param subject configuration subject + */ + <S> void clearConfig(S subject); + + /** + * Clears the complete configuration including queued. + * If does not exists this call has no effect. + * + */ + <S> void clearConfig(); + }
diff --git a/core/api/src/test/java/org/onosproject/net/config/NetworkConfigServiceAdapter.java b/core/api/src/test/java/org/onosproject/net/config/NetworkConfigServiceAdapter.java index 1dc9211..1bad3a9 100644 --- a/core/api/src/test/java/org/onosproject/net/config/NetworkConfigServiceAdapter.java +++ b/core/api/src/test/java/org/onosproject/net/config/NetworkConfigServiceAdapter.java
@@ -95,4 +95,12 @@ @Override public void removeListener(NetworkConfigListener listener) { } + + @Override + public <S> void removeConfig(S subject) { + } + + @Override + public <S> void removeConfig() { + } }