VPP-1508 python3 tests: xrange

xrange is not supported. Use six.range.

py27 runtests: commands[5] | stestr --test-path ./test run --slowest test_ip4 test_ip6
==============================================================================
IPv4 disabled
==============================================================================
==============================================================================
ICMP Echo Test Case
==============================================================================
{0} test.test_ip4.TestIPDisabled.test_ip_disabled [5.256819s] ... ok
07:24:41,902 Couldn't stat : /tmp/vpp-unittest-TestICMPEcho-hU4IsB/stats.sock
{1} test.test_ip4.TestICMPEcho.test_icmp_echo [0.367035s] ... ok
==============================================================================
IPv4 Deaggregate Routes
==============================================================================
==============================================================================
IPv4 Input Exceptions
==============================================================================
07:24:47,314 Couldn't stat : /tmp/vpp-unittest-TestIPDeag-eE1VgC/stats.sock
{1} test.test_ip4.TestIPDeag.test_ip_deag [5.895646s] ... ok
{0} test.test_ip4.TestIPInput.test_ip_input [5.819001s] ... ok
==============================================================================
IPv4 longest Prefix Match

... output truncated ...

==============================
Failed 4 tests - output below:
==============================

test.test_ip4.TestIPv4FibCrud.test_3_add_new_routes
---------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/vpp/test/test_ip4.py", line 509, in test_3_add_new_routes
        self.deleted_routes.remove(x)
    ValueError: list.remove(x): x not in list

test.test_ip4.TestIPv4FibCrud.test_2_del_routes
-----------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/vpp/test/test_ip4.py", line 478, in test_2_del_routes
        self.configured_routes.remove(x)
    ValueError: list.remove(x): x not in list

test.test_ip4_vrf_multi_instance.TestIp4VrfMultiInst.test_ip4_vrf_03
--------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/vpp/test/test_ip4_vrf_multi_instance.py", line 465, in test_ip4_vrf_03
        self.create_vrf_and_assign_interfaces(1)
      File "/vpp/test/test_ip4_vrf_multi_instance.py", line 189, in create_vrf_and_assign_interfaces
        pg_if.set_table_ip4(vrf_id)
      File "/vpp/test/vpp_interface.py", line 322, in set_table_ip4
        self.sw_if_index, 0, self.ip4_table_id)
      File "/vpp/test/vpp_papi_provider.py", line 264, in sw_interface_set_table
        'vrf_id': table_id})
      File "/vpp/test/vpp_papi_provider.py", line 196, in api
        raise UnexpectedApiReturnValueError(msg)
    test.vpp_papi_provider.UnexpectedApiReturnValueError: API call failed, expected 0 return value instead of -114 in sw_interface_set_table_reply(_0=91, context=1007, retval=-114)

test.test_ip4_vrf_multi_instance.TestIp4VrfMultiInst.test_ip4_vrf_02
--------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/vpp/test/test_ip4_vrf_multi_instance.py", line 445, in test_ip4_vrf_02
        self.reset_vrf_and_remove_from_vrf_list(1)
      File "/vpp/test/test_ip4_vrf_multi_instance.py", line 208, in reset_vrf_and_remove_from_vrf_list
        self.vapi.reset_fib(vrf_id, is_ipv6=0)
      File "/vpp/test/vpp_papi_provider.py", line 1137, in reset_fib
        'is_ipv6': is_ipv6,
      File "/vpp/test/vpp_papi_provider.py", line 196, in api
        raise UnexpectedApiReturnValueError(msg)
    test.vpp_papi_provider.UnexpectedApiReturnValueError: API call failed, expected 0 return value instead of -3 in reset_fib_reply(_0=259, context=1198, retval=-3)

======
Totals
======
Ran: 57 tests in 266.0000 sec.
 - Passed: 53
 - Skipped: 0
 - Expected Fail: 0
 - Unexpected Success: 0
 - Failed: 4
Sum of execute time for each test: 157.3925 sec.

==============
Worker Balance
==============
 - Worker 0 (29 tests) => 0:03:52.608995
 - Worker 1 (28 tests) => 0:04:08.615473
Test id                                        Runtime (s)
---------------------------------------------  -----------
test.test_ip_mcast.TestIPMcast.test_ip6_mcast  8.535
test.test_ip4.TestIPPunt.test_ip_punt          8.082
test.test_ip6.TestIP6Punt.test_ip_punt         6.582
test.test_ip6.TestIPDeag.test_ip_deag          6.175
test.test_ip6.TestIPv6.test_ns                 6.171
test.test_ip4.TestIPDeag.test_ip_deag          5.896
test.test_ip6.TestIPv6.test_fib                5.846
test.test_ip4.TestIPInput.test_ip_input        5.819
test.test_ip6.TestIPv6.test_rs                 5.737
test.test_ip4.TestIPv4.test_fib                5.267
ERROR: InvocationError for command '/vpp/.tox/py27/bin/stestr --test-path ./test run --slowest test_ip4 test_ip6' (exited with code 1)
______________________________________________________ summary ______________________________________________________
ERROR:   py27: commands failed
Change-Id: Id9f6ecb4897386f790d82ab908963e4971a3aac8
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2 files changed
tree: 86bd5509eb7dfe35c52e04a713ffe8654bbf16fd
  1. build/
  2. build-data/
  3. build-root/
  4. docs/
  5. doxygen/
  6. extras/
  7. gmod/
  8. src/
  9. test/
  10. .clang-format
  11. .gitignore
  12. .gitreview
  13. INFO.yaml
  14. LICENSE
  15. MAINTAINERS
  16. Makefile
  17. README.md
  18. RELEASE.md
README.md

Vector Packet Processing

Introduction

The VPP platform is an extensible framework that provides out-of-the-box production quality switch/router functionality. It is the open source version of Cisco's Vector Packet Processing (VPP) technology: a high performance, packet-processing stack that can run on commodity CPUs.

The benefits of this implementation of VPP are its high performance, proven technology, its modularity and flexibility, and rich feature set.

For more information on VPP and its features please visit the FD.io website and What is VPP? pages.

Changes

Details of the changes leading up to this version of VPP can be found under @ref release_notes.

Directory layout

Directory nameDescription
build-dataBuild metadata
build-rootBuild output directory
doxygenDocumentation generator configuration
dpdkDPDK patches and build infrastructure
@ref extras/libmemifClient library for memif
@ref src/examplesVPP example code
@ref src/pluginsVPP bundled plugins directory
@ref src/svmShared virtual memory allocation library
src/testsStandalone tests (not part of test harness)
src/vatVPP API test program
@ref src/vlibVPP application library
@ref src/vlibapiVPP API library
@ref src/vlibmemoryVPP Memory management
@ref src/vnetVPP networking
@ref src/vppVPP application
@ref src/vpp-apiVPP application API bindings
@ref src/vppinfraVPP core library
@ref src/vpp/apiNot-yet-relocated API bindings
testUnit tests and Python test harness

Getting started

In general anyone interested in building, developing or running VPP should consult the VPP wiki for more complete documentation.

In particular, readers are recommended to take a look at [Pulling, Building, Running, Hacking, Pushing](https://wiki.fd.io/view/VPP/Pulling,_Building,_Run ning,_Hacking_and_Pushing_VPP_Code) which provides extensive step-by-step coverage of the topic.

For the impatient, some salient information is distilled below.

Quick-start: On an existing Linux host

To install system dependencies, build VPP and then install it, simply run the build script. This should be performed a non-privileged user with sudo access from the project base directory:

./extras/vagrant/build.sh

If you want a more fine-grained approach because you intend to do some development work, the Makefile in the root directory of the source tree provides several convenience shortcuts as make targets that may be of interest. To see the available targets run:

make

Quick-start: Vagrant

The directory extras/vagrant contains a VagrantFile and supporting scripts to bootstrap a working VPP inside a Vagrant-managed Virtual Machine. This VM can then be used to test concepts with VPP or as a development platform to extend VPP. Some obvious caveats apply when using a VM for VPP since its performance will never match that of bare metal; if your work is timing or performance sensitive, consider using bare metal in addition or instead of the VM.

For this to work you will need a working installation of Vagrant. Instructions for this can be found [on the Setting up Vagrant wiki page] (https://wiki.fd.io/view/DEV/Setting_Up_Vagrant).

More information

Several modules provide documentation, see @subpage user_doc for more end-user-oriented information. Also see @subpage dev_doc for developer notes.

Visit the VPP wiki for details on more advanced building strategies and other development notes.

Test Framework

There is PyDoc generated documentation available for the VPP test framework. See @ref test_framework_doc for details.