2.0 beta NFVBENCH-91 Allow multi-chaining with separate edge networks
[nfvbench.git] / docs / testing / user / userguide / server.rst
index 4495e19..921e3bc 100644 (file)
@@ -42,23 +42,19 @@ 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:
 
 .. code-block:: bash
 
+    curl -XGET '127.0.0.1:7556/echo' -H "Content-Type: application/json" -d '{"nfvbench": "test"}'
+    Response:
     {
-      "error_message": "nfvbench run still pending",
-      "status": "PENDING"
+      "nfvbench": "test"
     }
 
+
 <http-url>/status (GET)
 ^^^^^^^^^^^^^^^^^^^^^^^
 
@@ -89,6 +85,34 @@ Example of return when the run completes:
     }
 
 
+<http-url>/start_run (POST)
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This request starts an NFVBench run with passed configurations. If no configuration is passed, a run with default configurations will be executed.
+
+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 +171,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 +191,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": {
@@ -196,30 +219,13 @@ The entire default configuration can be viewed using the --show-json-config opti
         },
         "name": "(built-in default config)",
         "no_cleanup": false,
-        "no_int_config": false,
-        "no_reset": false,
-        "no_tor_access": false,
         "no_traffic": false,
-        "no_vswitch_access": false,
         "openrc_file": "/tmp/nfvbench/openstack/openrc",
-        "openstack_defaults": "/tmp/nfvbench/openstack/defaults.yaml",
-        "openstack_setup": "/tmp/nfvbench/openstack/setup_data.yaml",
         "rate": "ndr_pdr",
         "service_chain": "PVP",
         "service_chain_count": 1,
         "sriov": false,
         "std_json": null,
-        "tor": {
-            "switches": [
-                {
-                    "host": "172.26.233.12",
-                    "password": "lab",
-                    "port": 22,
-                    "username": "admin"
-                }
-            ],
-            "type": "N9K"
-        },
         "traffic": {
             "bidirectional": true,
             "profile": "traffic_profile_64B"
@@ -248,7 +254,7 @@ The entire default configuration can be viewed using the --show-json-config opti
                             "vlan": null
                         }
                     ],
-                    "intf_speed": "10Gbps",
+                    "intf_speed": null,
                     "ip": "127.0.0.1",
                     "name": "trex-local",
                     "tool": "TRex"
@@ -301,13 +307,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",
-            "port": 22,
-            "username": "admin"
-        }
     }
 
 
@@ -423,7 +422,8 @@ use the default NFVbench configuration but do not generate traffic (no_traffic p
     {u'status': u'PENDING', u'error_message': u'nfvbench run still pending'}
 
     {u'status': u'OK', u'result': {u'date': u'2017-03-31 22:04:59', u'nfvbench_version': u'0.3.5',
-    u'config': {u'compute_nodes': None, u'compute_node_user': u'root', u'vts_ncs': {u'username': u'admin', u'host': None, u'password': u'secret', u'port': 22}, u'traffic_generator': {u'tg_gateway_ip_addrs': [u'1.1.0.100', u'2.2.0.100'], u'ip_addrs_step': u'0.0.0.1', u'step_mac': None, u'generator_profile': [{u'intf_speed': u'10Gbps', u'interfaces': [{u'pci': u'0a:00.0', u'port': 0, u'vlan': 1998, u'switch_port': None},
+     u'config': {u'compute_nodes': None, u'compute_node_user': u'root', u'traffic_generator': {u'tg_gateway_ip_addrs': [u'1.1.0.100', u'2.2.0.100'], u'ip_addrs_step': u'0.0.0.1',
+     u'step_mac': None, u'generator_profile': [{u'intf_speed': u'', u'interfaces': [{u'pci': u'0a:00.0', u'port': 0, u'vlan': 1998, u'switch_port': None},
 
     ...
 
@@ -436,10 +436,3 @@ Example of invocation using Websocket/SocketIO, execute NFVbench using the defau
 .. code-block:: bash
 
     [root@sjc04-pod3-mgmt ~]# docker exec -it nfvbench nfvbench_client -c '{"duration":5,"rate":"5kpps"}' --use-socketio  http://127.0.0.1:7555 >results.json
-
-
-
-
-
-
-