)]}'
{"doc/source/notifications.rst":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7c349a403d706e7a21b0bab8477cf79e173acec7","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"To support the above contract from the Nova code every versioned notification"},{"line_number":108,"context_line":"is modeled with oslo versionedobjects. Every versioned notification class"},{"line_number":109,"context_line":"shall inherit from the `nova.notifications.objects.base.NotificationBase` which"},{"line_number":110,"context_line":"already defines three mandatory fields of the notification `event_type`,"},{"line_number":111,"context_line":"`publisher_id` and `priority`. The new notification class shall add a new field"},{"line_number":112,"context_line":"`payload` with an appropriate payload type. The payload object of the"}],"source_content_type":"text/x-rst","patch_set":12,"id":"7aa08908_12e125d1","line":109,"range":{"start_line":109,"start_character":24,"end_line":109,"end_character":72},"updated":"2016-06-09 21:58:31.000000000","message":"This should have been worked into the change that moved the package, but that\u0027s already approved.","commit_id":"520ee65a55bf9894d5915d3cebc892439d703312"}],"nova/notifications/objects/base.py":[{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"f09801259bc1994a6a9b6b0fc5fac5e88280761e","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"@base.NovaObjectRegistry.register_if(False)"},{"line_number":21,"context_line":"class NotificationObject(base.NovaObject):"},{"line_number":22,"context_line":"    # Version 1.0: Initial version"},{"line_number":23,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":24,"context_line":"    pass"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"@base.NovaObjectRegistry.register_if(False)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_24da9778","line":24,"range":{"start_line":21,"start_character":0,"end_line":24,"end_character":8},"updated":"2016-05-05 16:03:20.000000000","message":"You should comment this class so we know what it\u0027s for. (It\u0027s for knowing what we need to register in tests, right?)","commit_id":"0a6f60646ff0aa0d66b3036fcefaba709c0aeb02"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"87614cc1c1ca9a7f22dcd397eb80bdb5a618a071","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"@base.NovaObjectRegistry.register_if(False)"},{"line_number":21,"context_line":"class NotificationObject(base.NovaObject):"},{"line_number":22,"context_line":"    # Version 1.0: Initial version"},{"line_number":23,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":24,"context_line":"    pass"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"@base.NovaObjectRegistry.register_if(False)"}],"source_content_type":"text/x-python","patch_set":3,"id":"dab17558_6ab43781","line":24,"range":{"start_line":21,"start_character":0,"end_line":24,"end_character":8},"in_reply_to":"1a122d0e_24da9778","updated":"2016-05-17 16:21:57.000000000","message":"Right. I will add a comment","commit_id":"0a6f60646ff0aa0d66b3036fcefaba709c0aeb02"},{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"f09801259bc1994a6a9b6b0fc5fac5e88280761e","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"@base.NovaObjectRegistry.register_if(False)"},{"line_number":47,"context_line":"class NotificationPayloadBase(NotificationObject):"},{"line_number":48,"context_line":"    \"\"\"Base class for the payload of versioned notifications.\"\"\""},{"line_number":49,"context_line":"    # SCHEMA defines how to populate the payload fields. It is a dictionary"},{"line_number":50,"context_line":"    # where every key value pair has the following format:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_e43b7fe8","line":47,"updated":"2016-05-05 16:03:20.000000000","message":"So we did register_if(False) on this originally because we don\u0027t want to directly version NotificationPayloadBase, but rather the objects that inherit from it. Do we want to maintain that, and not register this in the register_notfication_objects() method?","commit_id":"0a6f60646ff0aa0d66b3036fcefaba709c0aeb02"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"87614cc1c1ca9a7f22dcd397eb80bdb5a618a071","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"@base.NovaObjectRegistry.register_if(False)"},{"line_number":47,"context_line":"class NotificationPayloadBase(NotificationObject):"},{"line_number":48,"context_line":"    \"\"\"Base class for the payload of versioned notifications.\"\"\""},{"line_number":49,"context_line":"    # SCHEMA defines how to populate the payload fields. It is a dictionary"},{"line_number":50,"context_line":"    # where every key value pair has the following format:"}],"source_content_type":"text/x-python","patch_set":3,"id":"dab17558_4a6e9300","line":47,"in_reply_to":"1a122d0e_e43b7fe8","updated":"2016-05-17 16:21:57.000000000","message":"Right. Let\u0027s not version the base classes","commit_id":"0a6f60646ff0aa0d66b3036fcefaba709c0aeb02"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"b78df3d7e4d106345d4d8a53c72f7355fbc4ccd5","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"@base.NovaObjectRegistry.register_if(False)"},{"line_number":47,"context_line":"class NotificationPayloadBase(NotificationObject):"},{"line_number":48,"context_line":"    \"\"\"Base class for the payload of versioned notifications.\"\"\""},{"line_number":49,"context_line":"    # SCHEMA defines how to populate the payload fields. It is a dictionary"},{"line_number":50,"context_line":"    # where every key value pair has the following format:"}],"source_content_type":"text/x-python","patch_set":3,"id":"bab6814e_a568b188","line":47,"in_reply_to":"bab6814e_85d3ff37","updated":"2016-05-19 07:09:50.000000000","message":"It works apparently in patch set 5. Can it be that it is enough to register the derived classes and that will take care of the parent classes?","commit_id":"0a6f60646ff0aa0d66b3036fcefaba709c0aeb02"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"94c57c9a16e1b2a7cf2f7b30438e1f25daa6964b","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"@base.NovaObjectRegistry.register_if(False)"},{"line_number":47,"context_line":"class NotificationPayloadBase(NotificationObject):"},{"line_number":48,"context_line":"    \"\"\"Base class for the payload of versioned notifications.\"\"\""},{"line_number":49,"context_line":"    # SCHEMA defines how to populate the payload fields. It is a dictionary"},{"line_number":50,"context_line":"    # where every key value pair has the following format:"}],"source_content_type":"text/x-python","patch_set":3,"id":"bab6814e_9c8db17e","line":47,"in_reply_to":"bab6814e_a568b188","updated":"2016-05-26 11:17:25.000000000","message":"Just to be on the safe side I added the register_if(False) to the base classes.","commit_id":"0a6f60646ff0aa0d66b3036fcefaba709c0aeb02"},{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"e342010f10239b12060e9f0a40683f8c8b647fba","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"@base.NovaObjectRegistry.register_if(False)"},{"line_number":47,"context_line":"class NotificationPayloadBase(NotificationObject):"},{"line_number":48,"context_line":"    \"\"\"Base class for the payload of versioned notifications.\"\"\""},{"line_number":49,"context_line":"    # SCHEMA defines how to populate the payload fields. It is a dictionary"},{"line_number":50,"context_line":"    # where every key value pair has the following format:"}],"source_content_type":"text/x-python","patch_set":3,"id":"bab6814e_85d3ff37","line":47,"in_reply_to":"bab6814e_d81a166e","updated":"2016-05-18 19:45:53.000000000","message":"That won\u0027t work because you need to do register_if(False) to make the fields act like attributes.","commit_id":"0a6f60646ff0aa0d66b3036fcefaba709c0aeb02"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bd8070a9aa18078635e96ed72e30e1a2840be445","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"@base.NovaObjectRegistry.register_if(False)"},{"line_number":47,"context_line":"class NotificationPayloadBase(NotificationObject):"},{"line_number":48,"context_line":"    \"\"\"Base class for the payload of versioned notifications.\"\"\""},{"line_number":49,"context_line":"    # SCHEMA defines how to populate the payload fields. It is a dictionary"},{"line_number":50,"context_line":"    # where every key value pair has the following format:"}],"source_content_type":"text/x-python","patch_set":3,"id":"bab6814e_d81a166e","line":47,"in_reply_to":"dab17558_4a6e9300","updated":"2016-05-18 16:47:43.000000000","message":"Would it be OK not registering these classes at all not even with register_if(False)?","commit_id":"0a6f60646ff0aa0d66b3036fcefaba709c0aeb02"},{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"4d87f171dcbab6231557111927d1da4b0d6c88b8","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from nova import rpc"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class NotificationRegistry(object):"},{"line_number":21,"context_line":"    notification_cls \u003d []"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":6,"id":"9abb7d3a_d40029ad","line":20,"updated":"2016-05-27 20:41:22.000000000","message":"why do we need a separate registry for the notifications? Can\u0027t you just add this functionality to the NovaObjectRegistry?","commit_id":"d032790cf632faadd765853874c9251bc5b30c03"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9c7ce4a9bfbc412e6aecc9b88959d9fc3987f62a","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from nova import rpc"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class NotificationRegistry(object):"},{"line_number":21,"context_line":"    notification_cls \u003d []"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":6,"id":"9abb7d3a_29e2c59f","line":20,"in_reply_to":"9abb7d3a_d40029ad","updated":"2016-06-06 07:33:25.000000000","message":"You are right we don\u0027t need. I moved this extra piece of functionality to the NovaObjectRegistry","commit_id":"d032790cf632faadd765853874c9251bc5b30c03"},{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"4d87f171dcbab6231557111927d1da4b0d6c88b8","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        return cls(host\u003dservice.host, binary\u003dservice.binary)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"@base.NovaObjectRegistry.register_if(False)"},{"line_number":122,"context_line":"class NotificationBase(NotificationObject):"},{"line_number":123,"context_line":"    \"\"\"Base class for versioned notifications."},{"line_number":124,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9abb7d3a_c0922857","line":121,"updated":"2016-05-27 20:41:22.000000000","message":"So why was this one registered with NovaObjectRegistry, but the others are registered with the NotificationRegistry?","commit_id":"d032790cf632faadd765853874c9251bc5b30c03"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9c7ce4a9bfbc412e6aecc9b88959d9fc3987f62a","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        return cls(host\u003dservice.host, binary\u003dservice.binary)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"@base.NovaObjectRegistry.register_if(False)"},{"line_number":122,"context_line":"class NotificationBase(NotificationObject):"},{"line_number":123,"context_line":"    \"\"\"Base class for versioned notifications."},{"line_number":124,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9abb7d3a_497909f6","line":121,"in_reply_to":"9abb7d3a_c0922857","updated":"2016-06-06 07:33:25.000000000","message":"Good point, it is confusing. Let\u0027s clear it up and use only the NovaObjectRegistry","commit_id":"d032790cf632faadd765853874c9251bc5b30c03"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"0c4fa7d49517265bc682d9fa72f7cdbcdae3a632","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"# Note(gibi): It is explicitly not registered as this class shall not be used"},{"line_number":41,"context_line":"# directly, it is just a base class for notification payloads."},{"line_number":42,"context_line":"@base.NovaObjectRegistry.register_if(False)"},{"line_number":43,"context_line":"class NotificationPayloadBase(base.NovaObject):"},{"line_number":44,"context_line":"    \"\"\"Base class for the payload of versioned notifications.\"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"7aa08908_5c88e6e7","side":"PARENT","line":41,"updated":"2016-06-06 10:56:02.000000000","message":"Not sure if we should keep the comments, but I guess its clear enough now.","commit_id":"42ae9baecf0cabaa3b53e8a9ac73343c2fa10560"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bbfdbd25eb8f17f624893178ad85eb2a4509e2b5","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"# Note(gibi): It is explicitly not registered as this class shall not be used"},{"line_number":41,"context_line":"# directly, it is just a base class for notification payloads."},{"line_number":42,"context_line":"@base.NovaObjectRegistry.register_if(False)"},{"line_number":43,"context_line":"class NotificationPayloadBase(base.NovaObject):"},{"line_number":44,"context_line":"    \"\"\"Base class for the payload of versioned notifications.\"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"7aa08908_720fc9e1","side":"PARENT","line":41,"in_reply_to":"7aa08908_5c88e6e7","updated":"2016-06-06 11:41:07.000000000","message":"I think it was in a wrong place as this suggested that this note need to be added to every base class. That would generate a lot of unnecessary noise.","commit_id":"42ae9baecf0cabaa3b53e8a9ac73343c2fa10560"},{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"7c9ae6ccb701ef2c9b83843effe6ffa47f25c5d1","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"# Note(gibi): It is explicitly not registered as this class shall not be used"},{"line_number":41,"context_line":"# directly, it is just a base class for notification payloads."},{"line_number":42,"context_line":"@base.NovaObjectRegistry.register_if(False)"},{"line_number":43,"context_line":"class NotificationPayloadBase(base.NovaObject):"},{"line_number":44,"context_line":"    \"\"\"Base class for the payload of versioned notifications.\"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"7aa08908_34d9a622","side":"PARENT","line":41,"in_reply_to":"7aa08908_720fc9e1","updated":"2016-06-06 13:42:09.000000000","message":"This comment is actually incorrect now if we wanted to keep it in. We\u0027re not registering anything in the notification space anymore.","commit_id":"42ae9baecf0cabaa3b53e8a9ac73343c2fa10560"},{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"5aa22fa6913ed029feed72124b067b6510888a23","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"@base.NovaObjectRegistry.register_if(False)"},{"line_number":21,"context_line":"class NotificationObject(base.NovaObject):"},{"line_number":22,"context_line":"    \"\"\"Base class for every notification related versioned object."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    This is mainly used to have a common base class by which every notification"}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_efcbc770","line":21,"updated":"2016-06-06 13:52:01.000000000","message":"Do you use this class at all anymore for discovering versioned objects? I\u0027m not opposed to leaving it in, in case we want something notification-specific later on.","commit_id":"cbde86ffcdc4e35f62d42ac685600f62e0ef90b6"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"5e5467393d6871fc694c93af68d899f644b7526b","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"@base.NovaObjectRegistry.register_if(False)"},{"line_number":21,"context_line":"class NotificationObject(base.NovaObject):"},{"line_number":22,"context_line":"    \"\"\"Base class for every notification related versioned object."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    This is mainly used to have a common base class by which every notification"}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_53feda37","line":21,"in_reply_to":"7aa08908_efcbc770","updated":"2016-06-07 09:31:52.000000000","message":"Good point, we are not using it any more for discovery. I will update the docstring. \nHowever we actually need a place to add non NovaObject specific but notification specific common behaviors. One example is coming the the Transform instance.delete patch. The payload there consists of embedded objects. On those objects we need to call obj_reset_changes() to avoid that every field is marked changed in the wire format after creation. See https://review.openstack.org/#/c/313654/21/nova/notifications/objects/base.py L34","commit_id":"cbde86ffcdc4e35f62d42ac685600f62e0ef90b6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7c349a403d706e7a21b0bab8477cf79e173acec7","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from nova.objects import base"},{"line_number":17,"context_line":"from nova.objects import fields"},{"line_number":18,"context_line":"from nova import rpc"}],"source_content_type":"text/x-python","patch_set":12,"id":"7aa08908_f2da9916","side":"PARENT","line":15,"updated":"2016-06-09 21:58:31.000000000","message":"nit: remove the unrelated whitespace change.","commit_id":"cdfecc65e79a111566b52cfbc76fa070b94d421e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7c349a403d706e7a21b0bab8477cf79e173acec7","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"@base.NovaObjectRegistry.register_if(False)"},{"line_number":21,"context_line":"class NotificationObject(base.NovaObject):"},{"line_number":22,"context_line":"    \"\"\"Base class for every notification related versioned object.\"\"\""},{"line_number":23,"context_line":"    # Version 1.0: Initial version"},{"line_number":24,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7aa08908_b26c9137","line":22,"updated":"2016-06-09 21:58:31.000000000","message":"This is a bit confusing when you already have NotificationBase, but OK.","commit_id":"520ee65a55bf9894d5915d3cebc892439d703312"}],"nova/notifications/objects/service.py":[{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"f09801259bc1994a6a9b6b0fc5fac5e88280761e","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from nova.notifications.objects import base"},{"line_number":17,"context_line":"from nova.objects import base as nova_base"},{"line_number":18,"context_line":"from nova.objects import fields"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_64700f09","line":17,"range":{"start_line":17,"start_character":33,"end_line":17,"end_character":37},"updated":"2016-05-05 16:03:20.000000000","message":"I guess I don\u0027t know why you changed this, but now that you did, I can\u0027t figure out which version of it is better for readability.","commit_id":"0a6f60646ff0aa0d66b3036fcefaba709c0aeb02"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"87614cc1c1ca9a7f22dcd397eb80bdb5a618a071","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from nova.notifications.objects import base"},{"line_number":17,"context_line":"from nova.objects import base as nova_base"},{"line_number":18,"context_line":"from nova.objects import fields"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"dab17558_3e071419","line":17,"range":{"start_line":17,"start_character":33,"end_line":17,"end_character":37},"in_reply_to":"1a122d0e_64700f09","updated":"2016-05-17 16:21:57.000000000","message":"I don\u0027t remember the reason either. :) I will keep it this way until somebody comes up with an argument why to change it back. :)","commit_id":"0a6f60646ff0aa0d66b3036fcefaba709c0aeb02"}],"nova/objects/base.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"0c4fa7d49517265bc682d9fa72f7cdbcdae3a632","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    def register_notification(cls, notification_cls):"},{"line_number":60,"context_line":"        \"\"\"Register a class as notification."},{"line_number":61,"context_line":"        Use only to register concrete notification or payload classes,"},{"line_number":62,"context_line":"        do not register base classes intended for inheritance only."},{"line_number":63,"context_line":"        \"\"\""},{"line_number":64,"context_line":"        cls.register_if(False)(notification_cls)"},{"line_number":65,"context_line":"        cls.notification_classes.append(notification_cls)"}],"source_content_type":"text/x-python","patch_set":8,"id":"7aa08908_1c9ade14","line":62,"updated":"2016-06-06 10:56:02.000000000","message":"ah, I see, thats a good replacement for the previous note.","commit_id":"85ab799e9a9ccc38947fb878d1634066bd5190e9"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"0c4fa7d49517265bc682d9fa72f7cdbcdae3a632","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        \"\"\""},{"line_number":64,"context_line":"        cls.register_if(False)(notification_cls)"},{"line_number":65,"context_line":"        cls.notification_classes.append(notification_cls)"},{"line_number":66,"context_line":"        return notification_cls"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"remotable_classmethod \u003d ovoo_base.remotable_classmethod"}],"source_content_type":"text/x-python","patch_set":8,"id":"7aa08908_fc2f129f","line":66,"updated":"2016-06-06 10:56:02.000000000","message":"We have dropped the whole major/minor version support we have above, but that seems fine for now.","commit_id":"85ab799e9a9ccc38947fb878d1634066bd5190e9"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bbfdbd25eb8f17f624893178ad85eb2a4509e2b5","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        \"\"\""},{"line_number":64,"context_line":"        cls.register_if(False)(notification_cls)"},{"line_number":65,"context_line":"        cls.notification_classes.append(notification_cls)"},{"line_number":66,"context_line":"        return notification_cls"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"remotable_classmethod \u003d ovoo_base.remotable_classmethod"}],"source_content_type":"text/x-python","patch_set":8,"id":"7aa08908_b2965192","line":66,"in_reply_to":"7aa08908_fc2f129f","updated":"2016-06-06 11:41:07.000000000","message":"I don\u0027t see that we lost something we really need for notifications. I guess this is mostly needed if we want to support porting between object versions.","commit_id":"85ab799e9a9ccc38947fb878d1634066bd5190e9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7c349a403d706e7a21b0bab8477cf79e173acec7","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        return notification_cls"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    @classmethod"},{"line_number":69,"context_line":"    def register_notification_objects(cls):"},{"line_number":70,"context_line":"        \"\"\"Register previously decorated notification as normal ovos."},{"line_number":71,"context_line":"        This is not intended for production use but only for testing and"},{"line_number":72,"context_line":"        document generation purposes."}],"source_content_type":"text/x-python","patch_set":12,"id":"7aa08908_b201313c","line":69,"range":{"start_line":69,"start_character":8,"end_line":69,"end_character":37},"updated":"2016-06-09 21:58:31.000000000","message":"I wonder if we should prefix with _ to make it a bit more obvious it\u0027s internal only.","commit_id":"520ee65a55bf9894d5915d3cebc892439d703312"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"355ae595ab711cdc1c444c8086a70c210f9bfed4","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        return notification_cls"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    @classmethod"},{"line_number":69,"context_line":"    def register_notification_objects(cls):"},{"line_number":70,"context_line":"        \"\"\"Register previously decorated notification as normal ovos."},{"line_number":71,"context_line":"        This is not intended for production use but only for testing and"},{"line_number":72,"context_line":"        document generation purposes."}],"source_content_type":"text/x-python","patch_set":12,"id":"7aa08908_d6f5bfcb","line":69,"range":{"start_line":69,"start_character":8,"end_line":69,"end_character":37},"in_reply_to":"7aa08908_b201313c","updated":"2016-06-10 08:00:15.000000000","message":"hmm good point, can be follow up though, I think.","commit_id":"520ee65a55bf9894d5915d3cebc892439d703312"}],"nova/tests/unit/notifications/objects/test_notification.py":[{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"f09801259bc1994a6a9b6b0fc5fac5e88280761e","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def register_notification_objects():"},{"line_number":28,"context_line":"    modules \u003d ["},{"line_number":29,"context_line":"        \u0027base\u0027,"},{"line_number":30,"context_line":"        \u0027service\u0027"},{"line_number":31,"context_line":"    ]"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    for module_name in modules:"},{"line_number":34,"context_line":"        module \u003d importlib.import_module(\u0027nova.notifications.objects.\u0027 +"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_e4441f74","line":31,"range":{"start_line":28,"start_character":0,"end_line":31,"end_character":5},"updated":"2016-05-05 16:03:20.000000000","message":"So here\u0027s a gap that I can see happening here that isn\u0027t caught in tests in any way: If someone adds a new notification module, and correctly obeys the register_if(False), they will not be part of the versioning test. And because they didn\u0027t add it here, they stay hidden, which means it will have to be caught in review.\n\nI\u0027ve done things before that we can walk the packages within a module and find everything that way. So this isn\u0027t wrong right now, and I\u0027m willing to let it go through. I might make a follow up patch to do auto-discovery of everything within the nova.notifications.objects module so we don\u0027t have to maintain this list.\n\nAn alternative method to this would be, is do we want to do nova.notifications.objects the same way as notifications.objects, where we put everything in __init__.py? That way we can just import nova.notifications.objects and check everything that\u0027s a NotificationObject.","commit_id":"0a6f60646ff0aa0d66b3036fcefaba709c0aeb02"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"87614cc1c1ca9a7f22dcd397eb80bdb5a618a071","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def register_notification_objects():"},{"line_number":28,"context_line":"    modules \u003d ["},{"line_number":29,"context_line":"        \u0027base\u0027,"},{"line_number":30,"context_line":"        \u0027service\u0027"},{"line_number":31,"context_line":"    ]"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    for module_name in modules:"},{"line_number":34,"context_line":"        module \u003d importlib.import_module(\u0027nova.notifications.objects.\u0027 +"}],"source_content_type":"text/x-python","patch_set":3,"id":"dab17558_5ec77844","line":31,"range":{"start_line":28,"start_character":0,"end_line":31,"end_character":5},"in_reply_to":"1a122d0e_e4441f74","updated":"2016-05-17 16:21:57.000000000","message":"I agree that this has the gap you described. This was a fast and easy solution for the problem at hand. I agree that auto-discovery would be nice. If you have time go ahead and add that modification here, or in a later patch.\nI\u0027m also wondering if we can add our own register_if function (or object registry subclass) that does what the ovos register_if does but as an addition collects the list of not-registered notification classes. This way we don\u0027t have to walk the whole package to discover notification classes. \nWhat do you think?","commit_id":"0a6f60646ff0aa0d66b3036fcefaba709c0aeb02"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"0c4fa7d49517265bc682d9fa72f7cdbcdae3a632","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from nova import test"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def register_notification_objects():"},{"line_number":25,"context_line":"    for cls in base.NovaObjectRegistry.notification_classes:"},{"line_number":26,"context_line":"        base.NovaObjectRegistry.register(cls)"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7aa08908_6f57e202","line":24,"updated":"2016-06-06 10:56:02.000000000","message":"Hmm, I do wonder why this is not called in this class, but I guess this makes sense.","commit_id":"85ab799e9a9ccc38947fb878d1634066bd5190e9"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bbfdbd25eb8f17f624893178ad85eb2a4509e2b5","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from nova import test"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def register_notification_objects():"},{"line_number":25,"context_line":"    for cls in base.NovaObjectRegistry.notification_classes:"},{"line_number":26,"context_line":"        base.NovaObjectRegistry.register(cls)"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7aa08908_2f315a0c","line":24,"in_reply_to":"7aa08908_6f57e202","updated":"2016-06-06 11:41:07.000000000","message":"I\u0027m not sure either that I put this is the proper place. This is called from two places, from the doc generations, and from the nova.tests.unit.objects.test_objects (for version bump testing). It is definitely not needed for the TestNotificationBase. I think I will move it to the NovaObjectRegistry (that will be more cohesive that way)","commit_id":"85ab799e9a9ccc38947fb878d1634066bd5190e9"}]}
