StackStorm/st2

'st2 <thing> delete' should accept multiple positional args for removal

开放

#4,729 创建于 2019年6月28日

 (0 条评论) (2 个反应) (0 位负责人)Python (740 个派生)batch import
CLIchatopscomponent:st2clientenhancementgood first issue

仓库指标

星标
 (5,794 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Initially comes from a release testing when specific testing pack installs 100+ action aliases and we have no way to delete them in a bulky way.

The following construct fails because st2 action-alias delete can only accept single positional arg as id:

st2 action-alias delete pack.alias1 pack.alias2

Better example that ideally should work:

st2 action-alias delete $(st2 action-alias list -p chatops_tests -a id | awk '{print $2}')

The general CLI improvement here and helpful from user's perspective would be allowing multiple IDs for removal. From what I remember, only st2 pack delete 1 2 3 4 5 only works this way.

Affected CLI:

st2 action delete
st2 action-alias delete
st2 key delete
st2 policy delete
...
and so on

贡献者指南