neutron_lib.callbacks.registry module¶
- neutron_lib.callbacks.registry.clear()¶
- neutron_lib.callbacks.registry.has_registry_receivers(klass)¶
Decorator to setup __new__ method in classes to subscribe bound methods.
Any method decorated with @receives above is an unbound method on a class. This decorator sets up the class __new__ method to subscribe the bound method in the callback registry after object instantiation.
- neutron_lib.callbacks.registry.publish(resource, event, trigger, payload=None)¶
- neutron_lib.callbacks.registry.receives(resource, events, priority=55550000)¶
Use to decorate methods on classes before initialization.
Any classes that use this must themselves be decorated with the @has_registry_receivers decorator to setup the __new__ method to actually register the instance methods after initialization.
- neutron_lib.callbacks.registry.subscribe(callback, resource, event, priority=55550000, cancellable=False)¶
- neutron_lib.callbacks.registry.unsubscribe(callback, resource, event)¶
- neutron_lib.callbacks.registry.unsubscribe_all(callback)¶
- neutron_lib.callbacks.registry.unsubscribe_by_resource(callback, resource)¶