From f159f58dbfc85f616b029c36196961915d7e52d2 Mon Sep 17 00:00:00 2001 From: Ole Troan Date: Thu, 28 Feb 2019 20:20:47 +0100 Subject: test framework: add factory function and default parameters This is the first step to be able to remove all the API message wrappers in vpp_papi_provider.py. This allows to remove all functions that do not override parameters (different from zero), and a separate dictionary for messages requiring different defaults. The general requirement is that all new tests should use named arguments directly. Not positional arguments through the wrapper. Note when removing functions, the calls in vpp_papi_provider wrappers do not necessarily follow message order. Change-Id: If64916c07f8622c138db3a9d7c4a98b93a058e68 Signed-off-by: Ole Troan --- src/vpp-api/python/vpp_papi/vpp_papi.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/vpp-api/python/vpp_papi') diff --git a/src/vpp-api/python/vpp_papi/vpp_papi.py b/src/vpp-api/python/vpp_papi/vpp_papi.py index 2b73023025b..2e121386bb5 100644 --- a/src/vpp-api/python/vpp_papi/vpp_papi.py +++ b/src/vpp-api/python/vpp_papi/vpp_papi.py @@ -417,6 +417,8 @@ class VPP(object): f.__doc__ = ", ".join(["%s %s" % (msg.fieldtypes[j], k) for j, k in enumerate(msg.fields)]) + f.msg = msg + return f def _register_functions(self, do_async=False): -- cgit 1.2.3-korg