linux/tools/net/ynl/lib
Jakub Kicinski 3e51f2cbbc tools: ynl: add --list-ops and --list-msgs to CLI
I often forget the exact naming of ops and have to look at
the spec to find it. Add support for listing the operations:

  $ ./cli.py --spec .../netdev.yaml --list-ops
  dev-get  [ do, dump ]
  page-pool-get  [ do, dump ]
  page-pool-stats-get  [ do, dump ]
  queue-get  [ do, dump ]
  napi-get  [ do, dump ]
  qstats-get  [ dump ]

For completeness also support listing all ops (including
notifications:

  # ./cli.py --spec .../netdev.yaml --list-msgs
  dev-get  [ dump, do ]
  dev-add-ntf  [ notify ]
  dev-del-ntf  [ notify ]
  dev-change-ntf  [ notify ]
  page-pool-get  [ dump, do ]
  page-pool-add-ntf  [ notify ]
  page-pool-del-ntf  [ notify ]
  page-pool-change-ntf  [ notify ]
  page-pool-stats-get  [ dump, do ]
  queue-get  [ dump, do ]
  napi-get  [ dump, do ]
  qstats-get  [ dump ]

Use double space after the name for slightly easier to read
output.

Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Link: https://lore.kernel.org/r/20240502164043.2130184-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-05-03 15:13:21 -07:00
..
__init__.py tools/net/ynl: Report netlink errors without stacktrace 2024-03-07 20:28:26 -08:00
.gitignore
Makefile tools: ynl: remove __pycache__ during clean 2024-03-06 12:05:10 +00:00
nlspec.py tools: ynl: add --list-ops and --list-msgs to CLI 2024-05-03 15:13:21 -07:00
ynl-priv.h tools: ynl: check for overflow of constructed messages 2024-03-07 11:01:31 -08:00
ynl.c tools: ynl: Fix spelling mistake "Constructred" -> "Constructed" 2024-03-08 19:58:13 -08:00
ynl.h tools: ynl: add ynl_dump_empty() helper 2024-04-02 18:01:58 -07:00
ynl.py tools: ynl: don't append doc of missing type directly to the type 2024-04-26 17:35:03 -07:00