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

Acme state fixup neon #54008

Closed

Conversation

github-abcde
Copy link
Contributor

What does this PR do?

(neon version of #53366)
It provides an alternative to loop.until that does not use eval.
Added example for using this in the faq. Made some pylint-inspired changes.
I'm not entirely sure that the name of the new state until_no_eval is good enough (even though it is accurate), since it feels wrong to name a function with something that it does not have. I'm open to suggestions on this.

What issues does this PR fix or reference?

None

Previous Behavior

The generic state that allows you to (blockingly) execute a salt function until it produces a desired output hinged on using eval with user-input. Since this is potentially very dangerous, an alternative has been supplied.

New Behavior

A state exists (loop.until_no_eval) that will block execution until a specific salt execution module function returns an expected result. This produced result is passed together with the expected result to a function (either a method of python's operator, a function from __salt__ or __utils__) to produce a boolean indicating success (or failure).
Additionally, a parameter init_wait is available to configure a waiting period before the 1st call of the salt function is made.

Tests written?

Yes

Commits signed with GPG?

Yes

github-abcde and others added 9 commits July 25, 2019 10:39
…w" parameter in "needs_renewal". Pylint-inspired layout fixes.
…ction if nothing/fetch/renew is needed to be done.
…509.read_certificate as alternative method of getting certificate information if tls.cert_info is not available.
…o using x509.read_certificates. Fixed incorrect data placement in textwrap.dedent. Updated test for acme.info to expect dict when using openssl cli.
@github-abcde
Copy link
Contributor Author

Closing in favor or #55589

@github-abcde github-abcde deleted the acme_state_fixup-neon branch December 10, 2019 15:33
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.

1 participant