tools: ynl: fix enum-as-flags in the generic CLI
authorJakub Kicinski <kuba@kernel.org>
Wed, 8 Mar 2023 00:39:23 +0000 (16:39 -0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 9 Mar 2023 07:28:21 +0000 (23:28 -0800)
commitc311aaa74ca18bd0781d1d3bebd08484799f840c
treeec30e202a067311ee0ac0c711e452246f8773bed
parent6517a60b0307abdcca80133c237551cc7cc8e6ae
tools: ynl: fix enum-as-flags in the generic CLI

Lorenzo points out that the generic CLI is broken for the netdev
family. When I added the support for documentation of enums
(and sparse enums) the client script was not updated.
It expects the values in enum to be a list of names,
now it can also be a dict (YAML object).

Reported-by: Lorenzo Bianconi <lorenzo@kernel.org>
Fixes: e4b48ed460d3 ("tools: ynl: add a completely generic client")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/net/ynl/lib/nlspec.py
tools/net/ynl/lib/ynl.py