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

Allow 'salt' command metadata to be a dict #26606

Merged
merged 1 commit into from
Aug 25, 2015
Merged

Conversation

skizunov
Copy link
Contributor

When invoking 'salt' on the command line, using the '--metadata'
option will not allow you to pass in data that will be represented
in Python as a dict. This data will be represented as a string.
There are situations where using a dict for metadata is desirable.
For instance, if one would want to pass a number of named options as
metadata.

To accomplish this, the metadata is simply fed through the function:
'salt.utils.args.yamlify_arg'. This function is versatile: if the
original input is not a string, it will return the original input. If
it fails to parse the input into the dict or other such object, it
will return the original input.

Signed-off-by: Sergey Kizunov sergey.kizunov@ni.com

When invoking 'salt' on the command line, using the '--metadata'
option will not allow you to pass in data that will be represented
in Python as a dict. This data will be represented as a string.
There are situations where using a dict for metadata is desirable.
For instance, if one would want to pass a number of named options as
metadata.

To accomplish this, the metadata is simply fed through the function:
'salt.utils.args.yamlify_arg'. This function is versatile: if the
original input is not a string, it will return the original input. If
it fails to parse the input into the dict or other such object, it
will return the original input.

Signed-off-by: Sergey Kizunov <sergey.kizunov@ni.com>
@jfindlay jfindlay added Core relates to code central or existential to Salt Minor Change Tests-Passed labels Aug 24, 2015
@basepi
Copy link
Contributor

basepi commented Aug 25, 2015

This looks perfect. Great fix!

basepi added a commit that referenced this pull request Aug 25, 2015
Allow 'salt' command metadata to be a dict
@basepi basepi merged commit ecca40f into saltstack:develop Aug 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core relates to code central or existential to Salt Tests-Passed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants