tests docs: upgrade python packages

- Upgrade python package requirements for test & docs
- Clean up docs generation warnings
- Consolidate python requirements for docs in test
  requirements specs.
- Upgrade pip

Type: make

Change-Id: I74a3924b43ed93d15b32ec9f6fc41ed1ba95b69b
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
This commit is contained in:
Dave Wallace
2021-08-12 18:36:02 -04:00
committed by Andrew Yourtchenko
parent 078d258034
commit d170681b24
20 changed files with 448 additions and 410 deletions
+3 -3
View File
@@ -19,8 +19,8 @@
# -- Project information -----------------------------------------------------
project = u'The Vector Packet Processor'
copyright = u'2018-2020, Linux Foundation'
author = u'John DeNisco'
copyright = u'2018-2021, Linux Foundation'
author = u'FD.io VPP Community'
# The short X.Y version
version = u'master'
@@ -109,7 +109,7 @@ html_static_path = ['_static']
def setup(app):
app.add_stylesheet('css/rules.css')
app.add_css_file('css/rules.css')
# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
-36
View File
@@ -1,36 +0,0 @@
alabaster==0.7.12
attrs==19.3.0
Babel==2.8.0
certifi==2019.11.28
chardet==3.0.4
commonmark==0.9.1
docutils==0.16
idna==2.9
imagesize==1.2.0
importlib-metadata==1.5.0
Jinja2==2.11.1
jsonschema==3.2.0
MarkupSafe==1.1.1
packaging==20.3
pyaml==20.3.1
pyenchant==3.0.1
Pygments==2.6.1
pyparsing==2.4.6
pyrsistent==0.15.7
pytz==2019.3
PyYAML==5.3.1
recommonmark==0.6.0
requests==2.23.0
six==1.14.0
snowballstemmer==2.0.0
Sphinx==2.4.4
sphinx-rtd-theme==0.4.3
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==1.0.3
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.4
sphinxcontrib-spelling==4.3.0
urllib3==1.25.8
zipp==3.1.0
+1
View File
@@ -44,4 +44,5 @@ The Developers section covers the following areas:
quic_plugin
cross_compile_macos.rst
cnat
ipsec
VPPAPI.md
+4 -16
View File
@@ -12,30 +12,18 @@ fi
# Get the OS
OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
OS_VERSION=$(grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
PIP_VERSION=$(grep 'PIP_VERSION=' $WS_ROOT/test/Makefile | cut -d'=' -f2)
if [ "$1" == "venv" ]
then
# We need to install the venv package on new systems
if [ "$OS_ID" == "ubuntu" ]
then
sudo apt-get install $CONFIRM python3-venv
fi
if [ "$OS_ID" == "centos" ]
then
if [ "$OS_VERSION" == "8" ]
then
sudo yum install $CONFIRM python3-virtualenv
else
sudo yum install $CONFIRM python3-venv
fi
fi
# Install the virtual environment
$PYTHON_INTERP -m venv $VENV_DIR
source $VENV_DIR/bin/activate;
$PYTHON_INTERP -m pip install wheel==0.34.2
$PYTHON_INTERP -m pip install -r $DOCS_DIR/etc/requirements.txt
$PYTHON_INTERP -m pip install pip==$PIP_VERSION
$PYTHON_INTERP -m pip install -r $WS_ROOT/test/requirements-3.txt
else
[ -n "$(declare -f deactivate)" ] && deactivate
source $VENV_DIR/bin/activate;
VERSION=`source $WS_ROOT/src/scripts/version`
TM=`TZ=GMT date`
+2 -2
View File
@@ -81,9 +81,9 @@ PYTHON_INTERP=$(PYTHON)
endif
PYTHON_VERSION=$(shell $(PYTHON_INTERP) -c 'import sys; print(sys.version_info.major)')
PIP_VERSION=20.1.1
PIP_VERSION=21.2.4
# Keep in sync with requirements.txt
PIP_TOOLS_VERSION=5.1.2
PIP_TOOLS_VERSION=6.2.0
PYTHON_DEPENDS=requirements-$(PYTHON_VERSION).txt
SCAPY_SOURCE=$(shell find $(VENV_PATH)/lib/python* -name site-packages)
BUILD_COV_DIR=$(TEST_BR)/coverage
+35 -30
View File
@@ -175,8 +175,8 @@ e.g. for the IPv4 address assigned to the VPP interface:
* local_ip4n - Local IPv4 address - raw, suitable as API parameter.
These addresses need to be configured in VPP to be usable using e.g.
`config_ip4` API. Please see the documentation to `VppInterface` for more
details.
`VppInterface.config_ip4` API. Please see the documentation to
`VppInterface` for more details.
By default, there is one remote address of each kind created for L3:
remote_ip4 and remote_ip6. If the test needs more addresses, because it's
@@ -195,9 +195,9 @@ using packet-generator interfaces, represented by the `VppPGInterface` class.
Packets are written into a temporary .pcap file, which is then read by the VPP
and the packets are injected into the VPP world.
To add a list of packets to an interface, call the `add_stream` method on that
interface. Once everything is prepared, call `pg_start` method to start
the packet generator on the VPP side.
To add a list of packets to an interface, call the `VppPGInterface.add_stream`
method on that interface. Once everything is prepared, call `pg_start` method to
start the packet generator on the VPP side.
VPP -> test framework
~~~~~~~~~~~~~~~~~~~~~
@@ -208,36 +208,41 @@ which is then read and analyzed by the |vtf|.
The following APIs are available to the test case for reading pcap files.
* `get_capture`: this API is suitable for bulk & batch style of test, where
a list of packets is prepared & sent, then the received packets are read
and verified. The API needs the number of packets which are expected to
be captured (ignoring filtered packets - see below) to know when the pcap
file is completely written by the VPP. If using packet infos for verifying
packets, then the counts of the packet infos can be automatically used
by `get_capture` to get the proper count (in this case the default value
None can be supplied as expected_count or ommitted altogether).
* `wait_for_packet`: this API is suitable for interactive style of test,
e.g. when doing session management, three-way handsakes, etc. This API waits
for and returns a single packet, keeping the capture file in place
and remembering context. Repeated invocations return following packets
(or raise Exception if timeout is reached) from the same capture file
(= packets arriving on the same interface).
* `VppPGInterface.get_capture`: this API is suitable for bulk & batch
style of test, where a list of packets is prepared & sent, then the
received packets are read and verified. The API needs the number of
packets which are expected to be captured (ignoring filtered
packets - see below) to know when the pcap file is completely
written by the VPP. If using packet infos for verifying packets,
then the counts of the packet infos can be automatically used by
`VppPGInterface.get_capture` to get the proper count (in this case
the default value None can be supplied as expected_count or ommitted
altogether).
* `VppPGInterface.wait_for_packet`: this API is suitable for
interactive style of test, e.g. when doing session management,
three-way handshakes, etc. This API waits for and returns a single
packet, keeping the capture file in place and remembering
context. Repeated invocations return following packets (or raise
Exception if timeout is reached) from the same capture file (=
packets arriving on the same interface).
*NOTE*: it is not recommended to mix these APIs unless you understand how they
work internally. None of these APIs rotate the pcap capture file, so calling
e.g. `get_capture` after `wait_for_packet` will return already read packets.
It is safe to switch from one API to another after calling `enable_capture`
as that API rotates the capture file.
*NOTE*: it is not recommended to mix these APIs unless you understand
how they work internally. None of these APIs rotate the pcap capture
file, so calling e.g. `VppPGInterface.get_capture` after
`VppPGInterface.wait_for_packet` will return already read packets. It
is safe to switch from one API to another after calling
`VppPGInterface.enable_capture` as that API rotates the capture file.
Automatic filtering of packets:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Both APIs (`get_capture` and `wait_for_packet`) by default filter the packet
capture, removing known uninteresting packets from it - these are IPv6 Router
Advertisments and IPv6 Router Alerts. These packets are unsolicitated
and from the point of |vtf| are random. If a test wants to receive these
packets, it should specify either None or a custom filtering function
as the value to the 'filter_out_fn' argument.
Both APIs (`VppPGInterface.get_capture` and
`VppPGInterface.wait_for_packet`) by default filter the packet
capture, removing known uninteresting packets from it - these are IPv6
Router Advertisments and IPv6 Router Alerts. These packets are
unsolicitated and from the point of |vtf| are random. If a test wants
to receive these packets, it should specify either None or a custom
filtering function as the value to the 'filter_out_fn' argument.
Common API flow for sending/receiving packets:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Regular → Executable
+45 -35
View File
@@ -69,23 +69,33 @@ class RemoteClass(Process):
"""
This class can wrap around and adapt the interface of another class,
and then delegate its execution to a newly forked child process.
Usage:
# Create a remotely executed instance of MyClass
object = RemoteClass(MyClass, arg1='foo', arg2='bar')
object.start_remote()
# Access the object normally as if it was an instance of your class.
object.my_attribute = 20
print object.my_attribute
print object.my_method(object.my_attribute)
object.my_attribute.nested_attribute = 'test'
# If you need the value of a remote attribute, use .get_remote_value
method. This method is automatically called when needed in the context
of a remotely executed class. E.g.:
if (object.my_attribute.get_remote_value() > 20):
object.my_attribute2 = object.my_attribute
# Destroy the instance
object.quit_remote()
object.terminate()
#. Create a remotely executed instance of MyClass. ::
object = RemoteClass(MyClass, arg1='foo', arg2='bar')
object.start_remote()
#. Access the object normally as if it was an instance of your
class. ::
object.my_attribute = 20
print object.my_attribute
print object.my_method(object.my_attribute)
object.my_attribute.nested_attribute = 'test'
#. If you need the value of a remote attribute, use .get_remote_value
method. This method is automatically called when needed in the
context of a remotely executed class. E.g. ::
if (object.my_attribute.get_remote_value() > 20):
object.my_attribute2 = object.my_attribute
#. Destroy the instance. ::
object.quit_remote()
object.terminate()
"""
GET = 0 # Get attribute remotely
@@ -354,32 +364,32 @@ class RemoteClass(Process):
class RemoteVppTestCase(VppTestCase):
""" Re-use VppTestCase to create remote VPP segment
In your test case:
In your test case::
@classmethod
def setUpClass(cls):
# fork new process before client connects to VPP
cls.remote_test = RemoteClass(RemoteVppTestCase)
@classmethod
def setUpClass(cls):
# fork new process before client connects to VPP
cls.remote_test = RemoteClass(RemoteVppTestCase)
# start remote process
cls.remote_test.start_remote()
# start remote process
cls.remote_test.start_remote()
# set up your test case
super(MyTestCase, cls).setUpClass()
# set up your test case
super(MyTestCase, cls).setUpClass()
# set up remote test
cls.remote_test.setUpClass(cls.tempdir)
# set up remote test
cls.remote_test.setUpClass(cls.tempdir)
@classmethod
def tearDownClass(cls):
# tear down remote test
cls.remote_test.tearDownClass()
@classmethod
def tearDownClass(cls):
# tear down remote test
cls.remote_test.tearDownClass()
# stop remote process
cls.remote_test.quit_remote()
# stop remote process
cls.remote_test.quit_remote()
# tear down your test case
super(MyTestCase, cls).tearDownClass()
# tear down your test case
super(MyTestCase, cls).tearDownClass()
"""
def __init__(self):
+239 -186
View File
File diff suppressed because it is too large Load Diff
+4 -2
View File
@@ -1,4 +1,4 @@
pip-tools==5.1.2 # BSD Keep this in sync with Makefile's PIP_TOOLS_VERSION
pip-tools==6.2.0 # BSD Keep this in sync with Makefile's PIP_TOOLS_VERSION
cryptography!=2.0 # BSD/Apache-2.0
deprecation>=2.0.6 # Apache-2.0
@@ -13,6 +13,8 @@ six # MIT
syslog_rfc5424_parser>=0.3.1 # ISC
objgraph # MIT
pympler # Apache-2.0
sphinx<3.0.0 # BSD, sphinx 3.0.0 crashes with a traceback
sphinx # BSD
sphinxcontrib-spelling # BSD
sphinx-rtd-theme # MIT
noiseprotocol # MIT
recommonmark # MIT
+11 -11
View File
@@ -167,21 +167,21 @@ def config_tra_params(p, encryption_type):
class TemplateIpsec(VppTestCase):
"""
TRANSPORT MODE:
TRANSPORT MODE::
------ encrypt ---
|tra_if| <-------> |VPP|
------ decrypt ---
------ encrypt ---
|tra_if| <-------> |VPP|
------ decrypt ---
TUNNEL MODE:
TUNNEL MODE::
------ encrypt --- plain ---
|tun_if| <------- |VPP| <------ |pg1|
------ --- ---
------ encrypt --- plain ---
|tun_if| <------- |VPP| <------ |pg1|
------ --- ---
------ decrypt --- plain ---
|tun_if| -------> |VPP| ------> |pg1|
------ --- ---
------ decrypt --- plain ---
|tun_if| -------> |VPP| ------> |pg1|
------ --- ---
"""
tun_spd_id = 1
tra_spd_id = 2
+13 -12
View File
@@ -3,9 +3,9 @@
**NOTES:**
- higher number of pg-ip4 interfaces causes problems => only 15 pg-ip4 \
interfaces in 5 VRFs are tested
interfaces in 5 VRFs are tested
- jumbo packets in configuration with 15 pg-ip4 interfaces leads to \
problems too
problems too
**config 1**
- add 15 pg-ip4 interfaces
@@ -18,8 +18,8 @@
**verify 1**
- check VRF data by parsing output of ip_fib_dump API command
- all packets received correctly in case of pg-ip4 interfaces in the same
VRF
- all packets received correctly in case of pg-ip4 interfaces in the
same VRF
- no packet received in case of pg-ip4 interfaces not in VRF
- no packet received in case of pg-ip4 interfaces in different VRFs
@@ -30,8 +30,8 @@
- send IP4 packets between all pg-ip4 interfaces in all VRF groups
**verify 2**
- all packets received correctly in case of pg-ip4 interfaces in the same
VRF
- all packets received correctly in case of pg-ip4 interfaces in the
same VRF
- no packet received in case of pg-ip4 interfaces not in VRF
- no packet received in case of pg-ip4 interfaces in different VRFs
@@ -43,8 +43,8 @@
**verify 3**
- check VRF data by parsing output of ip_fib_dump API command
- all packets received correctly in case of pg-ip4 interfaces in the same
VRF
- all packets received correctly in case of pg-ip4 interfaces in the
same VRF
- no packet received in case of pg-ip4 interfaces not in VRF
- no packet received in case of pg-ip4 interfaces in different VRFs
@@ -56,8 +56,8 @@
**verify 4**
- check VRF data by parsing output of ip_fib_dump API command
- all packets received correctly in case of pg-ip4 interfaces in the same
VRF
- all packets received correctly in case of pg-ip4 interfaces in the
same VRF
- no packet received in case of pg-ip4 interfaces not in VRF
- no packet received in case of pg-ip4 interfaces in different VRFs
"""
@@ -396,9 +396,10 @@ class TestIp4VrfMultiInst(VppTestCase):
def run_crosswise_vrf_test(self):
"""
Create packet streams for every pg-ip4 interface in VRF towards all
pg-ip4 interfaces in other VRFs, send all prepared packet streams and \
pg-ip4 interfaces in other VRFs, send all prepared packet streams and
verify that:
- no packet received on all configured pg-ip4 interfaces
- no packet received on all configured pg-ip4 interfaces
:raise RuntimeError: If any packet is captured on any pg-ip4 interface.
"""
+13 -12
View File
@@ -3,9 +3,9 @@
**NOTES:**
- higher number of pg-ip6 interfaces causes problems => only 15 pg-ip6 \
interfaces in 5 VRFs are tested
interfaces in 5 VRFs are tested
- jumbo packets in configuration with 15 pg-ip6 interfaces leads to \
problems too
problems too
**config 1**
- add 15 pg-ip6 interfaces
@@ -18,8 +18,8 @@
**verify 1**
- check VRF data by parsing output of ip_route_dump API command
- all packets received correctly in case of pg-ip6 interfaces in the same
VRF
- all packets received correctly in case of pg-ip6 interfaces in the
same VRF
- no packet received in case of pg-ip6 interfaces not in VRF
- no packet received in case of pg-ip6 interfaces in different VRFs
@@ -31,8 +31,8 @@
**verify 2**
- check VRF data by parsing output of ip_route_dump API command
- all packets received correctly in case of pg-ip6 interfaces in the same
VRF
- all packets received correctly in case of pg-ip6 interfaces in the
same VRF
- no packet received in case of pg-ip6 interfaces not in VRF
- no packet received in case of pg-ip6 interfaces in different VRFs
@@ -44,8 +44,8 @@
**verify 3**
- check VRF data by parsing output of ip_route_dump API command
- all packets received correctly in case of pg-ip6 interfaces in the same
VRF
- all packets received correctly in case of pg-ip6 interfaces in the
same VRF
- no packet received in case of pg-ip6 interfaces not in VRF
- no packet received in case of pg-ip6 interfaces in different VRFs
@@ -57,8 +57,8 @@
**verify 4**
- check VRF data by parsing output of ip_route_dump API command
- all packets received correctly in case of pg-ip6 interfaces in the same
VRF
- all packets received correctly in case of pg-ip6 interfaces in the
same VRF
- no packet received in case of pg-ip6 interfaces not in VRF
- no packet received in case of pg-ip6 interfaces in different VRFs
"""
@@ -410,9 +410,10 @@ class TestIP6VrfMultiInst(VppTestCase):
def run_crosswise_vrf_test(self):
"""
Create packet streams for every pg-ip6 interface in VRF towards all
pg-ip6 interfaces in other VRFs, send all prepared packet streams and \
pg-ip6 interfaces in other VRFs, send all prepared packet streams and
verify that:
- no packet received on all configured pg-ip6 interfaces
- no packet received on all configured pg-ip6 interfaces
:raise RuntimeError: If any packet is captured on any pg-ip6 interface.
"""
+24 -22
View File
@@ -24,21 +24,22 @@ class ConfigIpsecAH(TemplateIpsec):
"""
Basic test for IPSEC using AH transport and Tunnel mode
TRANSPORT MODE:
TRANSPORT MODE::
--- encrypt ---
|pg2| <-------> |VPP|
--- decrypt ---
--- encrypt ---
|pg2| <-------> |VPP|
--- decrypt ---
TUNNEL MODE:
TUNNEL MODE::
--- encrypt --- plain ---
|pg0| <------- |VPP| <------ |pg1|
--- --- ---
--- encrypt --- plain ---
|pg0| <------- |VPP| <------ |pg1|
--- --- ---
--- decrypt --- plain ---
|pg0| -------> |VPP| ------> |pg1|
--- --- ---
--- decrypt --- plain ---
|pg0| -------> |VPP| ------> |pg1|
--- --- ---
"""
encryption_type = AH
net_objs = []
@@ -270,21 +271,22 @@ class TemplateIpsecAh(ConfigIpsecAH):
"""
Basic test for IPSEC using AH transport and Tunnel mode
TRANSPORT MODE:
TRANSPORT MODE::
--- encrypt ---
|pg2| <-------> |VPP|
--- decrypt ---
--- encrypt ---
|pg2| <-------> |VPP|
--- decrypt ---
TUNNEL MODE:
TUNNEL MODE::
--- encrypt --- plain ---
|pg0| <------- |VPP| <------ |pg1|
--- --- ---
--- encrypt --- plain ---
|pg0| <------- |VPP| <------ |pg1|
--- --- ---
--- decrypt --- plain ---
|pg0| -------> |VPP| ------> |pg1|
--- --- ---
--- decrypt --- plain ---
|pg0| -------> |VPP| ------> |pg1|
--- --- ---
"""
@classmethod
def setUpClass(cls):
+22 -17
View File
@@ -259,30 +259,35 @@ class TemplateIpsecEsp(ConfigIpsecESP):
Basic test for ipsec esp sanity - tunnel and transport modes.
Below 4 cases are covered as part of this test
1) ipsec esp v4 transport basic test - IPv4 Transport mode
#. ipsec esp v4 transport basic test - IPv4 Transport mode
scenario using HMAC-SHA1-96 integrity algo
2) ipsec esp v4 transport burst test
Above test for 257 pkts
3) ipsec esp 4o4 tunnel basic test - IPv4 Tunnel mode
scenario using HMAC-SHA1-96 integrity algo
4) ipsec esp 4o4 tunnel burst test
#. ipsec esp v4 transport burst test
Above test for 257 pkts
TRANSPORT MODE:
#. ipsec esp 4o4 tunnel basic test - IPv4 Tunnel mode
scenario using HMAC-SHA1-96 integrity algo
--- encrypt ---
|pg2| <-------> |VPP|
--- decrypt ---
#. ipsec esp 4o4 tunnel burst test
Above test for 257 pkts
TUNNEL MODE:
TRANSPORT MODE::
--- encrypt --- plain ---
|pg0| <------- |VPP| <------ |pg1|
--- --- ---
--- encrypt ---
|pg2| <-------> |VPP|
--- decrypt ---
TUNNEL MODE::
--- encrypt --- plain ---
|pg0| <------- |VPP| <------ |pg1|
--- --- ---
--- decrypt --- plain ---
|pg0| -------> |VPP| ------> |pg1|
--- --- ---
--- decrypt --- plain ---
|pg0| -------> |VPP| ------> |pg1|
--- --- ---
"""
@classmethod
Regular → Executable
+9 -8
View File
@@ -18,17 +18,18 @@ from vpp_papi import VppEnum
class IPSecNATTestCase(TemplateIpsec):
""" IPSec/NAT
TUNNEL MODE:
TUNNEL MODE::
public network | private network
--- encrypt --- plain ---
|pg0| <------- |VPP| <------ |pg1|
--- --- ---
public network | private network
--- encrypt --- plain ---
|pg0| <------- |VPP| <------ |pg1|
--- --- ---
--- decrypt --- plain ---
|pg0| -------> |VPP| ------> |pg1|
--- --- ---
--- decrypt --- plain ---
|pg0| -------> |VPP| ------> |pg1|
--- --- ---
"""
tcp_port_in = 6303
Regular → Executable
+1 -1
View File
@@ -153,7 +153,7 @@ class TestL2fib(VppTestCase):
interfaces. Create host IPv4 address for every host MAC address.
:param int n_hosts_per_if: Number of per interface hosts to
create MAC/IPv4 addresses for.
create MAC/IPv4 addresses for.
"""
hosts = dict()
Regular → Executable
+1 -1
View File
@@ -29,7 +29,7 @@ class TestL2LearnLimit(VppTestCase):
interfaces. Create host IPv4 address for every host MAC address.
:param int n_hosts_per_if: Number of per interface hosts to
create MAC/IPv4 addresses for.
create MAC/IPv4 addresses for.
"""
hosts = dict()
+1 -1
View File
@@ -29,7 +29,7 @@ class TestL2LearnLimit(VppTestCase):
interfaces. Create host IPv4 address for every host MAC address.
:param int n_hosts_per_if: Number of per interface hosts to
create MAC/IPv4 addresses for.
create MAC/IPv4 addresses for.
"""
hosts = dict()
+1 -1
View File
@@ -29,7 +29,7 @@ class TestL2LearnLimit(VppTestCase):
interfaces. Create host IPv4 address for every host MAC address.
:param int n_hosts_per_if: Number of per interface hosts to
create MAC/IPv4 addresses for.
create MAC/IPv4 addresses for.
"""
hosts = dict()
+19 -14
View File
@@ -149,21 +149,25 @@ class VppPapiProvider(object):
return self
def assert_negative_api_retval(self):
""" Expect API failure - used with with, e.g.:
with self.vapi.assert_negative_api_retval():
self.vapi.<api call expected to fail>
""" Expect API failure - used with with, e.g.::
with self.vapi.assert_negative_api_retval():
self.vapi.<api call expected to fail>
..
"""
self._expect_stack.append(self._expect_api_retval)
self._expect_api_retval = self._negative
return self
def assert_zero_api_retval(self):
""" Expect API success - used with with, e.g.:
with self.vapi.assert_negative_api_retval():
self.vapi.<api call expected to succeed>
""" Expect API success - used with with, e.g.::
note: this is useful only inside another with block
as success is the default expected value
with self.vapi.assert_negative_api_retval():
self.vapi.<api call expected to succeed>
:note: this is useful only inside another with block
as success is the default expected value
"""
self._expect_stack.append(self._expect_api_retval)
self._expect_api_retval = self._zero
@@ -843,7 +847,7 @@ class VppPapiProvider(object):
:param spd_id - SPD ID to be created in the vpp . mandatory
:param is_add - create (1) or delete(0) SPD (Default 1 - add) .
optional
optional
:returns: reply from the API
"""
return self.api(
@@ -894,11 +898,12 @@ class VppPapiProvider(object):
is_ip_any=0):
""" IPSEC policy SPD add/del -
Wrapper to configure ipsec SPD policy entries in VPP
:param spd_id: SPD ID for the policy
:param local_address_start: local-ip-range start address
:param local_address_stop : local-ip-range stop address
:param local_address_stop: local-ip-range stop address
:param remote_address_start: remote-ip-range start address
:param remote_address_stop : remote-ip-range stop address
:param remote_address_stop: remote-ip-range stop address
:param local_port_start: (Default value = 0)
:param local_port_stop: (Default value = 65535)
:param remote_port_start: (Default value = 0)
@@ -906,10 +911,10 @@ class VppPapiProvider(object):
:param protocol: Any(0), AH(51) & ESP(50) protocol (Default value = 0)
:param sa_id: Security Association ID for mapping it to SPD
:param policy: bypass(0), discard(1), resolve(2) or protect(3) action
(Default value = 0)
(Default value = 0)
:param priority: value for the spd action (Default value = 100)
:param is_outbound: flag for inbound(0) or outbound(1)
(Default value = 1)
(Default value = 1)
:param is_add: (Default value = 1)
"""
return self.api(
@@ -1038,7 +1043,7 @@ class VppPapiProvider(object):
def igmp_listen(self, filter, sw_if_index, saddrs, gaddr):
""" Listen for new (S,G) on specified interface
:param enable: add/del
:param enable: add/delas
:param sw_if_index: interface sw index
:param saddr: source ip4 addr
:param gaddr: group ip4 addr