summaryrefslogtreecommitdiffstats
path: root/cobbler/action_import.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2006-10-18 09:53:39 -0400
committerJim Meyering <jim@meyering.net>2006-10-18 09:53:39 -0400
commit99dc1148c07a92c0da60046da745f833627af5c1 (patch)
treeb211ac07f6e9dc872dcd200579b43e83238b10c4 /cobbler/action_import.py
parent0b7cb71f25fcce64e4af8226e69478d0ebc1c7dc (diff)
downloadthird_party-cobbler-99dc1148c07a92c0da60046da745f833627af5c1.tar.gz
third_party-cobbler-99dc1148c07a92c0da60046da745f833627af5c1.tar.xz
third_party-cobbler-99dc1148c07a92c0da60046da745f833627af5c1.zip
Serialize changes during imports, since NFS traversal is very slow.
Diffstat (limited to 'cobbler/action_import.py')
-rw-r--r--cobbler/action_import.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/cobbler/action_import.py b/cobbler/action_import.py
index 27255cc..adc1232 100644
--- a/cobbler/action_import.py
+++ b/cobbler/action_import.py
@@ -46,14 +46,12 @@ MATCH_LIST = (
class Importer:
- def __init__(self,config,path,mirror,mirror_name):
- # FIXME: consider a basename for the import
+ def __init__(self,api,config,path,mirror,mirror_name):
+ self.api = api
self.config = config
self.path = path
self.mirror = mirror
self.mirror_name = mirror_name
- #if path is None:
- # raise cexceptions.CobblerException("import_failed","no path specified")
self.distros = config.distros()
self.profiles = config.profiles()
self.systems = config.systems()
@@ -164,6 +162,7 @@ class Importer:
print "%s" % tree
print "*** ASSIGNING KICKSTART TREE = %s" % tree
profile.set_ksmeta(tree)
+ self.api.serialize()
def walker(self,arg,dirname,fnames):
# FIXME: requires getting an arch out of the path
@@ -202,6 +201,7 @@ class Importer:
profile.set_distro(name)
self.profiles.add(profile)
print "*** PROFILE ADDED ***"
+ self.api.serialize()
def get_proposed_name(self,dirname):
# for now, just use the path to the images directory as the