)]}'
{"networking_ovn/common/maintenance.py":[{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"0f9bd56ba67a8fe1e576d85f8bbe2746fd9dbe8e","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        if row.revision_number \u003d\u003d ovn_const.INITIAL_REV_NUM:"},{"line_number":225,"context_line":"            self._ovn_client.create_subnet(sn_db_obj, n_db_obj)"},{"line_number":226,"context_line":"        else:"},{"line_number":227,"context_line":"            self._ovn_client.update_floatingip(sn_db_obj, n_db_obj)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    @periodics.periodic(spacing\u003dDB_CONSISTENCY_CHECK_INTERVAL,"},{"line_number":230,"context_line":"                        run_immediately\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f96bb07_8fd0d752","line":227,"updated":"2018-01-11 09:28:40.000000000","message":"I suppose inadvertent copy/paste error here :).\nShould be \"update_subnet(..\"","commit_id":"35dfd0ded19394452671f82916febdd3bb0a05dd"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"037d51c6a7ec9407693cbbd0e7f59d37adda7e09","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        if row.revision_number \u003d\u003d ovn_const.INITIAL_REV_NUM:"},{"line_number":225,"context_line":"            self._ovn_client.create_subnet(sn_db_obj, n_db_obj)"},{"line_number":226,"context_line":"        else:"},{"line_number":227,"context_line":"            self._ovn_client.update_floatingip(sn_db_obj, n_db_obj)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    @periodics.periodic(spacing\u003dDB_CONSISTENCY_CHECK_INTERVAL,"},{"line_number":230,"context_line":"                        run_immediately\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f96bb07_c20469c9","line":227,"in_reply_to":"7f96bb07_8fd0d752","updated":"2018-01-12 14:48:51.000000000","message":"++ my bad!","commit_id":"35dfd0ded19394452671f82916febdd3bb0a05dd"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"1b4946bea3c9905003d003ebf37d7491db029f03","unresolved":false,"context_lines":[{"line_number":267,"context_line":"            self._ovn_client.delete_floatingip(row.resource_uuid)"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    def _fix_create_update_subnet(self, row):"},{"line_number":270,"context_line":"        # Get the lasted version of the port in Neutron DB"},{"line_number":271,"context_line":"        admin_context \u003d n_context.get_admin_context()"},{"line_number":272,"context_line":"        sn_db_obj \u003d self._ovn_client._plugin.get_subnet("},{"line_number":273,"context_line":"            admin_context, row.resource_uuid)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_c6eaa80d","line":270,"range":{"start_line":270,"start_character":18,"end_line":270,"end_character":24},"updated":"2018-01-17 09:18:00.000000000","message":"nit: latest","commit_id":"1f6460862e149b828f81f6b92d52fa964bb5f6cb"}],"networking_ovn/common/ovn_client.py":[{"author":{"_account_id":10237,"name":"Numan Siddique","email":"nusiddiq@redhat.com","username":"numansiddique"},"change_message_id":"0f9bd56ba67a8fe1e576d85f8bbe2746fd9dbe8e","unresolved":false,"context_lines":[{"line_number":1230,"context_line":"            elif not lsp_dhcp_opts:"},{"line_number":1231,"context_line":"                lsp_dhcp_options \u003d subnet_dhcp_option"},{"line_number":1232,"context_line":"            else:"},{"line_number":1233,"context_line":"                port_dhcp_options \u003d copy.deepcopy(base_dhcp_options)"},{"line_number":1234,"context_line":"                port_dhcp_options[\u0027options\u0027].update(lsp_dhcp_opts)"},{"line_number":1235,"context_line":"                port_dhcp_options[\u0027external_ids\u0027].update("},{"line_number":1236,"context_line":"                    {\u0027port_id\u0027: port[\u0027id\u0027]})"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f96bb07_46d95481","line":1233,"updated":"2018-01-11 09:28:40.000000000","message":"Why not subnet_dhcp_options here?\n\nPresently when dhcp options row is created during subnet create we store the subnet_id in external_ids.\n\nAnd if the user has defined port specific dhcp options we create a new dhcp row and store both the subnet id and port id in external_ids.\n\nFrom this patch and this one https://review.openstack.org/#/c/520631, I see that when dhcp option row is created for the port, the revision number of the subnet is stored. But when the dhcp option row is created here for subnet(because the user enables dhcp for the subnet) the revision number is not updated for the existing ports having their own dhcp options.\n\nSo, probably you think we need to use subnet_dhcp_options here?\n\nOr you are not bothered about the revision numbers for port port dhcp options rows I suppose ? Correct me if I am wrong.","commit_id":"35dfd0ded19394452671f82916febdd3bb0a05dd"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"037d51c6a7ec9407693cbbd0e7f59d37adda7e09","unresolved":false,"context_lines":[{"line_number":1230,"context_line":"            elif not lsp_dhcp_opts:"},{"line_number":1231,"context_line":"                lsp_dhcp_options \u003d subnet_dhcp_option"},{"line_number":1232,"context_line":"            else:"},{"line_number":1233,"context_line":"                port_dhcp_options \u003d copy.deepcopy(base_dhcp_options)"},{"line_number":1234,"context_line":"                port_dhcp_options[\u0027options\u0027].update(lsp_dhcp_opts)"},{"line_number":1235,"context_line":"                port_dhcp_options[\u0027external_ids\u0027].update("},{"line_number":1236,"context_line":"                    {\u0027port_id\u0027: port[\u0027id\u0027]})"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f96bb07_56dd5c40","line":1233,"in_reply_to":"7f96bb07_46d95481","updated":"2018-01-12 14:48:51.000000000","message":"Hi Numan,\n\n\u003eOr you are not bothered about the revision numbers for port port dhcp options rows I suppose ? Correct me if I am wrong.\n\nThat\u0027s right, the idea was to have a 1:1 map from the Neutron subnet to the base DHCP option (the one that doesn\u0027t contain the port_id). Since all the subsequent DHCP options are created/updated/deleted in the same transaction we know that, if the base one was committed all others were committed as well.\n\nI don\u0027t think it would do any harm if we wrote the revision number to all DHCP options tho. It would just make the database slight bigger.\n\nShould I do it you think ? Lemme know what you prefer.","commit_id":"35dfd0ded19394452671f82916febdd3bb0a05dd"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"1b4946bea3c9905003d003ebf37d7491db029f03","unresolved":false,"context_lines":[{"line_number":1230,"context_line":"            elif not lsp_dhcp_opts:"},{"line_number":1231,"context_line":"                lsp_dhcp_options \u003d subnet_dhcp_option"},{"line_number":1232,"context_line":"            else:"},{"line_number":1233,"context_line":"                port_dhcp_options \u003d copy.deepcopy(base_dhcp_options)"},{"line_number":1234,"context_line":"                port_dhcp_options[\u0027options\u0027].update(lsp_dhcp_opts)"},{"line_number":1235,"context_line":"                port_dhcp_options[\u0027external_ids\u0027].update("},{"line_number":1236,"context_line":"                    {\u0027port_id\u0027: port[\u0027id\u0027]})"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f96bb07_a6d3dcd4","line":1233,"in_reply_to":"7f96bb07_56dd5c40","updated":"2018-01-17 09:18:00.000000000","message":"I think it makes sense what you\u0027re doing right now and adding only to the base one since we should guarantee that everything happens in the same transaction and that won\u0027t ever happen. On the other hand, it won\u0027t do any harm and it may make the get_subnet method a bit quicker since you could get the subnet_id for an entry with the port_id if you find it earlier... Whatever you choose is okay to me.","commit_id":"35dfd0ded19394452671f82916febdd3bb0a05dd"}],"networking_ovn/common/utils.py":[{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"1b4946bea3c9905003d003ebf37d7491db029f03","unresolved":false,"context_lines":[{"line_number":208,"context_line":"                         constants.TYPE_SECURITY_GROUP_RULES,"},{"line_number":209,"context_line":"                         constants.TYPE_ROUTERS,"},{"line_number":210,"context_line":"                         constants.TYPE_SECURITY_GROUPS,"},{"line_number":211,"context_line":"                         constants.TYPE_FLOATINGIPS, constants.TYPE_SUBNETS):"},{"line_number":212,"context_line":"        return resource[\u0027revision_number\u0027]"},{"line_number":213,"context_line":"    else:"},{"line_number":214,"context_line":"        raise ovn_exc.UnknownResourceType(resource_type\u003dresource_type)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_8625805e","line":211,"updated":"2018-01-17 09:18:00.000000000","message":"nit: this would read better in the next line :)","commit_id":"1f6460862e149b828f81f6b92d52fa964bb5f6cb"}],"networking_ovn/ovsdb/commands.py":[{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"1b4946bea3c9905003d003ebf37d7491db029f03","unresolved":false,"context_lines":[{"line_number":1040,"context_line":"        for dhcp in self.api._tables[\u0027DHCP_Options\u0027].rows.values():"},{"line_number":1041,"context_line":"            ext_ids \u003d getattr(dhcp, \u0027external_ids\u0027, {})"},{"line_number":1042,"context_line":"            # Ignore ports DHCP Options"},{"line_number":1043,"context_line":"            if ext_ids.get(\u0027port_id\u0027):"},{"line_number":1044,"context_line":"                continue"},{"line_number":1045,"context_line":"            if ext_ids.get(\u0027subnet_id\u0027) \u003d\u003d self.name:"},{"line_number":1046,"context_line":"                return dhcp"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f96bb07_26f82c47","line":1043,"updated":"2018-01-17 09:18:00.000000000","message":"If we follow Numan\u0027s suggestion we could get rid of this and make it quicker. As I said before, I\u0027m okay either way as every CRUD operation would happen within the same transaction.","commit_id":"35dfd0ded19394452671f82916febdd3bb0a05dd"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"1b4946bea3c9905003d003ebf37d7491db029f03","unresolved":false,"context_lines":[{"line_number":1072,"context_line":"        # have the external_ids column. We can remove this conditional"},{"line_number":1073,"context_line":"        # here by then."},{"line_number":1074,"context_line":"        if not self.api.is_col_present(ovn_table, \u0027external_ids\u0027):"},{"line_number":1075,"context_line":"            return"},{"line_number":1076,"context_line":""},{"line_number":1077,"context_line":"        external_ids \u003d getattr(ovn_resource, \u0027external_ids\u0027, {})"},{"line_number":1078,"context_line":"        ovn_revision \u003d int(external_ids.get("}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_c6070882","line":1075,"updated":"2018-01-17 09:18:00.000000000","message":"not particular of this patch, maybe for your refactor one but we could move this as up as possible to avoid querying OVSDB if the external_ids column is not present for the resource.","commit_id":"1f6460862e149b828f81f6b92d52fa964bb5f6cb"}],"networking_ovn/tests/functional/test_ovn_db_resources.py":[{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"1b4946bea3c9905003d003ebf37d7491db029f03","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    # number that the DHCP Option will be at assertion time, we need to"},{"line_number":47,"context_line":"    # refactor it a little to make it easier for mapping these updates."},{"line_number":48,"context_line":"    def _strip_revision_number(self, ext_ids):"},{"line_number":49,"context_line":"        ext_ids.pop(ovn_const.OVN_REV_NUM_EXT_ID_KEY, None)"},{"line_number":50,"context_line":"        return ext_ids"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _verify_dhcp_option_rows(self, expected_dhcp_options_rows):"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f96bb07_46fbf877","line":49,"updated":"2018-01-17 09:18:00.000000000","message":"+1 to the fixme later :)","commit_id":"1f6460862e149b828f81f6b92d52fa964bb5f6cb"}]}
