Module mfplugin.compat
Functions
def get_installed_plugins(plugins_base_dir=None)
-
Get a detailled list of installed plugins.
This is just a compat helper (as the real implementatin is in manager class).
Args
plugins_base_dir
:string
- (optional) the plugin base directory path. If not set, the default plugins base directory path is used.
Returns
(string): dict of installed plugins with following keys: name, version, release, home.
Raises
FIXME.
def get_layer_home_from_plugin_name(name, plugins_base_dir=None)
def get_plugin_hash(name_or_filepath, mode='auto', plugins_base_dir=None)
-
Get a hash about a plugin.
This is just a compat helper (as the real implementatin is in manager class).
Args
name_or_filepath
:string
- name or file path of the plugin.
- mode (string)
- - "name": get information from the plugin name
- (name_or_filepath is the name of the plugin).
- - "file": get information from the plutgin file
- (name_or_filepath is the plugin file path).
- - "auto": guess if the name_or_filepath parameter is the name
- or the file path of the plugin.
plugins_base_dir
:string
- (optional) the plugin base directory path. If not set, the default plugins base directory path is used.
Returns
(string): string digest data for the plugin.
def get_plugin_info(name_or_filepath, mode='auto', plugins_base_dir=None)
-
Get detailed information about a plugin.
This is just a compat helper (as the real implementatin is in manager class).
Args
name_or_filepath
:string
- name or file path of the plugin.
- mode (string)
- - "name": get information from the plugin name
- (name_or_filepath is the name of the plugin).
- - "file": get information from the plutgin file
- (name_or_filepath is the plugin file path).
- - "auto": guess if the name_or_filepath parameter is the name
- or the file path of the plugin.
plugins_base_dir
:string
- (optional) the plugin base directory path. If not set, the default plugins base directory path is used.
Returns
(dict): dictionary containing plugin information (or None if the plugin is not installed (name mode).
Raises
NotInstalledPlugin
- is the plugin is not installed (if it is a "name").