)]}'
{"neutron/db/external_net_db.py":[{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"a44d6ca4d4a8be6292b3c7f14f6e5856f196424d","unresolved":false,"context_lines":[{"line_number":76,"context_line":"            result_filters\u003d_network_result_filter_hook)"},{"line_number":77,"context_line":"        return super(External_net_db_mixin, cls).__new__(cls, *args, **kwargs)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def network_is_external(self, context, net_id\u003dNone, net_db\u003dNone):"},{"line_number":80,"context_line":"        if net_db:"},{"line_number":81,"context_line":"            return bool(net_db.external)"},{"line_number":82,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_ab1d8c74","line":79,"range":{"start_line":79,"start_character":8,"end_line":79,"end_character":27},"updated":"2020-06-19 20:31:56.000000000","message":"This method is used in a lot of places: http://codesearch.openstack.org/?q\u003d_network_is_external\u0026i\u003dnope\u0026files\u003d\u0026repos\u003d . For backward-compatibility, we\u0027d better to avoid changing the name (although the name doesn\u0027t make perfect sense).","commit_id":"49ca5de91d55d33141b65b5012212eb67b9a4558"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"36b846e32593f13aff4f95327a7467accaeafb38","unresolved":false,"context_lines":[{"line_number":76,"context_line":"            result_filters\u003d_network_result_filter_hook)"},{"line_number":77,"context_line":"        return super(External_net_db_mixin, cls).__new__(cls, *args, **kwargs)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def network_is_external(self, context, net_id\u003dNone, net_db\u003dNone):"},{"line_number":80,"context_line":"        if net_db:"},{"line_number":81,"context_line":"            return bool(net_db.external)"},{"line_number":82,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_45e80de1","line":79,"range":{"start_line":79,"start_character":8,"end_line":79,"end_character":27},"in_reply_to":"bf51134e_ab1d8c74","updated":"2020-06-22 09:16:05.000000000","message":"Thank you! Good catch.\n\nI really wasn\u0027t expecting a private method to be called outside Neutron... but I was wrong.\n\nBTW, although I\u0027m changing the signature, \"net_id\" preserves the position.","commit_id":"49ca5de91d55d33141b65b5012212eb67b9a4558"}],"neutron/db/l3_db.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"9b456db624ac5cbc02a1cdd70cf78251592a5374","unresolved":false,"context_lines":[{"line_number":1269,"context_line":"        f_net_id \u003d fip[\u0027floating_network_id\u0027]"},{"line_number":1270,"context_line":"        f_net_db \u003d self._core_plugin._get_network(context, f_net_id)"},{"line_number":1271,"context_line":"        if not self._core_plugin._network_is_external(context,"},{"line_number":1272,"context_line":"                                                      net_db\u003df_net_db):"},{"line_number":1273,"context_line":"            msg \u003d _(\"Network %s is not a valid external network\") % f_net_id"},{"line_number":1274,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027floatingip\u0027, msg\u003dmsg)"},{"line_number":1275,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"bf51134e_8064134b","line":1272,"updated":"2020-07-06 08:27:53.000000000","message":"it is the only place when _network_is_external is used and changed to pass net_db instead of net_id. Why You can\u0027t simply do\n\n    if not bool(f_net_db.external):\n        ...\n\nand not change the _network_is_external() method? Change would be smaller and You would avoid this \"if...else...\" and depending on 2 different arguments are passed to the _network_is_external method.","commit_id":"f4dd7b5ae61a6e4c3f5b89da89c4c952225fbc25"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"40b6dc656bac7b47cc4e8530ed3545fe8bca4766","unresolved":false,"context_lines":[{"line_number":1269,"context_line":"        f_net_id \u003d fip[\u0027floating_network_id\u0027]"},{"line_number":1270,"context_line":"        f_net_db \u003d self._core_plugin._get_network(context, f_net_id)"},{"line_number":1271,"context_line":"        if not self._core_plugin._network_is_external(context,"},{"line_number":1272,"context_line":"                                                      net_db\u003df_net_db):"},{"line_number":1273,"context_line":"            msg \u003d _(\"Network %s is not a valid external network\") % f_net_id"},{"line_number":1274,"context_line":"            raise n_exc.BadRequest(resource\u003d\u0027floatingip\u0027, msg\u003dmsg)"},{"line_number":1275,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"bf51134e_1167b353","line":1272,"in_reply_to":"bf51134e_8064134b","updated":"2020-07-06 11:07:25.000000000","message":"Ahhh I was focused on using the same method. But you are right, it doesn\u0027t make sense here.","commit_id":"f4dd7b5ae61a6e4c3f5b89da89c4c952225fbc25"}]}
