From 4ce23db0492822de6ba8e8c445e202b72d805028 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Thu, 1 Feb 2007 17:40:04 -0500 Subject: Work towards implementation of optional integrated "light" sync support, which is enabled by default in /var/lib/cobbler/settings. Users of the API will need to use the with_copy=True and with_delete=True parameters to initiate this behavior. As mentioned in the previous commit, sync() still needs to be run at least once prior to any add commands using this feature. --- cobbler/api.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'cobbler/api.py') diff --git a/cobbler/api.py b/cobbler/api.py index dda4052..aa7d42a 100644 --- a/cobbler/api.py +++ b/cobbler/api.py @@ -32,6 +32,8 @@ class BootAPI: """ self._config = config.Config() self.deserialize() + # self.settings = self._config.settings() + # self.syncflag = self.settings.minimize_syncs def clear(self): """ @@ -106,7 +108,7 @@ class BootAPI: check = action_check.BootCheck(self._config) return check.run() - def sync(self,dryrun=True): + def sync(self): """ Take the values currently written to the configuration files in /etc, and /var, and build out the information tree found in @@ -114,15 +116,15 @@ class BootAPI: saved with serialize() will NOT be synchronized with this command. """ sync = action_sync.BootSync(self._config) - return sync.run(dryrun=dryrun) + return sync.run() - def reposync(self,dryrun=True): + def reposync(self): """ Take the contents of /var/lib/cobbler/repos and update them -- or create the initial copy if no contents exist yet. """ - sync = action_reposync.RepoSync(self._config) - return sync.run(dryrun=dryrun) + reposync = action_reposync.RepoSync(self._config) + return reposync.run() def enchant(self,address,profile,systemdef,is_virt): """ -- cgit