From a6b6871ecbc700229969f350b869bd19e785129d Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Wed, 15 Aug 2012 14:53:18 -0400 Subject: Removed deprecated plugins BB, Svcmgr, SGenshi --- src/lib/Bcfg2/Server/Lint/GroupNames.py | 12 +++++++----- src/lib/Bcfg2/Server/Lint/RequiredAttrs.py | 12 +++++++----- src/lib/Bcfg2/Server/Lint/Validate.py | 1 - 3 files changed, 14 insertions(+), 11 deletions(-) (limited to 'src/lib/Bcfg2/Server/Lint') diff --git a/src/lib/Bcfg2/Server/Lint/GroupNames.py b/src/lib/Bcfg2/Server/Lint/GroupNames.py index 069d5d2a5..5df98a30e 100644 --- a/src/lib/Bcfg2/Server/Lint/GroupNames.py +++ b/src/lib/Bcfg2/Server/Lint/GroupNames.py @@ -1,9 +1,11 @@ import os import re import Bcfg2.Server.Lint -from Bcfg2.Server.Plugins.Bundler import have_genshi -if have_genshi: - from Bcfg2.Server.Plugins.SGenshi import SGenshiTemplateFile +try: + from Bcfg2.Server.Plugins.Bundler import BundleTemplateFile + has_genshi = True +except ImportError: + has_genshi = False class GroupNames(Bcfg2.Server.Lint.ServerPlugin): """ ensure that all named groups are valid group names """ @@ -37,8 +39,8 @@ class GroupNames(Bcfg2.Server.Lint.ServerPlugin): """ check bundles for BoundPath entries with missing attrs """ for bundle in self.core.plugins['Bundler'].entries.values(): if (self.HandlesFile(bundle.name) and - (not have_genshi or - not isinstance(bundle, SGenshiTemplateFile))): + (not has_genshi or + not isinstance(bundle, BundleTemplateFile))): self.check_entries(bundle.xdata.xpath("//Group"), bundle.name) diff --git a/src/lib/Bcfg2/Server/Lint/RequiredAttrs.py b/src/lib/Bcfg2/Server/Lint/RequiredAttrs.py index b9a6dc2dc..fcb7c6c28 100644 --- a/src/lib/Bcfg2/Server/Lint/RequiredAttrs.py +++ b/src/lib/Bcfg2/Server/Lint/RequiredAttrs.py @@ -5,9 +5,11 @@ import Bcfg2.Server.Lint import Bcfg2.Client.Tools.POSIX import Bcfg2.Client.Tools.VCS from Bcfg2.Server.Plugins.Packages import Apt, Yum -from Bcfg2.Server.Plugins.Bundler import have_genshi -if have_genshi: - from Bcfg2.Server.Plugins.SGenshi import SGenshiTemplateFile +try: + from Bcfg2.Server.Plugins.Bundler import BundleTemplateFile + has_genshi = True +except ImportError: + has_genshi = False # format verifying functions def is_filename(val): @@ -157,8 +159,8 @@ class RequiredAttrs(Bcfg2.Server.Lint.ServerPlugin): if 'Bundler' in self.core.plugins: for bundle in self.core.plugins['Bundler'].entries.values(): if (self.HandlesFile(bundle.name) and - (not have_genshi or - not isinstance(bundle, SGenshiTemplateFile))): + (not has_genshi or + not isinstance(bundle, BundleTemplateFile))): try: xdata = lxml.etree.XML(bundle.data) except (lxml.etree.XMLSyntaxError, AttributeError): diff --git a/src/lib/Bcfg2/Server/Lint/Validate.py b/src/lib/Bcfg2/Server/Lint/Validate.py index 5499e75c2..b8bdb4755 100644 --- a/src/lib/Bcfg2/Server/Lint/Validate.py +++ b/src/lib/Bcfg2/Server/Lint/Validate.py @@ -22,7 +22,6 @@ class Validate(Bcfg2.Server.Lint.ServerlessPlugin): "%s/Rules/*.xml":"%s/rules.xsd", "%s/Defaults/*.xml":"%s/defaults.xsd", "%s/etc/report-configuration.xml":"%s/report-configuration.xsd", - "%s/Svcmgr/*.xml":"%s/services.xsd", "%s/Deps/*.xml":"%s/deps.xsd", "%s/Decisions/*.xml":"%s/decisions.xsd", "%s/Packages/sources.xml":"%s/packages.xsd", -- cgit v1.2.3-1-g7c22