Added one more Component Config REST API; for specified component and variable.
Change-Id: I810aa90636c55c8b05c146780ad28c307cefff33
(cherry picked from commit f31ac6ff9f72d040b2da80b6ee5c630ccf9dcc55)
diff --git a/core/net/src/main/java/org/onosproject/cfg/impl/ComponentConfigManager.java b/core/net/src/main/java/org/onosproject/cfg/impl/ComponentConfigManager.java
index 011733c..0a78bcd 100644
--- a/core/net/src/main/java/org/onosproject/cfg/impl/ComponentConfigManager.java
+++ b/core/net/src/main/java/org/onosproject/cfg/impl/ComponentConfigManager.java
@@ -195,6 +195,19 @@
store.unsetProperty(componentName, name);
}
+ @Override
+ public ConfigProperty getProperty(String componentName, String attribute) {
+ checkPermission(CONFIG_READ);
+
+ Map<String, ConfigProperty> map = properties.get(componentName);
+ if (map != null) {
+ return map.get(attribute);
+ } else {
+ log.error("Attribute {} not present in component {}", attribute, componentName);
+ return null;
+ }
+ }
+
private class InternalStoreDelegate implements ComponentConfigStoreDelegate {
@Override