summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2011-01-20 11:29:23 -0800
committerAn-Cheng Huang <ancheng@vyatta.com>2011-01-20 11:29:23 -0800
commit1417dea1e7a215bfeb00bebfaba6da70d570608f (patch)
treecbe00a4b57f7c463da20538acf39cafe9bc4e939
parent9cb5eb04bf0700bef1c061261ffbd6dc893eb7e8 (diff)
downloadvyatta-cfg-1417dea1e7a215bfeb00bebfaba6da70d570608f.tar.gz
vyatta-cfg-1417dea1e7a215bfeb00bebfaba6da70d570608f.zip
add comments for showConfig
-rw-r--r--src/cli_shell_api.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/cli_shell_api.cpp b/src/cli_shell_api.cpp
index a61046c..0c76daa 100644
--- a/src/cli_shell_api.cpp
+++ b/src/cli_shell_api.cpp
@@ -402,6 +402,35 @@ showCfg(Cstore& cstore, const vector<string>& args)
}
}
+/* new "show" API providing superset of functionality of showCfg above.
+ * available command-line options (all are optional):
+ * --show-cfg1 <cfg1> --show-cfg2 <cfg2>
+ * specify the two configs to be diffed (must specify both)
+ * <cfg1>: "@ACTIVE", "@WORKING", or config file name
+ * <cfg2>: "@ACTIVE", "@WORKING", or config file name
+ *
+ * if not specified, default is cfg1="@ACTIVE" and cfg2="@WORKING",
+ * i.e., same as "traditional show"
+ * --show-active-only
+ * only show active config (i.e., cfg1="@ACTIVE" and cfg2="@ACTIVE")
+ * --show-working-only
+ * only show working config (i.e., cfg1="@WORKING" and cfg2="@WORKING")
+ * --show-show-defaults
+ * display "default" values
+ * --show-hide-secrets
+ * hide "secret" values when displaying
+ * --show-context-diff
+ * show "context diff" between two configs
+ * --show-commands
+ * show output in "commands"
+ *
+ * note that when neither cfg1 nor cfg2 specifies a config file, the "args"
+ * argument specifies the root path for the show output, and the "edit level"
+ * in the environment is used.
+ *
+ * on the other hand, if either cfg1 or cfg2 specifies a config file, then
+ * both "args" and "edit level" are ignored.
+ */
static void
showConfig(Cstore& cstore, const vector<string>& args)
{