From 6e84895b828b4fa5e3c45464dd08949fa382dfa5 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Thu, 12 Oct 2006 18:04:08 -0400 Subject: Initial code behind an import feature for directory trees, i.e. to transform something like /mnt/redhat (containing a lot of OS builds with trees) into distributions and profiles directly. --- cobbler/api.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cobbler/api.py') diff --git a/cobbler/api.py b/cobbler/api.py index 186eca6..f4387eb 100644 --- a/cobbler/api.py +++ b/cobbler/api.py @@ -19,6 +19,7 @@ import utils import action_sync import action_check import action_enchant +import action_import import cexceptions class BootAPI: @@ -115,12 +116,12 @@ class BootAPI: enchant = action_enchant.Enchant(self._config,sysname,password) return enchant.run() - def import_distros(self,tree_path): + def import_tree(self,tree_path): """ Automatically import a directory tree full of distribution files. """ - print "STUB: NOT IMPLEMENTED YET" - return False + importer = action_import.Importer(self._config, tree_path) + return importer.run() def serialize(self): """ -- cgit