)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c7a5f18be55d7661382cf44e7fe7e7fb793ae768","unresolved":false,"context_lines":[{"line_number":14,"context_line":"contained herein."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"The depends-on patch contains neutron updates to:"},{"line_number":17,"context_line":"- Removes neutron.callbacks and moves all uses to"},{"line_number":18,"context_line":"neutron_lib.callbacks."},{"line_number":19,"context_line":"- Neutron uses of callbacks for BEFORE_RESPONSE events"},{"line_number":20,"context_line":"now use neutron-lib."},{"line_number":21,"context_line":"- Neutron uses of callbacks for ROUTER and PROCESS"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"1a6eadb0_f033e7f3","line":18,"range":{"start_line":17,"start_character":2,"end_line":18,"end_character":21},"updated":"2016-12-16 13:21:48.000000000","message":"That said, you\u0027d keep the use of the existing API. Just like that, this statement sounds a bit scary :)","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"5dc989fa28199fa16ead2045067ebb5f416e4d24","unresolved":false,"context_lines":[{"line_number":14,"context_line":"contained herein."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"The depends-on patch contains neutron updates to:"},{"line_number":17,"context_line":"- Removes neutron.callbacks and moves all uses to"},{"line_number":18,"context_line":"neutron_lib.callbacks."},{"line_number":19,"context_line":"- Neutron uses of callbacks for BEFORE_RESPONSE events"},{"line_number":20,"context_line":"now use neutron-lib."},{"line_number":21,"context_line":"- Neutron uses of callbacks for ROUTER and PROCESS"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"1a6eadb0_c4daa816","line":18,"range":{"start_line":17,"start_character":2,"end_line":18,"end_character":21},"in_reply_to":"1a6eadb0_f033e7f3","updated":"2016-12-16 16:32:38.000000000","message":"Pls see my response below.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c7a5f18be55d7661382cf44e7fe7e7fb793ae768","unresolved":false,"context_lines":[{"line_number":29,"context_line":"[1] https://review.openstack.org/#/c/345718"},{"line_number":30,"context_line":"[2] https://review.openstack.org/#/c/342304"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Depends-On: I5293d661dd19e13fe09eca25412baef9ce42dac1"},{"line_number":33,"context_line":"Change-Id: If76457b1f0d5d3479e394d0dba3b22a90928f0f2"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"1a6eadb0_753a69e8","line":32,"range":{"start_line":32,"start_character":12,"end_line":32,"end_character":53},"updated":"2016-12-16 13:21:48.000000000","message":"This way this patch can never merge. To test [1] out you\u0027d need to post a dummy patch rebased on top of this one and then make it depends-on [1]. Once you\u0027re happy with the result, you can throw it away.\n\n[1] I5293d661dd19e13fe09eca25412baef9ce42dac1","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"5dc989fa28199fa16ead2045067ebb5f416e4d24","unresolved":false,"context_lines":[{"line_number":29,"context_line":"[1] https://review.openstack.org/#/c/345718"},{"line_number":30,"context_line":"[2] https://review.openstack.org/#/c/342304"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Depends-On: I5293d661dd19e13fe09eca25412baef9ce42dac1"},{"line_number":33,"context_line":"Change-Id: If76457b1f0d5d3479e394d0dba3b22a90928f0f2"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"1a6eadb0_84d430ec","line":32,"range":{"start_line":32,"start_character":12,"end_line":32,"end_character":53},"in_reply_to":"1a6eadb0_753a69e8","updated":"2016-12-16 16:32:38.000000000","message":"The Depends-On patch is not intended to ever merge per say; it\u0027s the dummy patch to test neutron using neutron-lib\u0027s new event payloads. The dummy patch serves the following purposes in my mind:\n- Prototype that neutron can work with new event payload API.\n- Examples of using the payload API.\n- Can be used as ref/starting point when neutron starts to consume this new callback API.\n\n\nI left it here for reviewers to reference during review with (again) intentions on throwing it away.\n\n\nAlso note that I\u0027ve been rebasing the depends-on patch frequently, but because of its size its a moving target and needs frequent updates... As noted in my earlier comments the gate was green after I rebased, so it from a testing POV its purpose has been served.\n\n\nI will remove the depends-on in the commit message and just reference it instead.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"cb55b7c6c6a21561ee0ed6c126a204853f03a467","unresolved":false,"context_lines":[{"line_number":29,"context_line":"[1] https://review.openstack.org/#/c/345718"},{"line_number":30,"context_line":"[2] https://review.openstack.org/#/c/342304"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Depends-On: I5293d661dd19e13fe09eca25412baef9ce42dac1"},{"line_number":33,"context_line":"Change-Id: If76457b1f0d5d3479e394d0dba3b22a90928f0f2"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"1a6eadb0_d1b8a3ca","line":32,"range":{"start_line":32,"start_character":12,"end_line":32,"end_character":53},"in_reply_to":"1a6eadb0_84d430ec","updated":"2016-12-16 17:47:01.000000000","message":"You can keep it so long as we remember to remove it when we want to merge this :)","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"}],"doc/source/devref/callbacks.rst":[{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"7a2c576c0630f7bf0699db6135a470a1c613bac3","unresolved":false,"context_lines":[{"line_number":132,"context_line":"understand the state progression of the resource at hand. These event"},{"line_number":133,"context_line":"objects are suitable for the standard before/after database events we have"},{"line_number":134,"context_line":"today as well as any that might arise in the future."},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"Example usage::"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    # BEFORE_CREATE:"}],"source_content_type":"text/x-rst","patch_set":10,"id":"9a629dbe_80ac0e8d","line":135,"updated":"2016-11-11 21:38:59.000000000","message":"Maybe a few words on \"resource_states\" would help. I\u0027m struggling to wrap my mind around this, I\u0027m sure others may have the same reaction.","commit_id":"56a788581f56d8537dac7e190f03f9258bd0363f"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"5a6b7656d83fbd7c30b56f67de325ea321c9bb56","unresolved":false,"context_lines":[{"line_number":132,"context_line":"understand the state progression of the resource at hand. These event"},{"line_number":133,"context_line":"objects are suitable for the standard before/after database events we have"},{"line_number":134,"context_line":"today as well as any that might arise in the future."},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"Example usage::"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    # BEFORE_CREATE:"}],"source_content_type":"text/x-rst","patch_set":10,"id":"9a629dbe_3c8c1435","line":135,"in_reply_to":"9a629dbe_80ac0e8d","updated":"2016-11-14 17:07:08.000000000","message":"Will update in next patch. If still unclear please let me know.","commit_id":"56a788581f56d8537dac7e190f03f9258bd0363f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c7a5f18be55d7661382cf44e7fe7e7fb793ae768","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"Early versions of the callback system used unstandardized ``**kwargs`` as the"},{"line_number":81,"context_line":"callback event payload. While this approach worked, the broad differences"},{"line_number":82,"context_line":"in usage of the ``**kwargs`` payload became cumbersome, error prone and"},{"line_number":83,"context_line":"difficult to maintain. Therefore, current versions of the callback system"},{"line_number":84,"context_line":"use a standardized set of event objects to transport the event payload."},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"The event objects are defined in ``neutron_lib.callbacks.events`` and define a"}],"source_content_type":"text/x-rst","patch_set":28,"id":"1a6eadb0_9028f334","line":83,"range":{"start_line":82,"start_character":29,"end_line":83,"end_character":21},"updated":"2016-12-16 13:21:48.000000000","message":"while you can leave this sentence as is, I personally feel that this is less dramatic than this sentence makes the reader believe. The tool has been in use for a few cycles now and little to no negative feedback was reported, but rather the contrary and adoption has exceeded my wildest expectations. Granted, a reviewer/developer needs to be extra careful as the communication paradigm is not as common as direct request/response, but that\u0027s the nature and power of the tool itself.\n\nJust my 2c :)","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"Early versions of the callback system used unstandardized ``**kwargs`` as the"},{"line_number":81,"context_line":"callback event payload. While this approach worked, the broad differences"},{"line_number":82,"context_line":"in usage of the ``**kwargs`` payload became cumbersome, error prone and"},{"line_number":83,"context_line":"difficult to maintain. Therefore, current versions of the callback system"},{"line_number":84,"context_line":"use a standardized set of event objects to transport the event payload."},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"The event objects are defined in ``neutron_lib.callbacks.events`` and define a"}],"source_content_type":"text/x-rst","patch_set":28,"id":"ba5201f7_209d7abc","line":83,"range":{"start_line":82,"start_character":29,"end_line":83,"end_character":21},"in_reply_to":"1a6eadb0_9028f334","updated":"2017-01-04 19:10:11.000000000","message":"Agreed. I softened it.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c7a5f18be55d7661382cf44e7fe7e7fb793ae768","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"Note that states as well as any other event payload attributes are not copied;"},{"line_number":125,"context_line":"subscribers obtain a direct reference to event payload objects (states, metadata,"},{"line_number":126,"context_line":"etc.)."},{"line_number":127,"context_line":""},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"Event objects: DataStoreEvent"}],"source_content_type":"text/x-rst","patch_set":28,"id":"1a6eadb0_d087cbb2","line":126,"updated":"2016-12-16 13:21:48.000000000","message":"we should add here that consumers (i.e. callbacks) should refrain from modifying payloads to avoid callback interference. See FAQ line 499.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"Note that states as well as any other event payload attributes are not copied;"},{"line_number":125,"context_line":"subscribers obtain a direct reference to event payload objects (states, metadata,"},{"line_number":126,"context_line":"etc.)."},{"line_number":127,"context_line":""},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"Event objects: DataStoreEvent"}],"source_content_type":"text/x-rst","patch_set":28,"id":"ba5201f7_e360dcd1","line":126,"in_reply_to":"1a6eadb0_d087cbb2","updated":"2017-01-04 19:10:11.000000000","message":"+1","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c7a5f18be55d7661382cf44e7fe7e7fb793ae768","unresolved":false,"context_lines":[{"line_number":138,"context_line":"``states``. For example, an \u0027after update\u0027 event for a resource"},{"line_number":139,"context_line":"may include an original (before update) copy of the resource along with"},{"line_number":140,"context_line":"the final updated resource in the event\u0027s ``states`` that"},{"line_number":141,"context_line":"can be inspected by event consumers who wish to understand whats changing"},{"line_number":142,"context_line":"in the update."},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"These event objects are suitable for the standard before/after database"}],"source_content_type":"text/x-rst","patch_set":28,"id":"1a6eadb0_50373bfe","line":141,"range":{"start_line":141,"start_character":59,"end_line":141,"end_character":64},"updated":"2016-12-16 13:21:48.000000000","message":"typo.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":138,"context_line":"``states``. For example, an \u0027after update\u0027 event for a resource"},{"line_number":139,"context_line":"may include an original (before update) copy of the resource along with"},{"line_number":140,"context_line":"the final updated resource in the event\u0027s ``states`` that"},{"line_number":141,"context_line":"can be inspected by event consumers who wish to understand whats changing"},{"line_number":142,"context_line":"in the update."},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"These event objects are suitable for the standard before/after database"}],"source_content_type":"text/x-rst","patch_set":28,"id":"ba5201f7_43bd28b6","line":141,"range":{"start_line":141,"start_character":59,"end_line":141,"end_character":64},"in_reply_to":"1a6eadb0_50373bfe","updated":"2017-01-04 19:10:11.000000000","message":"Done","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"7aac506e2648d7e9e5024c3a8f0f198df87fb13f","unresolved":false,"context_lines":[{"line_number":149,"context_line":"    # BEFORE_CREATE:"},{"line_number":150,"context_line":"    DataStoreEvent(context,"},{"line_number":151,"context_line":"                   request_body\u003dparams_of_create_request,"},{"line_number":152,"context_line":"                   resource_id\u003did_of_resource,"},{"line_number":153,"context_line":"                   desired_state\u003ddb_resource_to_commit)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    # AFTER_CREATE:"}],"source_content_type":"text/x-rst","patch_set":28,"id":"1a6eadb0_44b3ee97","line":152,"updated":"2016-12-16 21:06:09.000000000","message":"resource_id should be None as you don\u0027t know it during BEFORE_CREATE phase.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":149,"context_line":"    # BEFORE_CREATE:"},{"line_number":150,"context_line":"    DataStoreEvent(context,"},{"line_number":151,"context_line":"                   request_body\u003dparams_of_create_request,"},{"line_number":152,"context_line":"                   resource_id\u003did_of_resource,"},{"line_number":153,"context_line":"                   desired_state\u003ddb_resource_to_commit)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    # AFTER_CREATE:"}],"source_content_type":"text/x-rst","patch_set":28,"id":"ba5201f7_a3d33403","line":152,"in_reply_to":"1a6eadb0_44b3ee97","updated":"2017-01-04 19:10:11.000000000","message":"In some cases its already been created best I can tell. I\u0027ll make this more clear tho.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"808735be497c2349f37034a99f6948adbdabf6c1","unresolved":false,"context_lines":[{"line_number":149,"context_line":"    # BEFORE_CREATE:"},{"line_number":150,"context_line":"    DataStoreEvent(context,"},{"line_number":151,"context_line":"                   request_body\u003dparams_of_create_request,"},{"line_number":152,"context_line":"                   resource_id\u003did_of_resource,"},{"line_number":153,"context_line":"                   desired_state\u003ddb_resource_to_commit)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    # AFTER_CREATE:"}],"source_content_type":"text/x-rst","patch_set":28,"id":"ba5201f7_8dde440f","line":152,"in_reply_to":"ba5201f7_a3d33403","updated":"2017-01-11 23:52:27.000000000","message":"Can you show me an example?","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"7aac506e2648d7e9e5024c3a8f0f198df87fb13f","unresolved":false,"context_lines":[{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    # PRECOMMIT_CREATE:"},{"line_number":162,"context_line":"    DataStoreEvent(context,"},{"line_number":163,"context_line":"                   states\u003d[update_request_body],"},{"line_number":164,"context_line":"                   resource_id\u003did_of_resource,"},{"line_number":165,"context_line":"                   desired_state\u003ddb_resource_to_commit)"},{"line_number":166,"context_line":""}],"source_content_type":"text/x-rst","patch_set":28,"id":"1a6eadb0_e49a3a13","line":163,"updated":"2016-12-16 21:06:09.000000000","message":"this should be None, as the object does not exist yet; the update request body comes on its own","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    # PRECOMMIT_CREATE:"},{"line_number":162,"context_line":"    DataStoreEvent(context,"},{"line_number":163,"context_line":"                   states\u003d[update_request_body],"},{"line_number":164,"context_line":"                   resource_id\u003did_of_resource,"},{"line_number":165,"context_line":"                   desired_state\u003ddb_resource_to_commit)"},{"line_number":166,"context_line":""}],"source_content_type":"text/x-rst","patch_set":28,"id":"ba5201f7_031c00c0","line":163,"in_reply_to":"1a6eadb0_e49a3a13","updated":"2017-01-04 19:10:11.000000000","message":"Done","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"7aac506e2648d7e9e5024c3a8f0f198df87fb13f","unresolved":false,"context_lines":[{"line_number":167,"context_line":"    # BEFORE_DELETE:"},{"line_number":168,"context_line":"    DataStoreEvent(context,"},{"line_number":169,"context_line":"                   states\u003d[resource_to_delete],"},{"line_number":170,"context_line":"                   resource_id\u003did_of_resource)"},{"line_number":171,"context_line":"    # AFTER_DELETE:"},{"line_number":172,"context_line":"    DataStoreEvent(context,"},{"line_number":173,"context_line":"                   states\u003d[copy_of_deleted_resource],"}],"source_content_type":"text/x-rst","patch_set":28,"id":"1a6eadb0_246fd2fc","line":170,"updated":"2016-12-16 21:06:09.000000000","message":"space?","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":167,"context_line":"    # BEFORE_DELETE:"},{"line_number":168,"context_line":"    DataStoreEvent(context,"},{"line_number":169,"context_line":"                   states\u003d[resource_to_delete],"},{"line_number":170,"context_line":"                   resource_id\u003did_of_resource)"},{"line_number":171,"context_line":"    # AFTER_DELETE:"},{"line_number":172,"context_line":"    DataStoreEvent(context,"},{"line_number":173,"context_line":"                   states\u003d[copy_of_deleted_resource],"}],"source_content_type":"text/x-rst","patch_set":28,"id":"ba5201f7_a36fb429","line":170,"in_reply_to":"1a6eadb0_246fd2fc","updated":"2017-01-04 19:10:11.000000000","message":"Done","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"7aac506e2648d7e9e5024c3a8f0f198df87fb13f","unresolved":false,"context_lines":[{"line_number":173,"context_line":"                   states\u003d[copy_of_deleted_resource],"},{"line_number":174,"context_line":"                   resource_id\u003did_of_resource)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    # AFTER_UPDATE:"},{"line_number":177,"context_line":"    DataStoreEvent(context,"},{"line_number":178,"context_line":"                   request_body\u003dbody_of_update_request,"},{"line_number":179,"context_line":"                   states\u003d[original, after_update],"}],"source_content_type":"text/x-rst","patch_set":28,"id":"1a6eadb0_e44f9a8f","line":176,"updated":"2016-12-16 21:06:09.000000000","message":"I think we missed BEFORE_UPDATE here, which is pretty important.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":173,"context_line":"                   states\u003d[copy_of_deleted_resource],"},{"line_number":174,"context_line":"                   resource_id\u003did_of_resource)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    # AFTER_UPDATE:"},{"line_number":177,"context_line":"    DataStoreEvent(context,"},{"line_number":178,"context_line":"                   request_body\u003dbody_of_update_request,"},{"line_number":179,"context_line":"                   states\u003d[original, after_update],"}],"source_content_type":"text/x-rst","patch_set":28,"id":"ba5201f7_239744ed","line":176,"in_reply_to":"1a6eadb0_e44f9a8f","updated":"2017-01-04 19:10:11.000000000","message":"Done","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c7a5f18be55d7661382cf44e7fe7e7fb793ae768","unresolved":false,"context_lines":[{"line_number":144,"context_line":"These event objects are suitable for the standard before/after database"},{"line_number":145,"context_line":"events we have today as well as any that might arise in the future."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"Example usage::"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    # BEFORE_CREATE:"},{"line_number":150,"context_line":"    DataStoreEvent(context,"},{"line_number":151,"context_line":"                   request_body\u003dparams_of_create_request,"},{"line_number":152,"context_line":"                   resource_id\u003did_of_resource,"},{"line_number":153,"context_line":"                   desired_state\u003ddb_resource_to_commit)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    # AFTER_CREATE:"},{"line_number":156,"context_line":"    DataStoreEvent(context,"},{"line_number":157,"context_line":"                   request_body\u003dparams_of_create_request,"},{"line_number":158,"context_line":"                   states\u003d[my_new_copy_after_create],"},{"line_number":159,"context_line":"                   resource_id\u003did_of_resource)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    # PRECOMMIT_CREATE:"},{"line_number":162,"context_line":"    DataStoreEvent(context,"},{"line_number":163,"context_line":"                   states\u003d[update_request_body],"},{"line_number":164,"context_line":"                   resource_id\u003did_of_resource,"},{"line_number":165,"context_line":"                   desired_state\u003ddb_resource_to_commit)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    # BEFORE_DELETE:"},{"line_number":168,"context_line":"    DataStoreEvent(context,"},{"line_number":169,"context_line":"                   states\u003d[resource_to_delete],"},{"line_number":170,"context_line":"                   resource_id\u003did_of_resource)"},{"line_number":171,"context_line":"    # AFTER_DELETE:"},{"line_number":172,"context_line":"    DataStoreEvent(context,"},{"line_number":173,"context_line":"                   states\u003d[copy_of_deleted_resource],"},{"line_number":174,"context_line":"                   resource_id\u003did_of_resource)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    # AFTER_UPDATE:"},{"line_number":177,"context_line":"    DataStoreEvent(context,"},{"line_number":178,"context_line":"                   request_body\u003dbody_of_update_request,"},{"line_number":179,"context_line":"                   states\u003d[original, after_update],"},{"line_number":180,"context_line":"                   resource_id\u003did_of_resource)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"Event objects: APIEvent"},{"line_number":184,"context_line":"~~~~~~~~~~~~~~~~~~~~~~~"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"For API related callbacks, the ``APIEvent`` object can be used to transport"},{"line_number":187,"context_line":"a callback payload. For example, the REST API resource controller can"},{"line_number":188,"context_line":"use API events for pre/post operation callbacks."},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"In addition to transporting all the attributes of ``BaseEvent``, the"},{"line_number":191,"context_line":"``APIEvent`` object also includes the ``action``, ``method_name`` and"},{"line_number":192,"context_line":"``collection_name`` payload attributes permitting API components to"},{"line_number":193,"context_line":"pass along API controller specifics."},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"Sample usage::"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    # BEFORE_RESPONSE for create:"},{"line_number":198,"context_line":"    APIEvent(context, notifier_method, action,"},{"line_number":199,"context_line":"             request_body\u003dreq_body,"},{"line_number":200,"context_line":"             states\u003d[create_result],"},{"line_number":201,"context_line":"             collection_name\u003dself._collection_name)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    # BEFORE_RESPONSE for delete:"},{"line_number":204,"context_line":"    APIEvent(context, notifier_method, action,"},{"line_number":205,"context_line":"             states\u003d[copy_of_deleted_resource],"},{"line_number":206,"context_line":"             collection_name\u003dself._collection_name)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    # BEFORE_RESPONSE for update:"},{"line_number":209,"context_line":"    APIEvent(context, notifier_method, action,"},{"line_number":210,"context_line":"             states\u003d[original, updated],"},{"line_number":211,"context_line":"             collection_name\u003dself._collection_name)"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"Subscribing to events"}],"source_content_type":"text/x-rst","patch_set":28,"id":"1a6eadb0_8b0b6623","line":211,"range":{"start_line":147,"start_character":0,"end_line":211,"end_character":51},"updated":"2016-12-16 13:21:48.000000000","message":"I am going to get back to this after I reviewed the actual code and have it simmer a bit in my head.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"5dc989fa28199fa16ead2045067ebb5f416e4d24","unresolved":false,"context_lines":[{"line_number":144,"context_line":"These event objects are suitable for the standard before/after database"},{"line_number":145,"context_line":"events we have today as well as any that might arise in the future."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"Example usage::"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    # BEFORE_CREATE:"},{"line_number":150,"context_line":"    DataStoreEvent(context,"},{"line_number":151,"context_line":"                   request_body\u003dparams_of_create_request,"},{"line_number":152,"context_line":"                   resource_id\u003did_of_resource,"},{"line_number":153,"context_line":"                   desired_state\u003ddb_resource_to_commit)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    # AFTER_CREATE:"},{"line_number":156,"context_line":"    DataStoreEvent(context,"},{"line_number":157,"context_line":"                   request_body\u003dparams_of_create_request,"},{"line_number":158,"context_line":"                   states\u003d[my_new_copy_after_create],"},{"line_number":159,"context_line":"                   resource_id\u003did_of_resource)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    # PRECOMMIT_CREATE:"},{"line_number":162,"context_line":"    DataStoreEvent(context,"},{"line_number":163,"context_line":"                   states\u003d[update_request_body],"},{"line_number":164,"context_line":"                   resource_id\u003did_of_resource,"},{"line_number":165,"context_line":"                   desired_state\u003ddb_resource_to_commit)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    # BEFORE_DELETE:"},{"line_number":168,"context_line":"    DataStoreEvent(context,"},{"line_number":169,"context_line":"                   states\u003d[resource_to_delete],"},{"line_number":170,"context_line":"                   resource_id\u003did_of_resource)"},{"line_number":171,"context_line":"    # AFTER_DELETE:"},{"line_number":172,"context_line":"    DataStoreEvent(context,"},{"line_number":173,"context_line":"                   states\u003d[copy_of_deleted_resource],"},{"line_number":174,"context_line":"                   resource_id\u003did_of_resource)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    # AFTER_UPDATE:"},{"line_number":177,"context_line":"    DataStoreEvent(context,"},{"line_number":178,"context_line":"                   request_body\u003dbody_of_update_request,"},{"line_number":179,"context_line":"                   states\u003d[original, after_update],"},{"line_number":180,"context_line":"                   resource_id\u003did_of_resource)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"Event objects: APIEvent"},{"line_number":184,"context_line":"~~~~~~~~~~~~~~~~~~~~~~~"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"For API related callbacks, the ``APIEvent`` object can be used to transport"},{"line_number":187,"context_line":"a callback payload. For example, the REST API resource controller can"},{"line_number":188,"context_line":"use API events for pre/post operation callbacks."},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"In addition to transporting all the attributes of ``BaseEvent``, the"},{"line_number":191,"context_line":"``APIEvent`` object also includes the ``action``, ``method_name`` and"},{"line_number":192,"context_line":"``collection_name`` payload attributes permitting API components to"},{"line_number":193,"context_line":"pass along API controller specifics."},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"Sample usage::"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    # BEFORE_RESPONSE for create:"},{"line_number":198,"context_line":"    APIEvent(context, notifier_method, action,"},{"line_number":199,"context_line":"             request_body\u003dreq_body,"},{"line_number":200,"context_line":"             states\u003d[create_result],"},{"line_number":201,"context_line":"             collection_name\u003dself._collection_name)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    # BEFORE_RESPONSE for delete:"},{"line_number":204,"context_line":"    APIEvent(context, notifier_method, action,"},{"line_number":205,"context_line":"             states\u003d[copy_of_deleted_resource],"},{"line_number":206,"context_line":"             collection_name\u003dself._collection_name)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    # BEFORE_RESPONSE for update:"},{"line_number":209,"context_line":"    APIEvent(context, notifier_method, action,"},{"line_number":210,"context_line":"             states\u003d[original, updated],"},{"line_number":211,"context_line":"             collection_name\u003dself._collection_name)"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"Subscribing to events"}],"source_content_type":"text/x-rst","patch_set":28,"id":"1a6eadb0_a4876cb3","line":211,"range":{"start_line":147,"start_character":0,"end_line":211,"end_character":51},"in_reply_to":"1a6eadb0_8b0b6623","updated":"2016-12-16 16:32:38.000000000","message":"Please do; this usage is the most critical part of the patch IMO so lets take the time to get it right.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c7a5f18be55d7661382cf44e7fe7e7fb793ae768","unresolved":false,"context_lines":[{"line_number":252,"context_line":"  from neutron_lib.callbacks import registry"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"  def callback1(resource, event, trigger, payload):"},{"line_number":256,"context_line":"      print(\u0027Callback1 called by trigger: \u0027, trigger)"},{"line_number":257,"context_line":"      print(\u0027payload: \u0027, payload)"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-rst","patch_set":28,"id":"1a6eadb0_f0c76761","line":255,"updated":"2016-12-16 13:21:48.000000000","message":"rather than replace, perhaps we can show an example with both usages in place?","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":252,"context_line":"  from neutron_lib.callbacks import registry"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"  def callback1(resource, event, trigger, payload):"},{"line_number":256,"context_line":"      print(\u0027Callback1 called by trigger: \u0027, trigger)"},{"line_number":257,"context_line":"      print(\u0027payload: \u0027, payload)"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-rst","patch_set":28,"id":"ba5201f7_86ae3e96","line":255,"in_reply_to":"1a6eadb0_f0c76761","updated":"2017-01-04 19:10:11.000000000","message":"Might that not encourage continued use of kwargs?","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c7a5f18be55d7661382cf44e7fe7e7fb793ae768","unresolved":false,"context_lines":[{"line_number":340,"context_line":""},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"  def do_notify():"},{"line_number":343,"context_line":"      registry.publish(resources.ROUTER, events.BEFORE_CREATE, do_notify)"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"  print(\u0027Notifying...\u0027)"},{"line_number":346,"context_line":"  try:"}],"source_content_type":"text/x-rst","patch_set":28,"id":"1a6eadb0_70afd77c","line":343,"updated":"2016-12-16 13:21:48.000000000","message":"you sure this runs correctly?","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":340,"context_line":""},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"  def do_notify():"},{"line_number":343,"context_line":"      registry.publish(resources.ROUTER, events.BEFORE_CREATE, do_notify)"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"  print(\u0027Notifying...\u0027)"},{"line_number":346,"context_line":"  try:"}],"source_content_type":"text/x-rst","patch_set":28,"id":"ba5201f7_a628a2e3","line":343,"in_reply_to":"1a6eadb0_70afd77c","updated":"2017-01-04 19:10:11.000000000","message":"Done","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c7a5f18be55d7661382cf44e7fe7e7fb793ae768","unresolved":false,"context_lines":[{"line_number":411,"context_line":""},{"line_number":412,"context_line":"  def do_notify():"},{"line_number":413,"context_line":"      print(\u0027Notifying...\u0027)"},{"line_number":414,"context_line":"      registry.publish(resources.ROUTER, events.BEFORE_READ, do_notify)"},{"line_number":415,"context_line":"      registry.publish(resources.ROUTER, events.BEFORE_CREATE, do_notify)"},{"line_number":416,"context_line":"      registry.publish(resources.ROUTER, events.AFTER_DELETE, do_notify)"},{"line_number":417,"context_line":"      registry.publish(resources.PORT, events.BEFORE_UPDATE, do_notify)"}],"source_content_type":"text/x-rst","patch_set":28,"id":"1a6eadb0_30b9dfcc","line":414,"range":{"start_line":414,"start_character":36,"end_line":414,"end_character":37},"updated":"2016-12-16 13:21:48.000000000","message":"you sure this runs correctly? I don\u0027t think it does.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":411,"context_line":""},{"line_number":412,"context_line":"  def do_notify():"},{"line_number":413,"context_line":"      print(\u0027Notifying...\u0027)"},{"line_number":414,"context_line":"      registry.publish(resources.ROUTER, events.BEFORE_READ, do_notify)"},{"line_number":415,"context_line":"      registry.publish(resources.ROUTER, events.BEFORE_CREATE, do_notify)"},{"line_number":416,"context_line":"      registry.publish(resources.ROUTER, events.AFTER_DELETE, do_notify)"},{"line_number":417,"context_line":"      registry.publish(resources.PORT, events.BEFORE_UPDATE, do_notify)"}],"source_content_type":"text/x-rst","patch_set":28,"id":"ba5201f7_a656e259","line":414,"range":{"start_line":414,"start_character":36,"end_line":414,"end_character":37},"in_reply_to":"1a6eadb0_04af367d","updated":"2017-01-04 19:10:11.000000000","message":"You are right; it\u0027s broken.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"7aac506e2648d7e9e5024c3a8f0f198df87fb13f","unresolved":false,"context_lines":[{"line_number":411,"context_line":""},{"line_number":412,"context_line":"  def do_notify():"},{"line_number":413,"context_line":"      print(\u0027Notifying...\u0027)"},{"line_number":414,"context_line":"      registry.publish(resources.ROUTER, events.BEFORE_READ, do_notify)"},{"line_number":415,"context_line":"      registry.publish(resources.ROUTER, events.BEFORE_CREATE, do_notify)"},{"line_number":416,"context_line":"      registry.publish(resources.ROUTER, events.AFTER_DELETE, do_notify)"},{"line_number":417,"context_line":"      registry.publish(resources.PORT, events.BEFORE_UPDATE, do_notify)"}],"source_content_type":"text/x-rst","patch_set":28,"id":"1a6eadb0_04af367d","line":414,"range":{"start_line":414,"start_character":36,"end_line":414,"end_character":37},"in_reply_to":"1a6eadb0_30b9dfcc","updated":"2016-12-16 21:06:09.000000000","message":"discard, I see you added a test ;)","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c7a5f18be55d7661382cf44e7fe7e7fb793ae768","unresolved":false,"context_lines":[{"line_number":457,"context_line":"----------------------"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":"A python `fixture \u003chttps://pypi.python.org/pypi/fixtures\u003e`_ is provided for implementations that need to"},{"line_number":460,"context_line":"unit test and mock the callback registry manager. Consumers can use ``neutron_lib.tests.unit.callbacks.base.RegistryFixture``"},{"line_number":461,"context_line":"in their unit test classes with the ``useFixture()`` method passing along a ``RegistryFixture`` instance."},{"line_number":462,"context_line":"If mocking of the actual singleton callback manager is necessary, consumers can pass a value to"},{"line_number":463,"context_line":"with the ``callback_manager`` kwarg. For example::"}],"source_content_type":"text/x-rst","patch_set":28,"id":"1a6eadb0_f0da0716","line":460,"range":{"start_line":460,"start_character":19,"end_line":460,"end_character":48},"updated":"2016-12-16 13:21:48.000000000","message":"I\u0027d replace this with neutron_lib.registry. The manager itself is ok, it\u0027s the registry that relies on a singleton instance.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":457,"context_line":"----------------------"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":"A python `fixture \u003chttps://pypi.python.org/pypi/fixtures\u003e`_ is provided for implementations that need to"},{"line_number":460,"context_line":"unit test and mock the callback registry manager. Consumers can use ``neutron_lib.tests.unit.callbacks.base.RegistryFixture``"},{"line_number":461,"context_line":"in their unit test classes with the ``useFixture()`` method passing along a ``RegistryFixture`` instance."},{"line_number":462,"context_line":"If mocking of the actual singleton callback manager is necessary, consumers can pass a value to"},{"line_number":463,"context_line":"with the ``callback_manager`` kwarg. For example::"}],"source_content_type":"text/x-rst","patch_set":28,"id":"ba5201f7_c601263a","line":460,"range":{"start_line":460,"start_character":19,"end_line":460,"end_character":48},"in_reply_to":"1a6eadb0_f0da0716","updated":"2017-01-04 19:10:11.000000000","message":"Done","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c7a5f18be55d7661382cf44e7fe7e7fb793ae768","unresolved":false,"context_lines":[{"line_number":460,"context_line":"unit test and mock the callback registry manager. Consumers can use ``neutron_lib.tests.unit.callbacks.base.RegistryFixture``"},{"line_number":461,"context_line":"in their unit test classes with the ``useFixture()`` method passing along a ``RegistryFixture`` instance."},{"line_number":462,"context_line":"If mocking of the actual singleton callback manager is necessary, consumers can pass a value to"},{"line_number":463,"context_line":"with the ``callback_manager`` kwarg. For example::"},{"line_number":464,"context_line":""},{"line_number":465,"context_line":"    mocked_mgr \u003d mock.Mock()"},{"line_number":466,"context_line":"    registry_fixture \u003d base.RegistryFixture(callback_manager\u003dmocked_mgr)"}],"source_content_type":"text/x-rst","patch_set":28,"id":"1a6eadb0_f0f12796","line":463,"updated":"2016-12-16 13:21:48.000000000","message":"We should reference here how the fixture is used by neutron, where this need currently exists.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":460,"context_line":"unit test and mock the callback registry manager. Consumers can use ``neutron_lib.tests.unit.callbacks.base.RegistryFixture``"},{"line_number":461,"context_line":"in their unit test classes with the ``useFixture()`` method passing along a ``RegistryFixture`` instance."},{"line_number":462,"context_line":"If mocking of the actual singleton callback manager is necessary, consumers can pass a value to"},{"line_number":463,"context_line":"with the ``callback_manager`` kwarg. For example::"},{"line_number":464,"context_line":""},{"line_number":465,"context_line":"    mocked_mgr \u003d mock.Mock()"},{"line_number":466,"context_line":"    registry_fixture \u003d base.RegistryFixture(callback_manager\u003dmocked_mgr)"}],"source_content_type":"text/x-rst","patch_set":28,"id":"ba5201f7_261af27d","line":463,"in_reply_to":"1a6eadb0_f0f12796","updated":"2017-01-04 19:10:11.000000000","message":"Done","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c7a5f18be55d7661382cf44e7fe7e7fb793ae768","unresolved":false,"context_lines":[{"line_number":462,"context_line":"If mocking of the actual singleton callback manager is necessary, consumers can pass a value to"},{"line_number":463,"context_line":"with the ``callback_manager`` kwarg. For example::"},{"line_number":464,"context_line":""},{"line_number":465,"context_line":"    mocked_mgr \u003d mock.Mock()"},{"line_number":466,"context_line":"    registry_fixture \u003d base.RegistryFixture(callback_manager\u003dmocked_mgr)"},{"line_number":467,"context_line":"    self.useFixture(registry_fixture)"},{"line_number":468,"context_line":"    registry.subscribe(my_callback, \u0027my-resource\u0027, \u0027my-event\u0027)"}],"source_content_type":"text/x-rst","patch_set":28,"id":"1a6eadb0_b0296fe8","line":465,"updated":"2016-12-16 13:21:48.000000000","message":"shouldn\u0027t this be an actual instance of a registry, so that we can provide isolation when dealing with neutron_lib.registry directly in testing? I suppose you\u0027re using it just to exemplify here right? Maybe a note (or as suggested above providing an actual example of it) might suffice to clear my confusion.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":462,"context_line":"If mocking of the actual singleton callback manager is necessary, consumers can pass a value to"},{"line_number":463,"context_line":"with the ``callback_manager`` kwarg. For example::"},{"line_number":464,"context_line":""},{"line_number":465,"context_line":"    mocked_mgr \u003d mock.Mock()"},{"line_number":466,"context_line":"    registry_fixture \u003d base.RegistryFixture(callback_manager\u003dmocked_mgr)"},{"line_number":467,"context_line":"    self.useFixture(registry_fixture)"},{"line_number":468,"context_line":"    registry.subscribe(my_callback, \u0027my-resource\u0027, \u0027my-event\u0027)"}],"source_content_type":"text/x-rst","patch_set":28,"id":"ba5201f7_29d2c55c","line":465,"in_reply_to":"1a6eadb0_b0296fe8","updated":"2017-01-04 19:10:11.000000000","message":"Done","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c7a5f18be55d7661382cf44e7fe7e7fb793ae768","unresolved":false,"context_lines":[{"line_number":554,"context_line":"      registry.subscribe(nested_subscribe, resources.ROUTER, events.BEFORE_CREATE)"},{"line_number":555,"context_line":""},{"line_number":556,"context_line":"      registry.publish(resources.ROUTER, events.BEFORE_CREATE,"},{"line_number":557,"context_line":"                       do_notify, events.BaseEvent(None))"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":""},{"line_number":560,"context_line":"  print(\u0027Notifying...\u0027)"}],"source_content_type":"text/x-rst","patch_set":28,"id":"1a6eadb0_f04da7c4","line":557,"updated":"2016-12-16 13:21:48.000000000","message":"is this ok?","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":554,"context_line":"      registry.subscribe(nested_subscribe, resources.ROUTER, events.BEFORE_CREATE)"},{"line_number":555,"context_line":""},{"line_number":556,"context_line":"      registry.publish(resources.ROUTER, events.BEFORE_CREATE,"},{"line_number":557,"context_line":"                       do_notify, events.BaseEvent(None))"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":""},{"line_number":560,"context_line":"  print(\u0027Notifying...\u0027)"}],"source_content_type":"text/x-rst","patch_set":28,"id":"ba5201f7_8912d107","line":557,"in_reply_to":"1a6eadb0_f04da7c4","updated":"2017-01-04 19:10:11.000000000","message":"It runs","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"}],"neutron_lib/_callbacks/events.py":[{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"a189ab75f2fbeafeb664b09c9694468a75e91247","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"dada55a8_19f8f248","updated":"2016-07-25 16:48:20.000000000","message":"While the current code uses @property with a fairly immutable approach, we could also just make the attrs public. e.g.\n\n\ndef __init__(self, context, event_owner\u003dNone...):\n    self.context \u003d context\n    self.event_owner \u003d event_owner\n    # ... etc.\n\n\nThis would collapse the event classes substantially. However I choose the @property approach b/c its nice to see the docstrings in IDEs like pycharm and also I tend to take a defensive approach.\n\n\nIf folks prefer public attrs, I\u0027m fine with that and will rework this patch.","commit_id":"3d0b621f617363ff75ed5636d05726985c3357f1"}],"neutron_lib/_callbacks/manager.py":[{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"b020bafa5ff198661b98d32a59adfde36396e688","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            del self._index[callback_id]"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    @db_utils.reraise_as_retryrequest"},{"line_number":111,"context_line":"    def safe_notify(self, resource, event, trigger, payload):"},{"line_number":112,"context_line":"        \"\"\"Sends a notification with the said payload."},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        If exceptions are raised during this notification, the respective"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a8bc5a2_f2582e8d","line":111,"updated":"2016-09-27 20:14:57.000000000","message":"I\u0027m not quite clear why safe_notify is \"safer\" than notify, given that the two both have the @db_utils.reraise_as_retryrequest decorator.  Is it just because the payload is not in kwargs and is type checked?\n\nAlso, since safe_notify - decorated with @db_utils.reraise_as_retryrequest - calls notify - also decorated with @db_utils.reraise_as_retryrequest - are both decorations necessary?","commit_id":"7dcd60e8a38dfa91daa5ad3b7da399dd5bc63263"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d6d56a0e8c03d8cd567f859e26603c297505e54b","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            del self._index[callback_id]"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    @db_utils.reraise_as_retryrequest"},{"line_number":111,"context_line":"    def safe_notify(self, resource, event, trigger, payload):"},{"line_number":112,"context_line":"        \"\"\"Sends a notification with the said payload."},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        If exceptions are raised during this notification, the respective"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a98d1f4_00ec148e","line":111,"in_reply_to":"5a8bc5a2_f2582e8d","updated":"2016-09-29 17:00:08.000000000","message":"Both good points that I\u0027ve addressed in PS8. In PS8 I\u0027ve removed safe_notify() and instead updated notify() to support payload while at the same time deprecating the use of **kwargs. Let me know what you think.\n\nThanks","commit_id":"7dcd60e8a38dfa91daa5ad3b7da399dd5bc63263"}],"neutron_lib/_callbacks/registry.py":[{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"f4c818337bbc820c9cfce2182813ef5d7151a193","unresolved":false,"context_lines":[{"line_number":44,"context_line":"def notify(resource, event, trigger, payload\u003dNone, **kwargs):"},{"line_number":45,"context_line":"    _get_callback_manager().notify(resource, event, trigger,"},{"line_number":46,"context_line":"                                   payload, **kwargs)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"def clear():"},{"line_number":50,"context_line":"    _get_callback_manager().clear()"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a98d1f4_521c2713","line":47,"updated":"2016-09-29 19:30:02.000000000","message":"Extraneous line kills pep8.","commit_id":"58742f20ff648110b23391611ccc99eb89362b02"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"e22ba95a2c3fc0c6eef97b8daf130fd3aae0ac78","unresolved":false,"context_lines":[{"line_number":44,"context_line":"def notify(resource, event, trigger, payload\u003dNone, **kwargs):"},{"line_number":45,"context_line":"    _get_callback_manager().notify(resource, event, trigger,"},{"line_number":46,"context_line":"                                   payload, **kwargs)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"def clear():"},{"line_number":50,"context_line":"    _get_callback_manager().clear()"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa6399be_7dc1532e","line":47,"in_reply_to":"3a98d1f4_521c2713","updated":"2016-10-10 19:33:57.000000000","message":"Darn you pep8!","commit_id":"58742f20ff648110b23391611ccc99eb89362b02"}],"neutron_lib/callbacks/events.py":[{"author":{"_account_id":20363,"name":"Adit Sarfaty","email":"asarfaty@vmware.com","username":"asarfaty"},"change_message_id":"3e02dae04d179af8483ab8df2eefbe7911074019","unresolved":false,"context_lines":[{"line_number":30,"context_line":"AFTER_REQUEST \u003d \u0027after_request\u0027"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"# String literals representing events associated to process operations"},{"line_number":33,"context_line":"BEFORE_INIT \u003d \u0027before_init\u0027"},{"line_number":34,"context_line":"AFTER_INIT \u003d \u0027after_init\u0027"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"# String literals representing events associated to error conditions"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a629dbe_f1b25193","line":33,"updated":"2016-11-10 07:22:48.000000000","message":"BEFORE_SPAWN event should also be added here.\nIt was added to neutron in https://review.openstack.org/#/c/337080/. should we do it in a separate patch?","commit_id":"56a788581f56d8537dac7e190f03f9258bd0363f"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"0b9988a3b4000940e745859b2078db7abea1f219","unresolved":false,"context_lines":[{"line_number":30,"context_line":"AFTER_REQUEST \u003d \u0027after_request\u0027"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"# String literals representing events associated to process operations"},{"line_number":33,"context_line":"BEFORE_INIT \u003d \u0027before_init\u0027"},{"line_number":34,"context_line":"AFTER_INIT \u003d \u0027after_init\u0027"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"# String literals representing events associated to error conditions"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a629dbe_408120fa","line":33,"in_reply_to":"9a629dbe_f1b25193","updated":"2016-11-11 16:35:58.000000000","message":"Thanks for pointing that out. PS11 should include these updates.","commit_id":"56a788581f56d8537dac7e190f03f9258bd0363f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"ef78946fca687e6200d639ebe7ab21658af2055e","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        # an iterable of states for the resource from the newest to the oldest"},{"line_number":72,"context_line":"        # for example db states or api request/response"},{"line_number":73,"context_line":"        self.states \u003d list(states) if states else list()"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        # a unique ID for the event resource"},{"line_number":76,"context_line":"        self.resource_id \u003d resource_id"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a77a97e_9962bf15","line":73,"updated":"2016-11-15 17:42:52.000000000","message":"If you are creating here to avoid shallow copy, it\u0027s probably better to use deepcopy here as well as 66.","commit_id":"449aa360c6f2f260481416939a34c9a3d61acc55"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"6a319a2100d3731c923a5e3c45f36cab54a60a59","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        # an iterable of states for the resource from the newest to the oldest"},{"line_number":72,"context_line":"        # for example db states or api request/response"},{"line_number":73,"context_line":"        self.states \u003d list(states) if states else list()"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        # a unique ID for the event resource"},{"line_number":76,"context_line":"        self.resource_id \u003d resource_id"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a77a97e_623254f3","line":73,"in_reply_to":"7a77a97e_9962bf15","updated":"2016-11-15 18:02:00.000000000","message":"Good point","commit_id":"449aa360c6f2f260481416939a34c9a3d61acc55"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"ef78946fca687e6200d639ebe7ab21658af2055e","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        self.resource_id \u003d resource_id"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    @property"},{"line_number":79,"context_line":"    def has_changes(self):"},{"line_number":80,"context_line":"        \"\"\"Determines if this event has changes."},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        :returns: True if this event has states, otherwise False."}],"source_content_type":"text/x-python","patch_set":12,"id":"7a77a97e_7c3151ec","line":79,"range":{"start_line":79,"start_character":8,"end_line":79,"end_character":19},"updated":"2016-11-15 17:42:52.000000000","message":"This property\u0027s name is misleading. Might as well call it has_states","commit_id":"449aa360c6f2f260481416939a34c9a3d61acc55"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"6a319a2100d3731c923a5e3c45f36cab54a60a59","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        self.resource_id \u003d resource_id"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    @property"},{"line_number":79,"context_line":"    def has_changes(self):"},{"line_number":80,"context_line":"        \"\"\"Determines if this event has changes."},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        :returns: True if this event has states, otherwise False."}],"source_content_type":"text/x-python","patch_set":12,"id":"7a77a97e_a252ac11","line":79,"range":{"start_line":79,"start_character":8,"end_line":79,"end_character":19},"in_reply_to":"7a77a97e_7c3151ec","updated":"2016-11-15 18:02:00.000000000","message":"Done","commit_id":"449aa360c6f2f260481416939a34c9a3d61acc55"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"ef78946fca687e6200d639ebe7ab21658af2055e","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        Can be used for signal events with no payload:"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        registry.notify(resources.PROCESS, events.AFTER_INIT,"},{"line_number":93,"context_line":"                        self.start, BaseEvent.new_empty_event())"},{"line_number":94,"context_line":"        \"\"\""},{"line_number":95,"context_line":"        return cls(None)"},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7a77a97e_7c48715c","line":93,"updated":"2016-11-15 17:42:52.000000000","message":"why can\u0027t we simply pass None? This is too verbose.","commit_id":"449aa360c6f2f260481416939a34c9a3d61acc55"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"6a319a2100d3731c923a5e3c45f36cab54a60a59","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        Can be used for signal events with no payload:"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        registry.notify(resources.PROCESS, events.AFTER_INIT,"},{"line_number":93,"context_line":"                        self.start, BaseEvent.new_empty_event())"},{"line_number":94,"context_line":"        \"\"\""},{"line_number":95,"context_line":"        return cls(None)"},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7a77a97e_0269a0be","line":93,"in_reply_to":"7a77a97e_7c48715c","updated":"2016-11-15 18:02:00.000000000","message":"Fine with me.","commit_id":"449aa360c6f2f260481416939a34c9a3d61acc55"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"ef78946fca687e6200d639ebe7ab21658af2055e","unresolved":false,"context_lines":[{"line_number":98,"context_line":"class DataStoreEvent(BaseEvent):"},{"line_number":99,"context_line":"    \"\"\"The payload for data store events.\"\"\""},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def __init__(self, context, resource_id\u003dNone,"},{"line_number":102,"context_line":"                 resource_states\u003dNone, desired_state\u003dNone,"},{"line_number":103,"context_line":"                 request_body\u003dNone,"},{"line_number":104,"context_line":"                 event_owner\u003dNone,"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a77a97e_7c5f910e","line":101,"updated":"2016-11-15 17:42:52.000000000","message":"can we please keep the order of the named parameters consistent with the base class?","commit_id":"449aa360c6f2f260481416939a34c9a3d61acc55"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"6a319a2100d3731c923a5e3c45f36cab54a60a59","unresolved":false,"context_lines":[{"line_number":98,"context_line":"class DataStoreEvent(BaseEvent):"},{"line_number":99,"context_line":"    \"\"\"The payload for data store events.\"\"\""},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def __init__(self, context, resource_id\u003dNone,"},{"line_number":102,"context_line":"                 resource_states\u003dNone, desired_state\u003dNone,"},{"line_number":103,"context_line":"                 request_body\u003dNone,"},{"line_number":104,"context_line":"                 event_owner\u003dNone,"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a77a97e_828f7022","line":101,"in_reply_to":"7a77a97e_7c5f910e","updated":"2016-11-15 18:02:00.000000000","message":"Done","commit_id":"449aa360c6f2f260481416939a34c9a3d61acc55"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"ef78946fca687e6200d639ebe7ab21658af2055e","unresolved":false,"context_lines":[{"line_number":142,"context_line":"class APIEvent(BaseEvent):"},{"line_number":143,"context_line":"    \"\"\"The payload for API events.\"\"\""},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    def __init__(self, context, method_name, action,"},{"line_number":146,"context_line":"                 event_owner\u003dNone, metadata\u003dNone, obj_states\u003dNone,"},{"line_number":147,"context_line":"                 request_body\u003dNone):"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7a77a97e_dca4250a","line":145,"updated":"2016-11-15 17:42:52.000000000","message":"ditto","commit_id":"449aa360c6f2f260481416939a34c9a3d61acc55"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"6a319a2100d3731c923a5e3c45f36cab54a60a59","unresolved":false,"context_lines":[{"line_number":142,"context_line":"class APIEvent(BaseEvent):"},{"line_number":143,"context_line":"    \"\"\"The payload for API events.\"\"\""},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    def __init__(self, context, method_name, action,"},{"line_number":146,"context_line":"                 event_owner\u003dNone, metadata\u003dNone, obj_states\u003dNone,"},{"line_number":147,"context_line":"                 request_body\u003dNone):"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7a77a97e_a2946c37","line":145,"in_reply_to":"7a77a97e_dca4250a","updated":"2016-11-15 18:02:00.000000000","message":"Done","commit_id":"449aa360c6f2f260481416939a34c9a3d61acc55"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"2d3f485ce79efa6a14419a926d319af91c079b02","unresolved":false,"context_lines":[{"line_number":45,"context_line":"PRECOMMIT \u003d \u0027precommit_\u0027"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class BaseEvent(object):"},{"line_number":49,"context_line":"    \"\"\"Base event object."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    This class is intended to be the super class for all events. As such, it"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a77a97e_1d49348c","line":48,"range":{"start_line":48,"start_character":0,"end_line":48,"end_character":24},"updated":"2016-11-14 22:10:01.000000000","message":"There was a comment on PS13 [1] regarding the need for a BaseEvent class here.\n\n\nThe intent of BaseEvent is to make development of new events more explicit/easier by providing a common base to subclass. This topic is open for discussion if you have additional thoughts.\n \n\n[1] https://review.openstack.org/#/c/346554/13/neutron_lib/callbacks/manager.py@136","commit_id":"9a0328df5b682d0c56d864f8a37621d8233dd72c"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"e70551b70f2cb2224001eeccee0c173d48c4efc3","unresolved":false,"context_lines":[{"line_number":45,"context_line":"PRECOMMIT \u003d \u0027precommit_\u0027"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class BaseEvent(object):"},{"line_number":49,"context_line":"    \"\"\"Base event object."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    This class is intended to be the super class for all events. As such, it"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a77a97e_13b5a3cc","line":48,"range":{"start_line":48,"start_character":0,"end_line":48,"end_character":24},"in_reply_to":"7a77a97e_1d49348c","updated":"2016-11-14 23:12:13.000000000","message":"I think this is useful, if for no other reason than to avoid duplicating some of these methods in the APIEvent and DataStoreEvent classes. I could imagine other types of events (say an RPCEvent as an example) which could extend BaseEvent. I\u0027m not opposed to having a BaseEvent.","commit_id":"9a0328df5b682d0c56d864f8a37621d8233dd72c"},{"author":{"_account_id":9423,"name":"Roey Chen","email":"roeyc@vmware.com","username":"roeyc"},"change_message_id":"97d8932968bf3f43a9807257fccd596038178339","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    @property"},{"line_number":126,"context_line":"    def is_persisted(self):"},{"line_number":127,"context_line":"        \"\"\"Determine if the resource for this even is persisted."},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        :returns: True if this event is persisted, otherwise False."},{"line_number":130,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":14,"id":"7a77a97e_efad7d32","line":127,"range":{"start_line":127,"start_character":46,"end_line":127,"end_character":50},"updated":"2016-11-15 13:11:03.000000000","message":"event","commit_id":"9a0328df5b682d0c56d864f8a37621d8233dd72c"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"144ca708285bcd73403214f719480c85acb87b28","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    @property"},{"line_number":126,"context_line":"    def is_persisted(self):"},{"line_number":127,"context_line":"        \"\"\"Determine if the resource for this even is persisted."},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        :returns: True if this event is persisted, otherwise False."},{"line_number":130,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":14,"id":"7a77a97e_ab5e1243","line":127,"range":{"start_line":127,"start_character":46,"end_line":127,"end_character":50},"in_reply_to":"7a77a97e_efad7d32","updated":"2016-11-15 15:35:56.000000000","message":"Done","commit_id":"9a0328df5b682d0c56d864f8a37621d8233dd72c"},{"author":{"_account_id":9423,"name":"Roey Chen","email":"roeyc@vmware.com","username":"roeyc"},"change_message_id":"97d8932968bf3f43a9807257fccd596038178339","unresolved":false,"context_lines":[{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        :returns: The 1st object state if set, otherwise None."},{"line_number":162,"context_line":"        \"\"\""},{"line_number":163,"context_line":"        return list(self.states)[0] if len(self.states) else None"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    @property"},{"line_number":166,"context_line":"    def updated_object(self):"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a77a97e_6157c102","line":163,"range":{"start_line":163,"start_character":15,"end_line":163,"end_character":32},"updated":"2016-11-15 13:11:03.000000000","message":"isn\u0027t self.states already a list?","commit_id":"9a0328df5b682d0c56d864f8a37621d8233dd72c"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"144ca708285bcd73403214f719480c85acb87b28","unresolved":false,"context_lines":[{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        :returns: The 1st object state if set, otherwise None."},{"line_number":162,"context_line":"        \"\"\""},{"line_number":163,"context_line":"        return list(self.states)[0] if len(self.states) else None"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    @property"},{"line_number":166,"context_line":"    def updated_object(self):"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a77a97e_0b7f06ab","line":163,"range":{"start_line":163,"start_character":15,"end_line":163,"end_character":32},"in_reply_to":"7a77a97e_6157c102","updated":"2016-11-15 15:35:56.000000000","message":"Yeah; this is left-over from the 1st patch set where the code didn\u0027t provide access to the underlying attributes, but rather only as @properties. Now we don\u0027t need this, so I\u0027ll update. Nice catch.","commit_id":"9a0328df5b682d0c56d864f8a37621d8233dd72c"},{"author":{"_account_id":9423,"name":"Roey Chen","email":"roeyc@vmware.com","username":"roeyc"},"change_message_id":"97d8932968bf3f43a9807257fccd596038178339","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        :returns: The last object state if set, otherwise None."},{"line_number":170,"context_line":"        \"\"\""},{"line_number":171,"context_line":"        return list(self.states)[-1] if len(self.states) else None"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    @property"},{"line_number":174,"context_line":"    def method_name(self):"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a77a97e_a141d93b","line":171,"range":{"start_line":171,"start_character":15,"end_line":171,"end_character":32},"updated":"2016-11-15 13:11:03.000000000","message":"ditto","commit_id":"9a0328df5b682d0c56d864f8a37621d8233dd72c"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":44,"context_line":"BEFORE \u003d \u0027before_\u0027"},{"line_number":45,"context_line":"PRECOMMIT \u003d \u0027precommit_\u0027"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class BaseEvent(object):"},{"line_number":49,"context_line":"    \"\"\"Base event object."},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"ba5201f7_51833504","line":47,"updated":"2017-01-04 19:10:11.000000000","message":"Another option is to move these Payload objects into their own module like: neutron_lib.callbacks.payloads\n\n\nLet me know if you like that idea.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"808735be497c2349f37034a99f6948adbdabf6c1","unresolved":false,"context_lines":[{"line_number":44,"context_line":"BEFORE \u003d \u0027before_\u0027"},{"line_number":45,"context_line":"PRECOMMIT \u003d \u0027precommit_\u0027"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class BaseEvent(object):"},{"line_number":49,"context_line":"    \"\"\"Base event object."},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"ba5201f7_6deda0b6","line":47,"in_reply_to":"ba5201f7_51833504","updated":"2017-01-11 23:52:27.000000000","message":"should be ok to keep these in the same module.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"7aac506e2648d7e9e5024c3a8f0f198df87fb13f","unresolved":false,"context_lines":[{"line_number":45,"context_line":"PRECOMMIT \u003d \u0027precommit_\u0027"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class BaseEvent(object):"},{"line_number":49,"context_line":"    \"\"\"Base event object."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    This class is intended to be the super class for all events. As such, it"}],"source_content_type":"text/x-python","patch_set":28,"id":"1a6eadb0_c439bea5","line":48,"updated":"2016-12-16 21:06:09.000000000","message":"I don\u0027t want to sound obnoxious by asking you to rename this all over the place, but now I wonder if suffixing this with Event is confusing these with the string literals above, which are the \u0027events\u0027. These objects sound like EventPayload or EventMessage. What do you think?","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":45,"context_line":"PRECOMMIT \u003d \u0027precommit_\u0027"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class BaseEvent(object):"},{"line_number":49,"context_line":"    \"\"\"Base event object."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    This class is intended to be the super class for all events. As such, it"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba5201f7_c0f595cb","line":48,"in_reply_to":"1a6eadb0_c439bea5","updated":"2017-01-04 19:10:11.000000000","message":"Agree; payload is more descriptive.\n\n\nIn the next PS I\u0027ve used the following names:\n- EventPayload\n- DBEventPayload\n- APIEventPayload\n\n\nAll references including docs have been updated to reflect.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c7a5f18be55d7661382cf44e7fe7e7fb793ae768","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    This class is intended to be the super class for all events. As such, it"},{"line_number":52,"context_line":"    defines common attributes many sub-events are likely to use in their"},{"line_number":53,"context_line":"    payload. Note that event attributes are passed by reference; no copying"},{"line_number":54,"context_line":"    of states, metadata or request_body is performed."},{"line_number":55,"context_line":"    \"\"\""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def __init__(self, context, metadata\u003dNone, request_body\u003dNone,"}],"source_content_type":"text/x-python","patch_set":28,"id":"1a6eadb0_ab3d82c5","line":54,"updated":"2016-12-16 13:21:48.000000000","message":"Maybe add: see devref FAQ for more details?","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    This class is intended to be the super class for all events. As such, it"},{"line_number":52,"context_line":"    defines common attributes many sub-events are likely to use in their"},{"line_number":53,"context_line":"    payload. Note that event attributes are passed by reference; no copying"},{"line_number":54,"context_line":"    of states, metadata or request_body is performed."},{"line_number":55,"context_line":"    \"\"\""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def __init__(self, context, metadata\u003dNone, request_body\u003dNone,"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba5201f7_a0e891e3","line":54,"in_reply_to":"1a6eadb0_ab3d82c5","updated":"2017-01-04 19:10:11.000000000","message":"Will do","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c7a5f18be55d7661382cf44e7fe7e7fb793ae768","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        self.metadata \u003d metadata if metadata else {}"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        # the request body associated to the resource"},{"line_number":67,"context_line":"        self.request_body \u003d request_body"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # an iterable of states for the resource from the newest to the oldest"},{"line_number":70,"context_line":"        # for example db states or api request/response"}],"source_content_type":"text/x-python","patch_set":28,"id":"1a6eadb0_ab44a249","line":67,"updated":"2016-12-16 13:21:48.000000000","message":"shall this always be not None? And thus raise an exception at construction if it is?","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        self.metadata \u003d metadata if metadata else {}"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        # the request body associated to the resource"},{"line_number":67,"context_line":"        self.request_body \u003d request_body"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # an iterable of states for the resource from the newest to the oldest"},{"line_number":70,"context_line":"        # for example db states or api request/response"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba5201f7_408c4535","line":67,"in_reply_to":"1a6eadb0_ab44a249","updated":"2017-01-04 19:10:11.000000000","message":"My thinking was None is acceptable for those edge cases where the caller doesn\u0027t have the body readily available. If folks think we should restrict this to non-None, I\u0027m will to revisit+investigate more in depth.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"808735be497c2349f37034a99f6948adbdabf6c1","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        self.metadata \u003d metadata if metadata else {}"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        # the request body associated to the resource"},{"line_number":67,"context_line":"        self.request_body \u003d request_body"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # an iterable of states for the resource from the newest to the oldest"},{"line_number":70,"context_line":"        # for example db states or api request/response"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba5201f7_ed37d04a","line":67,"in_reply_to":"ba5201f7_408c4535","updated":"2017-01-11 23:52:27.000000000","message":"ack","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c7a5f18be55d7661382cf44e7fe7e7fb793ae768","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        self.request_body \u003d request_body"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # an iterable of states for the resource from the newest to the oldest"},{"line_number":70,"context_line":"        # for example db states or api request/response"},{"line_number":71,"context_line":"        self.states \u003d states if states else []"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        # a unique ID for the event resource"}],"source_content_type":"text/x-python","patch_set":28,"id":"1a6eadb0_2b3a5299","line":70,"updated":"2016-12-16 13:21:48.000000000","message":"we should probably document here that the actual class type of the objects in this iterable varies by the nature of the resource associated to the notification event.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"7aac506e2648d7e9e5024c3a8f0f198df87fb13f","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        self.request_body \u003d request_body"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # an iterable of states for the resource from the newest to the oldest"},{"line_number":70,"context_line":"        # for example db states or api request/response"},{"line_number":71,"context_line":"        self.states \u003d states if states else []"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        # a unique ID for the event resource"}],"source_content_type":"text/x-python","patch_set":28,"id":"1a6eadb0_8180988c","line":70,"in_reply_to":"1a6eadb0_2b3a5299","updated":"2016-12-16 21:06:09.000000000","message":"In other words, that \u0027states\u0027 is supposed to be a list of homogenous model objects. Due to the dynamic nature of Python, we may want to start asking for proper documentation for events used in actual registry notifications.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        self.request_body \u003d request_body"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # an iterable of states for the resource from the newest to the oldest"},{"line_number":70,"context_line":"        # for example db states or api request/response"},{"line_number":71,"context_line":"        self.states \u003d states if states else []"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        # a unique ID for the event resource"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba5201f7_600dc98f","line":70,"in_reply_to":"1a6eadb0_8180988c","updated":"2017-01-04 19:10:11.000000000","message":"Done","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c7a5f18be55d7661382cf44e7fe7e7fb793ae768","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        # for example db states or api request/response"},{"line_number":71,"context_line":"        self.states \u003d states if states else []"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        # a unique ID for the event resource"},{"line_number":74,"context_line":"        self.resource_id \u003d resource_id"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":28,"id":"1a6eadb0_0b2f5688","line":73,"updated":"2016-12-16 13:21:48.000000000","message":", may be None.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        # for example db states or api request/response"},{"line_number":71,"context_line":"        self.states \u003d states if states else []"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        # a unique ID for the event resource"},{"line_number":74,"context_line":"        self.resource_id \u003d resource_id"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba5201f7_805e2d74","line":73,"in_reply_to":"1a6eadb0_0b2f5688","updated":"2017-01-04 19:10:11.000000000","message":"Done","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"7aac506e2648d7e9e5024c3a8f0f198df87fb13f","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    def has_states(self):"},{"line_number":78,"context_line":"        \"\"\"Determines if this event has any states."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        :returns: True if this event has states, otherwise False."},{"line_number":81,"context_line":"        \"\"\""},{"line_number":82,"context_line":"        return len(self.states) \u003e 0"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"1a6eadb0_848fc673","line":80,"range":{"start_line":80,"start_character":27,"end_line":80,"end_character":28},"updated":"2016-12-16 21:06:09.000000000","message":"may be None if resource involved in the event notification is not yet being created, e.g. has no states.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    def has_states(self):"},{"line_number":78,"context_line":"        \"\"\"Determines if this event has any states."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        :returns: True if this event has states, otherwise False."},{"line_number":81,"context_line":"        \"\"\""},{"line_number":82,"context_line":"        return len(self.states) \u003e 0"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"ba5201f7_60d229d4","line":80,"range":{"start_line":80,"start_character":27,"end_line":80,"end_character":28},"in_reply_to":"1a6eadb0_848fc673","updated":"2017-01-04 19:10:11.000000000","message":"Done","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"7aac506e2648d7e9e5024c3a8f0f198df87fb13f","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        return len(self.states) \u003e 0"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    @property"},{"line_number":85,"context_line":"    def latest_resource(self):"},{"line_number":86,"context_line":"        \"\"\"Returns the latest state for the event."},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        :returns: The last state of this event if has_state else"}],"source_content_type":"text/x-python","patch_set":28,"id":"1a6eadb0_8105f814","line":85,"updated":"2016-12-16 21:06:09.000000000","message":"I\u0027d be almost tempted to say this is more aptly named as last_state and return None in case has_states is False.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        return len(self.states) \u003e 0"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    @property"},{"line_number":85,"context_line":"    def latest_resource(self):"},{"line_number":86,"context_line":"        \"\"\"Returns the latest state for the event."},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        :returns: The last state of this event if has_state else"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba5201f7_53a09d43","line":85,"in_reply_to":"1a6eadb0_8105f814","updated":"2017-01-04 19:10:11.000000000","message":"Agreed.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"7aac506e2648d7e9e5024c3a8f0f198df87fb13f","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        return self.states[-1] if self.has_states else self.request_body"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"class DataStoreEvent(BaseEvent):"},{"line_number":95,"context_line":"    \"\"\"The payload for data store events.\"\"\""},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def __init__(self, context, metadata\u003dNone, request_body\u003dNone,"}],"source_content_type":"text/x-python","patch_set":28,"id":"1a6eadb0_c460dea7","line":94,"updated":"2016-12-16 21:06:09.000000000","message":"maybe  the super long DataStoreEventPayload? Could be shortened to DSEventPayload.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        return self.states[-1] if self.has_states else self.request_body"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"class DataStoreEvent(BaseEvent):"},{"line_number":95,"context_line":"    \"\"\"The payload for data store events.\"\"\""},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def __init__(self, context, metadata\u003dNone, request_body\u003dNone,"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba5201f7_935f6540","line":94,"in_reply_to":"1a6eadb0_c460dea7","updated":"2017-01-04 19:10:11.000000000","message":"I went with \u0027DBEventPayload\u0027. Feel free to disagree with it on the upcoming patch.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"7aac506e2648d7e9e5024c3a8f0f198df87fb13f","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            states\u003dstates, resource_id\u003dresource_id)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        # A state to be persisted"},{"line_number":105,"context_line":"        self.desired_state \u003d desired_state"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    @property"},{"line_number":108,"context_line":"    def is_persisted(self):"}],"source_content_type":"text/x-python","patch_set":28,"id":"1a6eadb0_84e6e641","line":105,"range":{"start_line":105,"start_character":8,"end_line":105,"end_character":42},"updated":"2016-12-16 21:06:09.000000000","message":"the objective of desired_state is to capture the model object in PreCommit event notifications","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            states\u003dstates, resource_id\u003dresource_id)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        # A state to be persisted"},{"line_number":105,"context_line":"        self.desired_state \u003d desired_state"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    @property"},{"line_number":108,"context_line":"    def is_persisted(self):"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba5201f7_73168156","line":105,"range":{"start_line":105,"start_character":8,"end_line":105,"end_character":42},"in_reply_to":"1a6eadb0_84e6e641","updated":"2017-01-04 19:10:11.000000000","message":"Done","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c7a5f18be55d7661382cf44e7fe7e7fb793ae768","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        return self.desired_state is not None"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    @property"},{"line_number":124,"context_line":"    def latest_resource(self):"},{"line_number":125,"context_line":"        \"\"\"Returns the latest state for the event."},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        :returns: If this event has a desired_state its returned, otherwise"}],"source_content_type":"text/x-python","patch_set":28,"id":"1a6eadb0_4b322ea8","line":124,"range":{"start_line":124,"start_character":15,"end_line":124,"end_character":23},"updated":"2016-12-16 13:21:48.000000000","message":"this should probably be \u0027latest_known_state?","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"7aac506e2648d7e9e5024c3a8f0f198df87fb13f","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        return self.desired_state is not None"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    @property"},{"line_number":124,"context_line":"    def latest_resource(self):"},{"line_number":125,"context_line":"        \"\"\"Returns the latest state for the event."},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        :returns: If this event has a desired_state its returned, otherwise"}],"source_content_type":"text/x-python","patch_set":28,"id":"1a6eadb0_a45cc219","line":124,"range":{"start_line":124,"start_character":15,"end_line":124,"end_character":23},"in_reply_to":"1a6eadb0_4b322ea8","updated":"2016-12-16 21:06:09.000000000","message":"discard this comment.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"7aac506e2648d7e9e5024c3a8f0f198df87fb13f","unresolved":false,"context_lines":[{"line_number":131,"context_line":"                super(DataStoreEvent, self).latest_resource)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"class APIEvent(BaseEvent):"},{"line_number":135,"context_line":"    \"\"\"The payload for API events.\"\"\""},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def __init__(self, context, method_name, action,"}],"source_content_type":"text/x-python","patch_set":28,"id":"1a6eadb0_6470ea72","line":134,"updated":"2016-12-16 21:06:09.000000000","message":"APIEventPayload?","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":131,"context_line":"                super(DataStoreEvent, self).latest_resource)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"class APIEvent(BaseEvent):"},{"line_number":135,"context_line":"    \"\"\"The payload for API events.\"\"\""},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def __init__(self, context, method_name, action,"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba5201f7_d3072d1a","line":134,"in_reply_to":"1a6eadb0_6470ea72","updated":"2017-01-04 19:10:11.000000000","message":"Yup.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"a5fe0b899eaa858b6507ee68eb8c29f922bc0bf9","unresolved":false,"context_lines":[{"line_number":45,"context_line":"PRECOMMIT \u003d \u0027precommit_\u0027"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class EventPayload(object):"},{"line_number":49,"context_line":"    \"\"\"Base event payload object."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    This class is intended to be the super class for all event payloads. As"}],"source_content_type":"text/x-python","patch_set":29,"id":"ba5201f7_8915714a","line":48,"updated":"2017-01-04 19:20:32.000000000","message":"Another option is to move these event payload classes into something like neutron_lib.callbacks.payloads.py","commit_id":"6e165e25572fc7243b17e47dff0049cc3de3cfed"}],"neutron_lib/callbacks/manager.py":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"0e1ce35f15709b8c2685c7b9340f74c3d0ca0435","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        # TODO(armax): consider using a GreenPile"},{"line_number":165,"context_line":"        for callback_id, callback in callbacks:"},{"line_number":166,"context_line":"            try:"},{"line_number":167,"context_line":"                LOG.debug(\"Calling callback %s\", callback_id)"},{"line_number":168,"context_line":"                callback(resource, event, trigger, **kwargs)"},{"line_number":169,"context_line":"            except Exception as e:"},{"line_number":170,"context_line":"                LOG.exception(_LE(\"Error during notification for \""}],"source_content_type":"text/x-python","patch_set":11,"id":"9a629dbe_a603d8bd","line":167,"updated":"2016-11-13 17:48:42.000000000","message":"Probably does not align with https://review.openstack.org/366424","commit_id":"f73458006cd51aeb7fcbb6a5afe05f3d4f79102d"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"2f2239f6eb1046ac232b1ba52ed59c2152d81a05","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        # TODO(armax): consider using a GreenPile"},{"line_number":165,"context_line":"        for callback_id, callback in callbacks:"},{"line_number":166,"context_line":"            try:"},{"line_number":167,"context_line":"                LOG.debug(\"Calling callback %s\", callback_id)"},{"line_number":168,"context_line":"                callback(resource, event, trigger, **kwargs)"},{"line_number":169,"context_line":"            except Exception as e:"},{"line_number":170,"context_line":"                LOG.exception(_LE(\"Error during notification for \""}],"source_content_type":"text/x-python","patch_set":11,"id":"9a629dbe_dc579824","line":167,"in_reply_to":"9a629dbe_a603d8bd","updated":"2016-11-14 17:06:44.000000000","message":"Sorry; thought I was up to date. My bad.","commit_id":"f73458006cd51aeb7fcbb6a5afe05f3d4f79102d"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"0e1ce35f15709b8c2685c7b9340f74c3d0ca0435","unresolved":false,"context_lines":[{"line_number":166,"context_line":"            try:"},{"line_number":167,"context_line":"                LOG.debug(\"Calling callback %s\", callback_id)"},{"line_number":168,"context_line":"                callback(resource, event, trigger, **kwargs)"},{"line_number":169,"context_line":"            except Exception as e:"},{"line_number":170,"context_line":"                LOG.exception(_LE(\"Error during notification for \""},{"line_number":171,"context_line":"                                  \"%(callback)s %(resource)s, %(event)s\"),"},{"line_number":172,"context_line":"                              {\u0027callback\u0027: callback_id,"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a629dbe_86689489","line":169,"updated":"2016-11-13 17:48:42.000000000","message":"New code from https://review.openstack.org/366424 is missing.","commit_id":"f73458006cd51aeb7fcbb6a5afe05f3d4f79102d"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"2f2239f6eb1046ac232b1ba52ed59c2152d81a05","unresolved":false,"context_lines":[{"line_number":166,"context_line":"            try:"},{"line_number":167,"context_line":"                LOG.debug(\"Calling callback %s\", callback_id)"},{"line_number":168,"context_line":"                callback(resource, event, trigger, **kwargs)"},{"line_number":169,"context_line":"            except Exception as e:"},{"line_number":170,"context_line":"                LOG.exception(_LE(\"Error during notification for \""},{"line_number":171,"context_line":"                                  \"%(callback)s %(resource)s, %(event)s\"),"},{"line_number":172,"context_line":"                              {\u0027callback\u0027: callback_id,"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a629dbe_1c303007","line":169,"in_reply_to":"9a629dbe_86689489","updated":"2016-11-14 17:06:44.000000000","message":"Done","commit_id":"f73458006cd51aeb7fcbb6a5afe05f3d4f79102d"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"0e1ce35f15709b8c2685c7b9340f74c3d0ca0435","unresolved":false,"context_lines":[{"line_number":186,"context_line":"    # TODO(armax): consider using something other than names"},{"line_number":187,"context_line":"    # https://www.python.org/dev/peps/pep-3155/, but this"},{"line_number":188,"context_line":"    # might be okay for now."},{"line_number":189,"context_line":"    return reflection.get_callable_name(callback)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a629dbe_0613a40e","line":189,"updated":"2016-11-13 17:48:42.000000000","message":"New code from https://review.openstack.org/354544 is missing.","commit_id":"f73458006cd51aeb7fcbb6a5afe05f3d4f79102d"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"2f2239f6eb1046ac232b1ba52ed59c2152d81a05","unresolved":false,"context_lines":[{"line_number":186,"context_line":"    # TODO(armax): consider using something other than names"},{"line_number":187,"context_line":"    # https://www.python.org/dev/peps/pep-3155/, but this"},{"line_number":188,"context_line":"    # might be okay for now."},{"line_number":189,"context_line":"    return reflection.get_callable_name(callback)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a629dbe_5c3aa8e8","line":189,"in_reply_to":"9a629dbe_0613a40e","updated":"2016-11-14 17:06:44.000000000","message":"Done","commit_id":"f73458006cd51aeb7fcbb6a5afe05f3d4f79102d"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"e8c406b9ecf6b5ee48c6fd43f9525f65967c8f85","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            del self._index[callback_id]"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    @db_utils.reraise_as_retryrequest"},{"line_number":112,"context_line":"    def notify(self, resource, event, trigger, payload\u003dNone, **kwargs):"},{"line_number":113,"context_line":"        \"\"\"Notify all subscribed callback(s)."},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        Dispatch the resource\u0027s event to the subscribed callbacks."}],"source_content_type":"text/x-python","patch_set":13,"id":"7a77a97e_9c2b8d33","line":112,"updated":"2016-11-14 18:55:08.000000000","message":"I\u0027d personally introduce a new method, and leave this as is for the time being\n\nA few name suggestions:\n\n * send\n * publish\n * dispatch","commit_id":"c041ea7c0943c124e15f14924727a517857b755b"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"ccad97c8c82fb8f6b38e215614378e79ae8df080","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            del self._index[callback_id]"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    @db_utils.reraise_as_retryrequest"},{"line_number":112,"context_line":"    def notify(self, resource, event, trigger, payload\u003dNone, **kwargs):"},{"line_number":113,"context_line":"        \"\"\"Notify all subscribed callback(s)."},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        Dispatch the resource\u0027s event to the subscribed callbacks."}],"source_content_type":"text/x-python","patch_set":13,"id":"7a77a97e_6bc42140","line":112,"in_reply_to":"7a77a97e_9c2b8d33","updated":"2016-11-14 21:31:28.000000000","message":"Done","commit_id":"c041ea7c0943c124e15f14924727a517857b755b"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"e8c406b9ecf6b5ee48c6fd43f9525f65967c8f85","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        is raise if the underlying callback has errors."},{"line_number":127,"context_line":"        \"\"\""},{"line_number":128,"context_line":"        if kwargs:"},{"line_number":129,"context_line":"            debtcollector.deprecate(\"The use of **kwargs is deprecated. \""},{"line_number":130,"context_line":"                                    \"Use the payload arg instead.\","},{"line_number":131,"context_line":"                                    version\u003d\u0027Ocata\u0027,"},{"line_number":132,"context_line":"                                    removal_version\u003d\u0027Queens\u0027)"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a77a97e_dc57c5c8","line":129,"updated":"2016-11-14 18:55:08.000000000","message":"this is probably gonna flood the logs until we switched everywhere, I\u0027d be wary of adding it, honestly.","commit_id":"c041ea7c0943c124e15f14924727a517857b755b"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"ccad97c8c82fb8f6b38e215614378e79ae8df080","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        is raise if the underlying callback has errors."},{"line_number":127,"context_line":"        \"\"\""},{"line_number":128,"context_line":"        if kwargs:"},{"line_number":129,"context_line":"            debtcollector.deprecate(\"The use of **kwargs is deprecated. \""},{"line_number":130,"context_line":"                                    \"Use the payload arg instead.\","},{"line_number":131,"context_line":"                                    version\u003d\u0027Ocata\u0027,"},{"line_number":132,"context_line":"                                    removal_version\u003d\u0027Queens\u0027)"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a77a97e_d0e164d2","line":129,"in_reply_to":"7a77a97e_dc57c5c8","updated":"2016-11-14 21:31:28.000000000","message":"I\u0027ll remove; was just trying to follow protocol.","commit_id":"c041ea7c0943c124e15f14924727a517857b755b"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"85774fd198d1f5903989bf52886ba642e00dc74f","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        if payload:"},{"line_number":134,"context_line":"            if not isinstance(payload, events.BaseEvent):"},{"line_number":135,"context_line":"                raise exceptions.Invalid(element\u003d\u0027event payload\u0027,"},{"line_number":136,"context_line":"                                         value\u003dtype(payload))"},{"line_number":137,"context_line":"            kwargs \u003d kwargs or {}"},{"line_number":138,"context_line":"            kwargs[\u0027payload\u0027] \u003d payload"},{"line_number":139,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"7a77a97e_5c76553f","line":136,"updated":"2016-11-14 18:56:37.000000000","message":"I am not terribly convinced the base event is buying us much, but I don\u0027t feel strongly one way or another.","commit_id":"c041ea7c0943c124e15f14924727a517857b755b"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"ccad97c8c82fb8f6b38e215614378e79ae8df080","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        if payload:"},{"line_number":134,"context_line":"            if not isinstance(payload, events.BaseEvent):"},{"line_number":135,"context_line":"                raise exceptions.Invalid(element\u003d\u0027event payload\u0027,"},{"line_number":136,"context_line":"                                         value\u003dtype(payload))"},{"line_number":137,"context_line":"            kwargs \u003d kwargs or {}"},{"line_number":138,"context_line":"            kwargs[\u0027payload\u0027] \u003d payload"},{"line_number":139,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"7a77a97e_f0af407b","line":136,"in_reply_to":"7a77a97e_5c76553f","updated":"2016-11-14 21:31:28.000000000","message":"I\u0027ll reraise this on the next patch in the events.py right by the def the BaseEvent class to see what others think. Please have a look there on the next patch.","commit_id":"c041ea7c0943c124e15f14924727a517857b755b"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"7c8fc74639c24b92c278f87dd10062a3ce305e28","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        # TODO(armax): consider using a GreenPile"},{"line_number":164,"context_line":"        for callback_id, callback in callbacks:"},{"line_number":165,"context_line":"            try:"},{"line_number":166,"context_line":"                callback(resource, event, trigger, **kwargs)"},{"line_number":167,"context_line":"            except Exception as e:"},{"line_number":168,"context_line":"                abortable_event \u003d ("},{"line_number":169,"context_line":"                    event.startswith(events.BEFORE) or"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a77a97e_7fd8631e","line":166,"updated":"2016-11-14 19:27:56.000000000","message":"In the spirit of trying to be more explicit, I\u0027m wondering if this mechanism of passing kwargs to the callback makes sense with these changes. Building off the comment at L112, I wonder if it would make sense to adjust the callback interface so that it takes the form of (resource, event, trigger, payload) instead of passing along kwargs. Crazy idea?","commit_id":"c041ea7c0943c124e15f14924727a517857b755b"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"ccad97c8c82fb8f6b38e215614378e79ae8df080","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        # TODO(armax): consider using a GreenPile"},{"line_number":164,"context_line":"        for callback_id, callback in callbacks:"},{"line_number":165,"context_line":"            try:"},{"line_number":166,"context_line":"                callback(resource, event, trigger, **kwargs)"},{"line_number":167,"context_line":"            except Exception as e:"},{"line_number":168,"context_line":"                abortable_event \u003d ("},{"line_number":169,"context_line":"                    event.startswith(events.BEFORE) or"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a77a97e_b0b5c8d1","line":166,"in_reply_to":"7a77a97e_7fd8631e","updated":"2016-11-14 21:31:28.000000000","message":"While I agree from a long-term perspective, I don\u0027t see the need to for additional code for that here/now. My thought was to get this patch integrated and then start updating consumers to use the new payload objects. Once they are all moved over I\u0027d then think about refactoring this logic to do away with **kwargs payloads all together... Not sure what others think.","commit_id":"c041ea7c0943c124e15f14924727a517857b755b"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"e8c406b9ecf6b5ee48c6fd43f9525f65967c8f85","unresolved":false,"context_lines":[{"line_number":165,"context_line":"            try:"},{"line_number":166,"context_line":"                callback(resource, event, trigger, **kwargs)"},{"line_number":167,"context_line":"            except Exception as e:"},{"line_number":168,"context_line":"                abortable_event \u003d ("},{"line_number":169,"context_line":"                    event.startswith(events.BEFORE) or"},{"line_number":170,"context_line":"                    event.startswith(events.PRECOMMIT)"},{"line_number":171,"context_line":"                )"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a77a97e_5c6c959c","line":168,"updated":"2016-11-14 18:55:08.000000000","message":"if you are bringing back changes made to the manager in the neutron repo, my suggestion would be to make this on its own patch.","commit_id":"c041ea7c0943c124e15f14924727a517857b755b"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"ccad97c8c82fb8f6b38e215614378e79ae8df080","unresolved":false,"context_lines":[{"line_number":165,"context_line":"            try:"},{"line_number":166,"context_line":"                callback(resource, event, trigger, **kwargs)"},{"line_number":167,"context_line":"            except Exception as e:"},{"line_number":168,"context_line":"                abortable_event \u003d ("},{"line_number":169,"context_line":"                    event.startswith(events.BEFORE) or"},{"line_number":170,"context_line":"                    event.startswith(events.PRECOMMIT)"},{"line_number":171,"context_line":"                )"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a77a97e_f05740c8","line":168,"in_reply_to":"7a77a97e_5c6c959c","updated":"2016-11-14 21:31:28.000000000","message":"Done","commit_id":"c041ea7c0943c124e15f14924727a517857b755b"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"e8c406b9ecf6b5ee48c6fd43f9525f65967c8f85","unresolved":false,"context_lines":[{"line_number":193,"context_line":"    # might be okay for now."},{"line_number":194,"context_line":"    parts \u003d (reflection.get_callable_name(callback),"},{"line_number":195,"context_line":"             str(hash(callback)))"},{"line_number":196,"context_line":"    return \u0027-\u0027.join(parts)"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a77a97e_7c69518b","line":196,"updated":"2016-11-14 18:55:08.000000000","message":"ditto","commit_id":"c041ea7c0943c124e15f14924727a517857b755b"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"ccad97c8c82fb8f6b38e215614378e79ae8df080","unresolved":false,"context_lines":[{"line_number":193,"context_line":"    # might be okay for now."},{"line_number":194,"context_line":"    parts \u003d (reflection.get_callable_name(callback),"},{"line_number":195,"context_line":"             str(hash(callback)))"},{"line_number":196,"context_line":"    return \u0027-\u0027.join(parts)"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a77a97e_506f1492","line":196,"in_reply_to":"7a77a97e_7c69518b","updated":"2016-11-14 21:31:28.000000000","message":"Done","commit_id":"c041ea7c0943c124e15f14924727a517857b755b"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"a04f99430df56ce28b09135c36d64749e22347a6","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        :param trigger: The trigger. A reference to the sender of the event."},{"line_number":143,"context_line":"        :param kwargs: (deprecated) Unstructured key/value pairs to invoke"},{"line_number":144,"context_line":"        the callback with."},{"line_number":145,"context_line":"        :raises Invalid, CallbackFailure: The Invalid exception is raised if"},{"line_number":146,"context_line":"        the payload object is not an instance of BaseEvent. CallbackFailure"},{"line_number":147,"context_line":"        is raise if the underlying callback has errors."},{"line_number":148,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"7a77a97e_b2a59b05","line":145,"range":{"start_line":145,"start_character":46,"end_line":145,"end_character":53},"updated":"2016-11-15 19:10:53.000000000","message":"Crud... I forgot to update these docstrings.","commit_id":"8887390223d4497eec7c83026e532c45faaddbc6"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"7aac506e2648d7e9e5024c3a8f0f198df87fb13f","unresolved":false,"context_lines":[{"line_number":129,"context_line":"            kwargs[\u0027payload\u0027] \u003d payload"},{"line_number":130,"context_line":"        return self.notify(resource, event, trigger, **kwargs)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    # NOTE(boden): We plan to deprecate the usage of this method and **kwargs"},{"line_number":133,"context_line":"    # as the payload in Queens, but no warning here to avoid log flooding"},{"line_number":134,"context_line":"    @db_utils.reraise_as_retryrequest"},{"line_number":135,"context_line":"    def notify(self, resource, event, trigger, **kwargs):"},{"line_number":136,"context_line":"        \"\"\"Notify all subscribed callback(s)."}],"source_content_type":"text/x-python","patch_set":28,"id":"1a6eadb0_e1ccec36","line":133,"range":{"start_line":132,"start_character":6,"end_line":133,"end_character":73},"updated":"2016-12-16 21:06:09.000000000","message":"may want to add this to the release notes.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":129,"context_line":"            kwargs[\u0027payload\u0027] \u003d payload"},{"line_number":130,"context_line":"        return self.notify(resource, event, trigger, **kwargs)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    # NOTE(boden): We plan to deprecate the usage of this method and **kwargs"},{"line_number":133,"context_line":"    # as the payload in Queens, but no warning here to avoid log flooding"},{"line_number":134,"context_line":"    @db_utils.reraise_as_retryrequest"},{"line_number":135,"context_line":"    def notify(self, resource, event, trigger, **kwargs):"},{"line_number":136,"context_line":"        \"\"\"Notify all subscribed callback(s)."}],"source_content_type":"text/x-python","patch_set":28,"id":"ba5201f7_3651470f","line":133,"range":{"start_line":132,"start_character":6,"end_line":133,"end_character":73},"in_reply_to":"1a6eadb0_e1ccec36","updated":"2017-01-04 19:10:11.000000000","message":"Good point.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"12d5af3dd37a0ef210a3f602542e2e110592e464","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                raise exceptions.Invalid(element\u003d\u0027event payload\u0027,"},{"line_number":128,"context_line":"                                         value\u003dtype(payload))"},{"line_number":129,"context_line":"            kwargs[\u0027payload\u0027] \u003d payload"},{"line_number":130,"context_line":"        return self.notify(resource, event, trigger, **kwargs)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    # NOTE(boden): We plan to deprecate the usage of this method and **kwargs"},{"line_number":133,"context_line":"    # as the payload in Queens, but no warning here to avoid log flooding"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba5201f7_635daf14","line":130,"updated":"2017-01-12 00:36:02.000000000","message":"nit: kwargs isn\u0027t necessary here since you\u0027re not passing anything through.\n\nself.notify(resource, event, trigger, payload\u003dpayload)","commit_id":"fea8bb64ba7ff52632c2bd3e3298eaedf623ee4f"}],"neutron_lib/callbacks/registry.py":[{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"7c8fc74639c24b92c278f87dd10062a3ce305e28","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"# NOTE(boden): The use of kwargs is deprecated in favor of payload."},{"line_number":44,"context_line":"# The callback manager generates a deprecation warning so not done here."},{"line_number":45,"context_line":"def notify(resource, event, trigger, payload\u003dNone, **kwargs):"},{"line_number":46,"context_line":"    _get_callback_manager().notify(resource, event, trigger,"},{"line_number":47,"context_line":"                                   payload, **kwargs)"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"7a77a97e_7fef83b0","line":45,"updated":"2016-11-14 19:27:56.000000000","message":"See comments at L166 in https://review.openstack.org/#/c/346554/13/neutron_lib/callbacks/manager.py","commit_id":"c041ea7c0943c124e15f14924727a517857b755b"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"284625f0d3068a18cf8f18e6538de29a86171e15","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"# NOTE(boden): This method is deprecated in favor of publish() and will be"},{"line_number":44,"context_line":"# removed in Queens, but not deprecation message to reduce log flooding"},{"line_number":45,"context_line":"def notify(resource, event, trigger, payload\u003dNone, **kwargs):"},{"line_number":46,"context_line":"    _get_callback_manager().notify(resource, event, trigger,"},{"line_number":47,"context_line":"                                   payload, **kwargs)"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"7a77a97e_f859908f","line":45,"range":{"start_line":45,"start_character":37,"end_line":45,"end_character":49},"updated":"2016-11-22 20:22:00.000000000","message":"Bug: payload shouldn\u0027t have been left in the signature as indicated by the gate-tempest-dsvm-neutron-src-neutron-lib failure.","commit_id":"b6f86331add59652396a334abc9771f5b3de690e"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"7aac506e2648d7e9e5024c3a8f0f198df87fb13f","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"# TODO(armax): consider adding locking"},{"line_number":17,"context_line":"CALLBACK_MANAGER \u003d None"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"def _get_callback_manager():"}],"source_content_type":"text/x-python","patch_set":28,"id":"1a6eadb0_44984e78","line":17,"updated":"2016-12-16 21:06:09.000000000","message":"wanna make this private now that we\u0027re at it?","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"# TODO(armax): consider adding locking"},{"line_number":17,"context_line":"CALLBACK_MANAGER \u003d None"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"def _get_callback_manager():"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba5201f7_162d2346","line":17,"in_reply_to":"1a6eadb0_44984e78","updated":"2017-01-04 19:10:11.000000000","message":"I would prefer private as well; thanks for reminding me.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"}],"neutron_lib/callbacks/resources.py":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"0e1ce35f15709b8c2685c7b9340f74c3d0ca0435","unresolved":false,"context_lines":[{"line_number":17,"context_line":"NETWORK \u003d \u0027network\u0027"},{"line_number":18,"context_line":"NETWORKS \u003d \u0027networks\u0027"},{"line_number":19,"context_line":"PORT \u003d \u0027port\u0027"},{"line_number":20,"context_line":"PORTS \u003d \u0027ports\u0027"},{"line_number":21,"context_line":"PROCESS \u003d \u0027process\u0027"},{"line_number":22,"context_line":"ROUTER \u003d \u0027router\u0027"},{"line_number":23,"context_line":"ROUTER_GATEWAY \u003d \u0027router_gateway\u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a629dbe_062ac42c","line":20,"updated":"2016-11-13 17:48:42.000000000","message":"PORT_DEVICE is missing.\nhttps://review.openstack.org/349275","commit_id":"f73458006cd51aeb7fcbb6a5afe05f3d4f79102d"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"2f2239f6eb1046ac232b1ba52ed59c2152d81a05","unresolved":false,"context_lines":[{"line_number":17,"context_line":"NETWORK \u003d \u0027network\u0027"},{"line_number":18,"context_line":"NETWORKS \u003d \u0027networks\u0027"},{"line_number":19,"context_line":"PORT \u003d \u0027port\u0027"},{"line_number":20,"context_line":"PORTS \u003d \u0027ports\u0027"},{"line_number":21,"context_line":"PROCESS \u003d \u0027process\u0027"},{"line_number":22,"context_line":"ROUTER \u003d \u0027router\u0027"},{"line_number":23,"context_line":"ROUTER_GATEWAY \u003d \u0027router_gateway\u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a629dbe_9c2440c7","line":20,"in_reply_to":"9a629dbe_062ac42c","updated":"2016-11-14 17:06:44.000000000","message":"Done","commit_id":"f73458006cd51aeb7fcbb6a5afe05f3d4f79102d"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"e8c406b9ecf6b5ee48c6fd43f9525f65967c8f85","unresolved":false,"context_lines":[{"line_number":18,"context_line":"NETWORKS \u003d \u0027networks\u0027"},{"line_number":19,"context_line":"PORT \u003d \u0027port\u0027"},{"line_number":20,"context_line":"PORTS \u003d \u0027ports\u0027"},{"line_number":21,"context_line":"PORT_DEVICE \u003d \u0027port_device\u0027"},{"line_number":22,"context_line":"PROCESS \u003d \u0027process\u0027"},{"line_number":23,"context_line":"ROUTER \u003d \u0027router\u0027"},{"line_number":24,"context_line":"ROUTER_GATEWAY \u003d \u0027router_gateway\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a77a97e_3ccb5974","line":21,"updated":"2016-11-14 18:55:08.000000000","message":"ditto","commit_id":"c041ea7c0943c124e15f14924727a517857b755b"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"f018b659a90bf946ed7c36077363e48dbe6e22b1","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# String literals representing core resources."},{"line_number":14,"context_line":"AGENT \u003d \u0027agent\u0027"},{"line_number":15,"context_line":"EXTERNAL_NETWORK \u003d \u0027external_network\u0027"},{"line_number":16,"context_line":"FLOATING_IP \u003d \u0027floating_ip\u0027"},{"line_number":17,"context_line":"NETWORK \u003d \u0027network\u0027"},{"line_number":18,"context_line":"NETWORKS \u003d \u0027networks\u0027"},{"line_number":19,"context_line":"PORT \u003d \u0027port\u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a71b18c_e9581659","line":16,"updated":"2016-12-01 21:56:58.000000000","message":"we should pull a recent fix from Yamamoto:\n\nhttps://review.openstack.org/#/c/399511/","commit_id":"16fc7b9716858d74c72b1fa6290d4928734fe802"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"7aac506e2648d7e9e5024c3a8f0f198df87fb13f","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# String literals representing core resources."},{"line_number":14,"context_line":"AGENT \u003d \u0027agent\u0027"},{"line_number":15,"context_line":"EXTERNAL_NETWORK \u003d \u0027external_network\u0027"},{"line_number":16,"context_line":"FLOATING_IP \u003d \u0027floating_ip\u0027"},{"line_number":17,"context_line":"NETWORK \u003d \u0027network\u0027"},{"line_number":18,"context_line":"NETWORKS \u003d \u0027networks\u0027"},{"line_number":19,"context_line":"PORT \u003d \u0027port\u0027"}],"source_content_type":"text/x-python","patch_set":28,"id":"1a6eadb0_64e54a07","line":16,"updated":"2016-12-16 21:06:09.000000000","message":"forgot to pull in:\n\nhttps://github.com/openstack/neutron/blob/master/neutron/callbacks/resources.py#L16\n\nWe shan\u0027t forget otherwise we regress when we move forward with this.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# String literals representing core resources."},{"line_number":14,"context_line":"AGENT \u003d \u0027agent\u0027"},{"line_number":15,"context_line":"EXTERNAL_NETWORK \u003d \u0027external_network\u0027"},{"line_number":16,"context_line":"FLOATING_IP \u003d \u0027floating_ip\u0027"},{"line_number":17,"context_line":"NETWORK \u003d \u0027network\u0027"},{"line_number":18,"context_line":"NETWORKS \u003d \u0027networks\u0027"},{"line_number":19,"context_line":"PORT \u003d \u0027port\u0027"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba5201f7_31e151d1","line":16,"in_reply_to":"1a6eadb0_64e54a07","updated":"2017-01-04 19:10:11.000000000","message":"We don\u0027t need any regressions!","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"}],"neutron_lib/tests/unit/callbacks/base.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"7aac506e2648d7e9e5024c3a8f0f198df87fb13f","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def _setUp(self):"},{"line_number":39,"context_line":"        self.mock_callback_manager \u003d mock.patch.object("},{"line_number":40,"context_line":"            registry, \u0027CALLBACK_MANAGER\u0027,"},{"line_number":41,"context_line":"            new\u003dself.callback_manager)"},{"line_number":42,"context_line":"        self.mock_callback_manager.start()"}],"source_content_type":"text/x-python","patch_set":28,"id":"1a6eadb0_e48dda31","line":40,"updated":"2016-12-16 21:06:09.000000000","message":"_CALLBACK_MANAGER in case you follow my suggestion.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def _setUp(self):"},{"line_number":39,"context_line":"        self.mock_callback_manager \u003d mock.patch.object("},{"line_number":40,"context_line":"            registry, \u0027CALLBACK_MANAGER\u0027,"},{"line_number":41,"context_line":"            new\u003dself.callback_manager)"},{"line_number":42,"context_line":"        self.mock_callback_manager.start()"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba5201f7_f1d7c9ea","line":40,"in_reply_to":"1a6eadb0_e48dda31","updated":"2017-01-04 19:10:11.000000000","message":"Got it.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"a5fe0b899eaa858b6507ee68eb8c29f922bc0bf9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":29,"id":"ba5201f7_74074018","updated":"2017-01-04 19:20:32.000000000","message":"Since this may be used by consumers; do we need to move it out of tests to something like: neutron_lib.fixtures.py?","commit_id":"6e165e25572fc7243b17e47dff0049cc3de3cfed"}],"neutron_lib/tests/unit/callbacks/test_events.py":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"12d5af3dd37a0ef210a3f602542e2e110592e464","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        self.assertEqual(meta, e.metadata)"},{"line_number":29,"context_line":"        event_meta \u003d e.metadata"},{"line_number":30,"context_line":"        event_meta[\u0027k3\u0027] \u003d \u0027v3\u0027"},{"line_number":31,"context_line":"        self.assertTrue(\u0027k3\u0027 in e.metadata)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def test_request_body(self):"},{"line_number":34,"context_line":"        e \u003d events.EventPayload(mock.ANY, request_body\u003d{\u0027k\u0027, \u0027v\u0027})"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba5201f7_4360abcf","line":31,"updated":"2017-01-12 00:36:02.000000000","message":"nit: self.assertIn(\u0027k3\u0027, e.metadata)\nnicer error message when it fails that shows contents","commit_id":"fea8bb64ba7ff52632c2bd3e3298eaedf623ee4f"}],"neutron_lib/tests/unit/callbacks/test_manager.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"7aac506e2648d7e9e5024c3a8f0f198df87fb13f","unresolved":false,"context_lines":[{"line_number":300,"context_line":"                          resources.PORT, events.AFTER_DELETE, self,"},{"line_number":301,"context_line":"                          payload\u003dobject())"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"    def test_publish_empty_payload(self):"},{"line_number":304,"context_line":"        notify_payload \u003d []"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"        def _memo(resource, event, trigger, payload\u003dNone):"}],"source_content_type":"text/x-python","patch_set":28,"id":"1a6eadb0_2400b265","line":303,"updated":"2016-12-16 21:06:09.000000000","message":"what about a test with a non-empty payload? Not worth it?","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":300,"context_line":"                          resources.PORT, events.AFTER_DELETE, self,"},{"line_number":301,"context_line":"                          payload\u003dobject())"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"    def test_publish_empty_payload(self):"},{"line_number":304,"context_line":"        notify_payload \u003d []"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"        def _memo(resource, event, trigger, payload\u003dNone):"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba5201f7_e268d989","line":303,"in_reply_to":"1a6eadb0_2400b265","updated":"2017-01-04 19:10:11.000000000","message":"I\u0027ll add it.","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"}],"neutron_lib/tests/unit/callbacks/test_registry.py":[{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"56a6a6d7e2136a2e5f5cb968d7eaca91f2d50a2b","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    def test_notify(self):"},{"line_number":60,"context_line":"        registry.notify(\u0027my-resource\u0027, \u0027my-event\u0027, mock.ANY)"},{"line_number":61,"context_line":"        self.callback_manager.notify.assert_called_with("},{"line_number":62,"context_line":"            \u0027my-resource\u0027, \u0027my-event\u0027, mock.ANY, None)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def test_clear(self):"},{"line_number":65,"context_line":"        registry.clear()"}],"source_content_type":"text/x-python","patch_set":19,"id":"5a74a57a_f8800d49","line":62,"range":{"start_line":62,"start_character":49,"end_line":62,"end_character":53},"updated":"2016-11-22 22:05:48.000000000","message":"Yet another bug: I didn\u0027t update this test.","commit_id":"6f617c3a5db0b1e0a110670391c532c3c519e5e3"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"7aac506e2648d7e9e5024c3a8f0f198df87fb13f","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        registry.clear()"},{"line_number":59,"context_line":"        registry.CALLBACK_MANAGER.clear.assert_called_with()"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def test_get_callback_manager(self):"},{"line_number":62,"context_line":"        with mock.patch.object(registry.manager,"},{"line_number":63,"context_line":"                               \u0027CallbacksManager\u0027) as mock_mgr:"},{"line_number":64,"context_line":"            registry.CALLBACK_MANAGER \u003d None"}],"source_content_type":"text/x-python","patch_set":28,"id":"1a6eadb0_64d9caf2","side":"PARENT","line":61,"range":{"start_line":61,"start_character":8,"end_line":61,"end_character":33},"updated":"2016-12-16 21:06:09.000000000","message":"didn\u0027t we lose coverage for this method. Btw, this should have been called test__get_callback_manager...meh, my bad.","commit_id":"322ae30246d21d154b44b90e12ecf5506ae4ed68"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"7aac506e2648d7e9e5024c3a8f0f198df87fb13f","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def setUp(self):"},{"line_number":33,"context_line":"        super(TestCallbackRegistryDispatching, self).setUp()"},{"line_number":34,"context_line":"        self.callback_manager \u003d mock.Mock()"},{"line_number":35,"context_line":"        self.registry_fixture \u003d callback_base.RegistryFixture("},{"line_number":36,"context_line":"            callback_manager\u003dself.callback_manager)"},{"line_number":37,"context_line":"        self.useFixture(self.registry_fixture)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def test_subscribe(self):"},{"line_number":40,"context_line":"        registry.subscribe(my_callback, \u0027my-resource\u0027, \u0027my-event\u0027)"}],"source_content_type":"text/x-python","patch_set":28,"id":"1a6eadb0_248512ce","line":37,"range":{"start_line":34,"start_character":8,"end_line":37,"end_character":46},"updated":"2016-12-16 21:06:09.000000000","message":"rock on!","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"7aac506e2648d7e9e5024c3a8f0f198df87fb13f","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        registry.clear()"},{"line_number":66,"context_line":"        self.callback_manager.clear.assert_called_with()"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def test_publish_payload(self):"},{"line_number":69,"context_line":"        mgr \u003d manager.CallbacksManager()"},{"line_number":70,"context_line":"        event_payload \u003d events.BaseEvent(mock.ANY)"},{"line_number":71,"context_line":"        self.registry_fixture.mock_callback_manager.stop()"}],"source_content_type":"text/x-python","patch_set":28,"id":"1a6eadb0_e465da44","line":68,"updated":"2016-12-16 21:06:09.000000000","message":"can this actually be a separate test altogether to avoid the mock plumbing code?","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        registry.clear()"},{"line_number":66,"context_line":"        self.callback_manager.clear.assert_called_with()"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def test_publish_payload(self):"},{"line_number":69,"context_line":"        mgr \u003d manager.CallbacksManager()"},{"line_number":70,"context_line":"        event_payload \u003d events.BaseEvent(mock.ANY)"},{"line_number":71,"context_line":"        self.registry_fixture.mock_callback_manager.stop()"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba5201f7_628789d7","line":68,"in_reply_to":"1a6eadb0_e465da44","updated":"2017-01-04 19:10:11.000000000","message":"Good call.\nThis can actually be reduced now that we\u0027re using the fixture.\nNot sure what I was thinking here!","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"}],"releasenotes/notes/expose-and-enhance-callback-api-714cce65a3c44fe7.yaml":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"7aac506e2648d7e9e5024c3a8f0f198df87fb13f","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - Neutron\u0027s callback API found in neutron.callbacks.* is now exposed"},{"line_number":4,"context_line":"    in neutron_lib.callbacks.*. In addition, a set of event objects are"},{"line_number":5,"context_line":"    now available for use in transporting event payload data in a"},{"line_number":6,"context_line":"    standardized way."}],"source_content_type":"text/x-yaml","patch_set":28,"id":"1a6eadb0_c491be48","line":6,"updated":"2016-12-16 21:06:09.000000000","message":"shall we document also the existence of the fixture for test isolation?","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d966a796e7a0eb2f3dd8cdadcf9426ba9816b708","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - Neutron\u0027s callback API found in neutron.callbacks.* is now exposed"},{"line_number":4,"context_line":"    in neutron_lib.callbacks.*. In addition, a set of event objects are"},{"line_number":5,"context_line":"    now available for use in transporting event payload data in a"},{"line_number":6,"context_line":"    standardized way."}],"source_content_type":"text/x-yaml","patch_set":28,"id":"ba5201f7_02323d10","line":6,"in_reply_to":"1a6eadb0_c491be48","updated":"2017-01-04 19:10:11.000000000","message":"Good idea. Does this also mean we should move it into neutron_lib.fixtures.py like you\u0027re doing rather than define this callback fixture under neutron_lib.tests.**?","commit_id":"bc703733f47ba4289409c2bc7449ef8161d3c766"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"8217ed8f5b0726c4ec031a4ebf1027a162feaad7","unresolved":false,"context_lines":[{"line_number":6,"context_line":"    standardized way."},{"line_number":7,"context_line":"  - A test fixture is provided for isolating the global callback manager in"},{"line_number":8,"context_line":"    ``neutron_lib.callbacks.registry``. For more details see the comments in"},{"line_number":9,"context_line":"    ``neutron_lib.tests.unti.callbacks.base``."},{"line_number":10,"context_line":"deprecations:"},{"line_number":11,"context_line":"  - The use of ``neutron_lib.callbacks.registry.notify()`` and"},{"line_number":12,"context_line":"    ``neutron_lib.callbacks.manager.CallbacksManager.notify()`` is deprecated in"}],"source_content_type":"text/x-yaml","patch_set":30,"id":"ba5201f7_ad6948fb","line":9,"range":{"start_line":9,"start_character":6,"end_line":9,"end_character":43},"updated":"2017-01-11 23:57:48.000000000","message":"this is stale.","commit_id":"fea8bb64ba7ff52632c2bd3e3298eaedf623ee4f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"8217ed8f5b0726c4ec031a4ebf1027a162feaad7","unresolved":false,"context_lines":[{"line_number":10,"context_line":"deprecations:"},{"line_number":11,"context_line":"  - The use of ``neutron_lib.callbacks.registry.notify()`` and"},{"line_number":12,"context_line":"    ``neutron_lib.callbacks.manager.CallbacksManager.notify()`` is deprecated in"},{"line_number":13,"context_line":"    favor of their ``publish()`` counterparts and will be removed in"},{"line_number":14,"context_line":"    the \"Queens\" release time-frame."}],"source_content_type":"text/x-yaml","patch_set":30,"id":"ba5201f7_4d561c2b","line":13,"updated":"2017-01-11 23:57:48.000000000","message":"I wonder if we should suggest consumers to look for practical examples of the use of publish() in the neutron codebase before actively adopting it.  But I suppose it\u0027s common sense.","commit_id":"fea8bb64ba7ff52632c2bd3e3298eaedf623ee4f"}]}
