From bf94ef8bdd7efaa65bb3e71e1aaded32c6e23937 Mon Sep 17 00:00:00 2001 From: Yumeng Bao Date: Thu, 9 Jul 2020 16:37:42 +0800 Subject: [PATCH] update API documentation The existed API documentation is not clear enough, which caused misleading and confusion to end users and developers from other community when talking about cyborg support in CNTT[1]. This patch updated the documentation to improve and avoid this kind of misleading. [1] http://eavesdrop.openstack.org/meetings/openstack_cyborg/2020/openstack_cyborg.2020-07-09-03.01.log.html Story: 2007809 Task: 40301 Change-Id: I3f882aa7c32b7439ab86e6658772f3d7630ab0c9 --- cyborg/cmd/__init__.py | 4 ++-- doc/source/index.rst | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/cyborg/cmd/__init__.py b/cyborg/cmd/__init__.py index 767af604..6f57a578 100644 --- a/cyborg/cmd/__init__.py +++ b/cyborg/cmd/__init__.py @@ -20,8 +20,8 @@ eventlet.monkey_patch() # Monkey patch the original current_thread to use the up-to-date _active # global variable. See https://bugs.launchpad.net/bugs/1863021 and # https://github.com/eventlet/eventlet/issues/592 -import __original_module_threading as orig_threading # noqa -import threading # noqa +import __original_module_threading as orig_threading # noqa +import threading # noqa orig_threading.current_thread.__globals__['_active'] = threading._active i18n.install('cyborg') diff --git a/doc/source/index.rst b/doc/source/index.rst index 494ef788..a2965470 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -59,10 +59,18 @@ Interface (CLI) can be found in this section of documentation. Using the API ~~~~~~~~~~~~~ -All end user (and some administrative) features of Cyborg are exposed via a -REST API, which can be used to build more complicated logic or automation with -Cyborg. This can be consumed directly, or via various SDKs. The following -resources will help you get started with consuming the API directly. +Following the Ussuri release, every Cyborg deployment should have the +following endpoints: + +/ - list of available versions + +/v2 - the version 2 of the Acceleration API, it uses microversions + +/v2.0 - same API as v2, except uses microversions + +The follwoing guide concentrates on documenting the v2 API, please note that +the v2.0 is the first microversion of the v2 API and are also covered by this +guide. * `Cyborg API Reference `_: The complete reference for the accelerator API, including all methods and