Package entropy :: Package client :: Package interfaces :: Module db :: Class ClientEntropyRepositoryPlugin

Class ClientEntropyRepositoryPlugin

source code


Instance Methods
 
__init__(self, client_interface, metadata=None)
Entropy client-side repository EntropyRepository Plugin class.
source code
string
get_id(self)
Return string identifier of myself.
source code
dict
get_metadata(self)
Developers reimplementing EntropyRepositoryPlugin can provide metadata along with every instance.
source code
int
add_plugin_hook(self, entropy_repository_instance)
Called during EntropyRepository plugin addition.
source code

Inherited from db.skel.EntropyRepositoryPlugin: accept_license_hook, add_package_hook, clear_cache_hook, close_repo_hook, commit_hook, initialize_repo_hook, remove_package_hook, remove_plugin_hook, treeupdates_move_action_hook, treeupdates_slot_move_action_hook

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, client_interface, metadata=None)
(Constructor)

source code 

Entropy client-side repository EntropyRepository Plugin class. This class will be instantiated and automatically added to EntropyRepository instances generated by Entropy Client.

Parameters:
  • client_interface (entropy.client.interfaces.Client class) - Entropy Client interface instance
  • metadata (dict) - any dict form metadata map (key => value)
Overrides: object.__init__

get_id(self)

source code 

Return string identifier of myself.

Returns: string
EntropyRepositoryPlugin identifier.
Overrides: db.skel.EntropyRepositoryPlugin.get_id
(inherited documentation)

get_metadata(self)

source code 

Developers reimplementing EntropyRepositoryPlugin can provide metadata along with every instance. If you want to provide read-only metadata, this method should really return a copy of the metadata object, otherwise, return its direct reference. Metadata format is a map-like object (dictionary, dict()). By default this method does return an empty dict. Make sure that your metadata dictionaries around don't have keys in common, otherwise those will be randomly overwritten eachothers.

Returns: dict
plugin metadata
Overrides: db.skel.EntropyRepositoryPlugin.get_metadata
(inherited documentation)

add_plugin_hook(self, entropy_repository_instance)

source code 

Called during EntropyRepository plugin addition.

Parameters:
  • entropy_repository_instance - EntropyRepository instance
Returns: int
execution status code, return nonzero for errors, this will raise a RepositoryPluginError exception.
Overrides: db.skel.EntropyRepositoryPlugin.add_plugin_hook
(inherited documentation)