summaryrefslogtreecommitdiffstats
path: root/cobbler/collection.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@mdehaan.rdu.redhat.com>2007-06-13 15:59:47 -0400
committerMichael DeHaan <mdehaan@mdehaan.rdu.redhat.com>2007-06-13 15:59:47 -0400
commit32908858c032f91726b02520d11a16d6cff2e93a (patch)
treed914d43b6231db3dc3755690fe1fca08223caee7 /cobbler/collection.py
parent72e9e1de6c3bc096180c62734476f775cdebfbee (diff)
downloadcobbler-32908858c032f91726b02520d11a16d6cff2e93a.tar.gz
cobbler-32908858c032f91726b02520d11a16d6cff2e93a.tar.xz
cobbler-32908858c032f91726b02520d11a16d6cff2e93a.zip
Lots of work towards profile inheritance. This works in the UI now, with
some rough edges (like listing the tree). cobbler profile add --name=profile2 --inherit=profile1 --otherparameters=... cobbler profile edit --name=profile2 --stillmoreparamters=... Data is interleaved for hashes, combined for arrays, and overriden for scalar values. This was heavily inspired by Will-It-Blend, and in this implementation it all blends. Implementation notes -- Updating a parent profile doesn't apply changes to the child objects until a sync, so this seems like a good upgrade for a future commit. Also, the children mapping that makes this possible needs some tweaks because they may load out of order, in which case "cobbler list" can't render a full tree. There are various approaches to deal with this and it should be a (relatively) easy change.
Diffstat (limited to 'cobbler/collection.py')
-rw-r--r--cobbler/collection.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cobbler/collection.py b/cobbler/collection.py
index a6a39915..43ad068e 100644
--- a/cobbler/collection.py
+++ b/cobbler/collection.py
@@ -97,7 +97,8 @@ class Collection(serializable.Serializable):
"""
if ref is None or not ref.is_valid():
- raise CX(_("invalid parameter"))
+ raise CX(_("insufficient or invalid arguments supplied"))
+ print "DEBUG: adding object %s" % ref.name
if not with_copy:
# don't need to run triggers, so add it already ...
self.listing[ref.name.lower()] = ref
@@ -126,7 +127,6 @@ class Collection(serializable.Serializable):
parent = ref.get_parent()
if parent != None:
parent.children[ref.name] = ref
-
return True
def _run_triggers(self,ref,globber):