summaryrefslogtreecommitdiff
path: root/src/cli_shell_api.cpp
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2010-08-11 17:56:28 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2010-08-11 17:56:28 -0700
commitbeb3e08460695b9b97eaf57630347c032a51f244 (patch)
tree872b21fa64c55e33d48dfb3c09c75665f4049dd1 /src/cli_shell_api.cpp
parent24a743fa9f796a434e4bb7979207a2e97435efc1 (diff)
downloadvyatta-cfg-beb3e08460695b9b97eaf57630347c032a51f244.tar.gz
vyatta-cfg-beb3e08460695b9b97eaf57630347c032a51f244.zip
document equivalent perl API functions for shell API.
Diffstat (limited to 'src/cli_shell_api.cpp')
-rw-r--r--src/cli_shell_api.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/cli_shell_api.cpp b/src/cli_shell_api.cpp
index eb0fd1a..7f0a4d1 100644
--- a/src/cli_shell_api.cpp
+++ b/src/cli_shell_api.cpp
@@ -196,6 +196,7 @@ inSession(const vector<string>& args)
}
}
+/* same as exists() in Perl API */
static void
exists(const vector<string>& args)
{
@@ -203,6 +204,7 @@ exists(const vector<string>& args)
exit(cstore.cfgPathExists(args, false) ? 0 : 1);
}
+/* same as existsOrig() in Perl API */
static void
existsActive(const vector<string>& args)
{
@@ -210,7 +212,9 @@ existsActive(const vector<string>& args)
exit(cstore.cfgPathExists(args, true) ? 0 : 1);
}
-/* outputs a string representing multiple nodes. this string MUST be
+/* same as listNodes() in Perl API.
+ *
+ * outputs a string representing multiple nodes. this string MUST be
* "eval"ed into an array of nodes. e.g.,
*
* values=$(cli-shell-api listNodes interfaces)
@@ -229,7 +233,9 @@ listNodes(const vector<string>& args)
print_vec(cnodes, " ", "'");
}
-/* outputs a string representing multiple nodes. this string MUST be
+/* same as listOrigNodes() in Perl API.
+ *
+ * outputs a string representing multiple nodes. this string MUST be
* "eval"ed into an array of nodes. see listNodes above.
*/
static void
@@ -241,7 +247,7 @@ listActiveNodes(const vector<string>& args)
print_vec(cnodes, " ", "'");
}
-/* outputs a string */
+/* same as returnValue() in Perl API. outputs a string. */
static void
returnValue(const vector<string>& args)
{
@@ -253,7 +259,7 @@ returnValue(const vector<string>& args)
printf("%s", val.c_str());
}
-/* outputs a string */
+/* same as returnOrigValue() in Perl API. outputs a string. */
static void
returnActiveValue(const vector<string>& args)
{
@@ -265,7 +271,9 @@ returnActiveValue(const vector<string>& args)
printf("%s", val.c_str());
}
-/* outputs a string representing multiple values. this string MUST be
+/* same as returnValues() in Perl API.
+ *
+ * outputs a string representing multiple values. this string MUST be
* "eval"ed into an array of values. see listNodes above.
*
* note that success/failure can be checked using the two-step invocation
@@ -294,7 +302,9 @@ returnValues(const vector<string>& args)
print_vec(vvec, " ", "'");
}
-/* outputs a string representing multiple values. this string MUST be
+/* same as returnOrigValues() in Perl API.
+ *
+ * outputs a string representing multiple values. this string MUST be
* "eval"ed into an array of values. see returnValues above.
*/
static void