Update docs to include sample commands 55/64055/5
authorShashank Kumar Shankar <shashank.kumar.shankar@intel.com>
Fri, 31 Aug 2018 18:36:01 +0000 (11:36 -0700)
committerVictor Morales <victor.morales@intel.com>
Tue, 4 Sep 2018 16:02:35 +0000 (09:02 -0700)
This patch updates the docs to include sample request and
response.

Change-Id: I5f1c29477587a2b0cda8b188ec5a9ff3bb34e5d2
Issue-ID: MULTICLOUD-301
Signed-off-by: Shashank Kumar Shankar <shashank.kumar.shankar@intel.com>
docs/sampleCommands.rst
tox.ini

index 2407b26..c635c25 100644 (file)
@@ -17,7 +17,7 @@ Sample cURL commands
 POST
 ****
 
-URL: `localhost:8081/v1/vnf_instances/cloudregion1/namespacetest`
+URL: `localhost:8081/v1/vnf_instances/`
 
 Request Body
 ------------
@@ -26,6 +26,7 @@ Request Body
 
     {
         "cloud_region_id": "region1",
+        "namespace": "test-namespace",
         "csar_id": "uuid",
         "namespace": "test",
         "oof_parameters": [{
@@ -48,37 +49,68 @@ Expected Response
 .. code-block:: json
 
     {
-        "response": "Created Deployment:nginx-deployment"
+        "vnf_id": "52fdfc07",
+        "cloud_region_id": "cloudregion1",
+        "namespace": "test-namespace",
+        "vnf_components": {
+            "deployment": [
+                "cloudregion1-test-namespace-52fdfc07-kubedeployment"
+            ],
+            "service": [
+                "cloudregion1-test-namespace-52fdfc07-kubeservice"
+            ]
+        }
     }
 
-The above POST request will download the following YAML file and run it on the Kubernetes cluster.
-
-.. code-block:: yaml
-
-    apiVersion: apps/v1
-    kind: Deployment
-    metadata:
-    name: nginx-deployment
-    labels:
-        app: nginx
-    spec:
-    replicas: 3
-    selector:
-        matchLabels:
-        app: nginx
-    template:
-        metadata:
-        labels:
-            app: nginx
-        spec:
-        containers:
-        - name: nginx
-            image: nginx:1.7.9
-            ports:
-            - containerPort: 80
-
 ***
 GET
 ***
 
 URL: `localhost:8081/v1/vnf_instances`
+
+Expected Response
+-----------------
+
+.. code-block:: json
+
+    {
+        "vnf_id_list": [
+            "52fdfc07"
+        ]
+    }
+
+***
+GET
+***
+
+URL: `localhost:8081/v1/vnf_instances/cloudregion1/test-namespace/52fdfc07`
+
+Expected Response
+-----------------
+
+.. code-block:: json
+
+    {
+        "vnf_id": "52fdfc07",
+        "cloud_region_id": "cloudregion1",
+        "namespace": "test-namespace",
+        "vnf_components": {
+            "deployment": [
+                "cloudregion1-test-namespace-52fdfc07-kubedeployment"
+            ],
+            "service": [
+                "cloudregion1-test-namespace-52fdfc07-kubeservice"
+            ]
+        }
+    }
+
+***
+DELETE
+***
+
+URL: `localhost:8081/v1/vnf_instances/cloudregion1/test-namespace/52fdfc07`
+
+Expected Response
+-----------------
+
+202 Accepted
\ No newline at end of file
diff --git a/tox.ini b/tox.ini
index a397103..2e59345 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -18,7 +18,7 @@ commands = bash -c "find {toxinidir} -not -path {toxinidir}/.tox/\* \
 # E006 check for lines longer than 79 columns
    -print0 | xargs -0 bashate -v -iE006"
    bash -c "find {toxinidir} -not -path {toxinidir}/.tox/\* \
-   -name \*.rst -type f -print0 | xargs -0 rstcheck"
+   -name \*.rst -type f -print0 | xargs -0 rstcheck --report warning"
 
 [testenv:docs]
 deps = sphinx