summaryrefslogtreecommitdiffstats
path: root/cobbler/collection.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@mdehaan.rdu.redhat.com>2007-04-19 12:44:28 -0400
committerMichael DeHaan <mdehaan@mdehaan.rdu.redhat.com>2007-04-19 12:44:28 -0400
commitc9da67b5170b473895ce83feba2aa328cf5ec9f8 (patch)
treed932414a83ed58ca0ad3f153a3173dc5e5eb2c84 /cobbler/collection.py
parentd7e488931d1c28f9f0693b7eaebe26bea19f72c5 (diff)
downloadthird_party-cobbler-c9da67b5170b473895ce83feba2aa328cf5ec9f8.tar.gz
third_party-cobbler-c9da67b5170b473895ce83feba2aa328cf5ec9f8.tar.xz
third_party-cobbler-c9da67b5170b473895ce83feba2aa328cf5ec9f8.zip
Various improvements to make the API more usable and cobbler a bit
more efficient. Make both the Config and BootAPI objects Borgs, to prevent duplicate configuration records. Also do not implicitly serialize configuration objects unless the with_copy parameter is used.
Diffstat (limited to 'cobbler/collection.py')
-rw-r--r--cobbler/collection.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/cobbler/collection.py b/cobbler/collection.py
index 196de7f..422ecc6 100644
--- a/cobbler/collection.py
+++ b/cobbler/collection.py
@@ -89,8 +89,6 @@ class Collection(serializable.Serializable):
raise cexceptions.CobblerException("bad_param")
self.listing[ref.name] = ref
- # save the tree, so if neccessary, scripts can examine it.
- self.config.api.serialize()
# perform filesystem operations
if with_copy:
@@ -103,6 +101,9 @@ class Collection(serializable.Serializable):
lite_sync.add_single_distro(ref.name)
else:
print "AIEEE ??? %s " % type(ref)
+
+ # save the tree, so if neccessary, scripts can examine it.
+ self.config.api.serialize()
self._run_triggers(ref,"/var/lib/cobbler/triggers/add/%s/*" % self.collection_type())