Fixing ComponentConfigManager to preset values locally; not just in the distributed store.
Also added 'preset' usage to the 'cfg' command.
Change-Id: I90df276e68328716784ca1f8624d4d0b8266ad24
(cherry picked from commit 8c73019d271efd7975f1f94c2aa32456dd73c170)
diff --git a/cli/src/main/java/org/onosproject/cli/cfg/ComponentConfigCommand.java b/cli/src/main/java/org/onosproject/cli/cfg/ComponentConfigCommand.java
index 3b86d09..ef20d07 100644
--- a/cli/src/main/java/org/onosproject/cli/cfg/ComponentConfigCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/cfg/ComponentConfigCommand.java
@@ -41,6 +41,7 @@
static final String GET = "get";
static final String SET = "set";
+ static final String PRESET = "preset";
private static final String FMT = " name=%s, type=%s, value=%s, defaultValue=%s, description=%s";
private static final String SHORT_FMT = " %s=%s";
@@ -51,7 +52,7 @@
@Argument(index = 0, name = "command",
- description = "Command name (get|set)",
+ description = "Command name (get|set|preset)",
required = false, multiValued = false)
String command = null;
@@ -85,6 +86,8 @@
service.unsetProperty(component, name);
} else if (command.equals(SET)) {
service.setProperty(component, name, value);
+ } else if (command.equals(PRESET)) {
+ service.preSetProperty(component, name, value);
} else {
error("Illegal usage");
}