[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [arm/master] Interpretor help for RESETCONF
commit 1e638c14399a90234534499475d3848d5b7d9573
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Sun Sep 18 20:36:55 2011 -0700
Interpretor help for RESETCONF
Similiar to GETCONF - basic usage and examples.
---
src/util/torInterpretor.py | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/util/torInterpretor.py b/src/util/torInterpretor.py
index 963a465..ff02a8b 100644
--- a/src/util/torInterpretor.py
+++ b/src/util/torInterpretor.py
@@ -107,13 +107,23 @@ HELP_GETCONF = """Provides the current value for a given configuration value. Op
HELP_SETCONF = """Sets the given configuration parameters. Values can be quoted or non-quoted
strings, and reverts the option to 0 or NULL if not provided.
-Example:
+Examples:
* Sets a contact address and resets our family to NULL
SETCONF MyFamily ContactInfo=foo@xxxxxxx
* Sets an exit policy that only includes port 80/443
SETCONF ExitPolicy=\"accept *:80, accept *:443, reject *:*\""""
+HELP_RESETCONF = """Reverts the given configuration options to their default values. If a value
+is provided then this behaves in the same way as SETCONF.
+
+Examples:
+ * Returns both of our accounting parameters to their defaults
+ RESETCONF AccountingMax AccountingStart
+
+ * Uses the default exit policy and sets our nickname to be 'Goomba'
+ RESETCONF ExitPolicy Nickname=Goomba"""
+
HELP_OPTIONS = {
"HELP": ("/help [OPTION]", HELP_HELP),
"WRITE": ("/write [PATH]", HELP_WRITE),
@@ -122,7 +132,8 @@ HELP_OPTIONS = {
"QUIT": ("/quit", HELP_QUIT),
"GETINFO": ("GETINFO OPTION", HELP_GETINFO),
"GETCONF": ("GETCONF OPTION", HELP_GETCONF),
- "SETCONF": ("SETCONF PARAM[=VALUE]", HELP_SETCONF)
+ "SETCONF": ("SETCONF PARAM[=VALUE]", HELP_SETCONF),
+ "RESETCONF": ("RESETCONF PARAM[=VALUE]", HELP_RESETCONF),
}
class InterpretorClosed(Exception):
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits