Skip to content
New issue

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

[st2client] Updated ActionRunCommand to enable specifying multiple array type value in the action parameter #3670

Merged
merged 3 commits into from
Aug 21, 2017

Conversation

userlocalhost
Copy link
Member

This is the change for #3646. The main points of this PR are

  • extending transform_array which is the internal method to parse the argument of array type, to be able to parse dict data when user declared that type parameter.
  • changing _get_action_parameters_from_args to accept multiple declaration of same argument.

Thank you.

@Kami
Copy link
Member

Kami commented Aug 21, 2017

Thanks and nice work!

Can you please also open corresponding st2docs PR?

@Kami Kami added this to the 2.4.0 milestone Aug 21, 2017
@Kami Kami merged commit e9ea478 into StackStorm:master Aug 21, 2017
'param_object=hoge=1,fuga=2',
'param_boolean=False',
'param_array=foo,bar,baz',
'param_array_of_dicts=foo:1,bar:2'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does it work if you want to specify multiple objects for an array?

Would something like that work: param_array_of_dicts=foo:1,bar:2,aram_array_of_dicts=foo:3,bar:4.

If yes, let's please add a test case or it and also document it.

Kami added a commit that referenced this pull request Aug 21, 2017
@Kami Kami mentioned this pull request Aug 21, 2017
Kami added a commit that referenced this pull request Aug 21, 2017
@userlocalhost
Copy link
Member Author

userlocalhost commented Aug 23, 2017

Thank you for your review and merging.
I got it. I'll make a PR which describes this feature to st2docs and do another one to add tests for array of dicts which have multiple type value.

It takes time because I've been offline until the end of this week, sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants