summaryrefslogtreecommitdiffstats
path: root/cobbler/item_profile.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@mdehaan.rdu.redhat.com>2007-06-11 19:05:53 -0400
committerMichael DeHaan <mdehaan@mdehaan.rdu.redhat.com>2007-06-11 19:05:53 -0400
commit06404c7931f48c2c50b4b6b5901de0736e65a6e5 (patch)
tree2e6fc02246ff805be2e6b7897724444a1ad27590 /cobbler/item_profile.py
parent1d5c5ba3f0252f8f90e170fe8a99f00d2cb03e84 (diff)
downloadthird_party-cobbler-06404c7931f48c2c50b4b6b5901de0736e65a6e5.tar.gz
third_party-cobbler-06404c7931f48c2c50b4b6b5901de0736e65a6e5.tar.xz
third_party-cobbler-06404c7931f48c2c50b4b6b5901de0736e65a6e5.zip
Generalizes object blending and the concept of parentage to allow for later support
of inheritance hierarchies, as well as making more data available to koan and the kickstart templating engine. With this change, any variable in the tree (anywhere), is now accessible via Cheetah -- and the same goes for koan XMLRPC. Unit tests pass and looks okay on the outside, though this still warrants extended testing to verify no unintended behaviors have changed.
Diffstat (limited to 'cobbler/item_profile.py')
-rw-r--r--cobbler/item_profile.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/cobbler/item_profile.py b/cobbler/item_profile.py
index 4ad53fc..c107865 100644
--- a/cobbler/item_profile.py
+++ b/cobbler/item_profile.py
@@ -146,6 +146,12 @@ class Profile(item.Item):
except:
return CX(_("invalid virt ram size"))
+ def get_parent(self):
+ """
+ Return object next highest up the tree.
+ """
+ return self.config.distros().find(self.distro)
+
def is_valid(self):
"""
A profile only needs a name and a distro. Kickstart info,