summaryrefslogtreecommitdiffstats
path: root/cobbler/item_system.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_system.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_system.py')
-rw-r--r--cobbler/item_system.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/cobbler/item_system.py b/cobbler/item_system.py
index a745ba9..8c6021f 100644
--- a/cobbler/item_system.py
+++ b/cobbler/item_system.py
@@ -76,6 +76,12 @@ class System(item.Item):
return self
+ def get_parent(self):
+ """
+ Return object next highest up the tree.
+ """
+ return self.config.distros().find(self.distro_name)
+
def set_name(self,name):
"""
In Cobbler 0.4.9, any name given is legal, but if it's not an IP or MAC, --ip-address of --mac-address must