Documentation update
[nfvbench.git] / docs / testing / user / userguide / server.rst
index 4495e19..e08f663 100644 (file)
@@ -42,22 +42,14 @@ HTTP Interface
 <http-url>/echo (GET)
 ^^^^^^^^^^^^^^^^^^^^^
 
-This request simply returns whatever content is sent in the body of the request (only used for testing)
+This request simply returns whatever content is sent in the body of the request (body should be in json format, only used for testing)
 
-<http-url>/start_run (POST)
-^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-This request will initiate a new NFVbench run asynchornously and can optionally pass the NFVbench configuration to run in the body (in JSON format).
-See "NFVbench configuration JSON parameter" below for details on how to format this parameter.
-
-The request returns immediately with a json content indicating if there was an error (status=ERROR) or if the request was submitted successfully (status=PENDING). Example of return when the submission is successful:
+Example request: curl -XGET '127.0.0.1:7556/echo' -H "Content-Type: application/json" -d '{"nfvbench": "test"}'
+Response:
+{
+  "nfvbench": "test"
+}
 
-.. code-block:: bash
-
-    {
-      "error_message": "nfvbench run still pending",
-      "status": "PENDING"
-    }
 
 <http-url>/status (GET)
 ^^^^^^^^^^^^^^^^^^^^^^^
@@ -89,6 +81,34 @@ Example of return when the run completes:
     }
 
 
+<http-url>/start_run (POST)
+^^^^^^^^^^^^^^^^^^^^^
+
+This request starts an NFVBench run with passed configurations.
+
+Example request: curl -XPOST 'localhost:7556/start_run' -H "Content-Type: application/json" -d @nfvbenchconfig.json
+
+See "NFVbench configuration JSON parameter" below for details on how to format this parameter.
+
+The request returns immediately with a json content indicating if there was an error (status=ERROR) or if the request was submitted successfully (status=PENDING).
+Example of return when the submission is successful:
+
+.. code-block:: bash
+
+    {
+      "error_message": "NFVbench run still pending",
+      "request_id": "42cccb7effdc43caa47f722f0ca8ec96",
+      "status": "PENDING"
+    }
+
+If there is already an NFVBench running then it will return
+
+.. code-block:: bash
+
+    {
+     "error_message": "there is already an NFVbench request running",
+     "status": "ERROR"
+    }
 
 WebSocket/SocketIO events
 -------------------------
@@ -147,7 +167,7 @@ The entire default configuration can be viewed using the --show-json-config opti
 
 .. code-block:: bash
 
-    # nfvbench --show-json-config
+    # nfvbench --show-config
     {
         "availability_zone": null,
         "compute_node_user": "root",
@@ -167,7 +187,6 @@ The entire default configuration can be viewed using the --show-json-config opti
         "flow_count": 1,
         "generic_poll_sec": 2,
         "generic_retry_count": 100,
-        "image_name": "nfvbenchvm",
         "inter_node": false,
         "internal_networks": {
             "left": {
@@ -301,7 +320,6 @@ The entire default configuration can be viewed using the --show-json-config opti
         ],
         "unidir_reverse_traffic_pps": 1,
         "vlan_tagging": true,
-        "vm_image_file": "file://172.29.172.152/downloads/nfvbench/nfvbenchvm-latest.qcow2",
         "vts_ncs": {
             "host": null,
             "password": "secret",