This request simply returns whatever content is sent in the body of the request (body should be in json format, only used for testing)
-Example request: curl -XGET '127.0.0.1:7556/echo' -H "Content-Type: application/json" -d '{"vmtp": "test"}'
-Response:
-{
- "vmtp": "test"
-}
-
-ls
-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)
^^^^^^^^^^^^^^^^^^^^^^^
}
+<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
-------------------------
"flow_count": 1,
"generic_poll_sec": 2,
"generic_retry_count": 100,
- "image_name": "nfvbenchvm",
"inter_node": false,
"internal_networks": {
"left": {
},
"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"
"vlan": null
}
],
- "intf_speed": "10Gbps",
+ "intf_speed": null,
"ip": "127.0.0.1",
"name": "trex-local",
"tool": "TRex"
],
"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"
- }
}
{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},
...
.. 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
-
-
-
-
-
-
-