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

Isbm module run parambug 42270 #42276

Closed
wants to merge 9 commits into from

Conversation

isbm
Copy link
Contributor

@isbm isbm commented Jul 12, 2017

What does this PR do?

Fixes the issue on module.run: #42270
Fixes the documentation for module.run. Allows running the same function within the same functionset with the different parameters. Fixes tests.

Note: probably needs to be backported to 2017.7

Tests written?

Yes

@ghost
Copy link

ghost commented Jul 12, 2017

@isbm, thanks for your PR! By analyzing the history of the files in this pull request, we identified @terminalmage, @mirceaulinic and @rallytime to be potential reviewers.

@isbm
Copy link
Contributor Author

isbm commented Jul 12, 2017

@cachedout I think this is needed to go to the 2017.7 before the release...

@cachedout
Copy link
Contributor

@isbm It won't make it into the release, sorry.

Since a lot of users are already using :py:func:`module.run
<salt.states.module.run>` states, this new behavior must currently be
explicitly turned on, to allow users to take their time updating their SLS
files. However, please keep in mind that the new syntax will take effect in
the next feature release of Salt (Oxygen) and the old usage will no longer be
supported at that time.

Another feature of the new :py:func:`module.run <salt.states.module.run>` is that
it allows to call many functions in a single batch, such as:
Copy link
Contributor

Choose a reason for hiding this comment

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

it allows calling many functions...

- myparam
- my_other_param

In a rare case you have a function that needs to be called several times but
Copy link
Contributor

Choose a reason for hiding this comment

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

In the rare case that you have...


In a rare case you have a function that needs to be called several times but
with the different parameters, an additional feature of "tagging" is to the
rescue. In order to tag a function, use a colon delimeter. For example
Copy link
Contributor

Choose a reason for hiding this comment

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

For example:

@isbm isbm mentioned this pull request Jul 13, 2017
@isbm
Copy link
Contributor Author

isbm commented Jul 17, 2017

@cachedout all these pytests aren't really related to this particular PR, right? Or I am missing something?

@rallytime
Copy link
Contributor

Most of these have been fixed upstream, but I can update this branch just to be sure we don't miss anything. Thanks @isbm!

@isbm isbm closed this Aug 17, 2017
@isbm isbm deleted the isbm-module_run_parambug_42270 branch August 17, 2017 10:28
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