From eb5b546171a061db9bd198a3bbe313ed47cbf943 Mon Sep 17 00:00:00 2001 From: Taku Fukushima Date: Wed, 2 Dec 2015 16:30:38 +0900 Subject: [PATCH] Add docstring for plugin_scope This patch adds the missing docstring of the request handler for /NetworkDriver.GetCapabilities. Change-Id: I84556e294aba3627b38fc4a99830c07eb7c1bf30 Signed-off-by: Taku Fukushima --- kuryr/controllers.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/kuryr/controllers.py b/kuryr/controllers.py index 2d8c7917..6f75d041 100644 --- a/kuryr/controllers.py +++ b/kuryr/controllers.py @@ -302,6 +302,17 @@ def plugin_activate(): @app.route('/NetworkDriver.GetCapabilities', methods=['POST']) def plugin_scope(): + """Returns the capability as the remote network driver. + + This function returns the capability of the remote network driver, which is + ``global`` or ``local`` and defaults to ``global``. With ``global`` + capability, the network information is shared among multipe Docker daemons + if the distributed store is appropriately configured. + + See the following link for more details about the spec: + + https://github.com/docker/libnetwork/blob/master/docs/remote.md#set-capability # noqa + """ capabilities = {'Scope': cfg.CONF.capability_scope} return flask.jsonify(capabilities)