summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorahothan <ahothan@cisco.com>2018-12-14 19:39:51 -0800
committerahothan <ahothan@cisco.com>2018-12-14 19:49:57 -0800
commit0d70709b1e56d7dae02411802730585af6bb071e (patch)
treefbceb97002f0be4b52d84da6d853d60acce31545
parent95ec969158c3f2e75a2e70e87d5f43f1c45b6f8e (diff)
Relax checking for vxlan network type.3.0.4
The code should allow any network type that has "vxlan" in it. Change-Id: I9e0a9b5f028b054e53b08a2765fd02b2c59342aa Signed-off-by: ahothan <ahothan@cisco.com>
-rw-r--r--docs/testing/user/userguide/quickstart_docker.rst23
-rw-r--r--docs/testing/user/userguide/readme.rst6
-rw-r--r--nfvbench/chain_runner.py8
-rw-r--r--nfvbench/chaining.py2
4 files changed, 19 insertions, 20 deletions
diff --git a/docs/testing/user/userguide/quickstart_docker.rst b/docs/testing/user/userguide/quickstart_docker.rst
index 625e491..6803bc3 100644
--- a/docs/testing/user/userguide/quickstart_docker.rst
+++ b/docs/testing/user/userguide/quickstart_docker.rst
@@ -55,12 +55,14 @@ The NFVbench container requires the following Docker options to operate properly
It can be convenient to write a shell script (or an alias) to automatically insert the necessary options.
-The minimal configuration file required must specify the openrc file to use (using in-container path), the PCI addresses of the 2 NIC ports to use
-for generating traffic and the line rate (in each direction) of each of these 2 interfaces.
+The minimal configuration file required must specify the PCI addresses of the 2 NIC ports to use.
+If OpenStack is used, the openrc_file property must be defined to point to a valid OpenStack rc file.
-Here is an example of mimimal configuration where:
-the openrc file is located on the host current directory which is mapped under /tmp/nfvbench in the container (this is achieved using -v $PWD:/tmp/nfvbench)
-the 2 NIC ports to use for generating traffic have the PCI addresses "04:00.0" and "04:00.1"
+
+Here is an example of mimimal configuration using OpenStack where:
+
+- the openrc file is located on the host current directory which is mapped under /tmp/nfvbench in the container (this is achieved using -v $PWD:/tmp/nfvbench)
+- the 2 NIC ports to use for generating traffic have the PCI addresses "04:00.0" and "04:00.1"
.. code-block:: bash
@@ -151,17 +153,18 @@ Create a new file containing the minimal configuration for NFVbench, we can call
software_mode: false,
interfaces:
- port: 0
- switch_port:
pci:
- port: 1
- switch_port:
pci:
intf_speed:
-NFVbench requires an ``openrc`` file to connect to OpenStack using the OpenStack API. This file can be downloaded from the OpenStack Horizon dashboard (refer to the OpenStack documentation on how to
+If OpenStack is used, NFVbench requires an ``openrc`` file to connect to OpenStack using the OpenStack API. This file can be downloaded from the OpenStack Horizon dashboard (refer to the OpenStack documentation on how to
retrieve the openrc file). The file pathname in the container must be stored in the "openrc_file" property. If it is stored on the host in the current directory, its full pathname must start with /tmp/nfvbench (since the current directory is mapped to /tmp/nfvbench in the container).
-The required configuration is the PCI address of the 2 physical interfaces that will be used by the traffic generator. The PCI address can be obtained for example by using the "lspci" Linux command. For example:
+If OpenStack is not used, remove the openrc_file property.
+
+The PCI address of the 2 physical interfaces that will be used by the traffic generator must be configured.
+The PCI address can be obtained for example by using the "lspci" Linux command. For example:
.. code-block:: bash
@@ -206,7 +209,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).
-Make sure you have your nfvbench configuration file (my_nfvbench.cfg) and OpenStack RC file in your pre-created working directory.
+Make sure you have your nfvbench configuration file (my_nfvbench.cfg) and - if OpenStack is used - OpenStack RC file in your pre-created working directory.
5. Run NFVbench
diff --git a/docs/testing/user/userguide/readme.rst b/docs/testing/user/userguide/readme.rst
index 04b7fb1..acd4763 100644
--- a/docs/testing/user/userguide/readme.rst
+++ b/docs/testing/user/userguide/readme.rst
@@ -31,9 +31,9 @@ Results of each run include the following data:
- Actual drop rate in %
- Latency in usec (min, max, average in the current version)
-Built-in OpenStack support
---------------------------
-NFVbench can stage OpenStack resources to build 1 or more service chains using direct OpenStack APIs. Each service chain is composed of:
+Built-in OpenStack support (optional)
+-------------------------------------
+NFVbench can optionally stage OpenStack resources to build 1 or more service chains using direct OpenStack APIs. Each service chain is composed of:
- 1 or 2 loopback VM instances per service chain
- 2 Neutron networks per loopback VM
diff --git a/nfvbench/chain_runner.py b/nfvbench/chain_runner.py
index e38cfcd..a4e461d 100644
--- a/nfvbench/chain_runner.py
+++ b/nfvbench/chain_runner.py
@@ -84,12 +84,8 @@ class ChainRunner(object):
vtep_vlan = gen_config.gen_config.vtep_vlan
src_vteps = gen_config.gen_config.src_vteps
dst_vtep = gen_config.gen_config.dst_vtep
- int_nets = self.config.internal_networks
- network_type = set(
- [int_nets[net].get('network_type') for net in int_nets])
- if 'vxlan' in network_type:
- gen_config.set_vxlans(0, self.chain_manager.get_chain_vxlans(0))
- gen_config.set_vxlans(1, self.chain_manager.get_chain_vxlans(1))
+ gen_config.set_vxlans(0, self.chain_manager.get_chain_vxlans(0))
+ gen_config.set_vxlans(1, self.chain_manager.get_chain_vxlans(1))
gen_config.set_vtep_vlan(0, vtep_vlan)
gen_config.set_vtep_vlan(1, vtep_vlan)
# Configuring source an remote VTEPs on TREx interfaces
diff --git a/nfvbench/chaining.py b/nfvbench/chaining.py
index 5f9e1e8..a97cd0b 100644
--- a/nfvbench/chaining.py
+++ b/nfvbench/chaining.py
@@ -329,7 +329,7 @@ class ChainNetwork(object):
:return: VNI ID for this network
"""
- if self.network['provider:network_type'] != 'vxlan':
+ if 'vxlan' not in self.network['provider:network_type']:
raise ChainException('Trying to retrieve VNI for non VXLAN network')
return self.network['provider:segmentation_id']