diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2011-10-07 08:37:17 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2011-10-07 08:37:17 -0400 |
commit | bd0fd1c4c32864414b60b51828c79198503cb3f6 (patch) | |
tree | 9bc328fedc111ce3e679c4921ef48d8566c3f562 /src/lib/Server/Lint/RequiredAttrs.py | |
parent | e8821c043cdee6ab61b811fcc508fb83f85ce71b (diff) | |
download | bcfg2-bd0fd1c4c32864414b60b51828c79198503cb3f6.tar.gz bcfg2-bd0fd1c4c32864414b60b51828c79198503cb3f6.tar.bz2 bcfg2-bd0fd1c4c32864414b60b51828c79198503cb3f6.zip |
* Added support for yum libraries (if available and configured). This
can dramatically reduce memory usage, and fixed several bugs:
* #1014 (Package plugin can't resolve dependencies for rpms with
Require: tags for full paths that aren't Provided explicitly)
* #991 (Dependency Resolution difference between Package and yum)
* #996 (Packages high memory usage)
* Added support for Yum package groups when using yum libraries
(#1039)
* Fixed #911 (bcfg2 output for wrong package version with Packages is
misleading)
* YUMng turns down the Yum debug level itself depending on the
debug/verbosity level requested by bcfg2 so you don't have to reduce
the Yum debug level on a global basis
* Added support for Pulp repositories, including registering Pulp
consumers and binding to repositories
* Added ability to disable magic OS groups
Diffstat (limited to 'src/lib/Server/Lint/RequiredAttrs.py')
-rw-r--r-- | src/lib/Server/Lint/RequiredAttrs.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/lib/Server/Lint/RequiredAttrs.py b/src/lib/Server/Lint/RequiredAttrs.py index f11ad9217..55206d2ba 100644 --- a/src/lib/Server/Lint/RequiredAttrs.py +++ b/src/lib/Server/Lint/RequiredAttrs.py @@ -1,7 +1,7 @@ import os.path import lxml.etree import Bcfg2.Server.Lint -import Bcfg2.Server.Plugins.Packages +from Bcfg2.Server.Plugins.Packages import Apt, Yum class RequiredAttrs(Bcfg2.Server.Lint.ServerPlugin): """ verify attributes for configuration entries (as defined in @@ -42,22 +42,22 @@ class RequiredAttrs(Bcfg2.Server.Lint.ServerPlugin): """ check package sources for Source entries with missing attrs """ if 'Packages' in self.core.plugins: for source in self.core.plugins['Packages'].sources: - if isinstance(source, Bcfg2.Server.Plugins.Packages.PulpSource): - if not source.id: + if isinstance(source, Yum.YumSource): + if (not source.pulp_id and not source.url and + not source.rawurl): self.LintError("required-attrs-missing", - "The required attribute id is missing " - "from a Pulp source: %s" % - self.RenderXML(source.xsource)) - else: - if not source.url and not source.rawurl: - self.LintError("required-attrs-missing", - "A %s source must have either a url or " - "rawurl attribute: %s" % + "A %s source must have either a url, " + "rawurl, or pulp_id attribute: %s" % (source.ptype, self.RenderXML(source.xsource))) + elif not source.url and not source.rawurl: + self.LintError("required-attrs-missing", + "A %s source must have either a url or " + "rawurl attribute: %s" % + (source.ptype, + self.RenderXML(source.xsource))) - if (not isinstance(source, - Bcfg2.Server.Plugins.Packages.APTSource) and + if (not isinstance(source, Apt.AptSource) and source.recommended): self.LintError("extra-attrs", "The recommended attribute is not " |