Commit 0a722e07 authored by Mark Caglienzi's avatar Mark Caglienzi
Browse files

Merge branch 'sphinx'

parents 8eece08b b84dbb5e
# fuss-manager REST API
## General description
The main API entry point is at `/api/1.0`. All methods return `JSON` results,
and the result is always an Object whether the request is successful or not.
All successful requests return objects with the `time` key set to the server
time as a Unix timestamp.
All failed requests return objects with three keys:
* `error`: `true`
* `code`: the HTTP error code
* `message`: a string describing the error
`GET` requests can take extra arguments in a query string.
`POST` requests take their input from the `POST` body encoded as `JSON`.
## API methods
### `ping`
Takes no arguments.
Returns:
* `pong`: `true`
### `async_ping`
Takes no arguments.
Returns:
* `pong`: `true`
### `machines`
Takes no arguments.
Returns:
* `machines`: list of machine objects.
Each machine object contains the following keys:
* `mac`: MAC address, as a string
* `ip`: IP address, as a string
* `name`: machine name
* `first_seen`: time the machine was first seen, as a Unix timestamp
* `last_seen`: time the machine was last seen, as a Unix timestamp
You can use the response `time` timestamp to compute how long ago a machine was
first or last seen without introducing errors due to the clock difference
between the browser and the server.
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
# -- Project information -----------------------------------------------------
project = 'fuss-manager'
copyright = '2019-2020, Provincia Autonoma di Bolzano'
author = 'Provincia Autonoma di Bolzano'
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
'sphinx_autodoc_typehints',
]
# This is needed by sphinx in buster
master_doc = 'index'
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = 'en'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# -- Extension configuration -------------------------------------------------
# -- Options for todo extension ----------------------------------------------
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
.. fuss-manager documentation master file, created by
sphinx-quickstart on Tue Aug 18 13:35:02 2020.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to fuss-manager's documentation!
========================================
.. toctree::
:maxdepth: 2
:caption: Contents:
configuration
web_interface
rest_api
reference
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
manager.compat module
=====================
.. automodule:: manager.compat
:members:
:undoc-members:
:show-inheritance:
manager.config module
=====================
.. automodule:: manager.config
:members:
:undoc-members:
:show-inheritance:
manager.events module
=====================
.. automodule:: manager.events
:members:
:undoc-members:
:show-inheritance:
manager.manager module
======================
.. automodule:: manager.manager
:members:
:undoc-members:
:show-inheritance:
manager.ops module
==================
.. automodule:: manager.ops
:members:
:undoc-members:
:show-inheritance:
manager.perms module
====================
.. automodule:: manager.perms
:members:
:undoc-members:
:show-inheritance:
manager.playbook module
=======================
.. automodule:: manager.playbook
:members:
:undoc-members:
:show-inheritance:
manager package
===============
.. automodule:: manager
:members:
:undoc-members:
:show-inheritance:
Subpackages
-----------
.. toctree::
manager.sources
manager.users
manager.web
Submodules
----------
.. toctree::
manager.compat
manager.config
manager.events
manager.manager
manager.ops
manager.perms
manager.playbook
manager.signing
manager.stores
manager.signing module
======================
.. automodule:: manager.signing
:members:
:undoc-members:
:show-inheritance:
manager.sources.arpwatch module
===============================
.. automodule:: manager.sources.arpwatch
:members:
:undoc-members:
:show-inheritance:
manager.sources.base module
===========================
.. automodule:: manager.sources.base
:members:
:undoc-members:
:show-inheritance:
manager.sources.chaos module
============================
.. automodule:: manager.sources.chaos
:members:
:undoc-members:
:show-inheritance:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment