summaryrefslogtreecommitdiffstats
path: root/test/vpp_papi_provider.py
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2016-10-28 13:20:27 +0200
committerDamjan Marion <dmarion.lists@gmail.com>2016-10-31 23:48:25 +0000
commit277b89c946e6fdc764ee48726fcd3df1c189eda9 (patch)
tree1ced5e4a47a00290251e89929df0945ae64370c8 /test/vpp_papi_provider.py
parentcede3798b7f3c35cab2a8268c584fd22bf3a34f6 (diff)
add vpp debugging support to test framework
improve test documentation Change-Id: Ia9678aa2532ecb4cb33736aedb4a31aa3f2a3f93 Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r--test/vpp_papi_provider.py19
1 files changed, 15 insertions, 4 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py
index 454f3edce3f..261a0f4aa4b 100644
--- a/test/vpp_papi_provider.py
+++ b/test/vpp_papi_provider.py
@@ -1,7 +1,19 @@
-import vpp_papi
+import os
from logging import error
from hook import Hook
+do_import = True
+try:
+ no_vpp_papi = os.getenv("NO_VPP_PAPI")
+ if no_vpp_papi == "1":
+ do_import = False
+except:
+ pass
+
+if do_import:
+ import vpp_papi
+
+
# from vnet/vnet/mpls/mpls_types.h
MPLS_IETF_MAX_LABEL = 0xfffff
MPLS_LABEL_INVALID = MPLS_IETF_MAX_LABEL + 1
@@ -16,7 +28,7 @@ class VppPapiProvider(object):
"""
def __init__(self, name, shm_prefix):
- self.hook = Hook()
+ self.hook = Hook("vpp-papi-provider")
self.name = name
self.shm_prefix = shm_prefix
@@ -130,7 +142,6 @@ class VppPapiProvider(object):
default_router, max_interval, min_interval,
lifetime, initial_count, initial_interval, async))
-
def vxlan_add_del_tunnel(
self,
src_addr,
@@ -177,7 +188,7 @@ class VppPapiProvider(object):
:param rx_sw_if_index: Software interface index of Rx interface.
:param tx_sw_if_index: Software interface index of Tx interface.
:param enable: Create cross-connect if equal to 1, delete cross-connect
- if equal to 0.
+ if equal to 0.
:type rx_sw_if_index: str or int
:type rx_sw_if_index: str or int
:type enable: int