From ff47fb64569ddbd65ef34c33e7cafc030c69a34e Mon Sep 17 00:00:00 2001 From: Paul Vinciguerra Date: Tue, 6 Aug 2019 19:58:24 -0400 Subject: vppapigen map: raise ValueError when fieldname is python keyword When working on the lb api, one of the field names was chosen as 'as' (application server). Since 'as' is a python keyword, the field was renamed to _1 in vpp_papi. This changeset instead fails early with a descriptive message, hopefully saving others time troubleshooting the issue. ValueError: Fieldname 'as' is a python keyword and is not accessible via the python API. Type: feature Change-Id: Ib048d97de0e392645540092e356cf8989848c947 Signed-off-by: Paul Vinciguerra --- src/plugins/map/map_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/map/map_api.c') diff --git a/src/plugins/map/map_api.c b/src/plugins/map/map_api.c index 4a0834d786b..1e50ba1b714 100644 --- a/src/plugins/map/map_api.c +++ b/src/plugins/map/map_api.c @@ -523,7 +523,7 @@ static void vl_api_map_param_set_traffic_class_reply_t *rmp; int rv; - rv = map_param_set_traffic_class (mp->copy, mp->class); + rv = map_param_set_traffic_class (mp->copy, mp->tc_class); REPLY_MACRO (VL_API_MAP_PARAM_SET_TRAFFIC_CLASS_REPLY); } -- cgit 1.2.3-korg