c7n.registry module¶
-
class
c7n.registry.
PluginRegistry
(plugin_type)[source]¶ Bases:
object
A plugin registry
Custodian is intended to be innately pluggable both internally and externally, for resource types and their filters and actions.
This plugin registry abstraction provides the core mechanism for that. Its a simple string to class map, with python package entry_point loading for external plugins.
As an example of defining an external plugin using a python package
setup( name="custodian_cmdb", description="Custodian filters for interacting with internal CMDB" version='1.0', packages=find_packages(), entry_points={ 'console_scripts': [ 'custodian.ec2.filters = custodian_cmdb:filter_ec2']}, )
For loading the plugins we can simply invoke method:load_plugins like so:
PluginRegistry('ec2.filters').load_plugins()
-
EVENTS
= (0, 1)¶
-
EVENT_FINAL
= 1¶
-
EVENT_REGISTER
= 0¶
-