diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2007-02-01 17:40:04 -0500 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2007-02-01 17:40:04 -0500 |
commit | 4ce23db0492822de6ba8e8c445e202b72d805028 (patch) | |
tree | c45ab9340ffab259fb9a5b7a2893a1ce242a33e2 /cobbler/api.py | |
parent | 7d280f93f627834c4361c8d3958edaed3d589e25 (diff) | |
download | third_party-cobbler-4ce23db0492822de6ba8e8c445e202b72d805028.tar.gz third_party-cobbler-4ce23db0492822de6ba8e8c445e202b72d805028.tar.xz third_party-cobbler-4ce23db0492822de6ba8e8c445e202b72d805028.zip |
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.
Diffstat (limited to 'cobbler/api.py')
-rw-r--r-- | cobbler/api.py | 12 |
1 files changed, 7 insertions, 5 deletions
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): """ |