Bug 966348 - Document models exposed to admin kickstart templates
Document models exposed to admin kickstart templates
Product: Beaker
Classification: Community
Component: Doc (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified (vote)
: 20.0
: ---
Assigned To: Dan Callaghan
: Documentation, Patch
Depends On:
  Show dependency treegraph
Reported: 2013-05-23 02:20 EDT by Nick Coghlan
Modified: 2015-04-19 22:22 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-04-19 22:22:43 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Nick Coghlan 2013-05-23 02:20:21 EDT
The admin docs for writing kickstart templates [1] mention several Beaker object models: "The system, distro, distro_tree, user, and recipe variables are the corresponding Beaker model objects loaded from the database."

Those models aren't actually documented anywhere at the moment. Some of the key attributes and methods that may be useful for writing custom templates (like distro_tree.url_in_lab) should be described in this section.

[1] http://beaker-project.org/docs/admin-guide/kickstarts.html#writing-kickstart-templates
Comment 1 Nick Coghlan 2013-11-25 00:20:13 EST
Other things that aren't currently covered are the differences between the rendering environments for server side kickstart templates and snippets and those provided in the job XML as part of the recipe definition, as well as the assorted utility functions and modules injected into the rendering context.

For now, rendering details can be found here (for those that are willing to dig into the source code):

And the default server side templates and snippets can serve as examples:

Comment 2 Dan Callaghan 2015-01-22 01:28:27 EST

For now I have just documented the attributes that are actually used by our existing templates/snippets, under the assumption that those are the main useful ones. In reality, admin templates still have full access to the raw model objects which may come in handy.
Comment 6 Dan Callaghan 2015-04-19 22:22:43 EDT
Beaker 20.0 has been released.

Note You need to log in before you can comment on or make changes to this bug.