)]}'
{"dragonflow/db/api_nb.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"64aa2baf8cfc312c74b02de32acf11c3848014ce","unresolved":false,"context_lines":[{"line_number":927,"context_line":""},{"line_number":928,"context_line":"            setattr(full_obj, key, new_attr)"},{"line_number":929,"context_line":""},{"line_number":930,"context_line":"        full_obj.on_update_pre()"},{"line_number":931,"context_line":"        serialized_obj \u003d jsonutils.dumps(full_obj.to_struct())"},{"line_number":932,"context_line":"        self.driver.set_key(model.table_name, full_obj.id,"},{"line_number":933,"context_line":"                            serialized_obj, full_obj.topic)"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a3905b3_d87f0913","line":930,"updated":"2017-01-23 16:59:24.000000000","message":"Maybe pass original object too?","commit_id":"1ba5ad71092ea17de98456ce83848fa228e2e012"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"08b68bb1a682f0e0ef5b3b7431f4dbc8d16a7593","unresolved":false,"context_lines":[{"line_number":927,"context_line":""},{"line_number":928,"context_line":"            setattr(full_obj, key, new_attr)"},{"line_number":929,"context_line":""},{"line_number":930,"context_line":"        full_obj.on_update_pre()"},{"line_number":931,"context_line":"        serialized_obj \u003d jsonutils.dumps(full_obj.to_struct())"},{"line_number":932,"context_line":"        self.driver.set_key(model.table_name, full_obj.id,"},{"line_number":933,"context_line":"                            serialized_obj, full_obj.topic)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a461143_82061c1b","line":930,"in_reply_to":"5a3905b3_d87f0913","updated":"2017-01-29 14:18:42.000000000","message":"There is no scenario where we use this hook yet, so I am not convinced we need that parameter. We can add later if we see that it is needed.","commit_id":"1ba5ad71092ea17de98456ce83848fa228e2e012"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"64aa2baf8cfc312c74b02de32acf11c3848014ce","unresolved":false,"context_lines":[{"line_number":951,"context_line":"            LOG.warning("},{"line_number":952,"context_line":"                _LW(\u0027Could not find object %(id)s to delete in %(table)s\u0027),"},{"line_number":953,"context_line":"                extra\u003d{\u0027id\u0027: id, \u0027table\u0027: model.table_name})"},{"line_number":954,"context_line":"            raise"},{"line_number":955,"context_line":""},{"line_number":956,"context_line":"    def get(self, lean_obj):"},{"line_number":957,"context_line":"        \"\"\"Retrieve a model instance from the database. This function uses"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a3905b3_d8cd4967","line":954,"range":{"start_line":954,"start_character":12,"end_line":954,"end_character":17},"updated":"2017-01-23 16:59:24.000000000","message":"I think this is redundant. Do we care if the object was not found, as long as it\u0027s gone? I think the warning is enough.","commit_id":"1ba5ad71092ea17de98456ce83848fa228e2e012"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"08b68bb1a682f0e0ef5b3b7431f4dbc8d16a7593","unresolved":false,"context_lines":[{"line_number":951,"context_line":"            LOG.warning("},{"line_number":952,"context_line":"                _LW(\u0027Could not find object %(id)s to delete in %(table)s\u0027),"},{"line_number":953,"context_line":"                extra\u003d{\u0027id\u0027: id, \u0027table\u0027: model.table_name})"},{"line_number":954,"context_line":"            raise"},{"line_number":955,"context_line":""},{"line_number":956,"context_line":"    def get(self, lean_obj):"},{"line_number":957,"context_line":"        \"\"\"Retrieve a model instance from the database. This function uses"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a461143_a2079816","line":954,"range":{"start_line":954,"start_character":12,"end_line":954,"end_character":17},"in_reply_to":"5a3905b3_d8cd4967","updated":"2017-01-29 14:18:42.000000000","message":"I can remove it though this exception is not suppressed because other delete_ methods above raise it (from db_driver.delete_key)","commit_id":"1ba5ad71092ea17de98456ce83848fa228e2e012"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"64aa2baf8cfc312c74b02de32acf11c3848014ce","unresolved":false,"context_lines":[{"line_number":981,"context_line":"        \"\"\""},{"line_number":982,"context_line":"        all_objects \u003d ["},{"line_number":983,"context_line":"            model.from_json(e)"},{"line_number":984,"context_line":"            for e in self.driver.get_all_entries(model.table_name, topic)"},{"line_number":985,"context_line":"        ]"},{"line_number":986,"context_line":"        return model.on_get_all_post(all_objects)"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a3905b3_f8f6858d","line":984,"range":{"start_line":984,"start_character":21,"end_line":984,"end_character":73},"updated":"2017-01-23 16:59:24.000000000","message":"Maybe put this in a variable?","commit_id":"1ba5ad71092ea17de98456ce83848fa228e2e012"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"08b68bb1a682f0e0ef5b3b7431f4dbc8d16a7593","unresolved":false,"context_lines":[{"line_number":981,"context_line":"        \"\"\""},{"line_number":982,"context_line":"        all_objects \u003d ["},{"line_number":983,"context_line":"            model.from_json(e)"},{"line_number":984,"context_line":"            for e in self.driver.get_all_entries(model.table_name, topic)"},{"line_number":985,"context_line":"        ]"},{"line_number":986,"context_line":"        return model.on_get_all_post(all_objects)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a461143_e2152040","line":984,"range":{"start_line":984,"start_character":21,"end_line":984,"end_character":73},"in_reply_to":"5a3905b3_f8f6858d","updated":"2017-01-29 14:18:42.000000000","message":"Done","commit_id":"1ba5ad71092ea17de98456ce83848fa228e2e012"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"1f7350aadd35315633566839f94dfac1d62bb8a0","unresolved":false,"context_lines":[{"line_number":897,"context_line":"        return res"},{"line_number":898,"context_line":""},{"line_number":899,"context_line":"    @classmethod"},{"line_number":900,"context_line":"    def _get_topic(cls, obj):"},{"line_number":901,"context_line":"        try:"},{"line_number":902,"context_line":"            return obj.topic"},{"line_number":903,"context_line":"        except AttributeError:"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a461143_f77960c9","line":900,"updated":"2017-01-29 14:05:39.000000000","message":"Isn\u0027t this just getattr(obj, \u0027topic\u0027, None)?","commit_id":"b917cb5e4d3079aa0c64157e4a57972934f868f8"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"7a4e124d196cbbd500f46a8a41e92b313f7893c3","unresolved":false,"context_lines":[{"line_number":897,"context_line":"        return res"},{"line_number":898,"context_line":""},{"line_number":899,"context_line":"    @classmethod"},{"line_number":900,"context_line":"    def _get_topic(cls, obj):"},{"line_number":901,"context_line":"        try:"},{"line_number":902,"context_line":"            return obj.topic"},{"line_number":903,"context_line":"        except AttributeError:"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a430d35_e3201f4c","line":900,"in_reply_to":"3a461143_827b7c8b","updated":"2017-02-04 20:39:11.000000000","message":"Why is this more readable? You could at least implement _get_topic as getattr(...), no?","commit_id":"b917cb5e4d3079aa0c64157e4a57972934f868f8"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"dda67be77d37e4b33918788f8716bc4e0f02a784","unresolved":false,"context_lines":[{"line_number":897,"context_line":"        return res"},{"line_number":898,"context_line":""},{"line_number":899,"context_line":"    @classmethod"},{"line_number":900,"context_line":"    def _get_topic(cls, obj):"},{"line_number":901,"context_line":"        try:"},{"line_number":902,"context_line":"            return obj.topic"},{"line_number":903,"context_line":"        except AttributeError:"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a461143_827b7c8b","line":900,"in_reply_to":"3a461143_f77960c9","updated":"2017-01-29 14:24:24.000000000","message":"Yes, but IMO it makes a code bit more readable.","commit_id":"b917cb5e4d3079aa0c64157e4a57972934f868f8"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"1f7350aadd35315633566839f94dfac1d62bb8a0","unresolved":false,"context_lines":[{"line_number":932,"context_line":"        if not changed_fields:"},{"line_number":933,"context_line":"            return"},{"line_number":934,"context_line":""},{"line_number":935,"context_line":"        full_obj.on_update_pre()"},{"line_number":936,"context_line":"        serialized_obj \u003d full_obj.to_json()"},{"line_number":937,"context_line":"        topic \u003d self._get_topic(full_obj)"},{"line_number":938,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3a461143_3780488b","line":935,"updated":"2017-01-29 14:05:39.000000000","message":"Again: Maybe pass the original object too?","commit_id":"b917cb5e4d3079aa0c64157e4a57972934f868f8"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"dda67be77d37e4b33918788f8716bc4e0f02a784","unresolved":false,"context_lines":[{"line_number":932,"context_line":"        if not changed_fields:"},{"line_number":933,"context_line":"            return"},{"line_number":934,"context_line":""},{"line_number":935,"context_line":"        full_obj.on_update_pre()"},{"line_number":936,"context_line":"        serialized_obj \u003d full_obj.to_json()"},{"line_number":937,"context_line":"        topic \u003d self._get_topic(full_obj)"},{"line_number":938,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3a461143_2233a8f7","line":935,"in_reply_to":"3a461143_3780488b","updated":"2017-01-29 14:24:24.000000000","message":"Reply in PS14","commit_id":"b917cb5e4d3079aa0c64157e4a57972934f868f8"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"dda67be77d37e4b33918788f8716bc4e0f02a784","unresolved":false,"context_lines":[{"line_number":932,"context_line":"        if not changed_fields:"},{"line_number":933,"context_line":"            return"},{"line_number":934,"context_line":""},{"line_number":935,"context_line":"        full_obj.on_update_pre()"},{"line_number":936,"context_line":"        serialized_obj \u003d full_obj.to_json()"},{"line_number":937,"context_line":"        topic \u003d self._get_topic(full_obj)"},{"line_number":938,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3a461143_a255d8fa","line":935,"in_reply_to":"3a461143_3780488b","updated":"2017-01-29 14:24:24.000000000","message":"There is no scenario where we use this hook yet, so I am not convinced we need that parameter. We can add later if we see that it is needed.","commit_id":"b917cb5e4d3079aa0c64157e4a57972934f868f8"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"7a4e124d196cbbd500f46a8a41e92b313f7893c3","unresolved":false,"context_lines":[{"line_number":932,"context_line":"        if not changed_fields:"},{"line_number":933,"context_line":"            return"},{"line_number":934,"context_line":""},{"line_number":935,"context_line":"        full_obj.on_update_pre()"},{"line_number":936,"context_line":"        serialized_obj \u003d full_obj.to_json()"},{"line_number":937,"context_line":"        topic \u003d self._get_topic(full_obj)"},{"line_number":938,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"1a430d35_83d83b55","line":935,"in_reply_to":"3a461143_a255d8fa","updated":"2017-02-04 20:39:11.000000000","message":"For instance, l3_proactive_app, router_updated, uses the original router to know exactly which flows to change. (But this may be update_post, not update_pre).\n\nIn any case, it doesn\u0027t cost us anything, and it\u0027s a useful feature.","commit_id":"b917cb5e4d3079aa0c64157e4a57972934f868f8"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"1f7350aadd35315633566839f94dfac1d62bb8a0","unresolved":false,"context_lines":[{"line_number":959,"context_line":"            LOG.warning("},{"line_number":960,"context_line":"                _LW(\u0027Could not find object %(id)s to delete in %(table)s\u0027),"},{"line_number":961,"context_line":"                extra\u003d{\u0027id\u0027: id, \u0027table\u0027: model.table_name})"},{"line_number":962,"context_line":"            raise"},{"line_number":963,"context_line":""},{"line_number":964,"context_line":"    def get(self, lean_obj):"},{"line_number":965,"context_line":"        \"\"\"Retrieve a model instance from the database. This function uses"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a461143_577dd4af","line":962,"range":{"start_line":962,"start_character":0,"end_line":962,"end_character":17},"updated":"2017-01-29 14:05:39.000000000","message":"Again: I think this is redundant. Do we care if the object was not found, as long as it\u0027s gone? I think the warning is enough.","commit_id":"b917cb5e4d3079aa0c64157e4a57972934f868f8"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"dda67be77d37e4b33918788f8716bc4e0f02a784","unresolved":false,"context_lines":[{"line_number":959,"context_line":"            LOG.warning("},{"line_number":960,"context_line":"                _LW(\u0027Could not find object %(id)s to delete in %(table)s\u0027),"},{"line_number":961,"context_line":"                extra\u003d{\u0027id\u0027: id, \u0027table\u0027: model.table_name})"},{"line_number":962,"context_line":"            raise"},{"line_number":963,"context_line":""},{"line_number":964,"context_line":"    def get(self, lean_obj):"},{"line_number":965,"context_line":"        \"\"\"Retrieve a model instance from the database. This function uses"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a461143_82545cff","line":962,"range":{"start_line":962,"start_character":0,"end_line":962,"end_character":17},"in_reply_to":"3a461143_577dd4af","updated":"2017-01-29 14:24:24.000000000","message":"I can remove it though this exception is not suppressed because other delete_ methods above raise it (from db_driver.delete_key)","commit_id":"b917cb5e4d3079aa0c64157e4a57972934f868f8"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"7a4e124d196cbbd500f46a8a41e92b313f7893c3","unresolved":false,"context_lines":[{"line_number":959,"context_line":"            LOG.warning("},{"line_number":960,"context_line":"                _LW(\u0027Could not find object %(id)s to delete in %(table)s\u0027),"},{"line_number":961,"context_line":"                extra\u003d{\u0027id\u0027: id, \u0027table\u0027: model.table_name})"},{"line_number":962,"context_line":"            raise"},{"line_number":963,"context_line":""},{"line_number":964,"context_line":"    def get(self, lean_obj):"},{"line_number":965,"context_line":"        \"\"\"Retrieve a model instance from the database. This function uses"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a430d35_c32b232f","line":962,"range":{"start_line":962,"start_character":0,"end_line":962,"end_character":17},"in_reply_to":"3a461143_82545cff","updated":"2017-02-04 20:39:11.000000000","message":"IIRC, delete_key should raise DBKeyNotFound in case the key isn\u0027t found, and not any other exception. At least according to the docs in db_api.py.","commit_id":"b917cb5e4d3079aa0c64157e4a57972934f868f8"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"1f7350aadd35315633566839f94dfac1d62bb8a0","unresolved":false,"context_lines":[{"line_number":989,"context_line":"        \"\"\""},{"line_number":990,"context_line":"        all_objects \u003d ["},{"line_number":991,"context_line":"            model.from_json(e)"},{"line_number":992,"context_line":"            for e in self.driver.get_all_entries(model.table_name, topic)"},{"line_number":993,"context_line":"        ]"},{"line_number":994,"context_line":"        return model.on_get_all_post(all_objects)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a461143_9751fc38","line":992,"range":{"start_line":992,"start_character":21,"end_line":992,"end_character":73},"updated":"2017-01-29 14:05:39.000000000","message":"Again: Maybe put this in a variable?","commit_id":"b917cb5e4d3079aa0c64157e4a57972934f868f8"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"dda67be77d37e4b33918788f8716bc4e0f02a784","unresolved":false,"context_lines":[{"line_number":989,"context_line":"        \"\"\""},{"line_number":990,"context_line":"        all_objects \u003d ["},{"line_number":991,"context_line":"            model.from_json(e)"},{"line_number":992,"context_line":"            for e in self.driver.get_all_entries(model.table_name, topic)"},{"line_number":993,"context_line":"        ]"},{"line_number":994,"context_line":"        return model.on_get_all_post(all_objects)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a461143_c25ae429","line":992,"range":{"start_line":992,"start_character":21,"end_line":992,"end_character":73},"in_reply_to":"3a461143_9751fc38","updated":"2017-01-29 14:24:24.000000000","message":"Done","commit_id":"b917cb5e4d3079aa0c64157e4a57972934f868f8"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"fc417eb01a5a116e3bc0f957c8814711a2ae99c6","unresolved":false,"context_lines":[{"line_number":897,"context_line":"        return res"},{"line_number":898,"context_line":""},{"line_number":899,"context_line":"    @classmethod"},{"line_number":900,"context_line":"    def _get_topic(cls, obj):"},{"line_number":901,"context_line":"        try:"},{"line_number":902,"context_line":"            return obj.topic"},{"line_number":903,"context_line":"        except AttributeError:"}],"source_content_type":"text/x-python","patch_set":25,"id":"1a430d35_031e0b0c","line":900,"updated":"2017-02-04 20:38:56.000000000","message":"Why is this more readable? You could at least implement _get_topic as getattr(...), no?","commit_id":"bc108d78a431ffc70dbc13e739d856223e4332c3"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"1fb07a55fb91a1382f0491056bd7630ae941b706","unresolved":false,"context_lines":[{"line_number":897,"context_line":"        return res"},{"line_number":898,"context_line":""},{"line_number":899,"context_line":"    @classmethod"},{"line_number":900,"context_line":"    def _get_topic(cls, obj):"},{"line_number":901,"context_line":"        try:"},{"line_number":902,"context_line":"            return obj.topic"},{"line_number":903,"context_line":"        except AttributeError:"}],"source_content_type":"text/x-python","patch_set":25,"id":"1a430d35_6ff32e74","line":900,"in_reply_to":"1a430d35_031e0b0c","updated":"2017-02-05 07:06:39.000000000","message":"I agree that inside this method getattr(obj, \u0027topic\u0027, None) makes more sense, I\u0027ll change that (and move it outside the class)\n\nAbout replacing all the calls to getattrs, it comes down to personal preference, I think get_topic(on_whom) is quicker to read than getattr(on_whom, \u0027topic\u0027, None (desired default))","commit_id":"bc108d78a431ffc70dbc13e739d856223e4332c3"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"20f088096eb7607d07c2499d9ecb41306a0c591b","unresolved":false,"context_lines":[{"line_number":897,"context_line":"        return res"},{"line_number":898,"context_line":""},{"line_number":899,"context_line":"    @classmethod"},{"line_number":900,"context_line":"    def _get_topic(cls, obj):"},{"line_number":901,"context_line":"        try:"},{"line_number":902,"context_line":"            return obj.topic"},{"line_number":903,"context_line":"        except AttributeError:"}],"source_content_type":"text/x-python","patch_set":25,"id":"1a430d35_09ac659f","line":900,"in_reply_to":"1a430d35_6ff32e74","updated":"2017-02-05 13:59:25.000000000","message":"Good enough.","commit_id":"bc108d78a431ffc70dbc13e739d856223e4332c3"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"fc417eb01a5a116e3bc0f957c8814711a2ae99c6","unresolved":false,"context_lines":[{"line_number":932,"context_line":"        if not changed_fields:"},{"line_number":933,"context_line":"            return"},{"line_number":934,"context_line":""},{"line_number":935,"context_line":"        full_obj.on_update_pre()"},{"line_number":936,"context_line":"        serialized_obj \u003d full_obj.to_json()"},{"line_number":937,"context_line":"        topic \u003d self._get_topic(full_obj)"},{"line_number":938,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"1a430d35_a3dd3744","line":935,"updated":"2017-02-04 20:38:56.000000000","message":"For instance, l3_proactive_app, router_updated, uses the original router to know exactly which flows to change. (But this may be update_post, not update_pre).\n\nIn any case, it doesn\u0027t cost us anything, and it\u0027s a useful feature.\n\nLeaving as a nit.","commit_id":"bc108d78a431ffc70dbc13e739d856223e4332c3"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"1fb07a55fb91a1382f0491056bd7630ae941b706","unresolved":false,"context_lines":[{"line_number":932,"context_line":"        if not changed_fields:"},{"line_number":933,"context_line":"            return"},{"line_number":934,"context_line":""},{"line_number":935,"context_line":"        full_obj.on_update_pre()"},{"line_number":936,"context_line":"        serialized_obj \u003d full_obj.to_json()"},{"line_number":937,"context_line":"        topic \u003d self._get_topic(full_obj)"},{"line_number":938,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"1a430d35_8fe85a7e","line":935,"in_reply_to":"1a430d35_439d7364","updated":"2017-02-05 07:06:39.000000000","message":"I think its best to add those as we progress with the transition.","commit_id":"bc108d78a431ffc70dbc13e739d856223e4332c3"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"20f088096eb7607d07c2499d9ecb41306a0c591b","unresolved":false,"context_lines":[{"line_number":932,"context_line":"        if not changed_fields:"},{"line_number":933,"context_line":"            return"},{"line_number":934,"context_line":""},{"line_number":935,"context_line":"        full_obj.on_update_pre()"},{"line_number":936,"context_line":"        serialized_obj \u003d full_obj.to_json()"},{"line_number":937,"context_line":"        topic \u003d self._get_topic(full_obj)"},{"line_number":938,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"1a430d35_29af6195","line":935,"in_reply_to":"1a430d35_8fe85a7e","updated":"2017-02-05 13:59:25.000000000","message":"Leaving as a nit. Let others voice their opinion.","commit_id":"bc108d78a431ffc70dbc13e739d856223e4332c3"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"e19ec33187d560e8ccdbc7d7f5aca4a0cc55ac41","unresolved":false,"context_lines":[{"line_number":932,"context_line":"        if not changed_fields:"},{"line_number":933,"context_line":"            return"},{"line_number":934,"context_line":""},{"line_number":935,"context_line":"        full_obj.on_update_pre()"},{"line_number":936,"context_line":"        serialized_obj \u003d full_obj.to_json()"},{"line_number":937,"context_line":"        topic \u003d self._get_topic(full_obj)"},{"line_number":938,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"1a430d35_439d7364","line":935,"in_reply_to":"1a430d35_a3dd3744","updated":"2017-02-04 20:50:05.000000000","message":"So apparently reviewing at 22:38 makes one confuse events and hooks.\n\nI don\u0027t have an example at the moment.","commit_id":"bc108d78a431ffc70dbc13e739d856223e4332c3"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"fc417eb01a5a116e3bc0f957c8814711a2ae99c6","unresolved":false,"context_lines":[{"line_number":959,"context_line":"            LOG.warning("},{"line_number":960,"context_line":"                _LW(\u0027Could not find object %(id)s to delete in %(table)s\u0027),"},{"line_number":961,"context_line":"                extra\u003d{\u0027id\u0027: id, \u0027table\u0027: model.table_name})"},{"line_number":962,"context_line":"            raise"},{"line_number":963,"context_line":""},{"line_number":964,"context_line":"    def get(self, lean_obj):"},{"line_number":965,"context_line":"        \"\"\"Retrieve a model instance from the database. This function uses"}],"source_content_type":"text/x-python","patch_set":25,"id":"1a430d35_c3e24303","line":962,"range":{"start_line":962,"start_character":0,"end_line":962,"end_character":17},"updated":"2017-02-04 20:38:56.000000000","message":"IIRC, delete_key should raise DBKeyNotFound in case the key isn\u0027t found, and not any other exception. At least according to the docs in db_api.py.","commit_id":"bc108d78a431ffc70dbc13e739d856223e4332c3"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"1fb07a55fb91a1382f0491056bd7630ae941b706","unresolved":false,"context_lines":[{"line_number":959,"context_line":"            LOG.warning("},{"line_number":960,"context_line":"                _LW(\u0027Could not find object %(id)s to delete in %(table)s\u0027),"},{"line_number":961,"context_line":"                extra\u003d{\u0027id\u0027: id, \u0027table\u0027: model.table_name})"},{"line_number":962,"context_line":"            raise"},{"line_number":963,"context_line":""},{"line_number":964,"context_line":"    def get(self, lean_obj):"},{"line_number":965,"context_line":"        \"\"\"Retrieve a model instance from the database. This function uses"}],"source_content_type":"text/x-python","patch_set":25,"id":"1a430d35_cf02623e","line":962,"range":{"start_line":962,"start_character":0,"end_line":962,"end_character":17},"in_reply_to":"1a430d35_c3e24303","updated":"2017-02-05 07:06:39.000000000","message":"And thats exactly the exception we catch here, I\u0027m not sure I understand the comment.","commit_id":"bc108d78a431ffc70dbc13e739d856223e4332c3"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"20f088096eb7607d07c2499d9ecb41306a0c591b","unresolved":false,"context_lines":[{"line_number":959,"context_line":"            LOG.warning("},{"line_number":960,"context_line":"                _LW(\u0027Could not find object %(id)s to delete in %(table)s\u0027),"},{"line_number":961,"context_line":"                extra\u003d{\u0027id\u0027: id, \u0027table\u0027: model.table_name})"},{"line_number":962,"context_line":"            raise"},{"line_number":963,"context_line":""},{"line_number":964,"context_line":"    def get(self, lean_obj):"},{"line_number":965,"context_line":"        \"\"\"Retrieve a model instance from the database. This function uses"}],"source_content_type":"text/x-python","patch_set":25,"id":"1a430d35_e9a479ba","line":962,"range":{"start_line":962,"start_character":0,"end_line":962,"end_character":17},"in_reply_to":"1a430d35_cf02623e","updated":"2017-02-05 13:59:25.000000000","message":"Yes. But why are we re-raising it? The warning is enough.","commit_id":"bc108d78a431ffc70dbc13e739d856223e4332c3"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"dff8dcf6c27cd1502d2d81817136fc6cb92633b5","unresolved":false,"context_lines":[{"line_number":959,"context_line":"            LOG.warning("},{"line_number":960,"context_line":"                _LW(\u0027Could not find object %(id)s to delete in %(table)s\u0027),"},{"line_number":961,"context_line":"                extra\u003d{\u0027id\u0027: id, \u0027table\u0027: model.table_name})"},{"line_number":962,"context_line":"            raise"},{"line_number":963,"context_line":""},{"line_number":964,"context_line":"    def get(self, lean_obj):"},{"line_number":965,"context_line":"        \"\"\"Retrieve a model instance from the database. This function uses"}],"source_content_type":"text/x-python","patch_set":25,"id":"1a430d35_e907197f","line":962,"range":{"start_line":962,"start_character":0,"end_line":962,"end_character":17},"in_reply_to":"1a430d35_e9a479ba","updated":"2017-02-05 14:13:16.000000000","message":"I see this is the previous behaviour, but as we\u0027re already here, would it make more sense to nor re-raise the exception? We don\u0027t care if it was already deleted.","commit_id":"bc108d78a431ffc70dbc13e739d856223e4332c3"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"69fbd8c51c316ab3632ab3bdc871b448711409b1","unresolved":false,"context_lines":[{"line_number":231,"context_line":"            self.db_consistency_manager.process(False)"},{"line_number":232,"context_line":"            return"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        try:"},{"line_number":235,"context_line":"            model_class \u003d mf.get_model(table)"},{"line_number":236,"context_line":"        except KeyError:"},{"line_number":237,"context_line":"            model_class \u003d None"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        if model_class:"},{"line_number":240,"context_line":"            if action \u003d\u003d \u0027delete\u0027:"},{"line_number":241,"context_line":"                # FIXME temporary adaptation to convert new model types"},{"line_number":242,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":33,"id":"fa31d9ce_613f06b4","line":239,"range":{"start_line":234,"start_character":0,"end_line":239,"end_character":23},"updated":"2017-02-16 02:53:49.000000000","message":"it looks like a try/except/else to me. Would it better to organize code that way?","commit_id":"f74b6ed9088713774d2a0394ba4de7fc31593fdb"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"ec74a8d33b8fa29e81c4303f72e81ed66fd153ad","unresolved":false,"context_lines":[{"line_number":231,"context_line":"            self.db_consistency_manager.process(False)"},{"line_number":232,"context_line":"            return"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        try:"},{"line_number":235,"context_line":"            model_class \u003d mf.get_model(table)"},{"line_number":236,"context_line":"        except KeyError:"},{"line_number":237,"context_line":"            model_class \u003d None"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"        if model_class:"},{"line_number":240,"context_line":"            if action \u003d\u003d \u0027delete\u0027:"},{"line_number":241,"context_line":"                # FIXME temporary adaptation to convert new model types"},{"line_number":242,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":33,"id":"fa31d9ce_0af81bc4","line":239,"range":{"start_line":234,"start_character":0,"end_line":239,"end_character":23},"in_reply_to":"fa31d9ce_613f06b4","updated":"2017-02-16 08:31:28.000000000","message":"I agree","commit_id":"f74b6ed9088713774d2a0394ba4de7fc31593fdb"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"69fbd8c51c316ab3632ab3bdc871b448711409b1","unresolved":false,"context_lines":[{"line_number":917,"context_line":""},{"line_number":918,"context_line":"    def update(self, obj):"},{"line_number":919,"context_line":"        \"\"\"Update the provided object in the database and publich an event"},{"line_number":920,"context_line":"           about its creation."},{"line_number":921,"context_line":""},{"line_number":922,"context_line":"           This method reads the existing object from the database and updates"},{"line_number":923,"context_line":"           any non-empty fields of the provided object. Retrieval happens by"}],"source_content_type":"text/x-python","patch_set":33,"id":"fa31d9ce_c176f2a2","line":920,"range":{"start_line":920,"start_character":21,"end_line":920,"end_character":29},"updated":"2017-02-16 02:53:49.000000000","message":"update","commit_id":"f74b6ed9088713774d2a0394ba4de7fc31593fdb"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"ec74a8d33b8fa29e81c4303f72e81ed66fd153ad","unresolved":false,"context_lines":[{"line_number":917,"context_line":""},{"line_number":918,"context_line":"    def update(self, obj):"},{"line_number":919,"context_line":"        \"\"\"Update the provided object in the database and publich an event"},{"line_number":920,"context_line":"           about its creation."},{"line_number":921,"context_line":""},{"line_number":922,"context_line":"           This method reads the existing object from the database and updates"},{"line_number":923,"context_line":"           any non-empty fields of the provided object. Retrieval happens by"}],"source_content_type":"text/x-python","patch_set":33,"id":"fa31d9ce_2ae31f07","line":920,"range":{"start_line":920,"start_character":21,"end_line":920,"end_character":29},"in_reply_to":"fa31d9ce_c176f2a2","updated":"2017-02-16 08:31:28.000000000","message":"Changing :)","commit_id":"f74b6ed9088713774d2a0394ba4de7fc31593fdb"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"69fbd8c51c316ab3632ab3bdc871b448711409b1","unresolved":false,"context_lines":[{"line_number":956,"context_line":"        try:"},{"line_number":957,"context_line":"            self.driver.delete_key(model.table_name, obj.id, topic)"},{"line_number":958,"context_line":"        except df_exceptions.DBKeyNotFound:"},{"line_number":959,"context_line":"            LOG.warning("},{"line_number":960,"context_line":"                _LW(\u0027Could not find object %(id)s to delete in %(table)s\u0027),"},{"line_number":961,"context_line":"                extra\u003d{\u0027id\u0027: id, \u0027table\u0027: model.table_name})"},{"line_number":962,"context_line":"            raise"},{"line_number":963,"context_line":""},{"line_number":964,"context_line":"        self._send_db_change_event(model.table_name, obj.id, \u0027delete\u0027,"},{"line_number":965,"context_line":"                                   obj.id, topic)"}],"source_content_type":"text/x-python","patch_set":33,"id":"fa31d9ce_81023ab2","line":962,"range":{"start_line":959,"start_character":0,"end_line":962,"end_character":17},"updated":"2017-02-16 02:53:49.000000000","message":"Better to use oslo_utils.excutils.save_and_reraise_exception. Some known issues of reraise have been taken care by that utils.","commit_id":"f74b6ed9088713774d2a0394ba4de7fc31593fdb"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"ec74a8d33b8fa29e81c4303f72e81ed66fd153ad","unresolved":false,"context_lines":[{"line_number":956,"context_line":"        try:"},{"line_number":957,"context_line":"            self.driver.delete_key(model.table_name, obj.id, topic)"},{"line_number":958,"context_line":"        except df_exceptions.DBKeyNotFound:"},{"line_number":959,"context_line":"            LOG.warning("},{"line_number":960,"context_line":"                _LW(\u0027Could not find object %(id)s to delete in %(table)s\u0027),"},{"line_number":961,"context_line":"                extra\u003d{\u0027id\u0027: id, \u0027table\u0027: model.table_name})"},{"line_number":962,"context_line":"            raise"},{"line_number":963,"context_line":""},{"line_number":964,"context_line":"        self._send_db_change_event(model.table_name, obj.id, \u0027delete\u0027,"},{"line_number":965,"context_line":"                                   obj.id, topic)"}],"source_content_type":"text/x-python","patch_set":33,"id":"fa31d9ce_eaae6797","line":962,"range":{"start_line":959,"start_character":0,"end_line":962,"end_character":17},"in_reply_to":"fa31d9ce_81023ab2","updated":"2017-02-16 08:31:28.000000000","message":"Ok, I\u0027ll try using that.","commit_id":"f74b6ed9088713774d2a0394ba4de7fc31593fdb"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"69fbd8c51c316ab3632ab3bdc871b448711409b1","unresolved":false,"context_lines":[{"line_number":974,"context_line":"        \"\"\""},{"line_number":975,"context_line":"        model \u003d type(lean_obj)"},{"line_number":976,"context_line":"        try:"},{"line_number":977,"context_line":"            serialized_obj \u003d self.driver.get_key("},{"line_number":978,"context_line":"                model.table_name,"},{"line_number":979,"context_line":"                lean_obj.id,"},{"line_number":980,"context_line":"                _get_topic(lean_obj),"},{"line_number":981,"context_line":"            )"},{"line_number":982,"context_line":"            return model.from_json(serialized_obj)"},{"line_number":983,"context_line":"        except df_exceptions.DBKeyNotFound:"},{"line_number":984,"context_line":"            LOG.exception("},{"line_number":985,"context_line":"                _LE(\u0027Could not get object %(id)s from table %(table)s\u0027),"}],"source_content_type":"text/x-python","patch_set":33,"id":"fa31d9ce_e1a696bf","line":982,"range":{"start_line":977,"start_character":0,"end_line":982,"end_character":50},"updated":"2017-02-16 02:53:49.000000000","message":"some db driver(e.g redis) will return None is the key is not in DB(yes, it doesn\u0027t align with the definition in DbApi). Have you considered that case? Maybe add a workaround and a TODO note?","commit_id":"f74b6ed9088713774d2a0394ba4de7fc31593fdb"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"d9a8112579f3a14b4e5ddc4837670c26f198bffd","unresolved":false,"context_lines":[{"line_number":974,"context_line":"        \"\"\""},{"line_number":975,"context_line":"        model \u003d type(lean_obj)"},{"line_number":976,"context_line":"        try:"},{"line_number":977,"context_line":"            serialized_obj \u003d self.driver.get_key("},{"line_number":978,"context_line":"                model.table_name,"},{"line_number":979,"context_line":"                lean_obj.id,"},{"line_number":980,"context_line":"                _get_topic(lean_obj),"},{"line_number":981,"context_line":"            )"},{"line_number":982,"context_line":"            return model.from_json(serialized_obj)"},{"line_number":983,"context_line":"        except df_exceptions.DBKeyNotFound:"},{"line_number":984,"context_line":"            LOG.exception("},{"line_number":985,"context_line":"                _LE(\u0027Could not get object %(id)s from table %(table)s\u0027),"}],"source_content_type":"text/x-python","patch_set":33,"id":"fa31d9ce_f0f658f8","line":982,"range":{"start_line":977,"start_character":0,"end_line":982,"end_character":50},"in_reply_to":"fa31d9ce_8a8deb2c","updated":"2017-02-16 09:11:08.000000000","message":"I think it would be better to adapt Redis to the definition in DbApi.","commit_id":"f74b6ed9088713774d2a0394ba4de7fc31593fdb"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"ec74a8d33b8fa29e81c4303f72e81ed66fd153ad","unresolved":false,"context_lines":[{"line_number":974,"context_line":"        \"\"\""},{"line_number":975,"context_line":"        model \u003d type(lean_obj)"},{"line_number":976,"context_line":"        try:"},{"line_number":977,"context_line":"            serialized_obj \u003d self.driver.get_key("},{"line_number":978,"context_line":"                model.table_name,"},{"line_number":979,"context_line":"                lean_obj.id,"},{"line_number":980,"context_line":"                _get_topic(lean_obj),"},{"line_number":981,"context_line":"            )"},{"line_number":982,"context_line":"            return model.from_json(serialized_obj)"},{"line_number":983,"context_line":"        except df_exceptions.DBKeyNotFound:"},{"line_number":984,"context_line":"            LOG.exception("},{"line_number":985,"context_line":"                _LE(\u0027Could not get object %(id)s from table %(table)s\u0027),"}],"source_content_type":"text/x-python","patch_set":33,"id":"fa31d9ce_8a8deb2c","line":982,"range":{"start_line":977,"start_character":0,"end_line":982,"end_character":50},"in_reply_to":"fa31d9ce_e1a696bf","updated":"2017-02-16 08:31:28.000000000","message":"Thanks ,unfortunately I haven\u0027t looked into Redis\u0027 get_key(). I\u0027ll take a look and adapt.","commit_id":"f74b6ed9088713774d2a0394ba4de7fc31593fdb"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"adc5332f8561ff12b53e00c651e0c95b159307c9","unresolved":false,"context_lines":[{"line_number":974,"context_line":"        \"\"\""},{"line_number":975,"context_line":"        model \u003d type(lean_obj)"},{"line_number":976,"context_line":"        try:"},{"line_number":977,"context_line":"            serialized_obj \u003d self.driver.get_key("},{"line_number":978,"context_line":"                model.table_name,"},{"line_number":979,"context_line":"                lean_obj.id,"},{"line_number":980,"context_line":"                _get_topic(lean_obj),"},{"line_number":981,"context_line":"            )"},{"line_number":982,"context_line":"            return model.from_json(serialized_obj)"},{"line_number":983,"context_line":"        except df_exceptions.DBKeyNotFound:"},{"line_number":984,"context_line":"            LOG.exception("},{"line_number":985,"context_line":"                _LE(\u0027Could not get object %(id)s from table %(table)s\u0027),"}],"source_content_type":"text/x-python","patch_set":33,"id":"fa31d9ce_91e19b9d","line":982,"range":{"start_line":977,"start_character":0,"end_line":982,"end_character":50},"in_reply_to":"fa31d9ce_f0f658f8","updated":"2017-02-16 11:30:07.000000000","message":"Posted a patch here https://review.openstack.org/#/c/434794/","commit_id":"f74b6ed9088713774d2a0394ba4de7fc31593fdb"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"2adfa6ff1d5ea24729a57b445806449f7acf89de","unresolved":false,"context_lines":[{"line_number":963,"context_line":"                LOG.warning("},{"line_number":964,"context_line":"                    _LW(\u0027Could not find object %(id)s to delete in %(table)s\u0027),"},{"line_number":965,"context_line":"                    extra\u003d{\u0027id\u0027: id, \u0027table\u0027: model.table_name})"},{"line_number":966,"context_line":"                ctxt.reraise \u003d True"},{"line_number":967,"context_line":""},{"line_number":968,"context_line":"        self._send_db_change_event(model.table_name, obj.id, \u0027delete\u0027,"},{"line_number":969,"context_line":"                                   obj.id, topic)"}],"source_content_type":"text/x-python","patch_set":35,"id":"fa31d9ce_104ca575","line":966,"range":{"start_line":966,"start_character":0,"end_line":966,"end_character":35},"updated":"2017-02-17 02:12:41.000000000","message":"reraise will be set to True by default, and the method name says it will reraise the exception, so no need for this line","commit_id":"2c016b166aa75556e59edd5c21418f69ac7e96bf"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"6141645ec49c96ebeb6dda2671f9014d2886ea1a","unresolved":false,"context_lines":[{"line_number":963,"context_line":"                LOG.warning("},{"line_number":964,"context_line":"                    _LW(\u0027Could not find object %(id)s to delete in %(table)s\u0027),"},{"line_number":965,"context_line":"                    extra\u003d{\u0027id\u0027: id, \u0027table\u0027: model.table_name})"},{"line_number":966,"context_line":"                ctxt.reraise \u003d True"},{"line_number":967,"context_line":""},{"line_number":968,"context_line":"        self._send_db_change_event(model.table_name, obj.id, \u0027delete\u0027,"},{"line_number":969,"context_line":"                                   obj.id, topic)"}],"source_content_type":"text/x-python","patch_set":35,"id":"da36d5c6_b7004aac","line":966,"range":{"start_line":966,"start_character":0,"end_line":966,"end_character":35},"in_reply_to":"fa31d9ce_104ca575","updated":"2017-02-19 06:38:21.000000000","message":"Ok, will remove","commit_id":"2c016b166aa75556e59edd5c21418f69ac7e96bf"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"fdad17275e2a4fde73aade5639d6091cbd09b823","unresolved":false,"context_lines":[{"line_number":283,"context_line":"                self.controller.update(obj)"},{"line_number":284,"context_line":"            return"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        if \u0027ovsinterface\u0027 \u003d\u003d table:"},{"line_number":287,"context_line":"            if action \u003d\u003d \u0027set\u0027 or action \u003d\u003d \u0027create\u0027:"},{"line_number":288,"context_line":"                ovs_port \u003d db_models.OvsPort(value)"},{"line_number":289,"context_line":"                self.controller.ovs_port_updated(ovs_port)"}],"source_content_type":"text/x-python","patch_set":41,"id":"da36d5c6_ded0bccb","line":286,"range":{"start_line":286,"start_character":12,"end_line":286,"end_character":24},"updated":"2017-02-24 15:33:01.000000000","message":"Once we get events, we can make this into a model as well.","commit_id":"f7a2a76ae329137d1d57e6538498a4e66e7e8627"}],"dragonflow/tests/unit/test_api_nb.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"1f7350aadd35315633566839f94dfac1d62bb8a0","unresolved":false,"context_lines":[{"line_number":117,"context_line":"    def test_get(self):"},{"line_number":118,"context_line":"        m \u003d ModelTest(id\u003d\u0027id1\u0027, topic\u003d\u0027topic\u0027)"},{"line_number":119,"context_line":"        self.api_nb.driver.get_key.return_value \u003d m.to_json()"},{"line_number":120,"context_line":"        self.assertEqual(m.to_struct(),"},{"line_number":121,"context_line":"                         self.api_nb.get(ModelTest(id\u003d\u0027id1\u0027)).to_struct())"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def test_get_all(self):"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a461143_7733b014","line":120,"range":{"start_line":120,"start_character":27,"end_line":120,"end_character":36},"updated":"2017-01-29 14:05:39.000000000","message":"Is this needed? I thought \u003d\u003d was added to jsonmodels?","commit_id":"b917cb5e4d3079aa0c64157e4a57972934f868f8"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"3bf581cba4cbaf40ca20d688e48164086e15aaa9","unresolved":false,"context_lines":[{"line_number":117,"context_line":"    def test_get(self):"},{"line_number":118,"context_line":"        m \u003d ModelTest(id\u003d\u0027id1\u0027, topic\u003d\u0027topic\u0027)"},{"line_number":119,"context_line":"        self.api_nb.driver.get_key.return_value \u003d m.to_json()"},{"line_number":120,"context_line":"        self.assertEqual(m.to_struct(),"},{"line_number":121,"context_line":"                         self.api_nb.get(ModelTest(id\u003d\u0027id1\u0027)).to_struct())"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def test_get_all(self):"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a461143_a2a318ff","line":120,"range":{"start_line":120,"start_character":27,"end_line":120,"end_character":36},"in_reply_to":"3a461143_7733b014","updated":"2017-01-29 14:26:26.000000000","message":"It\u0027s in a version above one required in requirements at the moment.\n\nI\u0027ll send the version bump once we\u0027re close to merging in case we\u0027ll add more stuff to jsonmodels.\n\nSince this is testing code I thinks this checks is good enough.","commit_id":"b917cb5e4d3079aa0c64157e4a57972934f868f8"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"7a4e124d196cbbd500f46a8a41e92b313f7893c3","unresolved":false,"context_lines":[{"line_number":117,"context_line":"    def test_get(self):"},{"line_number":118,"context_line":"        m \u003d ModelTest(id\u003d\u0027id1\u0027, topic\u003d\u0027topic\u0027)"},{"line_number":119,"context_line":"        self.api_nb.driver.get_key.return_value \u003d m.to_json()"},{"line_number":120,"context_line":"        self.assertEqual(m.to_struct(),"},{"line_number":121,"context_line":"                         self.api_nb.get(ModelTest(id\u003d\u0027id1\u0027)).to_struct())"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def test_get_all(self):"}],"source_content_type":"text/x-python","patch_set":19,"id":"1a430d35_e3e73f10","line":120,"range":{"start_line":120,"start_character":27,"end_line":120,"end_character":36},"in_reply_to":"3a461143_a2a318ff","updated":"2017-02-04 20:39:11.000000000","message":"Sure.","commit_id":"b917cb5e4d3079aa0c64157e4a57972934f868f8"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"9248c66cdbbcdf5638af565386bd39cae0bee480","unresolved":false,"context_lines":[{"line_number":112,"context_line":"            \u0027dummy_table\u0027, \u0027id1\u0027, \u0027topic\u0027)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        m.on_delete_pre.assert_called()"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def test_get(self):"},{"line_number":117,"context_line":"        m \u003d ModelTest(id\u003d\u0027id1\u0027, topic\u003d\u0027topic\u0027)"},{"line_number":118,"context_line":"        self.api_nb.driver.get_key.return_value \u003d m.to_json()"}],"source_content_type":"text/x-python","patch_set":27,"id":"1a430d35_4fe964b6","line":115,"updated":"2017-02-09 06:02:54.000000000","message":"please consider adding test to get not existing object","commit_id":"05b24057fe5bbb8ccc8320c95f02b51f4eb720df"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"bf91468cc9a2c200687cc820501e7b87c54ae224","unresolved":false,"context_lines":[{"line_number":112,"context_line":"            \u0027dummy_table\u0027, \u0027id1\u0027, \u0027topic\u0027)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        m.on_delete_pre.assert_called()"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def test_get(self):"},{"line_number":117,"context_line":"        m \u003d ModelTest(id\u003d\u0027id1\u0027, topic\u003d\u0027topic\u0027)"},{"line_number":118,"context_line":"        self.api_nb.driver.get_key.return_value \u003d m.to_json()"}],"source_content_type":"text/x-python","patch_set":27,"id":"1a430d35_f224ab60","line":115,"in_reply_to":"1a430d35_4fe964b6","updated":"2017-02-09 11:35:07.000000000","message":"Will add in next respin","commit_id":"05b24057fe5bbb8ccc8320c95f02b51f4eb720df"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"69fbd8c51c316ab3632ab3bdc871b448711409b1","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    def test_get_nonexistent(self):"},{"line_number":134,"context_line":"        self.api_nb.driver.get_key.side_effect \u003d exceptions.DBKeyNotFound()"},{"line_number":135,"context_line":"        self.assertEqual(None, self.api_nb.get(ModelTest(id\u003d\u0027id1\u0027)))"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def test_get_all(self):"},{"line_number":138,"context_line":"        m1 \u003d ModelTest(id\u003d\u0027id1\u0027, topic\u003d\u0027topic\u0027)"}],"source_content_type":"text/x-python","patch_set":33,"id":"fa31d9ce_613d462a","line":135,"range":{"start_line":135,"start_character":0,"end_line":135,"end_character":68},"updated":"2017-02-16 02:53:49.000000000","message":"This violates pep8 rule [H203] Use assertIs(Not)None to check for None.\n\nMaybe we should add H203 to the pep8 check list(it is disabled by default)","commit_id":"f74b6ed9088713774d2a0394ba4de7fc31593fdb"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"ec74a8d33b8fa29e81c4303f72e81ed66fd153ad","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    def test_get_nonexistent(self):"},{"line_number":134,"context_line":"        self.api_nb.driver.get_key.side_effect \u003d exceptions.DBKeyNotFound()"},{"line_number":135,"context_line":"        self.assertEqual(None, self.api_nb.get(ModelTest(id\u003d\u0027id1\u0027)))"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def test_get_all(self):"},{"line_number":138,"context_line":"        m1 \u003d ModelTest(id\u003d\u0027id1\u0027, topic\u003d\u0027topic\u0027)"}],"source_content_type":"text/x-python","patch_set":33,"id":"fa31d9ce_aa7c6fec","line":135,"range":{"start_line":135,"start_character":0,"end_line":135,"end_character":68},"in_reply_to":"fa31d9ce_613d462a","updated":"2017-02-16 08:31:28.000000000","message":"A good idea, I\u0027ll change that and post a patch to enable H203","commit_id":"f74b6ed9088713774d2a0394ba4de7fc31593fdb"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"7545fec49258b4c1d6ee29377bcfcfa8436fa958","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    def test_get_nonexistent(self):"},{"line_number":134,"context_line":"        self.api_nb.driver.get_key.side_effect \u003d exceptions.DBKeyNotFound()"},{"line_number":135,"context_line":"        self.assertEqual(None, self.api_nb.get(ModelTest(id\u003d\u0027id1\u0027)))"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def test_get_all(self):"},{"line_number":138,"context_line":"        m1 \u003d ModelTest(id\u003d\u0027id1\u0027, topic\u003d\u0027topic\u0027)"}],"source_content_type":"text/x-python","patch_set":33,"id":"fa31d9ce_cd0a9d79","line":135,"range":{"start_line":135,"start_character":0,"end_line":135,"end_character":68},"in_reply_to":"fa31d9ce_aa7c6fec","updated":"2017-02-16 09:01:54.000000000","message":"Please take a look at https://review.openstack.org/#/c/434751/","commit_id":"f74b6ed9088713774d2a0394ba4de7fc31593fdb"}]}
