Package yum :: Module plugins :: Class YumPlugins
[hide private]
[frames] | no frames]

Class YumPlugins

source code

Manager class for Yum plugins.

Instance Methods [hide private]
 
__init__(self, base, searchpath, optparser=None, types=None, pluginconfpath=None, disabled=None, enabled=None)
Initialise the instance.
source code
 
run(self, slotname, **kwargs)
Run all plugin functions for the given slot.
source code
 
_importplugins(self, types)
Load plugins matching the given types.
source code
 
_loadplugin(self, modulefile, types)
Attempt to import a plugin module and register the hook methods it uses.
source code
 
_getpluginconf(self, modname)
Parse the plugin specific configuration file and return a IncludingConfigParser instance representing it.
source code
 
setCmdLine(self, opts, commands)
Set the parsed command line options so that plugins can access them
source code
Static Methods [hide private]
 
_plugin_cmdline_match(modname, plugins, used)
Check if this plugin has been temporary enabled/disabled.
source code
Method Details [hide private]

__init__(self, base, searchpath, optparser=None, types=None, pluginconfpath=None, disabled=None, enabled=None)
(Constructor)

source code 

Initialise the instance.

Parameters:
  • base - The
  • searchpath - A list of paths to look for plugin modules.
  • optparser - The OptionParser instance for this run (optional). Use to allow plugins to extend command line options.
  • types - A sequence specifying the types of plugins to load. This should be sequnce containing one or more of the TYPE_... constants. If None (the default), all plugins will be loaded.
  • pluginconfpath - A list of paths to look for plugin configuration files. Defaults to "/etc/yum/pluginconf.d".

_getpluginconf(self, modname)

source code 

Parse the plugin specific configuration file and return a IncludingConfigParser instance representing it. Returns None if there was an error reading or parsing the configuration file.