summaryrefslogtreecommitdiffstats
path: root/docs/devguide/index.rst
diff options
context:
space:
mode:
authorrohitsakala <rohitsakala@gmail.com>2016-12-16 00:56:18 +0530
committerRohit Sakala <rohitsakala@gmail.com>2017-02-23 07:09:08 +0000
commit200f3e5cdfee0bd9a5c1cbdf5d34e7744256f6e8 (patch)
treed3b22de65703a375e9071a0124bc2b16369c85ca /docs/devguide/index.rst
parent03208634b25e61faebaa34e932e282a8f26c0ea4 (diff)
Add documentation of testapi internship
JIRA: FUNCTEST-706 Change-Id: I485337c2010f1250f34dcffdca91c52793e274c5 Signed-off-by: rohitsakala <rohitsakala@gmail.com>
Diffstat (limited to 'docs/devguide/index.rst')
-rw-r--r--docs/devguide/index.rst30
1 files changed, 25 insertions, 5 deletions
diff --git a/docs/devguide/index.rst b/docs/devguide/index.rst
index 42ad04451..eee013678 100644
--- a/docs/devguide/index.rst
+++ b/docs/devguide/index.rst
@@ -335,10 +335,6 @@ The API can described as follows. For detailed information, please go to
Authentication: opnfv/api@opnfv
-Please notes that POST/DELETE/PUT operations for test or study purpose via
-swagger website is not allowed, because it will change the real data in
-the database.
-
Version:
+--------+--------------------------+-----------------------------------------+
@@ -503,17 +499,39 @@ Scenarios:
The code of the API is hosted in the releng repository `[6]`_.
+The static documentation of the API can be found at `[17]`_.
The test API has been dockerized and may be installed locally in your
lab. See `[15]`_ for details.
The deployment of the test API has been automated.
A jenkins job manages:
* the unit tests of the test api
- * the cration of a new docker file
+ * the creation of a new docker file
* the deployment of the new test api
* the archive of the old test api
* the backup of the Mongo DB
+Test API Authorization
+~~~~~~~~~~~~~~~~~~~~~~
+
+PUT/DELETE/POST operations of the testapi now require token based authorization. The token needs
+to be added in the request using a header 'X-Auth-Token' for access to the database.
+
+e.g::
+ headers['X-Auth-Token']
+
+The value of the header i.e the token can be accessed in the jenkins environment variable
+*TestApiToken*. The token value is added as a masked password.
+
+.. code-block:: python
+
+ headers['X-Auth-Token'] = os.environ.get('TestApiToken')
+
+The above example is in Python. Token based authentication has been added so that only ci pods
+jenkins job can have access to the database.
+
+Please note that currently token authorization is implemented but is not yet enabled.
+
Automatic reporting
===================
@@ -960,6 +978,8 @@ _`[15]`: https://git.opnfv.org/cgit/releng/tree/utils/test/result_collection_api
_`[16]`: https://git.opnfv.org/cgit/releng/tree/utils/test/scripts/mongo_to_elasticsearch.py
+_`[17]`: http://artifacts.opnfv.org/releng/docs/testapi.html
+
OPNFV main site: http://www.opnfv.org
OPNFV functional test page: https://wiki.opnfv.org/opnfv_functional_testing