From 9e014ad0218c5795969994f912745f4575dcc322 Mon Sep 17 00:00:00 2001 From: Erik Reid <erik.reid@geant.org> Date: Fri, 28 May 2021 17:20:54 +0200 Subject: [PATCH] added docs --- docs/source/protocol/index.rst | 3 ++- docs/source/protocol/lnetd.rst | 14 ++++++++++++++ inventory_provider/routes/lnetd.py | 10 +++------- 3 files changed, 19 insertions(+), 8 deletions(-) create mode 100644 docs/source/protocol/lnetd.rst diff --git a/docs/source/protocol/index.rst b/docs/source/protocol/index.rst index e0ef1976..0ec3dbb5 100644 --- a/docs/source/protocol/index.rst +++ b/docs/source/protocol/index.rst @@ -33,4 +33,5 @@ API modules lg data jobs - msr \ No newline at end of file + msr + lnetd \ No newline at end of file diff --git a/docs/source/protocol/lnetd.rst b/docs/source/protocol/lnetd.rst new file mode 100644 index 00000000..6502451c --- /dev/null +++ b/docs/source/protocol/lnetd.rst @@ -0,0 +1,14 @@ +.. LnetD endpoint docs + + +LnetD support +========================= + +This endpoint is intended for use with LnetD + +.. contents:: :local: + +/LnetD/interfaces</hostname> +--------------------------------- + +.. autofunction:: inventory_provider.routes.lnetd.interfaces diff --git a/inventory_provider/routes/lnetd.py b/inventory_provider/routes/lnetd.py index 30131ccc..0025ef21 100644 --- a/inventory_provider/routes/lnetd.py +++ b/inventory_provider/routes/lnetd.py @@ -130,17 +130,13 @@ def _load_interfaces(hostname=None): @common.require_accepts_json def interfaces(hostname=None): """ - Handler for `/poller/interfaces` and - `/poller/interfaces/<hostname>` + Handler for `/LnetD/interfaces` and + `/LnetD/interfaces/<hostname>` which returns information for either all interfaces or those on the requested hostname. - The response is a list of information for all - interfaces that should be polled, including service - information and snmp information. - .. asjson:: - inventory_provider.routes.poller.INTERFACE_LIST_SCHEMA + inventory_provider.routes.lnetd.INTERFACE_LIST_SCHEMA :param hostname: optional, if present should be a router hostname :return: -- GitLab