Background / Problem
We can easily set object type values in a action parameter by the past efforts of the Team, like this.
$ st2 run some_pack.action param_obj='foo=bar,hoge=fuga'
In the similar way, we can do it for array type values, as follows.
$ st2 run some_pack.action param_arr='foo,bar,baz'
But it's quite difficult to set 'array of object' value, like following.
$ st2 run some_pack.action param_arr_obj=['{"foo": "bar"}','{"hoge": "fuga"}']
(Even if only a white space after comma is not permitted)
Currently, I can seldom see the action that requiresarray of object type value in a parameter.
But I think this restriction prevents to make it.
Suggestion
One of an idea to improve it is permitting to specify values more than once only if the array type parameter, as follows.
$ st2 run some_pack.action \
param_arr_obj='foo=bar'
param_arr_obj='hoge=fuga'
Internally, the param_arr_obj transforms as follows.
[{'foo': 'bar'}, {'hoge': 'fuga'}]
In this solution, I think there are following advantages.
- (User friendly) This easily makes
array of object using past assets.
- (Backward compatibility) This doesn't change current UI.
Could you please let me know what you think about it?
Thank you
Background / Problem
We can easily set object type values in a action parameter by the past efforts of the Team, like this.
In the similar way, we can do it for array type values, as follows.
But it's quite difficult to set 'array of object' value, like following.
(Even if only a white space after comma is not permitted)
Currently, I can seldom see the action that requires
array of objecttype value in a parameter.But I think this restriction prevents to make it.
Suggestion
One of an idea to improve it is permitting to specify values more than once only if the array type parameter, as follows.
Internally, the
param_arr_objtransforms as follows.In this solution, I think there are following advantages.
array of objectusing past assets.Could you please let me know what you think about it?
Thank you