summaryrefslogtreecommitdiffstats
path: root/cobbler/config.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/config.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/config.py')
-rw-r--r--cobbler/config.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/cobbler/config.py b/cobbler/config.py
index 4bcc31e..44a7ab1 100644
--- a/cobbler/config.py
+++ b/cobbler/config.py
@@ -18,10 +18,12 @@ import weakref
import item_distro as distro
import item_profile as profile
import item_system as system
+import item_repo as repo
import collection_distros as distros
import collection_profiles as profiles
import collection_systems as systems
+import collection_repos as repos
import settings
import serializer
@@ -37,11 +39,13 @@ class Config:
self._profiles = profiles.Profiles(weakref.proxy(self))
self._systems = systems.Systems(weakref.proxy(self))
self._settings = settings.Settings() # not a true collection
+ self._repos = repos.Repos(weakref.proxy(self))
self._classes = [
self._distros,
self._profiles,
self._systems,
self._settings,
+ self._repos
]
self.file_check()
@@ -69,6 +73,12 @@ class Config:
"""
return self._settings
+ def repos(self):
+ """
+ Return the definitive copy of the Repos collection
+ """
+ return self._repos
+
def new_distro(self):
"""
Create a new distro object with a backreference to this object
@@ -87,6 +97,12 @@ class Config:
"""
return profile.Profile(weakref.proxy(self))
+ def new_repo(self):
+ """
+ Create a new mirror to keep track of...
+ """
+ return repo.Repo(weakref.proxy(self))
+
def clear(self):
"""
Forget about all loaded configuration data