diff options
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | cobbler/pxegen.py | 1 | ||||
-rw-r--r-- | cobbler/utils.py | 13 |
3 files changed, 14 insertions, 1 deletions
@@ -13,6 +13,7 @@ Cobbler CHANGELOG - move warning about reposync to check also (check is more useful at runtime now) - build pxe trees for systems even if interface0 is undefined - add sync() back into XMLRPC API, missing in 0.9.1 +- added 'distro_name', 'profile_name', and 'system_name' to generated template vars - Fri May 09 2008 - 0.9.1 - patch to allow yumopts to override gpgcheck diff --git a/cobbler/pxegen.py b/cobbler/pxegen.py index 639c30b..d847569 100644 --- a/cobbler/pxegen.py +++ b/cobbler/pxegen.py @@ -84,7 +84,6 @@ class PXEGen: """ # copy is a 4-letter word but tftpboot runs chroot, thus it's required. for d in self.distros: - print _("sync distro: %s") % d.name self.copy_single_distro_files(d) def copy_single_distro_files(self, d): diff --git a/cobbler/utils.py b/cobbler/utils.py index 6e756c9..a63f7af 100644 --- a/cobbler/utils.py +++ b/cobbler/utils.py @@ -370,6 +370,19 @@ def blender(api_handle,remove_hashes, root_obj): # sanitize output for koan and kernel option lines, etc if remove_hashes: results = flatten(results) + + # add in some variables for easier templating + # as these variables change based on object type + if results.has_key("interfaces"): + results["system_name"] = results["name"] + results["profile_name"] = results["profile"] + results["distro_name"] = results["distro"] + elif results.has_key("distro"): + results["profile_name"] = results["name"] + results["distro_name"] = results["distro"] + elif results.has_key("kernel"): + results["distro_name"] = results["name"] + return results def flatten(data): |