From f1ce2a58c7da1dd77e00793d6e8fc5169574a1f5 Mon Sep 17 00:00:00 2001 From: licanwei Date: Mon, 19 Nov 2018 11:31:46 +0800 Subject: [PATCH] remove older api doc api referance doc uses api-ref and adds microversion history. Change-Id: I654bd25966f0f5ef982928766ac58aced2bc784c --- doc/source/api/index.rst | 8 -- doc/source/api/v1.rst | 100 ------------------ .../contributor/api_microversion_history.rst | 1 + doc/source/index.rst | 5 +- .../controllers/rest_api_version_history.rst | 27 +++++ 5 files changed, 31 insertions(+), 110 deletions(-) delete mode 100644 doc/source/api/index.rst delete mode 100644 doc/source/api/v1.rst create mode 100644 doc/source/contributor/api_microversion_history.rst create mode 100644 watcher/api/controllers/rest_api_version_history.rst diff --git a/doc/source/api/index.rst b/doc/source/api/index.rst deleted file mode 100644 index ebcce621d..000000000 --- a/doc/source/api/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -================================================== -OpenStack Infrastructure Optimization Service APIs -================================================== - -.. toctree:: - :maxdepth: 1 - - v1 diff --git a/doc/source/api/v1.rst b/doc/source/api/v1.rst deleted file mode 100644 index 7204969a1..000000000 --- a/doc/source/api/v1.rst +++ /dev/null @@ -1,100 +0,0 @@ -.. - Except where otherwise noted, this document is licensed under Creative - Commons Attribution 3.0 License. You can view the license at: - - https://creativecommons.org/licenses/by/3.0/ - -==================== -RESTful Web API (v1) -==================== - -Goals -===== - -.. rest-controller:: watcher.api.controllers.v1.goal:GoalsController - :webprefix: /v1/goal - -.. autotype:: watcher.api.controllers.v1.goal.GoalCollection - :members: - -.. autotype:: watcher.api.controllers.v1.goal.Goal - :members: - -Strategies -========== - -.. rest-controller:: watcher.api.controllers.v1.strategy:StrategiesController - :webprefix: /v1/strategies - -.. autotype:: watcher.api.controllers.v1.strategy.StrategyCollection - :members: - -.. autotype:: watcher.api.controllers.v1.strategy.Strategy - :members: - -Audit Templates -=============== - -.. rest-controller:: watcher.api.controllers.v1.audit_template:AuditTemplatesController - :webprefix: /v1/audit_templates - -.. autotype:: watcher.api.controllers.v1.audit_template.AuditTemplateCollection - :members: - -.. autotype:: watcher.api.controllers.v1.audit_template.AuditTemplate - :members: - -Audits -====== - -.. rest-controller:: watcher.api.controllers.v1.audit:AuditsController - :webprefix: /v1/audits - -.. autotype:: watcher.api.controllers.v1.audit.AuditCollection - :members: - -.. autotype:: watcher.api.controllers.v1.audit.Audit - :members: - -Links -===== - -.. autotype:: watcher.api.controllers.link.Link - :members: - -Action Plans -============ - -.. rest-controller:: watcher.api.controllers.v1.action_plan:ActionPlansController - :webprefix: /v1/action_plans - -.. autotype:: watcher.api.controllers.v1.action_plan.ActionPlanCollection - :members: - -.. autotype:: watcher.api.controllers.v1.action_plan.ActionPlan - :members: - - -Actions -======= - -.. rest-controller:: watcher.api.controllers.v1.action:ActionsController - :webprefix: /v1/actions - -.. autotype:: watcher.api.controllers.v1.action.ActionCollection - :members: - -.. autotype:: watcher.api.controllers.v1.action.Action - :members: - -Scoring Engine -============== - -.. rest-controller:: watcher.api.controllers.v1.scoring_engine:ScoringEngineController - :webprefix: /v1/scoring_engine - -.. autotype:: watcher.api.controllers.v1.scoring_engine.ScoringEngineCollection - :members: - -.. autotype:: watcher.api.controllers.v1.scoring_engine.ScoringEngine - :members: diff --git a/doc/source/contributor/api_microversion_history.rst b/doc/source/contributor/api_microversion_history.rst new file mode 100644 index 000000000..593c7c9be --- /dev/null +++ b/doc/source/contributor/api_microversion_history.rst @@ -0,0 +1 @@ +.. include:: ../../../watcher/api/controllers/rest_api_version_history.rst diff --git a/doc/source/index.rst b/doc/source/index.rst index 19a3f397b..72be52368 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -78,12 +78,13 @@ User Guide user/index API References --------------- +============== .. toctree:: :maxdepth: 1 - api/index + API Reference + Watcher API Microversion History Plugins ------- diff --git a/watcher/api/controllers/rest_api_version_history.rst b/watcher/api/controllers/rest_api_version_history.rst new file mode 100644 index 000000000..c2f51832f --- /dev/null +++ b/watcher/api/controllers/rest_api_version_history.rst @@ -0,0 +1,27 @@ +REST API Version History +======================== + +This documents the changes made to the REST API with every +microversion change. The description for each version should be a +verbose one which has enough information to be suitable for use in +user documentation. + +1.0 (Initial version) +----------------------- +This is the initial version of the Watcher API which supports +microversions. + +A user can specify a header in the API request:: + + OpenStack-API-Version: infra-optim + +where ```` is any valid api version for this API. + +If no version is specified then the API will behave as if version 1.0 +was requested. + +1.1 +--- +Added the parameters ``start_time`` and ``end_time`` to +create audit request. Supported for start and end time of continuous +audits.