summaryrefslogtreecommitdiffstats
path: root/cobbler/api.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2006-12-12 16:44:20 -0500
committerJim Meyering <jim@meyering.net>2006-12-12 16:44:20 -0500
commitedec049f66add415f402e251b217c9f09f589e40 (patch)
tree5d0105157734f2425ea979113dfb9d86aa29d66f /cobbler/api.py
parentf24ee795f6296abc4643889bbb9d35b9fc128799 (diff)
downloadthird_party-cobbler-edec049f66add415f402e251b217c9f09f589e40.tar.gz
third_party-cobbler-edec049f66add415f402e251b217c9f09f589e40.tar.xz
third_party-cobbler-edec049f66add415f402e251b217c9f09f589e40.zip
Preliminary support for repo mirroring.
Diffstat (limited to 'cobbler/api.py')
-rw-r--r--cobbler/api.py24
1 files changed, 21 insertions, 3 deletions
diff --git a/cobbler/api.py b/cobbler/api.py
index 720bcbc..2ebb2e6 100644
--- a/cobbler/api.py
+++ b/cobbler/api.py
@@ -20,6 +20,7 @@ import action_sync
import action_check
import action_enchant
import action_import
+import action_reposync
import cexceptions
class BootAPI:
@@ -51,20 +52,24 @@ class BootAPI:
"""
return self._config.profiles()
-
def distros(self):
"""
Return the current list of distributions
"""
return self._config.distros()
+ def repos(self):
+ """
+ Return the current list of repos
+ """
+ return self._config.repos()
+
def settings(self):
"""
Return the application configuration
"""
return self._config.settings()
-
def new_system(self):
"""
Return a blank, unconfigured system, unattached to a collection
@@ -85,6 +90,12 @@ class BootAPI:
"""
return self._config.new_profile()
+ def new_repo(self):
+ """
+ Create a blank, unconfigured repo, unattached to a collection
+ """
+ return self._config.new_repo()
+
def check(self):
"""
See if all preqs for network booting are valid. This returns
@@ -97,7 +108,6 @@ class BootAPI:
check = action_check.BootCheck(self._config)
return check.run()
-
def sync(self,dryrun=True):
"""
Take the values currently written to the configuration files in
@@ -108,6 +118,14 @@ class BootAPI:
sync = action_sync.BootSync(self._config)
return sync.run(dryrun=dryrun)
+ def reposync(self,dryrun=True):
+ """
+ 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)
+
def enchant(self,address,profile,systemdef):
"""
Re-kickstart a running system.