From 277b89c946e6fdc764ee48726fcd3df1c189eda9 Mon Sep 17 00:00:00 2001 From: Klement Sekera Date: Fri, 28 Oct 2016 13:20:27 +0200 Subject: add vpp debugging support to test framework improve test documentation Change-Id: Ia9678aa2532ecb4cb33736aedb4a31aa3f2a3f93 Signed-off-by: Klement Sekera --- test/vpp_papi_provider.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'test/vpp_papi_provider.py') 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 -- cgit 1.2.3-korg