We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
array of object
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.
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.
param_arr_obj
[{'foo': 'bar'}, {'hoge': 'fuga'}]
In this solution, I think there are following advantages.
Could you please let me know what you think about it?
Thank you
The text was updated successfully, but these errors were encountered:
I like the idea, though I would prefer to see different operators inside vs outside the dict definitions. I.e.:
$ st2 run some_pack.action \ param_arr_obj='foo:bar' param_arr_obj='hoge:fuga'
I am imagining that in more complex scenarios, it would be difficult to keep track of the equal signs.
Sorry, something went wrong.
Thank you for your reply! I should be able to make a PR for it based on your comment.
Addressed by #3670
No branches or pull requests
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 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.
Internally, the
param_arr_obj
transforms as follows.In this solution, I think there are following advantages.
array of object
using past assets.Could you please let me know what you think about it?
Thank you
The text was updated successfully, but these errors were encountered: