)]}'
{"dragonflow/controller/df_local_controller.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"f0419e0b31c9f7b6c4dd70e241d6b10116faa3cc","unresolved":false,"context_lines":[{"line_number":582,"context_line":"    def get_handler(self, table, action):"},{"line_number":583,"context_line":"        if action \u003d\u003d \u0027delete\u0027:"},{"line_number":584,"context_line":"            method_name \u003d \u0027delete_\u0027 + table"},{"line_number":585,"context_line":"            default \u003d self.delete_model_object"},{"line_number":586,"context_line":"        else:"},{"line_number":587,"context_line":"            method_name \u003d \u0027update_\u0027 + table"},{"line_number":588,"context_line":"            default \u003d self.update_model_object"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_222a8190","line":585,"range":{"start_line":585,"start_character":27,"end_line":585,"end_character":46},"updated":"2017-01-24 04:57:59.000000000","message":"Where is this method defined?","commit_id":"99bb6a65736cce3040912b821a3c79be3e4df41c"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"f0419e0b31c9f7b6c4dd70e241d6b10116faa3cc","unresolved":false,"context_lines":[{"line_number":585,"context_line":"            default \u003d self.delete_model_object"},{"line_number":586,"context_line":"        else:"},{"line_number":587,"context_line":"            method_name \u003d \u0027update_\u0027 + table"},{"line_number":588,"context_line":"            default \u003d self.update_model_object"},{"line_number":589,"context_line":"        return getattr(self, method_name, default)"},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"    def process_object(self, table, action, obj):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_421b0d81","line":588,"range":{"start_line":588,"start_character":27,"end_line":588,"end_character":46},"updated":"2017-01-24 04:57:59.000000000","message":"Same here","commit_id":"99bb6a65736cce3040912b821a3c79be3e4df41c"},{"author":{"_account_id":20153,"name":"Duan Kebo","email":"duankebo@gmail.com"},"change_message_id":"bbcaff69548bb5dff8814c9f7b6bb5b0d3bd11fe","unresolved":false,"context_lines":[{"line_number":572,"context_line":"    def get_chassis_name(self):"},{"line_number":573,"context_line":"        return self.chassis_name"},{"line_number":574,"context_line":""},{"line_number":575,"context_line":"    def get_handler(self, table, action):"},{"line_number":576,"context_line":"        if action \u003d\u003d \u0027delete\u0027:"},{"line_number":577,"context_line":"            method_name \u003d \u0027delete_\u0027 + table"},{"line_number":578,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa31d9ce_ddb25205","line":575,"range":{"start_line":575,"start_character":8,"end_line":575,"end_character":19},"updated":"2017-02-16 07:17:32.000000000","message":"will this method only be called by itself? can rename it to _get_handler","commit_id":"fa68768fc5ca71d4e6ee5d447fd1ea909d03a22b"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"54a0b84a657d20b61e527c009f9da2a187b42e2c","unresolved":false,"context_lines":[{"line_number":572,"context_line":"    def get_chassis_name(self):"},{"line_number":573,"context_line":"        return self.chassis_name"},{"line_number":574,"context_line":""},{"line_number":575,"context_line":"    def get_handler(self, table, action):"},{"line_number":576,"context_line":"        if action \u003d\u003d \u0027delete\u0027:"},{"line_number":577,"context_line":"            method_name \u003d \u0027delete_\u0027 + table"},{"line_number":578,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa31d9ce_e5020d09","line":575,"range":{"start_line":575,"start_character":8,"end_line":575,"end_character":19},"in_reply_to":"fa31d9ce_ddb25205","updated":"2017-02-16 12:43:11.000000000","message":"I think this might be useful later on in external modules. Initially I made it \"public\" because I wanted to use it in the object refresher but I since changed things a bit.\n\nSee https://review.openstack.org/#/c/425091/19/dragonflow/controller/df_local_controller.py","commit_id":"fa68768fc5ca71d4e6ee5d447fd1ea909d03a22b"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"7abe8e7404fe82ec9108cb27ecd7a2dfa57d88a0","unresolved":false,"context_lines":[{"line_number":581,"context_line":"            \u0027update_{0}\u0027.format(obj.table_name),"},{"line_number":582,"context_line":"            None,"},{"line_number":583,"context_line":"        )"},{"line_number":584,"context_line":"        if handler:"},{"line_number":585,"context_line":"            return handler(obj)"},{"line_number":586,"context_line":""},{"line_number":587,"context_line":"    def delete(self, obj):"},{"line_number":588,"context_line":"        handler \u003d self._get_delete_handler(obj.table_name)"}],"source_content_type":"text/x-python","patch_set":27,"id":"da36d5c6_0702443d","line":585,"range":{"start_line":584,"start_character":0,"end_line":585,"end_character":31},"updated":"2017-02-23 02:20:01.000000000","message":"What if the handler can\u0027t be found? Maybe we should raise an exception to warn user. Unlike apps, the controller should have handlers for all resources.","commit_id":"8b31fd6d4c094fa0c725e813d9abbfa491e8415f"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"8ca104761c560d467f7cc61a0fe8927029d15730","unresolved":false,"context_lines":[{"line_number":581,"context_line":"            \u0027update_{0}\u0027.format(obj.table_name),"},{"line_number":582,"context_line":"            None,"},{"line_number":583,"context_line":"        )"},{"line_number":584,"context_line":"        if handler:"},{"line_number":585,"context_line":"            return handler(obj)"},{"line_number":586,"context_line":""},{"line_number":587,"context_line":"    def delete(self, obj):"},{"line_number":588,"context_line":"        handler \u003d self._get_delete_handler(obj.table_name)"}],"source_content_type":"text/x-python","patch_set":27,"id":"da36d5c6_fc121f56","line":585,"range":{"start_line":584,"start_character":0,"end_line":585,"end_character":31},"in_reply_to":"da36d5c6_0702443d","updated":"2017-02-23 06:50:51.000000000","message":"I think I can remove the None argument from both getattrs, that way we\u0027ll get an AttributeError in case we don\u0027t have a handler available for a resource.","commit_id":"8b31fd6d4c094fa0c725e813d9abbfa491e8415f"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"7abe8e7404fe82ec9108cb27ecd7a2dfa57d88a0","unresolved":false,"context_lines":[{"line_number":594,"context_line":"        else:"},{"line_number":595,"context_line":"            return handler(obj)"},{"line_number":596,"context_line":""},{"line_number":597,"context_line":"    def delete_by_id(self, model, obj_id):"},{"line_number":598,"context_line":"        handler \u003d self._get_delete_handler(model.table_name)"},{"line_number":599,"context_line":"        if handler is None:"},{"line_number":600,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":27,"id":"da36d5c6_67622040","line":597,"range":{"start_line":597,"start_character":0,"end_line":597,"end_character":42},"updated":"2017-02-23 02:20:01.000000000","message":"I think this one will be deleted eventually, right? Better add some comment for it.","commit_id":"8b31fd6d4c094fa0c725e813d9abbfa491e8415f"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"8ca104761c560d467f7cc61a0fe8927029d15730","unresolved":false,"context_lines":[{"line_number":594,"context_line":"        else:"},{"line_number":595,"context_line":"            return handler(obj)"},{"line_number":596,"context_line":""},{"line_number":597,"context_line":"    def delete_by_id(self, model, obj_id):"},{"line_number":598,"context_line":"        handler \u003d self._get_delete_handler(model.table_name)"},{"line_number":599,"context_line":"        if handler is None:"},{"line_number":600,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":27,"id":"da36d5c6_fc393fd8","line":597,"range":{"start_line":597,"start_character":0,"end_line":597,"end_character":42},"in_reply_to":"da36d5c6_67622040","updated":"2017-02-23 06:50:51.000000000","message":"Yes, I think the only use for this function is in NB api, once we have only new-style models we can easily call .delete(model_class(id\u003dkey)) and we won\u0027t need this one.","commit_id":"8b31fd6d4c094fa0c725e813d9abbfa491e8415f"}]}
