Neale,
> What’s the best (i.e. least error prone) way to export enum values to the
> python API.
>
> For example;
> From l2/l2_vtr.h:
>
> /* VTR config options for API and CLI support */
> typedef enum
> {
> …
> } l2_vtr_op_t;
>
> Is required for use in (from vpe.py)
>
>
> def l2_interface_vlan_tag_rewrite(
> sw_if_index,
> vtr_op, <<<
> <more args>):
I take it you want type checking? (otherwise you could just represent it as
u32).
vpe.py has gone by the way.
Currently we got:
.api definition file -> vppapigen -> .json
vpp_papi.py processes the .json file and dynamically creates new abstract data
types and function definitions.
currently only structs and function calls are supported.
not a bad idea to add enums though. you want me to have a look at it, or would
you have a go?
Cheers,
Ole
_______________________________________________
vpp-dev mailing list
[email protected]
https://lists.fd.io/mailman/listinfo/vpp-dev