StackStorm/st2

'--last' doesn't work for all st2 CLI endpoints

Open

#3,940 opened on 2018年1月12日

GitHub で見る
 (2 comments) (0 reactions) (0 assignees)Python (5,794 stars) (740 forks)batch import
CLIbugenhancementgood first issue

説明

We recently introduced --last -1 #3735 param to show all CLI results and forced pagination to 50 per page for CLI output (some CLI previously reported ALL results by default). However --last present only for some CLI endpoints.

Ideally to have all the CLI working in the same manner & make it consistent and predictable.

And while some CLIs are missing --last, for example currently st2 action list outputs ALL the results, while other CLIs limit output to only 50 results.

List of working CLI endpoints with --last:

  • st2 execution list
  • st2 key list
  • st2 rule list
  • st2 trace list
  • st2 trigger-instance list
  • st2 rule-enforcement list

Missing --last param

  • st2 action list
  • st2 action-alias list
  • st2 apikey list
  • st2 pack list
  • st2 policy list
  • st2 policy-type list
  • st2 webhook list
  • st2 timer list
  • st2 runner list
  • st2 sensor list
  • st2 trigger list
  • st2 role list
  • st2 role-assignment list

Example CLI missing --last

$ st2 action list --last 1
usage: st2 [-h] [--version] [--url BASE_URL] [--auth-url AUTH_URL]
           [--api-url API_URL] [--stream-url STREAM_URL]
           [--api-version API_VERSION] [--cacert CACERT]
           [--config-file CONFIG_FILE] [--print-config] [--skip-config]
           [--debug]
           {run,action,action-alias,auth,login,whoami,apikey,execution,inquiry,key,pack,policy,policy-type,rule,webhook,timer,runner,sensor,trace,trigger,trigger-instance,rule-enforcement,role,role-assignment}
           ...
st2: error: unrecognized arguments: --last 1

cc @humblearner

コントリビューターガイド