summaryrefslogtreecommitdiffstats
path: root/src/plugins/map/map_api.c
diff options
context:
space:
mode:
authorPaul Vinciguerra <pvinci@vinciconsulting.com>2019-08-06 19:58:24 -0400
committerDave Wallace <dwallacelf@gmail.com>2019-08-19 14:38:12 +0000
commitff47fb64569ddbd65ef34c33e7cafc030c69a34e (patch)
tree5699f37e901ae2d32388509c8d291edc0e3748d2 /src/plugins/map/map_api.c
parentc458f5c09a21cc905aa1b53eda30736e52426418 (diff)
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 <pvinci@vinciconsulting.com>
Diffstat (limited to 'src/plugins/map/map_api.c')
-rw-r--r--src/plugins/map/map_api.c2
1 files changed, 1 insertions, 1 deletions
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);
}