)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"269d0b58ac7a5c4395522c61604b39208b476fe0","unresolved":false,"context_lines":[{"line_number":10,"context_line":"sent back to the user for ports and networks that weren\u0027t from"},{"line_number":11,"context_line":"ML2 extensions (e.g. availability zones). This created an"},{"line_number":12,"context_line":"inconsistent response between creates and updates/gets. It also"},{"line_number":13,"context_line":"resulted in incomplete data in the AMQP create notificaiton emitted"},{"line_number":14,"context_line":"in the API layer."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This patch adjusts ML2 to call the _apply_dict_extend_functions"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a5ae5dd_016c90ce","line":13,"range":{"start_line":13,"start_character":47,"end_line":13,"end_character":59},"updated":"2016-02-06 03:14:09.000000000","message":"typo","commit_id":"1ab806f7eb6cb6fb6461ced5b7cd5293bc4b74ad"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"5f3392bf07eac31cd772936e7c2a9c6cdaf16fa3","unresolved":false,"context_lines":[{"line_number":10,"context_line":"sent back to the user for ports and networks that weren\u0027t from"},{"line_number":11,"context_line":"ML2 extensions (e.g. availability zones). This created an"},{"line_number":12,"context_line":"inconsistent response between creates and updates/gets. It also"},{"line_number":13,"context_line":"resulted in incomplete data in the AMQP create notificaiton emitted"},{"line_number":14,"context_line":"in the API layer."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This patch adjusts ML2 to call the _apply_dict_extend_functions"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a5ae5dd_06a2614b","line":13,"range":{"start_line":13,"start_character":47,"end_line":13,"end_character":59},"in_reply_to":"5a5ae5dd_016c90ce","updated":"2016-02-06 09:51:31.000000000","message":"Done","commit_id":"1ab806f7eb6cb6fb6461ced5b7cd5293bc4b74ad"}],"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"269d0b58ac7a5c4395522c61604b39208b476fe0","unresolved":false,"context_lines":[{"line_number":673,"context_line":""},{"line_number":674,"context_line":"        # NOTE(kevinbenton): this extra lookup is necessary to get the"},{"line_number":675,"context_line":"        # latest db model for the extension functions"},{"line_number":676,"context_line":"        net_model \u003d self._get_network(context, result[\u0027id\u0027])"},{"line_number":677,"context_line":"        self._apply_dict_extend_functions(\u0027networks\u0027, result, net_model)"},{"line_number":678,"context_line":"        return result, mech_context"},{"line_number":679,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_a15d7c16","line":676,"updated":"2016-02-06 03:14:09.000000000","message":"maybe this is an overkill but if the various extensions are enables above there is an update of the network. Can we make use of res? say for example from line 663.","commit_id":"1ab806f7eb6cb6fb6461ced5b7cd5293bc4b74ad"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"ad47de542cb89bb7b22a7dd6980c5947462d02b2","unresolved":false,"context_lines":[{"line_number":673,"context_line":""},{"line_number":674,"context_line":"        # NOTE(kevinbenton): this extra lookup is necessary to get the"},{"line_number":675,"context_line":"        # latest db model for the extension functions"},{"line_number":676,"context_line":"        net_model \u003d self._get_network(context, result[\u0027id\u0027])"},{"line_number":677,"context_line":"        self._apply_dict_extend_functions(\u0027networks\u0027, result, net_model)"},{"line_number":678,"context_line":"        return result, mech_context"},{"line_number":679,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_26f0bd66","line":676,"in_reply_to":"5a5ae5dd_a15d7c16","updated":"2016-02-06 09:50:04.000000000","message":"No, unfortunately many of the dictionary extension functions rely on having access to the db model directly.\n\nI first tried refactoring the original make_network_dict above to also return the model, but then I ran into issues where that model being in memory would cause object persistence errors in sqlalchemy since it was no longer garbage collected and things below would separately update the DB. It will require a major refactor to fix this by re-using the initial model.","commit_id":"1ab806f7eb6cb6fb6461ced5b7cd5293bc4b74ad"}]}
