)]}'
{"networking_ovn/common/ovn_client.py":[{"author":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"change_message_id":"7323bea764cf563abbd87481d6213c73faf69d41","unresolved":false,"context_lines":[{"line_number":842,"context_line":"                                              networks, txn)"},{"line_number":843,"context_line":"            port \u003d self._get_router_ports(context, router_id, True)"},{"line_number":844,"context_line":"            if port:"},{"line_number":845,"context_line":"                # HELP ME !!! THIS IS JUST NOT WORKING !!!"},{"line_number":846,"context_line":"                # print(\"port id {}\".format(port))"},{"line_number":847,"context_line":"                # self._update_lrouter_port(port, False, txn)"},{"line_number":848,"context_line":"                # updated_gw_port \u003d router_object[\u0027gw_port_id\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_ef27df63","line":845,"updated":"2019-09-19 02:40:03.000000000","message":"If I uncomment any of these lines, I get some db failures that I do not currently understand. I need some expert assistance!","commit_id":"95915ef204457ae339d42969a6459e143c8cec6c"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"359d69b2ae2580fc31dd98bd084b031b752233d5","unresolved":false,"context_lines":[{"line_number":1300,"context_line":"        update \u003d {\u0027networks\u0027: networks, \u0027ipv6_ra_configs\u0027: ipv6_ra_configs}"},{"line_number":1301,"context_line":"        is_gw_port \u003d const.DEVICE_OWNER_ROUTER_GW \u003d\u003d port.get("},{"line_number":1302,"context_line":"            \u0027device_owner\u0027)"},{"line_number":1303,"context_line":"        if is_gw_port:"},{"line_number":1304,"context_line":"            selected_chassis \u003d self._select_gateway_chassis(port, lrp_name)"},{"line_number":1305,"context_line":"            if selected_chassis:"},{"line_number":1306,"context_line":"                update[\u0027gateway_chassis\u0027] \u003d selected_chassis"},{"line_number":1307,"context_line":""},{"line_number":1308,"context_line":"        commands \u003d ["},{"line_number":1309,"context_line":"            self._nb_idl.update_lrouter_port("}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_d0139b65","line":1306,"range":{"start_line":1303,"start_character":0,"end_line":1306,"end_character":60},"updated":"2019-09-19 10:18:18.000000000","message":"I don\u0027t think we require to reschedule a gw port when updating it.\nIf you think there\u0027s such scenario can you please describe it here?","commit_id":"95915ef204457ae339d42969a6459e143c8cec6c"}],"networking_ovn/ovsdb/commands.py":[{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"894c0064d2f4b3af77225eaf9e96cb27c5092421","unresolved":false,"context_lines":[{"line_number":407,"context_line":"            raise RuntimeError(msg)"},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"        _delvalue_from_list(lrouter, \u0027ports\u0027, lrouter_port)"},{"line_number":410,"context_line":"        lrouter_port.delete()"},{"line_number":411,"context_line":""},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"class SetLRouterPortInLSwitchPortCommand(command.BaseCommand):"}],"source_content_type":"text/x-python","patch_set":18,"id":"3fa7e38b_5e1c52c0","line":410,"range":{"start_line":410,"start_character":8,"end_line":410,"end_character":29},"updated":"2019-09-24 09:59:06.000000000","message":"This wouldn\u0027t be needed if we moved to ovsdbapp commands :)\n\nhttps://github.com/openstack/ovsdbapp/blob/master/ovsdbapp/schema/ovn_northbound/commands.py#L391","commit_id":"9bc8f20dd4755cca5c880187241ac2c1b196eed9"},{"author":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"change_message_id":"06de4a02e55b7ab39cf579fc2546e4564d53f755","unresolved":false,"context_lines":[{"line_number":407,"context_line":"            raise RuntimeError(msg)"},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"        _delvalue_from_list(lrouter, \u0027ports\u0027, lrouter_port)"},{"line_number":410,"context_line":"        lrouter_port.delete()"},{"line_number":411,"context_line":""},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"class SetLRouterPortInLSwitchPortCommand(command.BaseCommand):"}],"source_content_type":"text/x-python","patch_set":18,"id":"3fa7e38b_7edcaee3","line":410,"range":{"start_line":410,"start_character":8,"end_line":410,"end_character":29},"in_reply_to":"3fa7e38b_5e1c52c0","updated":"2019-09-24 13:40:26.000000000","message":"indeed! ;)","commit_id":"9bc8f20dd4755cca5c880187241ac2c1b196eed9"}],"networking_ovn/tests/functional/test_router.py":[{"author":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"change_message_id":"9866603a41b2511e2a103d5c77b8262b18168452","unresolved":false,"context_lines":[{"line_number":234,"context_line":"            # kwargs[\u0027candidates\u0027] is [], which causes"},{"line_number":235,"context_line":"            # self.assertItemsEqual to fail test."},{"line_number":236,"context_line":"            # self.l3_plugin.schedule_unhosted_gateways()"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"            self.candidates \u003d []"},{"line_number":239,"context_line":"            gw_info \u003d {\u0027network_id\u0027: ext3[\u0027network\u0027][\u0027id\u0027]}"},{"line_number":240,"context_line":"            self.l3_plugin.update_router("}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_64fedf06","line":237,"updated":"2019-09-17 02:01:48.000000000","message":"@Daniel: I could use some help from you on what this test is doing. It is still a bit confusing to me, but my changes to update_router could be missing something and it is important that we understand this test\u0027s expectations before going fwd.","commit_id":"6fda6155c3d835444c888f68476ad31c63318e3b"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"68e1b659e2e38124a4f937f1760bd83fd4e3b0bf","unresolved":false,"context_lines":[{"line_number":234,"context_line":"            # kwargs[\u0027candidates\u0027] is [], which causes"},{"line_number":235,"context_line":"            # self.assertItemsEqual to fail test."},{"line_number":236,"context_line":"            # self.l3_plugin.schedule_unhosted_gateways()"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"            self.candidates \u003d []"},{"line_number":239,"context_line":"            gw_info \u003d {\u0027network_id\u0027: ext3[\u0027network\u0027][\u0027id\u0027]}"},{"line_number":240,"context_line":"            self.l3_plugin.update_router("}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_0a3b6dd1","line":237,"in_reply_to":"3fa7e38b_64fedf06","updated":"2019-09-17 13:09:23.000000000","message":"In the setup (L35), we have two chassis:\n\n        self.chassis1 \u003d self.add_fake_chassis(\n            \u0027ovs-host1\u0027, physical_nets\u003d[\u0027physnet1\u0027, \u0027physnet3\u0027])\n        self.chassis2 \u003d self.add_fake_chassis(\n            \u0027ovs-host2\u0027, physical_nets\u003d[\u0027physnet2\u0027, \u0027physnet3\u0027])\n\n\nChassis1 is connected to both physnet1 and physnet3 while chassis2 is connected to physnet2 and physnet3.\n\nThe test is asserting that for every gw assigned to the router, the candidates are the right ones.\n\nFor example:\n\n- In L216, ext1 is used and ext1 is assigned to physnet1 (L196) so this is why only chassis1 is expected as a candidate to schedule the gateway port (L215).\n\n- Later in L225, ext2 (physnet3) is used so the expected candidates are chassis1 and chassis2 (L224)\n\n- For ext3 no candidates are expected (L238) as there\u0027s no physnet associated to it (no bridge mappings), note the \u0027None\u0027 in L200.\n\nDoes it make sense?","commit_id":"6fda6155c3d835444c888f68476ad31c63318e3b"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"effe947eb157b8d43ab0a2305526bccfcf3c819b","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from collections import Counter"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import mock"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa7e38b_96d8867f","line":15,"updated":"2019-09-23 10:55:22.000000000","message":"OpenStack coding guidelines suggest to import modules and to avoid importing objects from modules: https://docs.openstack.org/hacking/latest/user/hacking.html#imports","commit_id":"867dc72f6d989ff9095ed46775ab052bcd3c1465"},{"author":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"change_message_id":"0c855911a03203e424dc1dba20f4266891991212","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from collections import Counter"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import mock"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa7e38b_a999a46e","line":15,"in_reply_to":"3fa7e38b_96d8867f","updated":"2019-09-23 13:57:08.000000000","message":"ack. TY!","commit_id":"867dc72f6d989ff9095ed46775ab052bcd3c1465"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"effe947eb157b8d43ab0a2305526bccfcf3c819b","unresolved":false,"context_lines":[{"line_number":208,"context_line":"            for row in self.nb_api.tables[\u0027Logical_Router_Port\u0027].rows.values():"},{"line_number":209,"context_line":"                if row.name \u003d\u003d \u0027lrp-%s\u0027 % gw_port_id:"},{"line_number":210,"context_line":"                    return row"},{"line_number":211,"context_line":"            return None"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"        def fake_select(*args, **kwargs):"},{"line_number":214,"context_line":"            # We are not interested in further processing, let us return"}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa7e38b_d644be1d","line":211,"range":{"start_line":211,"start_character":0,"end_line":211,"end_character":23},"updated":"2019-09-23 10:55:22.000000000","message":"nit: this is implicit","commit_id":"867dc72f6d989ff9095ed46775ab052bcd3c1465"},{"author":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"change_message_id":"0c855911a03203e424dc1dba20f4266891991212","unresolved":false,"context_lines":[{"line_number":208,"context_line":"            for row in self.nb_api.tables[\u0027Logical_Router_Port\u0027].rows.values():"},{"line_number":209,"context_line":"                if row.name \u003d\u003d \u0027lrp-%s\u0027 % gw_port_id:"},{"line_number":210,"context_line":"                    return row"},{"line_number":211,"context_line":"            return None"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"        def fake_select(*args, **kwargs):"},{"line_number":214,"context_line":"            # We are not interested in further processing, let us return"}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa7e38b_89f5c885","line":211,"range":{"start_line":211,"start_character":0,"end_line":211,"end_character":23},"in_reply_to":"3fa7e38b_d644be1d","updated":"2019-09-23 13:57:08.000000000","message":"Done","commit_id":"867dc72f6d989ff9095ed46775ab052bcd3c1465"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"effe947eb157b8d43ab0a2305526bccfcf3c819b","unresolved":false,"context_lines":[{"line_number":210,"context_line":"                    return row"},{"line_number":211,"context_line":"            return None"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"        def fake_select(*args, **kwargs):"},{"line_number":214,"context_line":"            # We are not interested in further processing, let us return"},{"line_number":215,"context_line":"            # INVALID_CHASSIS to avoid errors"},{"line_number":216,"context_line":"            return [ovn_const.OVN_GATEWAY_INVALID_CHASSIS]"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"        with mock.patch.object(ovn_client._ovn_scheduler, \u0027select\u0027,"},{"line_number":219,"context_line":"                               side_effect\u003dfake_select) as client_select:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa7e38b_36c0b27b","line":216,"range":{"start_line":213,"start_character":0,"end_line":216,"end_character":58},"updated":"2019-09-23 10:55:22.000000000","message":"Do you need it as a callable? I think you can simply do\n\n mock.patch.object( ..., return_value\u003d[ovn_const.OVN_GATEWAY_INVALID_CHASSIS])","commit_id":"867dc72f6d989ff9095ed46775ab052bcd3c1465"},{"author":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"change_message_id":"0c855911a03203e424dc1dba20f4266891991212","unresolved":false,"context_lines":[{"line_number":210,"context_line":"                    return row"},{"line_number":211,"context_line":"            return None"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"        def fake_select(*args, **kwargs):"},{"line_number":214,"context_line":"            # We are not interested in further processing, let us return"},{"line_number":215,"context_line":"            # INVALID_CHASSIS to avoid errors"},{"line_number":216,"context_line":"            return [ovn_const.OVN_GATEWAY_INVALID_CHASSIS]"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"        with mock.patch.object(ovn_client._ovn_scheduler, \u0027select\u0027,"},{"line_number":219,"context_line":"                               side_effect\u003dfake_select) as client_select:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa7e38b_893aa831","line":216,"range":{"start_line":213,"start_character":0,"end_line":216,"end_character":58},"in_reply_to":"3fa7e38b_36c0b27b","updated":"2019-09-23 13:57:08.000000000","message":"Indeed! I copied it from the other tests, but I think return value is cleaner here.","commit_id":"867dc72f6d989ff9095ed46775ab052bcd3c1465"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"effe947eb157b8d43ab0a2305526bccfcf3c819b","unresolved":false,"context_lines":[{"line_number":276,"context_line":"            self.assertIsNotNone(gw_port)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"            expected_networks \u003d [\u0027%s/24\u0027 % subnet4_ip, \u0027%s/64\u0027 % subnet6_ip]"},{"line_number":279,"context_line":"            self.assertEqual("},{"line_number":280,"context_line":"                Counter(expected_networks), Counter(gw_port.networks),"},{"line_number":281,"context_line":"                \u0027networks in ovn port must match fixed_ips in neutron\u0027)"},{"line_number":282,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa7e38b_f660daa7","line":279,"range":{"start_line":279,"start_character":17,"end_line":279,"end_character":28},"updated":"2019-09-23 10:55:22.000000000","message":"I think assertItemsEqual should work here too, no?","commit_id":"867dc72f6d989ff9095ed46775ab052bcd3c1465"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"8f306696877ec8df62f4b9bde4c510e503b1bd29","unresolved":false,"context_lines":[{"line_number":276,"context_line":"            self.assertIsNotNone(gw_port)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"            expected_networks \u003d [\u0027%s/24\u0027 % subnet4_ip, \u0027%s/64\u0027 % subnet6_ip]"},{"line_number":279,"context_line":"            self.assertEqual("},{"line_number":280,"context_line":"                Counter(expected_networks), Counter(gw_port.networks),"},{"line_number":281,"context_line":"                \u0027networks in ovn port must match fixed_ips in neutron\u0027)"},{"line_number":282,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa7e38b_2ce70243","line":279,"range":{"start_line":279,"start_character":17,"end_line":279,"end_character":28},"in_reply_to":"3fa7e38b_2c1dc265","updated":"2019-09-23 14:00:02.000000000","message":"I didn\u0027t know about assertCountEqual :) Thanks for teaching me","commit_id":"867dc72f6d989ff9095ed46775ab052bcd3c1465"},{"author":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"change_message_id":"0c855911a03203e424dc1dba20f4266891991212","unresolved":false,"context_lines":[{"line_number":276,"context_line":"            self.assertIsNotNone(gw_port)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"            expected_networks \u003d [\u0027%s/24\u0027 % subnet4_ip, \u0027%s/64\u0027 % subnet6_ip]"},{"line_number":279,"context_line":"            self.assertEqual("},{"line_number":280,"context_line":"                Counter(expected_networks), Counter(gw_port.networks),"},{"line_number":281,"context_line":"                \u0027networks in ovn port must match fixed_ips in neutron\u0027)"},{"line_number":282,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa7e38b_2c1dc265","line":279,"range":{"start_line":279,"start_character":17,"end_line":279,"end_character":28},"in_reply_to":"3fa7e38b_f660daa7","updated":"2019-09-23 13:57:08.000000000","message":"Hm... that is a really good question! It seems that .assertItemsEqual is getting replaced by .assertCountEqual [1].\nI will use that instead and save from adding the import as a bonus. Good deal. ;)\n[1]: https://docs.python.org/3.2/library/unittest.html#unittest.TestCase.assertCountEqual","commit_id":"867dc72f6d989ff9095ed46775ab052bcd3c1465"}]}
