summaryrefslogtreecommitdiffstats
path: root/cobbler/collection_distros.py
diff options
context:
space:
mode:
Diffstat (limited to 'cobbler/collection_distros.py')
-rw-r--r--cobbler/collection_distros.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/cobbler/collection_distros.py b/cobbler/collection_distros.py
index e700727..be024fc 100644
--- a/cobbler/collection_distros.py
+++ b/cobbler/collection_distros.py
@@ -1,19 +1,26 @@
+"""
+A distro represents a network bootable matched set of kernels
+and initrd files
+
+Michael DeHaan <mdehaan@redhat.com
+"""
import utils
import collection
import item_distro as distro
-import collection_profiles as profiles
-"""
-A distro represents a network bootable matched set of kernels
-and initrd files
-"""
class Distros(collection.Collection):
def factory_produce(self,config,seed_data):
+ """
+ Return a Distro forged from seed_data
+ """
return distro.Distro(config).from_datastruct(seed_data)
def filename(self):
+ """
+ Config file for distro serialization
+ """
return "/var/lib/cobbler/distros"
def remove(self,name):
@@ -21,7 +28,7 @@ class Distros(collection.Collection):
Remove element named 'name' from the collection
"""
# first see if any Groups use this distro
- for k,v in self.config.profiles().listing.items():
+ for v in self.config.profiles():
if v.distro == name:
utils.set_error("orphan_files")
return False