use new payload objects for *_INIT callbacks
Part of the work we did while rehoming the callback modules introduced the notion of payload objects [1] to replace the unstructured kwargs used today. When using payloads event sources need to use publish() rather than notify() to trigger the callback(s) and pass along a payload object (if needed). This patch begins to move us onto the payload objects by updating BEFORE_INIT and AFTER_INIT event types to use the payloads. Depends-On: I9194c7857f10392149159071cda8e080e93adc10 [1] https://github.com/openstack/neutron-lib/blob/master/doc/source/devref/callbacks.rst#event-payloads Change-Id: Ie8311f28ebac6c1990a261cc6cfa130fac0cfc5f
This commit is contained in:
parent
2d3d1797e8
commit
2b76bbcf01
|
@ -95,7 +95,7 @@ class NsxLibBase(object):
|
|||
return self.general_apis.build_v3_tags_payload(
|
||||
resource, resource_type, project_name)
|
||||
|
||||
def reinitialize_cluster(self, resource, event, trigger, **kwargs):
|
||||
def reinitialize_cluster(self, resource, event, trigger, payload=None):
|
||||
self.cluster._reinit_cluster()
|
||||
|
||||
def subscribe(self, callback, event):
|
||||
|
|
Loading…
Reference in New Issue