Bug 966348

Summary: Document models exposed to admin kickstart templates
Product: [Retired] Beaker Reporter: Nick Coghlan <ncoghlan>
Component: DocAssignee: Dan Callaghan <dcallagh>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.12CC: aigao, asaha, dcallagh, dowang, jingwang, qwan, tools-bugs
Target Milestone: 20.0Keywords: Documentation, Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-20 02:22:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nick Coghlan 2013-05-23 06:20:21 UTC
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 05:20:13 UTC
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):
http://git.beaker-project.org/cgit/beaker/tree/Server/bkr/server/kickstart.py

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

http://git.beaker-project.org/cgit/beaker/tree/Server/bkr/server/kickstarts
http://git.beaker-project.org/cgit/beaker/tree/Server/bkr/server/snippets

Comment 2 Dan Callaghan 2015-01-22 06:28:27 UTC
http://gerrit.beaker-project.org/3945

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-20 02:22:43 UTC
Beaker 20.0 has been released.