Documented Actions API

Change-Id: Ia7ae9ae8b26556102008a0c1b80542a2277e9c1e
This commit is contained in:
aviau 2015-04-29 09:56:12 -04:00
parent 2ec8b4bf27
commit d0530b7d59
9 changed files with 48 additions and 51 deletions

View File

@ -25,7 +25,7 @@ extensions = [
'sphinx.ext.intersphinx', 'sphinx.ext.intersphinx',
'sphinxcontrib.autohttp.flask', 'sphinxcontrib.autohttp.flask',
'sphinxcontrib.pecanwsme.rest', 'sphinxcontrib.pecanwsme.rest',
'oslosphinx', # 'oslosphinx',
'wsmeext.sphinxext', 'wsmeext.sphinxext',
] ]
@ -43,7 +43,7 @@ master_doc = 'index'
# General information about the project. # General information about the project.
project = u'surveil' project = u'surveil'
copyright = u'2014, Surveil Contributors' copyright = u'2014-2015, Surveil Contributors'
# If true, '()' will be appended to :func: etc. cross-reference text. # If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True add_function_parentheses = True
@ -60,8 +60,9 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. Major themes that come with # The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'. # Sphinx are currently 'default' and 'sphinxdoc'.
# html_theme_path = ["."] # html_theme_path = ["."]
# html_theme = '_theme' import sphinx_rtd_theme
html_static_path = ['_static'] html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# Output file base name for HTML help builder. # Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project htmlhelp_basename = '%sdoc' % project

View File

@ -8,7 +8,6 @@ Table of Contents:
:maxdepth: 2 :maxdepth: 2
readme readme
getting_started
webapi/index webapi/index
Indices and tables Indices and tables

View File

@ -0,0 +1,26 @@
.. docbookrestapi
=======
Actions
=======
acknowledge
===========
.. rest-controller:: surveil.api.controllers.v2.actions.acknowledge:AcknowledgeController
:webprefix: /v2/actions/acknowledge
downtime
========
.. rest-controller:: surveil.api.controllers.v2.actions.downtime:DowntimeController
:webprefix: /v2/actions/downtime
types documentation
===================
.. autotype:: surveil.api.datamodel.actions.acknowledgement.Acknowledgement
:members:
.. autotype:: surveil.api.datamodel.actions.downtime.Downtime
:members:

View File

@ -28,11 +28,6 @@ Hosts
.. rest-controller:: surveil.api.controllers.v2.config.hosts:ServiceCheckResultsSubController .. rest-controller:: surveil.api.controllers.v2.config.hosts:ServiceCheckResultsSubController
:webprefix: /v2/config/hosts/(host_name)/services/(service_description)/results :webprefix: /v2/config/hosts/(host_name)/services/(service_description)/results
.. autotype:: surveil.api.controllers.v2.datamodel.checkresult.CheckResult
:members:
.. autotype:: surveil.api.controllers.v2.datamodel.host.Host
:members:
Services Services
======== ========
@ -40,7 +35,7 @@ Services
.. rest-controller:: surveil.api.controllers.v2.config.services:ServicesController .. rest-controller:: surveil.api.controllers.v2.config.services:ServicesController
:webprefix: /v2/config/services :webprefix: /v2/config/services
.. autotype:: surveil.api.controllers.v2.datamodel.service.Service .. autotype:: surveil.api.datamodel.config.service.Service
:members: :members:
@ -53,6 +48,16 @@ Commands
.. rest-controller:: surveil.api.controllers.v2.config.commands:CommandController .. rest-controller:: surveil.api.controllers.v2.config.commands:CommandController
:webprefix: /v2/config/commands :webprefix: /v2/config/commands
.. autotype:: surveil.api.controllers.v2.datamodel.command.Command
types documentation
===================
.. autotype:: surveil.api.datamodel.config.command.Command
:members:
.. autotype:: surveil.api.datamodel.config.host.Host
:members:
.. autotype:: surveil.api.datamodel.checkresult.CheckResult
:members: :members:

View File

@ -7,3 +7,4 @@ V2 Web API
config config
status status
actions

View File

@ -1,36 +0,0 @@
.. docbookrestapi
====
Logs
====
.. rest-controller:: surveil.api.controllers.v2.logs:LogsController
:webprefix: /v2/logs
Acknowledgements
================
.. rest-controller:: surveil.api.controllers.v2.logs.acknowledgements:AcknowledgementsController
:webprefix: /v2/logs/acknowledgements
Comments
========
.. rest-controller:: surveil.api.controllers.v2.logs.comments:CommentsController
:webprefix: /v2/logs/comments
Downtimes
=========
.. rest-controller:: surveil.api.controllers.v2.logs.downtimes:DowntimesController
:webprefix: /v2/logs/downtimes
Notifications
=============
.. rest-controller:: surveil.api.controllers.v2.logs.notifications:NotificationsController
:webprefix: /v2/logs/notifications

View File

@ -54,8 +54,8 @@ Metrics
.. rest-controller:: surveil.api.controllers.v2.status.metrics:MetricController .. rest-controller:: surveil.api.controllers.v2.status.metrics:MetricController
:webprefix: /v2/status/metrics/ :webprefix: /v2/status/metrics/
Types types documentation
===== ===================
.. autotype:: surveil.api.datamodel.status.live_service.LiveService .. autotype:: surveil.api.datamodel.status.live_service.LiveService
:members: :members:

View File

@ -25,7 +25,7 @@ class Downtime(types.Base):
service_description = wsme.wsattr(wtypes.text, mandatory=False) service_description = wsme.wsattr(wtypes.text, mandatory=False)
"""Ther service description""" """Ther service description"""
time_stamp = wsme.wsattr(wtypes.text, mandatory=False) time_stamp = wsme.wsattr(int, mandatory=False)
"""Time stamp for the downtime""" """Time stamp for the downtime"""
start_time = wsme.wsattr(int, mandatory=False) start_time = wsme.wsattr(int, mandatory=False)

View File

@ -7,3 +7,4 @@ oslosphinx>=2.5.0
testrepository>=0.0.18 testrepository>=0.0.18
mongomock mongomock
httpretty httpretty
sphinx_rtd_theme