-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Add Pyobjects (formerly NaCl) to Salt #10517
Conversation
Todo: * Adapt tests into Salt test framework See: * https://github.com/borgstrom/nacl * http://borgstrom.ca/2014/02/15/building-a-pythonic-interface-to-saltstack-states.html * https://groups.google.com/forum/#!topic/salt-users/5frdabVwAdE
Test FAILed. |
Nice! |
from salt.loader import states | ||
from salt.utils.pyobjects import StateFactory, StateRegistry | ||
|
||
log = logging.getLogger("pyobjects") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please switch to:
log = logging.getLogger(__name__)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I switched to "pyobjects" during testing to ensure I was getting log messages at one point. This has been switched back to name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
Aside from my comment(minor change), I think this is awesome! |
Test FAILed. |
Test FAILed. |
Add Pyobjects (formerly NaCl) to Salt
I really like this! Thanks @borgstrom! I am wondering if this works with the top file, and if not if it could be extended to do so. @basepi, we can cherry this into 2014.1 |
Thanks! Is there anything else you'd recommend I do from a documentation
|
Are there any docs on how salt modules would be called, or how to reference pillar data? if it's like a normal #!py that's fine, though it seems less than ideal given how nicely states are presented. Sorry if this is too obvious, but I'm unclear how includes would work as well. |
@erchn currently you access Includes & Extends are documented in the renderer (https://github.com/saltstack/salt/blob/develop/salt/renderers/pyobjects.py#L91) |
Thanks to @erchn for the suggestion in saltstack#10517
This adds a new renderer
#!pyobjects
that provides an object based interface for building state data.See the following for more background: