Dan Guernsey wrote:
I am unable to test these at this time (I get an error from api.py when it encounters:
import acls
What package/file does this come from?)
Meanwhile, here are two patches. The first moves the builtins into cheetah_macros and provides documentation. The second adds cheetah_macros to setup.py and MANIFEST.in (you'll want to check my work).
I'll be as prompt as possible to help resolve any errors that this untested code may (will) introduce.
~ Dan
cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler
Thanks!
I tested this briefly with a doubly nested snippet and it looks good. I've additionally modified cobbler.spec so it can be packaged with the right permissions (and is marked "noreplace" so upgrades do not remove user changes).
I think the cheetah_macros file could still use considerable cleanup though this now it makes things much easier to edit.
Points regarding the macro file: * Examples in things like "includeall" don't seem to be complete -- perhaps have someone unfamiliar with what they do try to understand them? * Lack of indentation. #raw... #endraw might help with this. * Code for things like "set permissions" seems a bit weird (things like file[4] and repeated calls to chown, why not a loop?) * Lacking examples for some of the copy file functions
It might actually be easier to start a Wiki page for documentation on the macros feature and explain those there, where there's more room for elaboration.
Anyhow, this is all applied in git devel now. Much appreciated!
--Michael