• Jakub Kicinski's avatar
    tools: ynl: add --list-ops and --list-msgs to CLI · 3e51f2cb
    Jakub Kicinski authored
    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: default avatarJiri Pirko <jiri@nvidia.com>
    Reviewed-by: default avatarDonald Hunter <donald.hunter@gmail.com>
    Link: https://lore.kernel.org/r/20240502164043.2130184-1-kuba@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    3e51f2cb
cli.py 3.79 KB