summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugins/Packages/Apt.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-09-20 11:00:54 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-09-20 11:37:55 -0400
commita63f3c46d17d8d300cebde9e73362ba23009450c (patch)
tree1fbb2d8f1d3d929e18a575fa76ee9898fbc3dec9 /src/lib/Bcfg2/Server/Plugins/Packages/Apt.py
parent8cba8ccce5be7094afd25037863f6819fa13ee7f (diff)
downloadbcfg2-a63f3c46d17d8d300cebde9e73362ba23009450c.tar.gz
bcfg2-a63f3c46d17d8d300cebde9e73362ba23009450c.tar.bz2
bcfg2-a63f3c46d17d8d300cebde9e73362ba23009450c.zip
documented packages backends
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Packages/Apt.py')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Packages/Apt.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Packages/Apt.py b/src/lib/Bcfg2/Server/Plugins/Packages/Apt.py
index 5e3d86f02..11355e117 100644
--- a/src/lib/Bcfg2/Server/Plugins/Packages/Apt.py
+++ b/src/lib/Bcfg2/Server/Plugins/Packages/Apt.py
@@ -1,3 +1,5 @@
+""" APT backend for :mod:`Bcfg2.Server.Plugins.Packages` """
+
import re
import gzip
from Bcfg2.Server.Plugins.Packages.Collection import Collection
@@ -5,7 +7,16 @@ from Bcfg2.Server.Plugins.Packages.Source import Source
class AptCollection(Collection):
+ """ Handle collections of APT sources. This is a no-op object
+ that simply inherits from
+ :class:`Bcfg2.Server.Plugins.Packages.Collection.Collection`,
+ overrides nothing, and defers all operations to :class:`PacSource`
+ """
+
def get_config(self):
+ """ Get an APT configuration file (i.e., ``sources.list``).
+
+ :returns: string """
lines = ["# This config was generated automatically by the Bcfg2 " \
"Packages plugin", '']
@@ -22,11 +33,19 @@ class AptCollection(Collection):
class AptSource(Source):
+ """ Handle APT sources """
+
+ #: :ref:`server-plugins-generators-packages-magic-groups` for
+ #: ``AptSource`` are "apt", "debian", "ubuntu", and "nexenta"
basegroups = ['apt', 'debian', 'ubuntu', 'nexenta']
+
+ #: AptSource sets the ``type`` on Package entries to "deb"
ptype = 'deb'
@property
def urls(self):
+ """ A list of URLs to the base metadata file for each
+ repository described by this source. """
if not self.rawurl:
rv = []
for part in self.components:
@@ -92,3 +111,4 @@ class AptSource(Source):
bprov[barch][dname] = set()
bprov[barch][dname].add(pkgname)
self.process_files(bdeps, bprov)
+ read_files.__doc__ = Source.read_files.__doc__