Bug 966348 - Document models exposed to admin kickstart templates
Summary: Document models exposed to admin kickstart templates
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: Doc
Version: 0.12
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 20.0
Assignee: Dan Callaghan
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-23 06:20 UTC by Nick Coghlan
Modified: 2018-02-06 00:41 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-04-20 02:22:43 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1077251 0 unspecified CLOSED RFE: Make distro and friends available in kickstart as well 2021-02-22 00:41:40 UTC

Internal Links: 1077251

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.


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