From b94e9fd60ae018c9436827500f41a50ba1ec4e7d Mon Sep 17 00:00:00 2001 From: Juergen Brendel Date: Fri, 21 Jul 2017 12:02:27 +1200 Subject: [PATCH] Updated docstrings and comments. --- vpcrouter/watcher/plugins/configfile.py | 15 +++++++++++---- vpcrouter/watcher/plugins/http.py | 5 +++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/vpcrouter/watcher/plugins/configfile.py b/vpcrouter/watcher/plugins/configfile.py index 3039d03..e59270f 100644 --- a/vpcrouter/watcher/plugins/configfile.py +++ b/vpcrouter/watcher/plugins/configfile.py @@ -97,10 +97,14 @@ def read_route_spec_config(fname): class Configfile(common.WatcherPlugin): """ - Implements the WatcherPlugin interface for the 'http' plugin. + Implements the WatcherPlugin interface for the 'configfile' plugin. - Start a Bottle application thread, which serves a minimal HTTP interface - to set route specs or enquire about the status. + Establishes a watcher thread, which detectes any changes to the config + file and re-reads it. + + The plugin adds a command line argument to vpc-router: + + -f / --file: The name of the config file, which should be monitored. """ def start(self): @@ -150,7 +154,10 @@ def stop(self): @classmethod def add_arguments(cls, parser): - # Arguments for the configfile mode + """ + Arguments for the configfile mode. + + """ parser.add_argument('-f', '--file', dest='file', help="config file for routing groups " "(only in configfile mode)") diff --git a/vpcrouter/watcher/plugins/http.py b/vpcrouter/watcher/plugins/http.py index f28eb7a..982f727 100644 --- a/vpcrouter/watcher/plugins/http.py +++ b/vpcrouter/watcher/plugins/http.py @@ -171,6 +171,11 @@ class Http(common.WatcherPlugin): Start a Bottle application thread, which serves a minimal HTTP interface to set route specs or enquire about the status. + This plugin adds two command line arguments to vpc-router: + + -a / --address: The listen address for the HTTP server. + -p / --port: The listen port for the HTTP server. + """ def start(self): """