)]}'
{"neutron/db/db_base_plugin_common.py":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"4616e7be56c9c85c7962a3cceb1564fd2cd9b1d9","unresolved":false,"context_lines":[{"line_number":121,"context_line":"            subnet_id\u003dsubnet_id"},{"line_number":122,"context_line":"        )"},{"line_number":123,"context_line":"        port_db \u003d context.session.query(models_v2.Port).get(port_id)"},{"line_number":124,"context_line":"        port_db.fixed_ips.append(allocated)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def _make_subnet_dict(self, subnet, fields\u003dNone, context\u003dNone):"},{"line_number":127,"context_line":"        res \u003d {\u0027id\u0027: subnet[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"7ffa3b31_31be9665","line":124,"updated":"2017-04-16 09:04:49.000000000","message":"This should work:\n\nport_db.fixed_ips.sort(key\u003dlambda fip: (fip[\u0027ip_address\u0027],\n                                        fip[\u0027subnet_id\u0027]))","commit_id":"63a2508be5fa4ca5a879d98ecdd7d043c6268208"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"e801bd5c025a34c043c8cab2f3087c39b26b8834","unresolved":false,"context_lines":[{"line_number":121,"context_line":"            subnet_id\u003dsubnet_id"},{"line_number":122,"context_line":"        )"},{"line_number":123,"context_line":"        port_db \u003d context.session.query(models_v2.Port).get(port_id)"},{"line_number":124,"context_line":"        port_db.fixed_ips.append(allocated)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def _make_subnet_dict(self, subnet, fields\u003dNone, context\u003dNone):"},{"line_number":127,"context_line":"        res \u003d {\u0027id\u0027: subnet[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"7ffa3b31_a9ba3adb","line":124,"in_reply_to":"7ffa3b31_31be9665","updated":"2017-04-16 22:20:42.000000000","message":"Yes, that seems to do the trick. Thanks","commit_id":"63a2508be5fa4ca5a879d98ecdd7d043c6268208"}],"neutron/db/models_v2.py":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"4616e7be56c9c85c7962a3cceb1564fd2cd9b1d9","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                                 lazy\u003d\u0027subquery\u0027,"},{"line_number":85,"context_line":"                                 cascade\u003d\u0027all, delete-orphan\u0027,"},{"line_number":86,"context_line":"                                 order_by\u003d(IPAllocation.ip_address,"},{"line_number":87,"context_line":"                                           IPAllocation.subnet_id))"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    mac_address \u003d sa.Column(sa.String(32), nullable\u003dFalse)"},{"line_number":90,"context_line":"    admin_state_up \u003d sa.Column(sa.Boolean(), nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7ffa3b31_518fe2cb","side":"PARENT","line":87,"updated":"2017-04-16 09:04:49.000000000","message":"I see. I think if we remove it though, we\u0027re back to the non-determinism of order of IPs (i.e. the backend DB can return whatever order it wants). See sort comment above to see how we can keep deterministic fixed_ips.","commit_id":"39cc2ca5fde03d97aa974c3748eb4871fe756cdf"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"a20ca1259aaff0ae0127059f34b224e689d09573","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                                 lazy\u003d\u0027subquery\u0027,"},{"line_number":85,"context_line":"                                 cascade\u003d\u0027all, delete-orphan\u0027,"},{"line_number":86,"context_line":"                                 order_by\u003d(IPAllocation.ip_address,"},{"line_number":87,"context_line":"                                           IPAllocation.subnet_id))"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    mac_address \u003d sa.Column(sa.String(32), nullable\u003dFalse)"},{"line_number":90,"context_line":"    admin_state_up \u003d sa.Column(sa.Boolean(), nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7ffa3b31_1384b75d","side":"PARENT","line":87,"updated":"2017-04-17 06:24:52.000000000","message":"Thanks. I suspect that test should be written in a way that ensures the result is actually ordered in order of IP address. Outside the scope of this patch though.","commit_id":"39cc2ca5fde03d97aa974c3748eb4871fe756cdf"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"af565ad3d5263fdeec595cc1ff68b7f1c3f49b29","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                                 lazy\u003d\u0027subquery\u0027,"},{"line_number":85,"context_line":"                                 cascade\u003d\u0027all, delete-orphan\u0027,"},{"line_number":86,"context_line":"                                 order_by\u003d(IPAllocation.ip_address,"},{"line_number":87,"context_line":"                                           IPAllocation.subnet_id))"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    mac_address \u003d sa.Column(sa.String(32), nullable\u003dFalse)"},{"line_number":90,"context_line":"    admin_state_up \u003d sa.Column(sa.Boolean(), nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bff0334d_15b3029a","side":"PARENT","line":87,"updated":"2017-04-10 18:05:50.000000000","message":"why the change here?","commit_id":"39cc2ca5fde03d97aa974c3748eb4871fe756cdf"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"e801bd5c025a34c043c8cab2f3087c39b26b8834","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                                 lazy\u003d\u0027subquery\u0027,"},{"line_number":85,"context_line":"                                 cascade\u003d\u0027all, delete-orphan\u0027,"},{"line_number":86,"context_line":"                                 order_by\u003d(IPAllocation.ip_address,"},{"line_number":87,"context_line":"                                           IPAllocation.subnet_id))"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    mac_address \u003d sa.Column(sa.String(32), nullable\u003dFalse)"},{"line_number":90,"context_line":"    admin_state_up \u003d sa.Column(sa.Boolean(), nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7ffa3b31_89cf7e7e","side":"PARENT","line":87,"in_reply_to":"7ffa3b31_518fe2cb","updated":"2017-04-16 22:20:42.000000000","message":"I restored these lines","commit_id":"39cc2ca5fde03d97aa974c3748eb4871fe756cdf"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"920e2aa87bf7f3b84aa0da2a12a7446feb508c17","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                                 lazy\u003d\u0027subquery\u0027,"},{"line_number":85,"context_line":"                                 cascade\u003d\u0027all, delete-orphan\u0027,"},{"line_number":86,"context_line":"                                 order_by\u003d(IPAllocation.ip_address,"},{"line_number":87,"context_line":"                                           IPAllocation.subnet_id))"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    mac_address \u003d sa.Column(sa.String(32), nullable\u003dFalse)"},{"line_number":90,"context_line":"    admin_state_up \u003d sa.Column(sa.Boolean(), nullable\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7ffa3b31_88f65f8f","side":"PARENT","line":87,"in_reply_to":"bff0334d_15b3029a","updated":"2017-04-15 22:41:53.000000000","message":"You added this in patchset https://review.openstack.org/#/c/382121, which also added this unit test case: https://github.com/openstack/neutron/blob/master/neutron/tests/unit/plugins/ml2/test_plugin.py#L785. With the change to add the IPAllocation directly to the port\u0027s fixed_ips attribute directly, this unit test case fails. If I remove these two lines, it passes again, so we continue preserving the deterministic ordering of fixed_ips","commit_id":"39cc2ca5fde03d97aa974c3748eb4871fe756cdf"}]}
