aboutsummaryrefslogtreecommitdiffstats
path: root/docs/testing
diff options
context:
space:
mode:
Diffstat (limited to 'docs/testing')
-rw-r--r--docs/testing/user/userguide/advanced.rst3
-rw-r--r--docs/testing/user/userguide/examples.rst4
-rw-r--r--docs/testing/user/userguide/quickstart_docker.rst26
-rw-r--r--docs/testing/user/userguide/server.rst44
4 files changed, 52 insertions, 25 deletions
diff --git a/docs/testing/user/userguide/advanced.rst b/docs/testing/user/userguide/advanced.rst
index 00bac53..896affb 100644
--- a/docs/testing/user/userguide/advanced.rst
+++ b/docs/testing/user/userguide/advanced.rst
@@ -288,7 +288,8 @@ The corresponding ``step`` is used for ranging the IP addresses from the `ip_add
Traffic Configuration via CLI
-----------------------------
-While traffic configuration can be modified using the configuration file, it can be inconvenient to have to change the configuration file everytime you need to change a traffic configuration option. Traffic configuration options can be overridden with a few CLI options.
+While traffic configuration can be modified using the configuration file, it can be inconvenient to have to change the configuration file everytime
+you need to change a traffic configuration option. Traffic configuration options can be overridden with a few CLI options.
Here is an example of configuring traffic via CLI:
diff --git a/docs/testing/user/userguide/examples.rst b/docs/testing/user/userguide/examples.rst
index cd1f886..fd6be5c 100644
--- a/docs/testing/user/userguide/examples.rst
+++ b/docs/testing/user/userguide/examples.rst
@@ -7,9 +7,11 @@ Example of Results
Example run for fixed rate
.. code-block:: bash
+
nfvbench -c /nfvbench/nfvbenchconfig.json --rate 1%
.. code-block:: bash
+
========== NFVBench Summary ==========
Date: 2017-09-21 23:57:44
NFVBench version 1.0.9
@@ -77,9 +79,11 @@ Example run for fixed rate
Example run for NDR/PDR with package size 1518B
.. code-block:: bash
+
nfvbench -c /nfvbench/nfvbenchconfig.json -fs 1518
.. code-block:: bash
+
========== NFVBench Summary ==========
Date: 2017-09-22 00:02:07
NFVBench version 1.0.9
diff --git a/docs/testing/user/userguide/quickstart_docker.rst b/docs/testing/user/userguide/quickstart_docker.rst
index 98d4d25..ccb629b 100644
--- a/docs/testing/user/userguide/quickstart_docker.rst
+++ b/docs/testing/user/userguide/quickstart_docker.rst
@@ -38,11 +38,15 @@ The NFVbench container requires the following Docker options to operate properly
| | /tmp/nfvbench director in the container but any |
| | other similar mapping can work as well |
+------------------------------------------------------+------------------------------------------------------+
-| --net=host | (optional) needed if you run the NFVbench REST |
+| --net=host | (optional) needed if you run the NFVbench ok |
| | server in the container (or use any appropriate |
| | docker network mode other than "host") |
+------------------------------------------------------+------------------------------------------------------+
-| --privilege | (optional) required if SELinux is enabled on the host|
+| --privileged | (optional) required if SELinux is enabled on the host|
++------------------------------------------------------+------------------------------------------------------+
+| --e HOST="127.0.0.1" | (optional) required if REST server is enabled |
++------------------------------------------------------+------------------------------------------------------+
+| --e PORT=7556 | (optional) required if REST server is enabled |
+------------------------------------------------------+------------------------------------------------------+
It can be convenient to write a shell script (or an alias) to automatically insert the necessary options.
@@ -57,11 +61,18 @@ The second approach is more responsive as the delay is only incurred once when s
We will take the second approach and start the NFVbench container in detached mode with the name "nfvbench" (this works with bash, prefix with "sudo" if you do not use the root login)
+To run NFVBench without server mode
+
.. code-block:: bash
- docker run --detach --net=host --privileged -v $PWD:/tmp/nfvbench -v /dev:/dev -v /lib/modules/$(uname -r):/lib/modules/$(uname -r) --name nfvbench opnfv/nfvbench tail -f /dev/null
+ docker run --detach --net=host --privileged -v $PWD:/tmp/nfvbench -v /dev:/dev -v /lib/modules/$(uname -r):/lib/modules/$(uname -r) --name nfvbench opnfv/nfvbench
+
+To run NFVBench enabling REST server
+
+.. code-block:: bash
+
+ docker run --detach --net=host --privileged -e HOST="127.0.0.1" -e PORT=7556 -v $PWD:/tmp/nfvbench -v /dev:/dev -v /lib/modules/$(uname -r):/lib/modules/$(uname -r) --name nfvbench opnfv/nfvbench start_rest_server
-The tail command simply prevents the container from exiting.
The create an alias to make it easy to execute nfvbench commands directly from the host shell prompt:
@@ -146,12 +157,7 @@ Alternatively, the full template with comments can be obtained using the --show-
Edit the nfvbench.cfg file to only keep those properties that need to be modified (preserving the nesting)
-5. Upload the NFVbench loopback VM image to OpenStack
------------------------------------------------------
-[TBP URL to NFVbench VM image in the OPNFV artifact repository]
-
-
-6. Run NFVbench
+5. Run NFVbench
---------------
To do a single run at 10,000pps bi-directional (or 5kpps in each direction) using the PVP packet path:
diff --git a/docs/testing/user/userguide/server.rst b/docs/testing/user/userguide/server.rst
index f1ab618..e08f663 100644
--- a/docs/testing/user/userguide/server.rst
+++ b/docs/testing/user/userguide/server.rst
@@ -44,23 +44,12 @@ HTTP Interface
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"}'
+Example request: curl -XGET '127.0.0.1:7556/echo' -H "Content-Type: application/json" -d '{"nfvbench": "test"}'
Response:
{
- "vmtp": "test"
+ "nfvbench": "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:
-
-.. code-block:: bash
-
- {
- "error_message": "nfvbench run still pending",
- "status": "PENDING"
- }
<http-url>/status (GET)
^^^^^^^^^^^^^^^^^^^^^^^
@@ -92,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
-------------------------
@@ -303,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": "/nfvbench/nfvbenchvm-0.3.qcow2",
"vts_ncs": {
"host": null,
"password": "secret",