Package entropy :: Package server :: Package interfaces :: Module main :: Class ServerEntropyRepositoryPlugin

Class ServerEntropyRepositoryPlugin

source code


Instance Methods
 
__init__(self, server_interface, metadata=None)
Entropy server-side repository ServerPackagesRepository Plugin class.
source code
string
get_id(self)
Return string identifier of myself.
source code
dict
get_metadata(self)
This method should always return a direct reference to the object and NOT a copy.
source code
int
add_plugin_hook(self, entropy_repository_instance)
Called during EntropyRepository plugin addition.
source code
int
close_repo_hook(self, entropy_repository_instance)
Called during EntropyRepository instance shutdown (close()).
source code
int
commit_hook(self, entropy_repository_instance)
Called during EntropyRepository data commit.
source code
int
add_package_hook(self, entropy_repository_instance, package_id, package_data)
Called after the addition of a package from EntropyRepository.
source code
int
remove_package_hook(self, entropy_repository_instance, package_id, from_add_package)
Called after the removal of a package from EntropyRepository.
source code
int
treeupdates_move_action_hook(self, entropy_repository_instance, package_id)
Called after EntropyRepository treeupdates move action execution for given package_id in given EntropyRepository instance.
source code
int
treeupdates_slot_move_action_hook(self, entropy_repository_instance, package_id)
Called after EntropyRepository treeupdates slot move action execution for given package_id in given EntropyRepository instance.
source code

Inherited from db.skel.EntropyRepositoryPlugin: accept_license_hook, clear_cache_hook, initialize_repo_hook, remove_plugin_hook

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

Class Variables
  PLUGIN_ID = '__server__'
Properties

Inherited from object: __class__

Method Details

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

source code 

Entropy server-side repository ServerPackagesRepository Plugin class. This class will be instantiated and automatically added to ServerPackagesRepository instances generated by Entropy Server.

Parameters:
  • server_interface (entropy.server.interfaces.Server class) - Entropy Server 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 

This method should always return a direct reference to the object and NOT a copy.

Returns: dict
plugin metadata
Overrides: db.skel.EntropyRepositoryPlugin.get_metadata

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)

close_repo_hook(self, entropy_repository_instance)

source code 

Called during EntropyRepository instance shutdown (close()).

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.close_repo_hook
(inherited documentation)

commit_hook(self, entropy_repository_instance)

source code 

Called during EntropyRepository data commit.

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.commit_hook
(inherited documentation)

add_package_hook(self, entropy_repository_instance, package_id, package_data)

source code 

Called after the addition of a package from EntropyRepository.

Parameters:
  • entropy_repository_instance - EntropyRepository instance
  • package_id - Entropy repository package identifier
  • package_data - package metadata used for insertion (see addPackage)
Returns: int
execution status code, return nonzero for errors, this will raise a RepositoryPluginError exception.
Overrides: db.skel.EntropyRepositoryPlugin.add_package_hook
(inherited documentation)

remove_package_hook(self, entropy_repository_instance, package_id, from_add_package)

source code 

Called after the removal of a package from EntropyRepository.

Parameters:
  • entropy_repository_instance - EntropyRepository instance
  • package_id - Entropy repository package identifier
  • from_add_package - inform whether removePackage() is called inside addPackage()
Returns: int
execution status code, return nonzero for errors, this will raise a RepositoryPluginError exception.
Overrides: db.skel.EntropyRepositoryPlugin.remove_package_hook
(inherited documentation)

treeupdates_move_action_hook(self, entropy_repository_instance, package_id)

source code 

Called after EntropyRepository treeupdates move action execution for given package_id in given EntropyRepository instance.

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

treeupdates_slot_move_action_hook(self, entropy_repository_instance, package_id)

source code 

Called after EntropyRepository treeupdates slot move action execution for given package_id in given EntropyRepository instance.

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