diff options
-rw-r--r-- | src/lib/Server/Admin/Viz.py | 7 | ||||
-rw-r--r-- | src/lib/Server/Admin/__init__.py | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/lib/Server/Admin/Viz.py b/src/lib/Server/Admin/Viz.py index 03a46335c..3945591f7 100644 --- a/src/lib/Server/Admin/Viz.py +++ b/src/lib/Server/Admin/Viz.py @@ -24,10 +24,15 @@ class Viz(Bcfg2.Server.Admin.MetadataCore): colors = ['steelblue1', 'chartreuse', 'gold', 'magenta', 'indianred1', 'limegreen', 'orange1', 'lightblue2', 'green1', 'blue1', 'yellow1', 'darkturquoise', 'gray66'] + plugin_blacklist = ['DBStats', 'Snapshots', 'Cfg', 'Pkgmgr', 'Packages', + 'Rules', 'Account', 'Decisions', 'Deps', 'Git', 'Svn', + 'Fossil', 'Bzr', 'Bundler', 'TGenshi', 'SGenshi', 'Base'] def __init__(self, cfile): + Bcfg2.Server.Admin.MetadataCore.__init__(self, cfile, - self.__usage__) + self.__usage__, + pblacklist=self.plugin_blacklist) def __call__(self, args): Bcfg2.Server.Admin.MetadataCore.__call__(self, args) diff --git a/src/lib/Server/Admin/__init__.py b/src/lib/Server/Admin/__init__.py index 532afc65e..ecd2bd5b6 100644 --- a/src/lib/Server/Admin/__init__.py +++ b/src/lib/Server/Admin/__init__.py @@ -87,12 +87,16 @@ class Mode(object): class MetadataCore(Mode): '''Base class for admin-modes that handle metadata''' - def __init__(self, configfile, usage): + def __init__(self, configfile, usage, pwhitelist=None, pblacklist=None): Mode.__init__(self, configfile) options = {'plugins': Bcfg2.Options.SERVER_PLUGINS} setup = Bcfg2.Options.OptionParser(options) setup.hm = usage setup.parse(sys.argv[1:]) + if pwhitelist is not None: + setup['plugins'] = [x for x in setup['plugins'] if x in pwhitelist] + elif pblacklist is not None: + setup['plugins'] = [x for x in setup['plugins'] if x not in pblacklist] try: self.bcore = Bcfg2.Server.Core.Core(self.get_repo_path(), setup['plugins'], |