)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"3da863a5923a93c3d0c59cbb9e905465af40f81a","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Artur Korzeniewski \u003cartur.korzeniewski@intel.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-07-28 13:31:19 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"objects: Subnet OVO usage in db base plugin code for get, update and delete"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"changes made in db_base_plugin _v2 and _common:"},{"line_number":10,"context_line":"- _make_subnet_dict accepts both dict and Subnet object"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"bacf61ea_10646120","line":7,"updated":"2016-07-28 20:28:35.000000000","message":"nit: the title exceeds the limit of 50 chars","commit_id":"760909e3a30cec4f0f731b9d623e02cdc309d6b7"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"a640c868434caf36bf52c996f9fdf415d294202c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Artur Korzeniewski \u003cartur.korzeniewski@intel.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-07-28 13:31:19 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"objects: Subnet OVO usage in db base plugin code for get, update and delete"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"changes made in db_base_plugin _v2 and _common:"},{"line_number":10,"context_line":"- _make_subnet_dict accepts both dict and Subnet object"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"bacf61ea_957c46ed","line":7,"in_reply_to":"bacf61ea_10646120","updated":"2016-08-01 13:20:37.000000000","message":"I\u0027m not sure if characters limit is some kind of blocker... It is hard to rephrase it.","commit_id":"760909e3a30cec4f0f731b9d623e02cdc309d6b7"}],"neutron/db/db_base_plugin_common.py":[{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"37dd2b9728f75911b863621c4634ca9928b881d6","unresolved":false,"context_lines":[{"line_number":225,"context_line":"            raise n_exc.NetworkNotFound(net_id\u003did)"},{"line_number":226,"context_line":"        return network"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    def _get_subnet(self, context, id):"},{"line_number":229,"context_line":"        subnet \u003d subnet_obj.Subnet.get_object(context, id\u003did)"},{"line_number":230,"context_line":"        if not subnet:"},{"line_number":231,"context_line":"            raise n_exc.SubnetNotFound(subnet_id\u003did)"}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_b107d780","line":228,"range":{"start_line":228,"start_character":8,"end_line":228,"end_character":19},"updated":"2016-08-01 15:05:51.000000000","message":"Newbie question: A number of these \u0027getters\u0027 for subnets now return the OVO as per this patch. Based on the changes I see above in _make_subnet_dict() it appears the usage of a subnet OVO is slightly different (in some cases) than the subnet dict being used before.\n\n\nPresumably we have a number of consumers of the subnets returned from these \u0027getters\u0027; perhaps even out of the neutron tree. Are these consumers just expected to fix up their usage (to now use OVO) reactively or am I missing something?","commit_id":"760909e3a30cec4f0f731b9d623e02cdc309d6b7"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"7286232b730ccefca64aa2ca86a8e8b65cff08cb","unresolved":false,"context_lines":[{"line_number":225,"context_line":"            raise n_exc.NetworkNotFound(net_id\u003did)"},{"line_number":226,"context_line":"        return network"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    def _get_subnet(self, context, id):"},{"line_number":229,"context_line":"        subnet \u003d subnet_obj.Subnet.get_object(context, id\u003did)"},{"line_number":230,"context_line":"        if not subnet:"},{"line_number":231,"context_line":"            raise n_exc.SubnetNotFound(subnet_id\u003did)"}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_847c9e21","line":228,"range":{"start_line":228,"start_character":8,"end_line":228,"end_character":19},"in_reply_to":"bacf61ea_5f5561c4","updated":"2016-08-04 07:19:11.000000000","message":"the update_subnet from IPAM is returning back to the db_base_plugin_v2, so it is not trigger by extensions.","commit_id":"760909e3a30cec4f0f731b9d623e02cdc309d6b7"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"311da578b3af3d02606bdc192cbc2afac2571d80","unresolved":false,"context_lines":[{"line_number":225,"context_line":"            raise n_exc.NetworkNotFound(net_id\u003did)"},{"line_number":226,"context_line":"        return network"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    def _get_subnet(self, context, id):"},{"line_number":229,"context_line":"        subnet \u003d subnet_obj.Subnet.get_object(context, id\u003did)"},{"line_number":230,"context_line":"        if not subnet:"},{"line_number":231,"context_line":"            raise n_exc.SubnetNotFound(subnet_id\u003did)"}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_5f5561c4","line":228,"range":{"start_line":228,"start_character":8,"end_line":228,"end_character":19},"in_reply_to":"bacf61ea_9a6c2038","updated":"2016-08-03 08:23:54.000000000","message":"Thanks for looking into this. Feedback is welcomed. \nThis patch is still kinda WIP, because we are still working on some technical details, how to integrate the object in Newton cycle, not to break everything.\n\nI need to go throu this patch once again and see the implications on where we are using OVO. I will look into IPAM case, if returning the OVO can break anything.","commit_id":"760909e3a30cec4f0f731b9d623e02cdc309d6b7"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"054f8296b232e675a1b81e156a2678de72a8b7c0","unresolved":false,"context_lines":[{"line_number":225,"context_line":"            raise n_exc.NetworkNotFound(net_id\u003did)"},{"line_number":226,"context_line":"        return network"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    def _get_subnet(self, context, id):"},{"line_number":229,"context_line":"        subnet \u003d subnet_obj.Subnet.get_object(context, id\u003did)"},{"line_number":230,"context_line":"        if not subnet:"},{"line_number":231,"context_line":"            raise n_exc.SubnetNotFound(subnet_id\u003did)"}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_eebcaddd","line":228,"range":{"start_line":228,"start_character":8,"end_line":228,"end_character":19},"in_reply_to":"bacf61ea_b107d780","updated":"2016-08-02 09:04:01.000000000","message":"_get_subnet() is returning object now. So every consumer of _get_subnet should be aware of OVO. OVO should replace direct access to DB, so implementing the _get_subnet returning OVO make sense. \n\nAs for dict representation, the get_subnet() is returning it without any change. So the question is, if the consumer of get_subnet would like to work on dict or on DB/OVO object. If the latter, he should be aware of consequences of using the \u0027private\u0027 method.","commit_id":"760909e3a30cec4f0f731b9d623e02cdc309d6b7"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"eee89bed473f6fe206e73b98719830d485214c43","unresolved":false,"context_lines":[{"line_number":225,"context_line":"            raise n_exc.NetworkNotFound(net_id\u003did)"},{"line_number":226,"context_line":"        return network"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    def _get_subnet(self, context, id):"},{"line_number":229,"context_line":"        subnet \u003d subnet_obj.Subnet.get_object(context, id\u003did)"},{"line_number":230,"context_line":"        if not subnet:"},{"line_number":231,"context_line":"            raise n_exc.SubnetNotFound(subnet_id\u003did)"}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_9a6c2038","line":228,"range":{"start_line":228,"start_character":8,"end_line":228,"end_character":19},"in_reply_to":"bacf61ea_eebcaddd","updated":"2016-08-02 19:20:59.000000000","message":"There appear to be consumers of _get_subnet() that \"inadvertently\" return an OVO now from their public method. As an example [1]. IIUC their consumers now get OVOs, but as you stated they may have to be aware of such.\n\n\nNot trying to nit this to death; just trying to make sure I better understand the scope of this work and its implications.\n\n\n[1] https://github.com/openstack/neutron/blob/master/neutron/db/ipam_backend_mixin.py#L194","commit_id":"760909e3a30cec4f0f731b9d623e02cdc309d6b7"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"3da863a5923a93c3d0c59cbb9e905465af40f81a","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        filters \u003d filters or {}"},{"line_number":278,"context_line":"        if \u0027tenant_id\u0027 in filters:"},{"line_number":279,"context_line":"            filters[\u0027project_id\u0027] \u003d filters.pop(\u0027tenant_id\u0027)"},{"line_number":280,"context_line":"        #import pdb; pdb.set_trace()"},{"line_number":281,"context_line":"        subnet_objs \u003d subnet_obj.Subnet.get_objects(context, _pager\u003dpager,"},{"line_number":282,"context_line":"                                                    **filters)"},{"line_number":283,"context_line":"        return subnet_objs"}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_2b277ab7","line":280,"range":{"start_line":280,"start_character":8,"end_line":280,"end_character":36},"updated":"2016-07-28 20:28:35.000000000","message":"don\u0027t forget to remove this line","commit_id":"760909e3a30cec4f0f731b9d623e02cdc309d6b7"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"7286232b730ccefca64aa2ca86a8e8b65cff08cb","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        filters \u003d filters or {}"},{"line_number":278,"context_line":"        if \u0027tenant_id\u0027 in filters:"},{"line_number":279,"context_line":"            filters[\u0027project_id\u0027] \u003d filters.pop(\u0027tenant_id\u0027)"},{"line_number":280,"context_line":"        #import pdb; pdb.set_trace()"},{"line_number":281,"context_line":"        subnet_objs \u003d subnet_obj.Subnet.get_objects(context, _pager\u003dpager,"},{"line_number":282,"context_line":"                                                    **filters)"},{"line_number":283,"context_line":"        return subnet_objs"}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_18b58630","line":280,"range":{"start_line":280,"start_character":8,"end_line":280,"end_character":36},"in_reply_to":"bacf61ea_07e66d14","updated":"2016-08-04 07:19:11.000000000","message":"pdb removed.","commit_id":"760909e3a30cec4f0f731b9d623e02cdc309d6b7"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"a640c868434caf36bf52c996f9fdf415d294202c","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        filters \u003d filters or {}"},{"line_number":278,"context_line":"        if \u0027tenant_id\u0027 in filters:"},{"line_number":279,"context_line":"            filters[\u0027project_id\u0027] \u003d filters.pop(\u0027tenant_id\u0027)"},{"line_number":280,"context_line":"        #import pdb; pdb.set_trace()"},{"line_number":281,"context_line":"        subnet_objs \u003d subnet_obj.Subnet.get_objects(context, _pager\u003dpager,"},{"line_number":282,"context_line":"                                                    **filters)"},{"line_number":283,"context_line":"        return subnet_objs"}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_3572ba11","line":280,"range":{"start_line":280,"start_character":8,"end_line":280,"end_character":36},"in_reply_to":"bacf61ea_2b277ab7","updated":"2016-08-01 13:20:37.000000000","message":"I better do, thanks :)","commit_id":"760909e3a30cec4f0f731b9d623e02cdc309d6b7"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"054f8296b232e675a1b81e156a2678de72a8b7c0","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        filters \u003d filters or {}"},{"line_number":278,"context_line":"        if \u0027tenant_id\u0027 in filters:"},{"line_number":279,"context_line":"            filters[\u0027project_id\u0027] \u003d filters.pop(\u0027tenant_id\u0027)"},{"line_number":280,"context_line":"        #import pdb; pdb.set_trace()"},{"line_number":281,"context_line":"        subnet_objs \u003d subnet_obj.Subnet.get_objects(context, _pager\u003dpager,"},{"line_number":282,"context_line":"                                                    **filters)"},{"line_number":283,"context_line":"        return subnet_objs"}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_07e66d14","line":280,"range":{"start_line":280,"start_character":8,"end_line":280,"end_character":36},"in_reply_to":"bacf61ea_3572ba11","updated":"2016-08-02 09:04:01.000000000","message":"Renaming the tenant_id to project_id seems like it is common pattern, need to find a common place for it.","commit_id":"760909e3a30cec4f0f731b9d623e02cdc309d6b7"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"37dd2b9728f75911b863621c4634ca9928b881d6","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        if \u0027tenant_id\u0027 in filters:"},{"line_number":279,"context_line":"            filters[\u0027project_id\u0027] \u003d filters.pop(\u0027tenant_id\u0027)"},{"line_number":280,"context_line":"        #import pdb; pdb.set_trace()"},{"line_number":281,"context_line":"        subnet_objs \u003d subnet_obj.Subnet.get_objects(context, _pager\u003dpager,"},{"line_number":282,"context_line":"                                                    **filters)"},{"line_number":283,"context_line":"        return subnet_objs"},{"line_number":284,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_a0e027ce","line":281,"range":{"start_line":281,"start_character":8,"end_line":281,"end_character":21},"updated":"2016-08-01 15:05:51.000000000","message":"Nit: why not just put the return here as we don\u0027t seem to do anything with \u0027subnet_objs\u0027","commit_id":"760909e3a30cec4f0f731b9d623e02cdc309d6b7"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"7286232b730ccefca64aa2ca86a8e8b65cff08cb","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        if \u0027tenant_id\u0027 in filters:"},{"line_number":279,"context_line":"            filters[\u0027project_id\u0027] \u003d filters.pop(\u0027tenant_id\u0027)"},{"line_number":280,"context_line":"        #import pdb; pdb.set_trace()"},{"line_number":281,"context_line":"        subnet_objs \u003d subnet_obj.Subnet.get_objects(context, _pager\u003dpager,"},{"line_number":282,"context_line":"                                                    **filters)"},{"line_number":283,"context_line":"        return subnet_objs"},{"line_number":284,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_b8a55a05","line":281,"range":{"start_line":281,"start_character":8,"end_line":281,"end_character":21},"in_reply_to":"bacf61ea_0eadc19a","updated":"2016-08-04 07:19:11.000000000","message":"Done","commit_id":"760909e3a30cec4f0f731b9d623e02cdc309d6b7"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"054f8296b232e675a1b81e156a2678de72a8b7c0","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        if \u0027tenant_id\u0027 in filters:"},{"line_number":279,"context_line":"            filters[\u0027project_id\u0027] \u003d filters.pop(\u0027tenant_id\u0027)"},{"line_number":280,"context_line":"        #import pdb; pdb.set_trace()"},{"line_number":281,"context_line":"        subnet_objs \u003d subnet_obj.Subnet.get_objects(context, _pager\u003dpager,"},{"line_number":282,"context_line":"                                                    **filters)"},{"line_number":283,"context_line":"        return subnet_objs"},{"line_number":284,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_0eadc19a","line":281,"range":{"start_line":281,"start_character":8,"end_line":281,"end_character":21},"in_reply_to":"bacf61ea_a0e027ce","updated":"2016-08-02 09:04:01.000000000","message":"Good point.","commit_id":"760909e3a30cec4f0f731b9d623e02cdc309d6b7"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"4c7786ef0e470c1d74a9c08552b8bc2c9bea74a1","unresolved":false,"context_lines":[{"line_number":283,"context_line":"            filters[\u0027project_id\u0027] \u003d filters.pop(\u0027tenant_id\u0027)"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"        # NOTE(korzen) removing unknown filter keys as temporary workaround."},{"line_number":286,"context_line":"        # Final solution should be placed in API layer."},{"line_number":287,"context_line":"        bad_filters \u003d {key for key in filters"},{"line_number":288,"context_line":"                       if key not in subnet_obj.Subnet.fields or"},{"line_number":289,"context_line":"                       subnet_obj.Subnet.is_synthetic(key)}"}],"source_content_type":"text/x-python","patch_set":16,"id":"bacf61ea_154decc3","line":286,"range":{"start_line":286,"start_character":10,"end_line":286,"end_character":54},"updated":"2016-08-05 19:32:12.000000000","message":"In the time being, shouldn\u0027t this be down on one of the \"base methods\" such as get_objects() since other callers will have this same issue? Or maybe this is the only use of filters.","commit_id":"a7479f72e72f773ab33b7074042eccfeff01ba88"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"93959ae7c47b3df621557c9f53ef10ef085d00a2","unresolved":false,"context_lines":[{"line_number":283,"context_line":"            filters[\u0027project_id\u0027] \u003d filters.pop(\u0027tenant_id\u0027)"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"        # NOTE(korzen) removing unknown filter keys as temporary workaround."},{"line_number":286,"context_line":"        # Final solution should be placed in API layer."},{"line_number":287,"context_line":"        bad_filters \u003d {key for key in filters"},{"line_number":288,"context_line":"                       if key not in subnet_obj.Subnet.fields or"},{"line_number":289,"context_line":"                       subnet_obj.Subnet.is_synthetic(key)}"}],"source_content_type":"text/x-python","patch_set":16,"id":"9ad45d7e_fca0c3a7","line":286,"range":{"start_line":286,"start_character":10,"end_line":286,"end_character":54},"in_reply_to":"bacf61ea_154decc3","updated":"2016-08-08 13:51:06.000000000","message":"Based on discussion with Ihar [1] we have decided to keep removing of bad filters case by case, without generalization.\n\n[1] https://review.openstack.org/#/c/350423/2/neutron/objects/utils.py@18","commit_id":"a7479f72e72f773ab33b7074042eccfeff01ba88"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"c5f2fd4bf2d52dcb9b7f4b520e5a96c1d1d46b97","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    def _make_subnet_dict(self, subnet, fields\u003dNone, context\u003dNone):"},{"line_number":134,"context_line":"        res \u003d {\u0027id\u0027: subnet[\u0027id\u0027],"},{"line_number":135,"context_line":"               \u0027tenant_id\u0027: subnet.project_id,"},{"line_number":136,"context_line":"               \u0027name\u0027: subnet[\u0027name\u0027],"},{"line_number":137,"context_line":"               \u0027network_id\u0027: subnet[\u0027network_id\u0027],"},{"line_number":138,"context_line":"               \u0027ip_version\u0027: subnet[\u0027ip_version\u0027],"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a8bc5a2_a1ec2490","line":135,"range":{"start_line":135,"start_character":28,"end_line":135,"end_character":45},"updated":"2016-09-24 00:19:08.000000000","message":"if subnet can be dictionary or object would be safe to use subnet.project_id here without checking isinstance(subnet, subnet_obj.Subnet) ?","commit_id":"9b72f34f8d224e2315f6226798f2812d31d07069"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"f13832e3c7dcb20cb42f380b4fa014c9d00b5a8f","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    def _make_subnet_dict(self, subnet, fields\u003dNone, context\u003dNone):"},{"line_number":134,"context_line":"        res \u003d {\u0027id\u0027: subnet[\u0027id\u0027],"},{"line_number":135,"context_line":"               \u0027tenant_id\u0027: subnet.project_id,"},{"line_number":136,"context_line":"               \u0027name\u0027: subnet[\u0027name\u0027],"},{"line_number":137,"context_line":"               \u0027network_id\u0027: subnet[\u0027network_id\u0027],"},{"line_number":138,"context_line":"               \u0027ip_version\u0027: subnet[\u0027ip_version\u0027],"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a8bc5a2_a5b40235","line":135,"range":{"start_line":135,"start_character":28,"end_line":135,"end_character":45},"in_reply_to":"5a8bc5a2_a1ec2490","updated":"2016-09-26 12:00:44.000000000","message":"I guess that I have misunderstood the type of subnet field. The \u0027subnet\u0027 argument can be models_v2.Subnet object or OVO. So if we have db vs OVO, it is safe to use subnet.project_id as common case. It can be rewritten as \u0027subnet[\u0027project_id\u0027] to be consistent with next lines.","commit_id":"9b72f34f8d224e2315f6226798f2812d31d07069"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"f13832e3c7dcb20cb42f380b4fa014c9d00b5a8f","unresolved":false,"context_lines":[{"line_number":144,"context_line":"               \u0027dns_nameservers\u0027: [str(dns[\u0027address\u0027])"},{"line_number":145,"context_line":"                                   for dns in subnet[\u0027dns_nameservers\u0027]]"},{"line_number":146,"context_line":"               }"},{"line_number":147,"context_line":"        # NOTE(korzen) this method can get the subnet as dict and Subnet OVO"},{"line_number":148,"context_line":"        # so temporary workaround will be to fill in the fields in separate"},{"line_number":149,"context_line":"        # ways. After converting all code pieces to use Subnet OVO, the latter"},{"line_number":150,"context_line":"        # \u0027else\u0027 can be deleted"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a8bc5a2_e5d60a4e","line":147,"range":{"start_line":147,"start_character":44,"end_line":147,"end_character":61},"updated":"2016-09-26 12:00:44.000000000","message":"I guess that subnet can be db object or OVO, not dict.","commit_id":"9b72f34f8d224e2315f6226798f2812d31d07069"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"c5f2fd4bf2d52dcb9b7f4b520e5a96c1d1d46b97","unresolved":false,"context_lines":[{"line_number":250,"context_line":"                                                    subnet_id\u003dsubnet_id)"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    def _get_route_by_subnet(self, context, subnet_id):"},{"line_number":253,"context_line":"        route_qry \u003d context.session.query(models_v2.SubnetRoute)"},{"line_number":254,"context_line":"        return route_qry.filter_by(subnet_id\u003dsubnet_id).all()"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"    def _get_router_gw_ports_by_network(self, context, network_id):"},{"line_number":257,"context_line":"        port_qry \u003d context.session.query(models_v2.Port)"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a8bc5a2_1c8d3f7b","line":254,"range":{"start_line":253,"start_character":7,"end_line":254,"end_character":61},"updated":"2016-09-24 00:19:08.000000000","message":"since SubnetRoute is added in same object tree under objects/subnet might want this to use object db api here as well unless there is specific reason to do it later,","commit_id":"9b72f34f8d224e2315f6226798f2812d31d07069"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"f13832e3c7dcb20cb42f380b4fa014c9d00b5a8f","unresolved":false,"context_lines":[{"line_number":250,"context_line":"                                                    subnet_id\u003dsubnet_id)"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    def _get_route_by_subnet(self, context, subnet_id):"},{"line_number":253,"context_line":"        route_qry \u003d context.session.query(models_v2.SubnetRoute)"},{"line_number":254,"context_line":"        return route_qry.filter_by(subnet_id\u003dsubnet_id).all()"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"    def _get_router_gw_ports_by_network(self, context, network_id):"},{"line_number":257,"context_line":"        port_qry \u003d context.session.query(models_v2.Port)"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a8bc5a2_654afa27","line":254,"range":{"start_line":253,"start_character":7,"end_line":254,"end_character":61},"in_reply_to":"5a8bc5a2_1c8d3f7b","updated":"2016-09-26 12:00:44.000000000","message":"Use of SubnetRoute is to be done in separate patch.","commit_id":"9b72f34f8d224e2315f6226798f2812d31d07069"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"868b8583d03bec78a17409145fdee1480818c162","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            # as its parent network"},{"line_number":162,"context_line":"            res[\u0027shared\u0027] \u003d subnet.shared"},{"line_number":163,"context_line":"            # Call auxiliary extend functions, if any"},{"line_number":164,"context_line":"            if context:"},{"line_number":165,"context_line":"                context.session.add(subnet.db_obj)"},{"line_number":166,"context_line":"            self._apply_dict_extend_functions(attributes.SUBNETS, res,"},{"line_number":167,"context_line":"                                              subnet.db_obj)"}],"source_content_type":"text/x-python","patch_set":23,"id":"9ff52f3f_e85bc751","line":164,"updated":"2017-04-13 00:42:23.000000000","message":"we should be able to get rid of this session logic now. try rebasing and removing it and then ping me for help on IRC if it\u0027s still causing problems","commit_id":"9c98bdb3ec0ca2ba28bddfad7b47a126d2d5d6de"},{"author":{"_account_id":20277,"name":"James Anziano","email":"janzian@us.ibm.com","username":"janzian"},"change_message_id":"5efc28c8e27f1d59e24c3a8b613d3456ea8f7a6f","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            # as its parent network"},{"line_number":162,"context_line":"            res[\u0027shared\u0027] \u003d subnet.shared"},{"line_number":163,"context_line":"            # Call auxiliary extend functions, if any"},{"line_number":164,"context_line":"            if context:"},{"line_number":165,"context_line":"                context.session.add(subnet.db_obj)"},{"line_number":166,"context_line":"            self._apply_dict_extend_functions(attributes.SUBNETS, res,"},{"line_number":167,"context_line":"                                              subnet.db_obj)"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f201791_8c942e46","line":164,"in_reply_to":"9ff52f3f_e85bc751","updated":"2017-06-21 20:27:52.000000000","message":"Done","commit_id":"9c98bdb3ec0ca2ba28bddfad7b47a126d2d5d6de"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"868b8583d03bec78a17409145fdee1480818c162","unresolved":false,"context_lines":[{"line_number":168,"context_line":"            if context:"},{"line_number":169,"context_line":"                context.session.expunge(subnet.db_obj)"},{"line_number":170,"context_line":"        else:"},{"line_number":171,"context_line":"            res[\u0027gateway_ip\u0027] \u003d subnet[\u0027gateway_ip\u0027]"},{"line_number":172,"context_line":"            res[\u0027allocation_pools\u0027] \u003d [{\u0027start\u0027: str(pool[\u0027first_ip\u0027]),"},{"line_number":173,"context_line":"                                       \u0027end\u0027: str(pool[\u0027last_ip\u0027])}"},{"line_number":174,"context_line":"                                       for pool in subnet[\u0027allocation_pools\u0027]]"}],"source_content_type":"text/x-python","patch_set":23,"id":"9ff52f3f_c8580358","line":171,"updated":"2017-04-13 00:42:23.000000000","message":"seems gateway_ip logic can be shared\n\nstr(subnet[\u0027gateway_ip\u0027]) if subnet[\u0027gateway_ip\u0027] else None\n\n should work with both","commit_id":"9c98bdb3ec0ca2ba28bddfad7b47a126d2d5d6de"},{"author":{"_account_id":20277,"name":"James Anziano","email":"janzian@us.ibm.com","username":"janzian"},"change_message_id":"5efc28c8e27f1d59e24c3a8b613d3456ea8f7a6f","unresolved":false,"context_lines":[{"line_number":168,"context_line":"            if context:"},{"line_number":169,"context_line":"                context.session.expunge(subnet.db_obj)"},{"line_number":170,"context_line":"        else:"},{"line_number":171,"context_line":"            res[\u0027gateway_ip\u0027] \u003d subnet[\u0027gateway_ip\u0027]"},{"line_number":172,"context_line":"            res[\u0027allocation_pools\u0027] \u003d [{\u0027start\u0027: str(pool[\u0027first_ip\u0027]),"},{"line_number":173,"context_line":"                                       \u0027end\u0027: str(pool[\u0027last_ip\u0027])}"},{"line_number":174,"context_line":"                                       for pool in subnet[\u0027allocation_pools\u0027]]"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f201791_2c9bda72","line":171,"in_reply_to":"9ff52f3f_c8580358","updated":"2017-06-21 20:27:52.000000000","message":"Done","commit_id":"9c98bdb3ec0ca2ba28bddfad7b47a126d2d5d6de"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"868b8583d03bec78a17409145fdee1480818c162","unresolved":false,"context_lines":[{"line_number":233,"context_line":"        return network"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    def _get_subnet(self, context, id):"},{"line_number":236,"context_line":"        subnet \u003d subnet_obj.Subnet.get_object(context, id\u003did)"},{"line_number":237,"context_line":"        if not subnet:"},{"line_number":238,"context_line":"            raise n_exc.SubnetNotFound(subnet_id\u003did)"},{"line_number":239,"context_line":"        return subnet"}],"source_content_type":"text/x-python","patch_set":23,"id":"9ff52f3f_a855bf1f","line":236,"updated":"2017-04-13 00:42:23.000000000","message":"Unfortunately this will be pretty disruptive I think because I know other core plugins expect an SQLA object in return. can you leave this function behind as is and add a new _get_subnet_object function and convert the in tree stuff to that? then we can deprecate this one at the end of the cycle.","commit_id":"9c98bdb3ec0ca2ba28bddfad7b47a126d2d5d6de"},{"author":{"_account_id":20277,"name":"James Anziano","email":"janzian@us.ibm.com","username":"janzian"},"change_message_id":"5efc28c8e27f1d59e24c3a8b613d3456ea8f7a6f","unresolved":false,"context_lines":[{"line_number":233,"context_line":"        return network"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    def _get_subnet(self, context, id):"},{"line_number":236,"context_line":"        subnet \u003d subnet_obj.Subnet.get_object(context, id\u003did)"},{"line_number":237,"context_line":"        if not subnet:"},{"line_number":238,"context_line":"            raise n_exc.SubnetNotFound(subnet_id\u003did)"},{"line_number":239,"context_line":"        return subnet"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f201791_ac9daa5a","line":236,"in_reply_to":"9ff52f3f_a855bf1f","updated":"2017-06-21 20:27:52.000000000","message":"Done","commit_id":"9c98bdb3ec0ca2ba28bddfad7b47a126d2d5d6de"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f290d92ec78ce37adb9bd599c2b23a239c7089ba","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        # Ib32509d974c8654131112234bcf19d6eae8f7cca"},{"line_number":128,"context_line":"        allocated.create()"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def _make_subnet_dict(self, subnet, fields\u003dNone, context\u003dNone):"},{"line_number":131,"context_line":"        res \u003d {\u0027id\u0027: subnet[\u0027id\u0027],"},{"line_number":132,"context_line":"               \u0027name\u0027: subnet[\u0027name\u0027],"},{"line_number":133,"context_line":"               \u0027tenant_id\u0027: subnet[\u0027project_id\u0027],"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_c2f0886a","line":130,"updated":"2017-10-11 19:38:59.000000000","message":"I don\u0027t think I agree with the idea that we will pass two different types into the method. Let\u0027s stick to a single one (OVO if it\u0027s easy, model if it\u0027s not - we already have a model available on the object: obj.db_obj)","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"403862ee25c21ecf37611371ff2cf9edac99bf88","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        # Ib32509d974c8654131112234bcf19d6eae8f7cca"},{"line_number":128,"context_line":"        allocated.create()"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def _make_subnet_dict(self, subnet, fields\u003dNone, context\u003dNone):"},{"line_number":131,"context_line":"        res \u003d {\u0027id\u0027: subnet[\u0027id\u0027],"},{"line_number":132,"context_line":"               \u0027name\u0027: subnet[\u0027name\u0027],"},{"line_number":133,"context_line":"               \u0027tenant_id\u0027: subnet[\u0027project_id\u0027],"}],"source_content_type":"text/x-python","patch_set":32,"id":"3f4b6375_47cc9ebb","line":130,"in_reply_to":"5f4e5783_5d31faeb","updated":"2017-10-20 18:50:27.000000000","message":"This method is explicitly internal (name starts with underscore).","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"842a0ed4ca5973a1464159227951c652c4f99376","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        # Ib32509d974c8654131112234bcf19d6eae8f7cca"},{"line_number":128,"context_line":"        allocated.create()"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def _make_subnet_dict(self, subnet, fields\u003dNone, context\u003dNone):"},{"line_number":131,"context_line":"        res \u003d {\u0027id\u0027: subnet[\u0027id\u0027],"},{"line_number":132,"context_line":"               \u0027name\u0027: subnet[\u0027name\u0027],"},{"line_number":133,"context_line":"               \u0027tenant_id\u0027: subnet[\u0027project_id\u0027],"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_5d31faeb","line":130,"in_reply_to":"5f4e5783_c2f0886a","updated":"2017-10-13 08:29:34.000000000","message":"I know that it\u0027s not perfect solution but IMHO it\u0027s good as temporary until we will not switch all to use subnet OVO?\nI can pass subnet_obj.db_model anywhere where subnet OVO is already used and treat it here as db object but I\u0027m not sure if it\u0027s good solution.\nFrom the other side, I think we can\u0027t switch to use only OVO as input parameter to provide some backward compatibility for someone who would use this method also (similar case like for \"get_subnet()\" and \"get_subnet_obj()\" methods)","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f290d92ec78ce37adb9bd599c2b23a239c7089ba","unresolved":false,"context_lines":[{"line_number":130,"context_line":"    def _make_subnet_dict(self, subnet, fields\u003dNone, context\u003dNone):"},{"line_number":131,"context_line":"        res \u003d {\u0027id\u0027: subnet[\u0027id\u0027],"},{"line_number":132,"context_line":"               \u0027name\u0027: subnet[\u0027name\u0027],"},{"line_number":133,"context_line":"               \u0027tenant_id\u0027: subnet[\u0027project_id\u0027],"},{"line_number":134,"context_line":"               \u0027network_id\u0027: subnet[\u0027network_id\u0027],"},{"line_number":135,"context_line":"               \u0027ip_version\u0027: subnet[\u0027ip_version\u0027],"},{"line_number":136,"context_line":"               \u0027cidr\u0027: str(subnet[\u0027cidr\u0027]),"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_7c705da6","line":133,"updated":"2017-10-11 19:38:59.000000000","message":"wouldn\u0027t [\u0027tenant_id\u0027] still work since we have https://github.com/openstack/neutron/blob/b11b5c5c43af0f76c816a47d505332a2ffb339ee/neutron/objects/base.py#L246-L247","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"842a0ed4ca5973a1464159227951c652c4f99376","unresolved":false,"context_lines":[{"line_number":130,"context_line":"    def _make_subnet_dict(self, subnet, fields\u003dNone, context\u003dNone):"},{"line_number":131,"context_line":"        res \u003d {\u0027id\u0027: subnet[\u0027id\u0027],"},{"line_number":132,"context_line":"               \u0027name\u0027: subnet[\u0027name\u0027],"},{"line_number":133,"context_line":"               \u0027tenant_id\u0027: subnet[\u0027project_id\u0027],"},{"line_number":134,"context_line":"               \u0027network_id\u0027: subnet[\u0027network_id\u0027],"},{"line_number":135,"context_line":"               \u0027ip_version\u0027: subnet[\u0027ip_version\u0027],"},{"line_number":136,"context_line":"               \u0027cidr\u0027: str(subnet[\u0027cidr\u0027]),"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_7d36f6e8","line":133,"in_reply_to":"5f4e5783_7c705da6","updated":"2017-10-13 08:29:34.000000000","message":"Done","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f290d92ec78ce37adb9bd599c2b23a239c7089ba","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                                       for pool in subnet.allocation_pools]"},{"line_number":154,"context_line":"            res[\u0027host_routes\u0027] \u003d [{\u0027destination\u0027: str(route[\u0027destination\u0027]),"},{"line_number":155,"context_line":"                                   \u0027nexthop\u0027: str(route[\u0027nexthop\u0027])}"},{"line_number":156,"context_line":"                                 for route in subnet[\u0027host_routes\u0027]]"},{"line_number":157,"context_line":"            # The shared attribute for a subnet is the same"},{"line_number":158,"context_line":"            # as its parent network"},{"line_number":159,"context_line":"            res[\u0027shared\u0027] \u003d subnet.shared"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_3cdd4570","line":156,"range":{"start_line":156,"start_character":52,"end_line":156,"end_character":67},"updated":"2017-10-11 19:38:59.000000000","message":"since you write code that explicitly handles OVOs, consider using __getattr__ instead of __getitem__:\n\nsubnet[\u0027host_routes\u0027] \u003d\u003e subnet.host_routes\n\nThe latter is generally preferred for OVOs, though we avoid that for now to reduce the number of lines changed; but since you write new code, it makes sense to write it in new style.","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"842a0ed4ca5973a1464159227951c652c4f99376","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                                       for pool in subnet.allocation_pools]"},{"line_number":154,"context_line":"            res[\u0027host_routes\u0027] \u003d [{\u0027destination\u0027: str(route[\u0027destination\u0027]),"},{"line_number":155,"context_line":"                                   \u0027nexthop\u0027: str(route[\u0027nexthop\u0027])}"},{"line_number":156,"context_line":"                                 for route in subnet[\u0027host_routes\u0027]]"},{"line_number":157,"context_line":"            # The shared attribute for a subnet is the same"},{"line_number":158,"context_line":"            # as its parent network"},{"line_number":159,"context_line":"            res[\u0027shared\u0027] \u003d subnet.shared"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_5d69fa88","line":156,"range":{"start_line":156,"start_character":52,"end_line":156,"end_character":67},"in_reply_to":"5f4e5783_3cdd4570","updated":"2017-10-13 08:29:34.000000000","message":"changed","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f290d92ec78ce37adb9bd599c2b23a239c7089ba","unresolved":false,"context_lines":[{"line_number":154,"context_line":"            res[\u0027host_routes\u0027] \u003d [{\u0027destination\u0027: str(route[\u0027destination\u0027]),"},{"line_number":155,"context_line":"                                   \u0027nexthop\u0027: str(route[\u0027nexthop\u0027])}"},{"line_number":156,"context_line":"                                 for route in subnet[\u0027host_routes\u0027]]"},{"line_number":157,"context_line":"            # The shared attribute for a subnet is the same"},{"line_number":158,"context_line":"            # as its parent network"},{"line_number":159,"context_line":"            res[\u0027shared\u0027] \u003d subnet.shared"},{"line_number":160,"context_line":"            # Call auxiliary extend functions, if any"},{"line_number":161,"context_line":"            self._apply_dict_extend_functions(subnet_def.COLLECTION_NAME,"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_7cd17dcd","line":158,"range":{"start_line":157,"start_character":12,"end_line":158,"end_character":35},"updated":"2017-10-11 19:38:59.000000000","message":"I don\u0027t think this comment makes sense here; it makes sense in the old code path.","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"842a0ed4ca5973a1464159227951c652c4f99376","unresolved":false,"context_lines":[{"line_number":154,"context_line":"            res[\u0027host_routes\u0027] \u003d [{\u0027destination\u0027: str(route[\u0027destination\u0027]),"},{"line_number":155,"context_line":"                                   \u0027nexthop\u0027: str(route[\u0027nexthop\u0027])}"},{"line_number":156,"context_line":"                                 for route in subnet[\u0027host_routes\u0027]]"},{"line_number":157,"context_line":"            # The shared attribute for a subnet is the same"},{"line_number":158,"context_line":"            # as its parent network"},{"line_number":159,"context_line":"            res[\u0027shared\u0027] \u003d subnet.shared"},{"line_number":160,"context_line":"            # Call auxiliary extend functions, if any"},{"line_number":161,"context_line":"            self._apply_dict_extend_functions(subnet_def.COLLECTION_NAME,"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_fd70a6a7","line":158,"range":{"start_line":157,"start_character":12,"end_line":158,"end_character":35},"in_reply_to":"5f4e5783_7cd17dcd","updated":"2017-10-13 08:29:34.000000000","message":"Removed","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f290d92ec78ce37adb9bd599c2b23a239c7089ba","unresolved":false,"context_lines":[{"line_number":158,"context_line":"            # as its parent network"},{"line_number":159,"context_line":"            res[\u0027shared\u0027] \u003d subnet.shared"},{"line_number":160,"context_line":"            # Call auxiliary extend functions, if any"},{"line_number":161,"context_line":"            self._apply_dict_extend_functions(subnet_def.COLLECTION_NAME,"},{"line_number":162,"context_line":"                                              res, subnet.db_obj)"},{"line_number":163,"context_line":"        else:"},{"line_number":164,"context_line":"            res[\u0027allocation_pools\u0027] \u003d [{\u0027start\u0027: str(pool[\u0027first_ip\u0027]),"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_1cd609c5","line":161,"updated":"2017-10-11 19:38:59.000000000","message":"why not calling apply_funcs?","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"842a0ed4ca5973a1464159227951c652c4f99376","unresolved":false,"context_lines":[{"line_number":158,"context_line":"            # as its parent network"},{"line_number":159,"context_line":"            res[\u0027shared\u0027] \u003d subnet.shared"},{"line_number":160,"context_line":"            # Call auxiliary extend functions, if any"},{"line_number":161,"context_line":"            self._apply_dict_extend_functions(subnet_def.COLLECTION_NAME,"},{"line_number":162,"context_line":"                                              res, subnet.db_obj)"},{"line_number":163,"context_line":"        else:"},{"line_number":164,"context_line":"            res[\u0027allocation_pools\u0027] \u003d [{\u0027start\u0027: str(pool[\u0027first_ip\u0027]),"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_9d6532e4","line":161,"in_reply_to":"5f4e5783_1cd609c5","updated":"2017-10-13 08:29:34.000000000","message":"changed","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f290d92ec78ce37adb9bd599c2b23a239c7089ba","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            self._apply_dict_extend_functions(subnet_def.COLLECTION_NAME,"},{"line_number":162,"context_line":"                                              res, subnet.db_obj)"},{"line_number":163,"context_line":"        else:"},{"line_number":164,"context_line":"            res[\u0027allocation_pools\u0027] \u003d [{\u0027start\u0027: str(pool[\u0027first_ip\u0027]),"},{"line_number":165,"context_line":"                                       \u0027end\u0027: str(pool[\u0027last_ip\u0027])}"},{"line_number":166,"context_line":"                                       for pool in subnet[\u0027allocation_pools\u0027]]"},{"line_number":167,"context_line":"            res[\u0027host_routes\u0027] \u003d [{\u0027destination\u0027: str(route[\u0027destination\u0027]),"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_3caf85e4","line":164,"updated":"2017-10-11 19:38:59.000000000","message":"add TODO here to clean it up (or maybe convert the NOTE above to TODO)","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"842a0ed4ca5973a1464159227951c652c4f99376","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            self._apply_dict_extend_functions(subnet_def.COLLECTION_NAME,"},{"line_number":162,"context_line":"                                              res, subnet.db_obj)"},{"line_number":163,"context_line":"        else:"},{"line_number":164,"context_line":"            res[\u0027allocation_pools\u0027] \u003d [{\u0027start\u0027: str(pool[\u0027first_ip\u0027]),"},{"line_number":165,"context_line":"                                       \u0027end\u0027: str(pool[\u0027last_ip\u0027])}"},{"line_number":166,"context_line":"                                       for pool in subnet[\u0027allocation_pools\u0027]]"},{"line_number":167,"context_line":"            res[\u0027host_routes\u0027] \u003d [{\u0027destination\u0027: str(route[\u0027destination\u0027]),"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_7db9562c","line":164,"in_reply_to":"5f4e5783_3caf85e4","updated":"2017-10-13 08:29:34.000000000","message":"Converted","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f290d92ec78ce37adb9bd599c2b23a239c7089ba","unresolved":false,"context_lines":[{"line_number":162,"context_line":"                                              res, subnet.db_obj)"},{"line_number":163,"context_line":"        else:"},{"line_number":164,"context_line":"            res[\u0027allocation_pools\u0027] \u003d [{\u0027start\u0027: str(pool[\u0027first_ip\u0027]),"},{"line_number":165,"context_line":"                                       \u0027end\u0027: str(pool[\u0027last_ip\u0027])}"},{"line_number":166,"context_line":"                                       for pool in subnet[\u0027allocation_pools\u0027]]"},{"line_number":167,"context_line":"            res[\u0027host_routes\u0027] \u003d [{\u0027destination\u0027: str(route[\u0027destination\u0027]),"},{"line_number":168,"context_line":"                                   \u0027nexthop\u0027: str(route[\u0027nexthop\u0027])}"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_1caa89d1","line":165,"range":{"start_line":165,"start_character":46,"end_line":165,"end_character":49},"updated":"2017-10-11 19:38:59.000000000","message":"if it\u0027s dict, you don\u0027t need to str(), do you?","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"842a0ed4ca5973a1464159227951c652c4f99376","unresolved":false,"context_lines":[{"line_number":162,"context_line":"                                              res, subnet.db_obj)"},{"line_number":163,"context_line":"        else:"},{"line_number":164,"context_line":"            res[\u0027allocation_pools\u0027] \u003d [{\u0027start\u0027: str(pool[\u0027first_ip\u0027]),"},{"line_number":165,"context_line":"                                       \u0027end\u0027: str(pool[\u0027last_ip\u0027])}"},{"line_number":166,"context_line":"                                       for pool in subnet[\u0027allocation_pools\u0027]]"},{"line_number":167,"context_line":"            res[\u0027host_routes\u0027] \u003d [{\u0027destination\u0027: str(route[\u0027destination\u0027]),"},{"line_number":168,"context_line":"                                   \u0027nexthop\u0027: str(route[\u0027nexthop\u0027])}"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_5db45a35","line":165,"range":{"start_line":165,"start_character":46,"end_line":165,"end_character":49},"in_reply_to":"5f4e5783_1caa89d1","updated":"2017-10-13 08:29:34.000000000","message":"Done","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f290d92ec78ce37adb9bd599c2b23a239c7089ba","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            res[\u0027allocation_pools\u0027] \u003d [{\u0027start\u0027: str(pool[\u0027first_ip\u0027]),"},{"line_number":165,"context_line":"                                       \u0027end\u0027: str(pool[\u0027last_ip\u0027])}"},{"line_number":166,"context_line":"                                       for pool in subnet[\u0027allocation_pools\u0027]]"},{"line_number":167,"context_line":"            res[\u0027host_routes\u0027] \u003d [{\u0027destination\u0027: str(route[\u0027destination\u0027]),"},{"line_number":168,"context_line":"                                   \u0027nexthop\u0027: str(route[\u0027nexthop\u0027])}"},{"line_number":169,"context_line":"                                  for route in subnet[\u0027routes\u0027]]"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_dcc4f161","line":167,"updated":"2017-10-11 19:38:59.000000000","message":"you don\u0027t need str() here either I believe","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"842a0ed4ca5973a1464159227951c652c4f99376","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            res[\u0027allocation_pools\u0027] \u003d [{\u0027start\u0027: str(pool[\u0027first_ip\u0027]),"},{"line_number":165,"context_line":"                                       \u0027end\u0027: str(pool[\u0027last_ip\u0027])}"},{"line_number":166,"context_line":"                                       for pool in subnet[\u0027allocation_pools\u0027]]"},{"line_number":167,"context_line":"            res[\u0027host_routes\u0027] \u003d [{\u0027destination\u0027: str(route[\u0027destination\u0027]),"},{"line_number":168,"context_line":"                                   \u0027nexthop\u0027: str(route[\u0027nexthop\u0027])}"},{"line_number":169,"context_line":"                                  for route in subnet[\u0027routes\u0027]]"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_3d851e5b","line":167,"in_reply_to":"5f4e5783_dcc4f161","updated":"2017-10-13 08:29:34.000000000","message":"Done","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f290d92ec78ce37adb9bd599c2b23a239c7089ba","unresolved":false,"context_lines":[{"line_number":224,"context_line":"            raise n_exc.NetworkNotFound(net_id\u003did)"},{"line_number":225,"context_line":"        return network"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    def _get_subnet(self, context, id):"},{"line_number":228,"context_line":"        try:"},{"line_number":229,"context_line":"            subnet \u003d model_query.get_by_id(context, models_v2.Subnet, id)"},{"line_number":230,"context_line":"        except exc.NoResultFound:"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_e771560e","line":227,"updated":"2017-10-11 19:38:59.000000000","message":"mark it with a TODO for eventual removal?","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"403862ee25c21ecf37611371ff2cf9edac99bf88","unresolved":false,"context_lines":[{"line_number":224,"context_line":"            raise n_exc.NetworkNotFound(net_id\u003did)"},{"line_number":225,"context_line":"        return network"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    def _get_subnet(self, context, id):"},{"line_number":228,"context_line":"        try:"},{"line_number":229,"context_line":"            subnet \u003d model_query.get_by_id(context, models_v2.Subnet, id)"},{"line_number":230,"context_line":"        except exc.NoResultFound:"}],"source_content_type":"text/x-python","patch_set":32,"id":"3f4b6375_2744021b","line":227,"in_reply_to":"5f4e5783_3d063ed0","updated":"2017-10-20 18:50:27.000000000","message":"No.","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"842a0ed4ca5973a1464159227951c652c4f99376","unresolved":false,"context_lines":[{"line_number":224,"context_line":"            raise n_exc.NetworkNotFound(net_id\u003did)"},{"line_number":225,"context_line":"        return network"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    def _get_subnet(self, context, id):"},{"line_number":228,"context_line":"        try:"},{"line_number":229,"context_line":"            subnet \u003d model_query.get_by_id(context, models_v2.Subnet, id)"},{"line_number":230,"context_line":"        except exc.NoResultFound:"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_3d063ed0","line":227,"in_reply_to":"5f4e5783_e771560e","updated":"2017-10-13 08:29:34.000000000","message":"Maybe I should add deprecation warning for it also?","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f290d92ec78ce37adb9bd599c2b23a239c7089ba","unresolved":false,"context_lines":[{"line_number":273,"context_line":"    def _get_all_subnets(self, context):"},{"line_number":274,"context_line":"        # NOTE(salvatore-orlando): This query might end up putting"},{"line_number":275,"context_line":"        # a lot of stress on the db. Consider adding a cache layer"},{"line_number":276,"context_line":"        return subnet_obj.Subnet.get_objects(context)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"    def _get_subnets(self, context, filters\u003dNone, fields\u003dNone,"},{"line_number":279,"context_line":"                     sorts\u003dNone, limit\u003dNone, marker\u003dNone,"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_7c9f3d03","line":276,"updated":"2017-10-11 19:38:59.000000000","message":"this is kinda ridiculous at this point. why do we even need those shallow methods? they don\u0027t seem to save us any space do they?","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"842a0ed4ca5973a1464159227951c652c4f99376","unresolved":false,"context_lines":[{"line_number":273,"context_line":"    def _get_all_subnets(self, context):"},{"line_number":274,"context_line":"        # NOTE(salvatore-orlando): This query might end up putting"},{"line_number":275,"context_line":"        # a lot of stress on the db. Consider adding a cache layer"},{"line_number":276,"context_line":"        return subnet_obj.Subnet.get_objects(context)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"    def _get_subnets(self, context, filters\u003dNone, fields\u003dNone,"},{"line_number":279,"context_line":"                     sorts\u003dNone, limit\u003dNone, marker\u003dNone,"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_3dd4fe1f","line":276,"in_reply_to":"5f4e5783_7c9f3d03","updated":"2017-10-13 08:29:34.000000000","message":"Removed","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"403862ee25c21ecf37611371ff2cf9edac99bf88","unresolved":false,"context_lines":[{"line_number":133,"context_line":"               \u0027tenant_id\u0027: subnet[\u0027tenant_id\u0027],"},{"line_number":134,"context_line":"               \u0027network_id\u0027: subnet[\u0027network_id\u0027],"},{"line_number":135,"context_line":"               \u0027ip_version\u0027: subnet[\u0027ip_version\u0027],"},{"line_number":136,"context_line":"               \u0027cidr\u0027: str(subnet[\u0027cidr\u0027]),"},{"line_number":137,"context_line":"               \u0027subnetpool_id\u0027: subnet[\u0027subnetpool_id\u0027],"},{"line_number":138,"context_line":"               \u0027enable_dhcp\u0027: subnet[\u0027enable_dhcp\u0027],"},{"line_number":139,"context_line":"               \u0027ipv6_ra_mode\u0027: subnet[\u0027ipv6_ra_mode\u0027],"}],"source_content_type":"text/x-python","patch_set":34,"id":"3f4b6375_6731daa2","line":136,"updated":"2017-10-20 18:50:27.000000000","message":"nit: you don\u0027t need to call str() for dict case, here and in line 141 for dns_nameservers","commit_id":"bd04ecb005147e305bafb50c449422032eb92b7e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d7a9382785e825ad2a0724e60a5925d5fe1421af","unresolved":false,"context_lines":[{"line_number":133,"context_line":"               \u0027tenant_id\u0027: subnet[\u0027tenant_id\u0027],"},{"line_number":134,"context_line":"               \u0027network_id\u0027: subnet[\u0027network_id\u0027],"},{"line_number":135,"context_line":"               \u0027ip_version\u0027: subnet[\u0027ip_version\u0027],"},{"line_number":136,"context_line":"               \u0027cidr\u0027: str(subnet[\u0027cidr\u0027]),"},{"line_number":137,"context_line":"               \u0027subnetpool_id\u0027: subnet[\u0027subnetpool_id\u0027],"},{"line_number":138,"context_line":"               \u0027enable_dhcp\u0027: subnet[\u0027enable_dhcp\u0027],"},{"line_number":139,"context_line":"               \u0027ipv6_ra_mode\u0027: subnet[\u0027ipv6_ra_mode\u0027],"}],"source_content_type":"text/x-python","patch_set":34,"id":"3f4b6375_edf61dd9","line":136,"in_reply_to":"3f4b6375_2d20209b","updated":"2017-10-27 17:17:00.000000000","message":"Yeah, but since you already have a different path for OVO, you may have had str() there only, similar to what you have for e.g. \u0027allocation_pools\u0027 attribute that has its own implementation per code path.","commit_id":"bd04ecb005147e305bafb50c449422032eb92b7e"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"805883834ae8136ebe887263497c078e9e0e0a76","unresolved":false,"context_lines":[{"line_number":133,"context_line":"               \u0027tenant_id\u0027: subnet[\u0027tenant_id\u0027],"},{"line_number":134,"context_line":"               \u0027network_id\u0027: subnet[\u0027network_id\u0027],"},{"line_number":135,"context_line":"               \u0027ip_version\u0027: subnet[\u0027ip_version\u0027],"},{"line_number":136,"context_line":"               \u0027cidr\u0027: str(subnet[\u0027cidr\u0027]),"},{"line_number":137,"context_line":"               \u0027subnetpool_id\u0027: subnet[\u0027subnetpool_id\u0027],"},{"line_number":138,"context_line":"               \u0027enable_dhcp\u0027: subnet[\u0027enable_dhcp\u0027],"},{"line_number":139,"context_line":"               \u0027ipv6_ra_mode\u0027: subnet[\u0027ipv6_ra_mode\u0027],"}],"source_content_type":"text/x-python","patch_set":34,"id":"3f4b6375_2d20209b","line":136,"in_reply_to":"3f4b6375_6731daa2","updated":"2017-10-24 14:23:33.000000000","message":"But when it comes from OVO then it\u0027s AuthenticIPNetwork type and then it fails as it is not JSON serializable","commit_id":"bd04ecb005147e305bafb50c449422032eb92b7e"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"d5bbebe6033de6cd59939c9a72faf6f310a76f36","unresolved":false,"context_lines":[{"line_number":133,"context_line":"               \u0027tenant_id\u0027: subnet[\u0027tenant_id\u0027],"},{"line_number":134,"context_line":"               \u0027network_id\u0027: subnet[\u0027network_id\u0027],"},{"line_number":135,"context_line":"               \u0027ip_version\u0027: subnet[\u0027ip_version\u0027],"},{"line_number":136,"context_line":"               \u0027cidr\u0027: str(subnet[\u0027cidr\u0027]),"},{"line_number":137,"context_line":"               \u0027subnetpool_id\u0027: subnet[\u0027subnetpool_id\u0027],"},{"line_number":138,"context_line":"               \u0027enable_dhcp\u0027: subnet[\u0027enable_dhcp\u0027],"},{"line_number":139,"context_line":"               \u0027ipv6_ra_mode\u0027: subnet[\u0027ipv6_ra_mode\u0027],"}],"source_content_type":"text/x-python","patch_set":34,"id":"3f4b6375_e0604d38","line":136,"in_reply_to":"3f4b6375_edf61dd9","updated":"2017-10-29 21:16:36.000000000","message":"yeah, You\u0027re right. I changed it","commit_id":"bd04ecb005147e305bafb50c449422032eb92b7e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"403862ee25c21ecf37611371ff2cf9edac99bf88","unresolved":false,"context_lines":[{"line_number":151,"context_line":"            res[\u0027allocation_pools\u0027] \u003d [{\u0027start\u0027: str(pool.start),"},{"line_number":152,"context_line":"                                       \u0027end\u0027: str(pool.end)}"},{"line_number":153,"context_line":"                                       for pool in subnet.allocation_pools]"},{"line_number":154,"context_line":"            res[\u0027host_routes\u0027] \u003d [{\u0027destination\u0027: str(route[\u0027destination\u0027]),"},{"line_number":155,"context_line":"                                   \u0027nexthop\u0027: str(route[\u0027nexthop\u0027])}"},{"line_number":156,"context_line":"                                 for route in subnet.host_routes]"},{"line_number":157,"context_line":"            res[\u0027shared\u0027] \u003d subnet.shared"}],"source_content_type":"text/x-python","patch_set":34,"id":"3f4b6375_67d67a2a","line":154,"range":{"start_line":154,"start_character":59,"end_line":154,"end_character":61},"updated":"2017-10-20 18:50:27.000000000","message":"nit: routes are also objects, use __getattr__ instead of __getitem__","commit_id":"bd04ecb005147e305bafb50c449422032eb92b7e"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"805883834ae8136ebe887263497c078e9e0e0a76","unresolved":false,"context_lines":[{"line_number":151,"context_line":"            res[\u0027allocation_pools\u0027] \u003d [{\u0027start\u0027: str(pool.start),"},{"line_number":152,"context_line":"                                       \u0027end\u0027: str(pool.end)}"},{"line_number":153,"context_line":"                                       for pool in subnet.allocation_pools]"},{"line_number":154,"context_line":"            res[\u0027host_routes\u0027] \u003d [{\u0027destination\u0027: str(route[\u0027destination\u0027]),"},{"line_number":155,"context_line":"                                   \u0027nexthop\u0027: str(route[\u0027nexthop\u0027])}"},{"line_number":156,"context_line":"                                 for route in subnet.host_routes]"},{"line_number":157,"context_line":"            res[\u0027shared\u0027] \u003d subnet.shared"}],"source_content_type":"text/x-python","patch_set":34,"id":"3f4b6375_6d4f386b","line":154,"range":{"start_line":154,"start_character":59,"end_line":154,"end_character":61},"in_reply_to":"3f4b6375_67d67a2a","updated":"2017-10-24 14:23:33.000000000","message":"Done","commit_id":"bd04ecb005147e305bafb50c449422032eb92b7e"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"a0d0eaaaf1e4f759e84dec08ab93d55cd75db774","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        # ways. After converting all code pieces to use Subnet OVO, the latter"},{"line_number":146,"context_line":"        # \u0027else\u0027 can be deleted"},{"line_number":147,"context_line":"        if isinstance(subnet, subnet_obj.Subnet):"},{"line_number":148,"context_line":"            res[\u0027cidr\u0027] \u003d str(subnet[\u0027cidr\u0027])"},{"line_number":149,"context_line":"            res[\u0027allocation_pools\u0027] \u003d [{\u0027start\u0027: str(pool.start),"},{"line_number":150,"context_line":"                                       \u0027end\u0027: str(pool.end)}"},{"line_number":151,"context_line":"                                       for pool in subnet.allocation_pools]"}],"source_content_type":"text/x-python","patch_set":36,"id":"3f4b6375_8c7c3273","line":148,"range":{"start_line":148,"start_character":26,"end_line":148,"end_character":45},"updated":"2017-10-30 02:47:45.000000000","message":"why not subnet.cidr like https://review.openstack.org/#/c/321001/36/neutron/db/db_base_plugin_v2.py L836","commit_id":"9d4bf7d021b3a3132533a357c96ad9df78d78e93"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"a9c489ac04de761aadef79e008ff7c535ee99610","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        # ways. After converting all code pieces to use Subnet OVO, the latter"},{"line_number":146,"context_line":"        # \u0027else\u0027 can be deleted"},{"line_number":147,"context_line":"        if isinstance(subnet, subnet_obj.Subnet):"},{"line_number":148,"context_line":"            res[\u0027cidr\u0027] \u003d str(subnet[\u0027cidr\u0027])"},{"line_number":149,"context_line":"            res[\u0027allocation_pools\u0027] \u003d [{\u0027start\u0027: str(pool.start),"},{"line_number":150,"context_line":"                                       \u0027end\u0027: str(pool.end)}"},{"line_number":151,"context_line":"                                       for pool in subnet.allocation_pools]"}],"source_content_type":"text/x-python","patch_set":36,"id":"3f4b6375_6b467924","line":148,"range":{"start_line":148,"start_character":26,"end_line":148,"end_character":45},"in_reply_to":"3f4b6375_8c7c3273","updated":"2017-10-30 08:10:32.000000000","message":"probably because I forgot to change it. Thx.\nI just changed it here and also in L155 and L156","commit_id":"9d4bf7d021b3a3132533a357c96ad9df78d78e93"}],"neutron/db/db_base_plugin_v2.py":[{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"3da863a5923a93c3d0c59cbb9e905465af40f81a","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        # raise if multiple tenants found or if the only tenant found"},{"line_number":250,"context_line":"        # is not the owner of the network"},{"line_number":251,"context_line":"        # TODO(korzen) rename \u0027original.tenant_id\u0027 when Network OVO is done"},{"line_number":252,"context_line":"        if (len(project_ids) \u003e 1 or len(project_ids) \u003d\u003d 1 and"},{"line_number":253,"context_line":"            project_ids.pop() !\u003d original.tenant_id):"},{"line_number":254,"context_line":"            raise n_exc.InvalidSharedSetting(network\u003doriginal.name)"},{"line_number":255,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_f641be0c","line":252,"range":{"start_line":252,"start_character":12,"end_line":252,"end_character":51},"updated":"2016-07-28 20:28:35.000000000","message":"len(project_ids) \u003e\u003d 1","commit_id":"760909e3a30cec4f0f731b9d623e02cdc309d6b7"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"a640c868434caf36bf52c996f9fdf415d294202c","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        # raise if multiple tenants found or if the only tenant found"},{"line_number":250,"context_line":"        # is not the owner of the network"},{"line_number":251,"context_line":"        # TODO(korzen) rename \u0027original.tenant_id\u0027 when Network OVO is done"},{"line_number":252,"context_line":"        if (len(project_ids) \u003e 1 or len(project_ids) \u003d\u003d 1 and"},{"line_number":253,"context_line":"            project_ids.pop() !\u003d original.tenant_id):"},{"line_number":254,"context_line":"            raise n_exc.InvalidSharedSetting(network\u003doriginal.name)"},{"line_number":255,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_750a728b","line":252,"range":{"start_line":252,"start_character":12,"end_line":252,"end_character":51},"in_reply_to":"bacf61ea_f641be0c","updated":"2016-08-01 13:20:37.000000000","message":"It seems like \u003d\u003d 1 is more connected to check if subnet project_id is equal network tenant_id. I would not change it since it working...","commit_id":"760909e3a30cec4f0f731b9d623e02cdc309d6b7"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"55b1883d18a1c83d191a9ca738cbf1e5b9cdbe85","unresolved":false,"context_lines":[{"line_number":927,"context_line":"        ]"},{"line_number":928,"context_line":""},{"line_number":929,"context_line":"    def get_subnets_count(self, context, filters\u003dNone):"},{"line_number":930,"context_line":"        # NOTE (korzen) No need to use OVO here since it is only counting"},{"line_number":931,"context_line":"        # the records for given model, current method would be faster than OVO"},{"line_number":932,"context_line":"        return self._get_collection_count(context, models_v2.Subnet,"},{"line_number":933,"context_line":"                                          filters\u003dfilters)"}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_e30fb734","line":930,"updated":"2016-08-01 20:27:15.000000000","message":"well, in the future, no code should refer to models except objects, to isolate from potential changes, including but not limited to model renames.","commit_id":"760909e3a30cec4f0f731b9d623e02cdc309d6b7"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"054f8296b232e675a1b81e156a2678de72a8b7c0","unresolved":false,"context_lines":[{"line_number":927,"context_line":"        ]"},{"line_number":928,"context_line":""},{"line_number":929,"context_line":"    def get_subnets_count(self, context, filters\u003dNone):"},{"line_number":930,"context_line":"        # NOTE (korzen) No need to use OVO here since it is only counting"},{"line_number":931,"context_line":"        # the records for given model, current method would be faster than OVO"},{"line_number":932,"context_line":"        return self._get_collection_count(context, models_v2.Subnet,"},{"line_number":933,"context_line":"                                          filters\u003dfilters)"}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_283d1cdd","line":930,"in_reply_to":"bacf61ea_e30fb734","updated":"2016-08-02 09:04:01.000000000","message":"So maybe we can add get_count(context, filters) method to object base class to count the resources for us.","commit_id":"760909e3a30cec4f0f731b9d623e02cdc309d6b7"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"c2ad0e463752673e6e43ee510458f6a59edabae7","unresolved":false,"context_lines":[{"line_number":1036,"context_line":"                              \u0027subnet\u0027: subnet.id})"},{"line_number":1037,"context_line":"                    raise exc.SubnetInUse(subnet_id\u003dsubnet.id)"},{"line_number":1038,"context_line":""},{"line_number":1039,"context_line":"            subnet.delete()"},{"line_number":1040,"context_line":"            # Delete related ipam subnet manually,"},{"line_number":1041,"context_line":"            # since there is no FK relationship"},{"line_number":1042,"context_line":"            self.ipam.delete_subnet(context, subnet.id)"}],"source_content_type":"text/x-python","patch_set":25,"id":"3f1d235d_a9cb7b1c","line":1039,"updated":"2017-06-29 14:05:22.000000000","message":"It seems that most (if not all) of the failures you are seeing in the check jobs happen during the tearDown of tests: http://logs.openstack.org/01/321001/25/check/gate-tempest-dsvm-neutron-full-ubuntu-xenial/84ce1e2/console.html#_2017-06-28_21_06_13_600803\n\nLooking at the Neutron server log, you can see a lot of tracebacks triggered because subnet doesn\u0027t have a delete method: http://logs.openstack.org/01/321001/25/check/gate-tempest-dsvm-neutron-full-ubuntu-xenial/84ce1e2/logs/screen-q-svc.txt.gz?#_Jun_28_20_22_46_658562","commit_id":"281c0110ab993654747aeb79bb7519d7700f446d"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f290d92ec78ce37adb9bd599c2b23a239c7089ba","unresolved":false,"context_lines":[{"line_number":274,"context_line":"            constants.DEVICE_OWNER_NETWORK_PREFIX)))"},{"line_number":275,"context_line":"        subnets \u003d subnet_obj.Subnet.get_objects(context, network_id\u003did)"},{"line_number":276,"context_line":"        project_ids \u003d set([port[\u0027tenant_id\u0027] for port in ports] +"},{"line_number":277,"context_line":"                         [subnet.project_id for subnet in subnets])"},{"line_number":278,"context_line":"        # raise if multiple tenants found or if the only tenant found"},{"line_number":279,"context_line":"        # is not the owner of the network"},{"line_number":280,"context_line":"        if (len(project_ids) \u003e 1 or len(project_ids) \u003d\u003d 1 and"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_fcab2d1a","line":277,"range":{"start_line":277,"start_character":31,"end_line":277,"end_character":43},"updated":"2017-10-11 19:38:59.000000000","message":"[\u0027tenant_id\u0027] should work just fine, and we try to avoid unnecessary changes when adopting OVO objects, to reduce size of those patches.","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"842a0ed4ca5973a1464159227951c652c4f99376","unresolved":false,"context_lines":[{"line_number":274,"context_line":"            constants.DEVICE_OWNER_NETWORK_PREFIX)))"},{"line_number":275,"context_line":"        subnets \u003d subnet_obj.Subnet.get_objects(context, network_id\u003did)"},{"line_number":276,"context_line":"        project_ids \u003d set([port[\u0027tenant_id\u0027] for port in ports] +"},{"line_number":277,"context_line":"                         [subnet.project_id for subnet in subnets])"},{"line_number":278,"context_line":"        # raise if multiple tenants found or if the only tenant found"},{"line_number":279,"context_line":"        # is not the owner of the network"},{"line_number":280,"context_line":"        if (len(project_ids) \u003e 1 or len(project_ids) \u003d\u003d 1 and"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_b92b552e","line":277,"range":{"start_line":277,"start_character":31,"end_line":277,"end_character":43},"in_reply_to":"5f4e5783_fcab2d1a","updated":"2017-10-13 08:29:34.000000000","message":"Done","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f290d92ec78ce37adb9bd599c2b23a239c7089ba","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                         [subnet.project_id for subnet in subnets])"},{"line_number":278,"context_line":"        # raise if multiple tenants found or if the only tenant found"},{"line_number":279,"context_line":"        # is not the owner of the network"},{"line_number":280,"context_line":"        if (len(project_ids) \u003e 1 or len(project_ids) \u003d\u003d 1 and"},{"line_number":281,"context_line":"            project_ids.pop() !\u003d original.project_id):"},{"line_number":282,"context_line":"            raise n_exc.InvalidSharedSetting(network\u003doriginal.name)"},{"line_number":283,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_7c6dfd02","line":280,"updated":"2017-10-11 19:38:59.000000000","message":"ditto","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"842a0ed4ca5973a1464159227951c652c4f99376","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                         [subnet.project_id for subnet in subnets])"},{"line_number":278,"context_line":"        # raise if multiple tenants found or if the only tenant found"},{"line_number":279,"context_line":"        # is not the owner of the network"},{"line_number":280,"context_line":"        if (len(project_ids) \u003e 1 or len(project_ids) \u003d\u003d 1 and"},{"line_number":281,"context_line":"            project_ids.pop() !\u003d original.project_id):"},{"line_number":282,"context_line":"            raise n_exc.InvalidSharedSetting(network\u003doriginal.name)"},{"line_number":283,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_19d4a91f","line":280,"in_reply_to":"5f4e5783_7c6dfd02","updated":"2017-10-13 08:29:34.000000000","message":"Done","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f290d92ec78ce37adb9bd599c2b23a239c7089ba","unresolved":false,"context_lines":[{"line_number":449,"context_line":"            # retry reference errors so we can check the port type and"},{"line_number":450,"context_line":"            # cleanup if a network-owned port snuck in without failing"},{"line_number":451,"context_line":"            for subnet in subnets:"},{"line_number":452,"context_line":"                self._delete_subnet(context, subnet)"},{"line_number":453,"context_line":"            with db_api.context_manager.writer.using(context):"},{"line_number":454,"context_line":"                network_db \u003d self._get_network(context, id)"},{"line_number":455,"context_line":"                network \u003d self._make_network_dict(network_db, context\u003dcontext)"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_1c2049b0","line":452,"updated":"2017-10-11 19:38:59.000000000","message":"why is it that we need to call _delete_subnet here?","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"842a0ed4ca5973a1464159227951c652c4f99376","unresolved":false,"context_lines":[{"line_number":449,"context_line":"            # retry reference errors so we can check the port type and"},{"line_number":450,"context_line":"            # cleanup if a network-owned port snuck in without failing"},{"line_number":451,"context_line":"            for subnet in subnets:"},{"line_number":452,"context_line":"                self._delete_subnet(context, subnet)"},{"line_number":453,"context_line":"            with db_api.context_manager.writer.using(context):"},{"line_number":454,"context_line":"                network_db \u003d self._get_network(context, id)"},{"line_number":455,"context_line":"                network \u003d self._make_network_dict(network_db, context\u003dcontext)"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_d984d10e","line":452,"in_reply_to":"5f4e5783_1c2049b0","updated":"2017-10-13 08:29:34.000000000","message":"it\u0027s \"just\" replace for previously used self.delete_subnet() method here. Don\u0027t we need to delete it now?","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"403862ee25c21ecf37611371ff2cf9edac99bf88","unresolved":false,"context_lines":[{"line_number":449,"context_line":"            # retry reference errors so we can check the port type and"},{"line_number":450,"context_line":"            # cleanup if a network-owned port snuck in without failing"},{"line_number":451,"context_line":"            for subnet in subnets:"},{"line_number":452,"context_line":"                self._delete_subnet(context, subnet)"},{"line_number":453,"context_line":"            with db_api.context_manager.writer.using(context):"},{"line_number":454,"context_line":"                network_db \u003d self._get_network(context, id)"},{"line_number":455,"context_line":"                network \u003d self._make_network_dict(network_db, context\u003dcontext)"}],"source_content_type":"text/x-python","patch_set":32,"id":"3f4b6375_a74fd232","line":452,"in_reply_to":"5f4e5783_d984d10e","updated":"2017-10-20 18:50:27.000000000","message":"That was the question: why not delete_subnet?","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f290d92ec78ce37adb9bd599c2b23a239c7089ba","unresolved":false,"context_lines":[{"line_number":576,"context_line":"                        ipal.subnet_id \u003d\u003d cur_subnet[\u0027id\u0027]).first()"},{"line_number":577,"context_line":"                if allocated and allocated[\u0027port_id\u0027]:"},{"line_number":578,"context_line":"                    raise n_exc.GatewayIpInUse("},{"line_number":579,"context_line":"                        ip_address\u003dstr(cur_subnet[\u0027gateway_ip\u0027]),"},{"line_number":580,"context_line":"                        port_id\u003dallocated[\u0027port_id\u0027])"},{"line_number":581,"context_line":""},{"line_number":582,"context_line":"        if validators.is_attr_set(s.get(\u0027dns_nameservers\u0027)):"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_c7ff7aff","line":579,"updated":"2017-10-11 19:38:59.000000000","message":"nit: you could calculate str() once and reuse it in those two places","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"842a0ed4ca5973a1464159227951c652c4f99376","unresolved":false,"context_lines":[{"line_number":576,"context_line":"                        ipal.subnet_id \u003d\u003d cur_subnet[\u0027id\u0027]).first()"},{"line_number":577,"context_line":"                if allocated and allocated[\u0027port_id\u0027]:"},{"line_number":578,"context_line":"                    raise n_exc.GatewayIpInUse("},{"line_number":579,"context_line":"                        ip_address\u003dstr(cur_subnet[\u0027gateway_ip\u0027]),"},{"line_number":580,"context_line":"                        port_id\u003dallocated[\u0027port_id\u0027])"},{"line_number":581,"context_line":""},{"line_number":582,"context_line":"        if validators.is_attr_set(s.get(\u0027dns_nameservers\u0027)):"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_d999716e","line":579,"in_reply_to":"5f4e5783_c7ff7aff","updated":"2017-10-13 08:29:34.000000000","message":"Done","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f290d92ec78ce37adb9bd599c2b23a239c7089ba","unresolved":false,"context_lines":[{"line_number":870,"context_line":"                        self, **kwargs)"},{"line_number":871,"context_line":""},{"line_number":872,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":873,"context_line":"            subnet, changes \u003d self.ipam.update_db_subnet(context, id, s,"},{"line_number":874,"context_line":"                                                         db_pools)"},{"line_number":875,"context_line":"        # we expire here since ipam may have made changes to relationships"},{"line_number":876,"context_line":"        # that will be stale on any subsequent lookups while the subnet"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_e7e1562c","line":873,"range":{"start_line":873,"start_character":40,"end_line":873,"end_character":56},"updated":"2017-10-11 19:38:59.000000000","message":"I believe we should start thinking about splitting the patch into smaller bits. For example, ipam modifications can live as a separate patch. But here, you pass \u0027s\u0027 that assumes the update_db_subnet method works with OVO objects. I suggest to revert some of those changes to reduce the scope and impact of the patch to something that we could easily reason about.","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"842a0ed4ca5973a1464159227951c652c4f99376","unresolved":false,"context_lines":[{"line_number":870,"context_line":"                        self, **kwargs)"},{"line_number":871,"context_line":""},{"line_number":872,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":873,"context_line":"            subnet, changes \u003d self.ipam.update_db_subnet(context, id, s,"},{"line_number":874,"context_line":"                                                         db_pools)"},{"line_number":875,"context_line":"        # we expire here since ipam may have made changes to relationships"},{"line_number":876,"context_line":"        # that will be stale on any subsequent lookups while the subnet"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_194dc999","line":873,"range":{"start_line":873,"start_character":40,"end_line":873,"end_character":56},"in_reply_to":"5f4e5783_e7e1562c","updated":"2017-10-13 08:29:34.000000000","message":"Ok, I will try to do it in separate patch for IPAM","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f290d92ec78ce37adb9bd599c2b23a239c7089ba","unresolved":false,"context_lines":[{"line_number":979,"context_line":"            raise exc.SubnetInUse(subnet_id\u003did)"},{"line_number":980,"context_line":""},{"line_number":981,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":982,"context_line":"    def _remove_subnet_ip_allocations_from_ports(self, context, subnet):"},{"line_number":983,"context_line":"        # Do not allow a subnet to be deleted if a router is attached to it"},{"line_number":984,"context_line":"        self._subnet_check_ip_allocations_internal_router_ports("},{"line_number":985,"context_line":"                context, subnet.id)"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_276f6e93","line":982,"range":{"start_line":982,"start_character":65,"end_line":982,"end_character":71},"updated":"2017-10-11 19:38:59.000000000","message":"why not making it fetch the subnet again, as it already does? I would love to see this patch not sneaking in changes that are not absolutely necessary. The change of the arguments here seems like a performance optimization that we can avoid.","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"842a0ed4ca5973a1464159227951c652c4f99376","unresolved":false,"context_lines":[{"line_number":979,"context_line":"            raise exc.SubnetInUse(subnet_id\u003did)"},{"line_number":980,"context_line":""},{"line_number":981,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":982,"context_line":"    def _remove_subnet_ip_allocations_from_ports(self, context, subnet):"},{"line_number":983,"context_line":"        # Do not allow a subnet to be deleted if a router is attached to it"},{"line_number":984,"context_line":"        self._subnet_check_ip_allocations_internal_router_ports("},{"line_number":985,"context_line":"                context, subnet.id)"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_f4bb14c1","line":982,"range":{"start_line":982,"start_character":65,"end_line":982,"end_character":71},"in_reply_to":"5f4e5783_276f6e93","updated":"2017-10-13 08:29:34.000000000","message":"changed","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f290d92ec78ce37adb9bd599c2b23a239c7089ba","unresolved":false,"context_lines":[{"line_number":998,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":999,"context_line":"    def delete_subnet(self, context, id):"},{"line_number":1000,"context_line":"        LOG.debug(\"Deleting subnet %s\", id)"},{"line_number":1001,"context_line":"        # TODO(korzen) check if get_subnet and _delete_subnet should be under"},{"line_number":1002,"context_line":"        # the same transaction"},{"line_number":1003,"context_line":"        # Make sure the subnet isn\u0027t used by other resources"},{"line_number":1004,"context_line":"        _check_subnet_not_used(context, id)"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_c7377ab0","line":1001,"updated":"2017-10-11 19:38:59.000000000","message":"I don\u0027t see \u0027get_subnet\u0027 called here","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"842a0ed4ca5973a1464159227951c652c4f99376","unresolved":false,"context_lines":[{"line_number":998,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":999,"context_line":"    def delete_subnet(self, context, id):"},{"line_number":1000,"context_line":"        LOG.debug(\"Deleting subnet %s\", id)"},{"line_number":1001,"context_line":"        # TODO(korzen) check if get_subnet and _delete_subnet should be under"},{"line_number":1002,"context_line":"        # the same transaction"},{"line_number":1003,"context_line":"        # Make sure the subnet isn\u0027t used by other resources"},{"line_number":1004,"context_line":"        _check_subnet_not_used(context, id)"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_b4ea3ca9","line":1001,"in_reply_to":"5f4e5783_84e9721b","updated":"2017-10-13 08:29:34.000000000","message":"But e.g. it can\u0027t be done inside transaction in ML2 plugin and some tests are failing when I put those 3 lines inside transaction","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":17491,"name":"Lujin Luo","email":"luo.lujin@jp.fujitsu.com","username":"Lujin"},"change_message_id":"d05ca0ce11321b9ce1d18c33f3e10ceade33fa13","unresolved":false,"context_lines":[{"line_number":998,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":999,"context_line":"    def delete_subnet(self, context, id):"},{"line_number":1000,"context_line":"        LOG.debug(\"Deleting subnet %s\", id)"},{"line_number":1001,"context_line":"        # TODO(korzen) check if get_subnet and _delete_subnet should be under"},{"line_number":1002,"context_line":"        # the same transaction"},{"line_number":1003,"context_line":"        # Make sure the subnet isn\u0027t used by other resources"},{"line_number":1004,"context_line":"        _check_subnet_not_used(context, id)"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_84e9721b","line":1001,"in_reply_to":"5f4e5783_c7377ab0","updated":"2017-10-12 07:29:09.000000000","message":"I think what TODO really meant is _get_subnet_object(). It is possible that we have race condition here when _get_subnet_object() and _delete_subnet() are not protected by the same transaction.","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f290d92ec78ce37adb9bd599c2b23a239c7089ba","unresolved":false,"context_lines":[{"line_number":1019,"context_line":""},{"line_number":1020,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1021,"context_line":"    def get_subnet(self, context, id, fields\u003dNone):"},{"line_number":1022,"context_line":"        subnet_object \u003d self._get_subnet(context, id)"},{"line_number":1023,"context_line":"        return self._make_subnet_dict(subnet_object, fields, context\u003dcontext)"},{"line_number":1024,"context_line":""},{"line_number":1025,"context_line":"    @db_api.retry_if_session_inactive()"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_a708fed8","line":1022,"updated":"2017-10-11 19:38:59.000000000","message":"nit: adding _object to everything is a bit too wordy. We usually use _obj, or just omit it completely.","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"842a0ed4ca5973a1464159227951c652c4f99376","unresolved":false,"context_lines":[{"line_number":1019,"context_line":""},{"line_number":1020,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1021,"context_line":"    def get_subnet(self, context, id, fields\u003dNone):"},{"line_number":1022,"context_line":"        subnet_object \u003d self._get_subnet(context, id)"},{"line_number":1023,"context_line":"        return self._make_subnet_dict(subnet_object, fields, context\u003dcontext)"},{"line_number":1024,"context_line":""},{"line_number":1025,"context_line":"    @db_api.retry_if_session_inactive()"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_b4035c73","line":1022,"in_reply_to":"5f4e5783_a708fed8","updated":"2017-10-13 08:29:34.000000000","message":"Done","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f290d92ec78ce37adb9bd599c2b23a239c7089ba","unresolved":false,"context_lines":[{"line_number":1035,"context_line":""},{"line_number":1036,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1037,"context_line":"    def get_subnets_count(self, context, filters\u003dNone):"},{"line_number":1038,"context_line":"        #TODO(korzen) check if convert filters are still required"},{"line_number":1039,"context_line":"        filters \u003d filters or {}"},{"line_number":1040,"context_line":"        return subnet_obj.Subnet.count(context, validate_filters\u003dFalse,"},{"line_number":1041,"context_line":"                                       **filters)"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_a7311ea5","line":1038,"range":{"start_line":1038,"start_character":31,"end_line":1038,"end_character":46},"updated":"2017-10-11 19:38:59.000000000","message":"what\u0027s that comment about? I don\u0027t understand. if you don\u0027t either, let\u0027s remove it.","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"842a0ed4ca5973a1464159227951c652c4f99376","unresolved":false,"context_lines":[{"line_number":1035,"context_line":""},{"line_number":1036,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1037,"context_line":"    def get_subnets_count(self, context, filters\u003dNone):"},{"line_number":1038,"context_line":"        #TODO(korzen) check if convert filters are still required"},{"line_number":1039,"context_line":"        filters \u003d filters or {}"},{"line_number":1040,"context_line":"        return subnet_obj.Subnet.count(context, validate_filters\u003dFalse,"},{"line_number":1041,"context_line":"                                       **filters)"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_54f42886","line":1038,"range":{"start_line":1038,"start_character":31,"end_line":1038,"end_character":46},"in_reply_to":"5f4e5783_a7311ea5","updated":"2017-10-13 08:29:34.000000000","message":"Done","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f290d92ec78ce37adb9bd599c2b23a239c7089ba","unresolved":false,"context_lines":[{"line_number":1042,"context_line":""},{"line_number":1043,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1044,"context_line":"    def get_subnets_by_network(self, context, network_id):"},{"line_number":1045,"context_line":"        return [self._make_subnet_dict(subnet_object) for subnet_object in"},{"line_number":1046,"context_line":"                self._get_subnets_by_network(context, network_id)]"},{"line_number":1047,"context_line":""},{"line_number":1048,"context_line":"    def _validate_address_scope_id(self, context, address_scope_id,"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_672b2630","line":1045,"range":{"start_line":1045,"start_character":46,"end_line":1045,"end_character":52},"updated":"2017-10-11 19:38:59.000000000","message":"nit: wordy","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"842a0ed4ca5973a1464159227951c652c4f99376","unresolved":false,"context_lines":[{"line_number":1042,"context_line":""},{"line_number":1043,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1044,"context_line":"    def get_subnets_by_network(self, context, network_id):"},{"line_number":1045,"context_line":"        return [self._make_subnet_dict(subnet_object) for subnet_object in"},{"line_number":1046,"context_line":"                self._get_subnets_by_network(context, network_id)]"},{"line_number":1047,"context_line":""},{"line_number":1048,"context_line":"    def _validate_address_scope_id(self, context, address_scope_id,"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_743a8434","line":1045,"range":{"start_line":1045,"start_character":46,"end_line":1045,"end_character":52},"in_reply_to":"5f4e5783_672b2630","updated":"2017-10-13 08:29:34.000000000","message":"Done","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f290d92ec78ce37adb9bd599c2b23a239c7089ba","unresolved":false,"context_lines":[{"line_number":1212,"context_line":"    def delete_subnetpool(self, context, id):"},{"line_number":1213,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":1214,"context_line":"            subnetpool \u003d self._get_subnetpool(context, id\u003did)"},{"line_number":1215,"context_line":"            subnet_objs \u003d self._get_subnets_by_subnetpool(context, id)"},{"line_number":1216,"context_line":"            if subnet_objs:"},{"line_number":1217,"context_line":"                reason \u003d _(\"Subnet pool has existing allocations\")"},{"line_number":1218,"context_line":"                raise n_exc.SubnetPoolDeleteError(reason\u003dreason)"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_27e2ce02","line":1215,"updated":"2017-10-11 19:38:59.000000000","message":"this actually seems like something that we could solve with:\n\nif subnet.Subnet.objects_exist(subnetpool_id\u003did):\n    raise ...","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"842a0ed4ca5973a1464159227951c652c4f99376","unresolved":false,"context_lines":[{"line_number":1212,"context_line":"    def delete_subnetpool(self, context, id):"},{"line_number":1213,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":1214,"context_line":"            subnetpool \u003d self._get_subnetpool(context, id\u003did)"},{"line_number":1215,"context_line":"            subnet_objs \u003d self._get_subnets_by_subnetpool(context, id)"},{"line_number":1216,"context_line":"            if subnet_objs:"},{"line_number":1217,"context_line":"                reason \u003d _(\"Subnet pool has existing allocations\")"},{"line_number":1218,"context_line":"                raise n_exc.SubnetPoolDeleteError(reason\u003dreason)"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_74516462","line":1215,"in_reply_to":"5f4e5783_27e2ce02","updated":"2017-10-13 08:29:34.000000000","message":"Done","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"403862ee25c21ecf37611371ff2cf9edac99bf88","unresolved":false,"context_lines":[{"line_number":1001,"context_line":"        _check_subnet_not_used(context, id)"},{"line_number":1002,"context_line":"        self._remove_subnet_ip_allocations_from_ports(context, id)"},{"line_number":1003,"context_line":"        # retry integrity errors to catch ip allocation races"},{"line_number":1004,"context_line":"        with db_api.exc_to_retry(sql_exc.IntegrityError), \\"},{"line_number":1005,"context_line":"                db_api.context_manager.writer.using(context):"},{"line_number":1006,"context_line":"            subnet_db \u003d self._get_subnet(context, id)"},{"line_number":1007,"context_line":"            subnet \u003d self._make_subnet_dict(subnet_db, context\u003dcontext)"}],"source_content_type":"text/x-python","patch_set":34,"id":"3f4b6375_c7f3ee9d","side":"PARENT","line":1004,"updated":"2017-10-20 18:50:27.000000000","message":"why is it that we don\u0027t need this logic anymore?","commit_id":"62b788192014705ae1c31bed05fd5f6dbba9a2d9"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"805883834ae8136ebe887263497c078e9e0e0a76","unresolved":false,"context_lines":[{"line_number":1001,"context_line":"        _check_subnet_not_used(context, id)"},{"line_number":1002,"context_line":"        self._remove_subnet_ip_allocations_from_ports(context, id)"},{"line_number":1003,"context_line":"        # retry integrity errors to catch ip allocation races"},{"line_number":1004,"context_line":"        with db_api.exc_to_retry(sql_exc.IntegrityError), \\"},{"line_number":1005,"context_line":"                db_api.context_manager.writer.using(context):"},{"line_number":1006,"context_line":"            subnet_db \u003d self._get_subnet(context, id)"},{"line_number":1007,"context_line":"            subnet \u003d self._make_subnet_dict(subnet_db, context\u003dcontext)"}],"source_content_type":"text/x-python","patch_set":34,"id":"3f4b6375_2db4a0f1","side":"PARENT","line":1004,"in_reply_to":"3f4b6375_c7f3ee9d","updated":"2017-10-24 14:23:33.000000000","message":"we need, it was removed by mistake during some rebase (in PS23 or 24 I think)","commit_id":"62b788192014705ae1c31bed05fd5f6dbba9a2d9"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"403862ee25c21ecf37611371ff2cf9edac99bf88","unresolved":false,"context_lines":[{"line_number":879,"context_line":"        # that will be stale on any subsequent lookups while the subnet"},{"line_number":880,"context_line":"        # object is in the session otherwise."},{"line_number":881,"context_line":"        # Check if subnet attached for session before expire."},{"line_number":882,"context_line":"        # korzen: no need to expire subnet, since it is OVO now"},{"line_number":883,"context_line":"        # if subnet in context.session:"},{"line_number":884,"context_line":"        #    context.session.expire(subnet)"},{"line_number":885,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"3f4b6375_c7dace15","line":882,"updated":"2017-10-20 18:50:27.000000000","message":"Should it be TODO/NOTE?..","commit_id":"bd04ecb005147e305bafb50c449422032eb92b7e"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"805883834ae8136ebe887263497c078e9e0e0a76","unresolved":false,"context_lines":[{"line_number":879,"context_line":"        # that will be stale on any subsequent lookups while the subnet"},{"line_number":880,"context_line":"        # object is in the session otherwise."},{"line_number":881,"context_line":"        # Check if subnet attached for session before expire."},{"line_number":882,"context_line":"        # korzen: no need to expire subnet, since it is OVO now"},{"line_number":883,"context_line":"        # if subnet in context.session:"},{"line_number":884,"context_line":"        #    context.session.expire(subnet)"},{"line_number":885,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"3f4b6375_cd962c94","line":882,"in_reply_to":"3f4b6375_c7dace15","updated":"2017-10-24 14:23:33.000000000","message":"I think I can remove this comment now, no?","commit_id":"bd04ecb005147e305bafb50c449422032eb92b7e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"403862ee25c21ecf37611371ff2cf9edac99bf88","unresolved":false,"context_lines":[{"line_number":881,"context_line":"        # Check if subnet attached for session before expire."},{"line_number":882,"context_line":"        # korzen: no need to expire subnet, since it is OVO now"},{"line_number":883,"context_line":"        # if subnet in context.session:"},{"line_number":884,"context_line":"        #    context.session.expire(subnet)"},{"line_number":885,"context_line":""},{"line_number":886,"context_line":"        return self._make_subnet_dict(subnet, context\u003dcontext), orig"},{"line_number":887,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"3f4b6375_87061686","line":884,"updated":"2017-10-20 18:50:27.000000000","message":"should this be removed then?","commit_id":"bd04ecb005147e305bafb50c449422032eb92b7e"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"805883834ae8136ebe887263497c078e9e0e0a76","unresolved":false,"context_lines":[{"line_number":881,"context_line":"        # Check if subnet attached for session before expire."},{"line_number":882,"context_line":"        # korzen: no need to expire subnet, since it is OVO now"},{"line_number":883,"context_line":"        # if subnet in context.session:"},{"line_number":884,"context_line":"        #    context.session.expire(subnet)"},{"line_number":885,"context_line":""},{"line_number":886,"context_line":"        return self._make_subnet_dict(subnet, context\u003dcontext), orig"},{"line_number":887,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"3f4b6375_ad8f7073","line":884,"in_reply_to":"3f4b6375_87061686","updated":"2017-10-24 14:23:33.000000000","message":"removed","commit_id":"bd04ecb005147e305bafb50c449422032eb92b7e"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"064e84654bf2a35f94bc5b3cc7a32e385a90551f","unresolved":false,"context_lines":[{"line_number":876,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":877,"context_line":"            subnet, changes \u003d self.ipam.update_db_subnet(context, id, s,"},{"line_number":878,"context_line":"                                                         db_pools)"},{"line_number":879,"context_line":"        # we expire here since ipam may have made changes to relationships"},{"line_number":880,"context_line":"        # that will be stale on any subsequent lookups while the subnet"},{"line_number":881,"context_line":"        # object is in the session otherwise."},{"line_number":882,"context_line":"        # Check if subnet attached for session before expire."},{"line_number":883,"context_line":""},{"line_number":884,"context_line":"        return self._make_subnet_dict(subnet, context\u003dcontext), orig"},{"line_number":885,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"3f4b6375_dc25b8c3","line":882,"range":{"start_line":879,"start_character":0,"end_line":882,"end_character":61},"updated":"2017-11-02 21:04:01.000000000","message":"Shouldn\u0027t we remove this comment?","commit_id":"6c3b37091c50ebb40701f94ce207e793b670adf9"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"16c74c4aef31c591e88efde837577e4f3d098b0e","unresolved":false,"context_lines":[{"line_number":876,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":877,"context_line":"            subnet, changes \u003d self.ipam.update_db_subnet(context, id, s,"},{"line_number":878,"context_line":"                                                         db_pools)"},{"line_number":879,"context_line":"        # we expire here since ipam may have made changes to relationships"},{"line_number":880,"context_line":"        # that will be stale on any subsequent lookups while the subnet"},{"line_number":881,"context_line":"        # object is in the session otherwise."},{"line_number":882,"context_line":"        # Check if subnet attached for session before expire."},{"line_number":883,"context_line":""},{"line_number":884,"context_line":"        return self._make_subnet_dict(subnet, context\u003dcontext), orig"},{"line_number":885,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"3f4b6375_12a217fd","line":882,"range":{"start_line":879,"start_character":0,"end_line":882,"end_character":61},"in_reply_to":"3f4b6375_dc25b8c3","updated":"2017-11-02 21:53:29.000000000","message":"Yes, I missed that. Thx","commit_id":"6c3b37091c50ebb40701f94ce207e793b670adf9"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"064e84654bf2a35f94bc5b3cc7a32e385a90551f","unresolved":false,"context_lines":[{"line_number":1016,"context_line":"            # since there is no FK relationship"},{"line_number":1017,"context_line":"            self.ipam.delete_subnet(context, subnet.id)"},{"line_number":1018,"context_line":"        registry.notify(resources.SUBNET, events.AFTER_DELETE,"},{"line_number":1019,"context_line":"                        self, context\u003dcontext, subnet\u003dsubnet)"},{"line_number":1020,"context_line":""},{"line_number":1021,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1022,"context_line":"    def get_subnet(self, context, id, fields\u003dNone):"}],"source_content_type":"text/x-python","patch_set":37,"id":"3f4b6375_f7de4d3c","line":1019,"range":{"start_line":1019,"start_character":54,"end_line":1019,"end_character":60},"updated":"2017-11-02 21:04:01.000000000","message":"Now this is a subnet object, right? But previously, we were passing a subnet dictionary here. Is it going to work the same for the callbacks that receive this notification?","commit_id":"6c3b37091c50ebb40701f94ce207e793b670adf9"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"34ae8fc600f3f331433d8940dc603e157c6d6eb3","unresolved":false,"context_lines":[{"line_number":1016,"context_line":"            # since there is no FK relationship"},{"line_number":1017,"context_line":"            self.ipam.delete_subnet(context, subnet.id)"},{"line_number":1018,"context_line":"        registry.notify(resources.SUBNET, events.AFTER_DELETE,"},{"line_number":1019,"context_line":"                        self, context\u003dcontext, subnet\u003dsubnet)"},{"line_number":1020,"context_line":""},{"line_number":1021,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1022,"context_line":"    def get_subnet(self, context, id, fields\u003dNone):"}],"source_content_type":"text/x-python","patch_set":37,"id":"3f4b6375_4ab2fe95","line":1019,"range":{"start_line":1019,"start_character":54,"end_line":1019,"end_character":60},"in_reply_to":"3f4b6375_94425b67","updated":"2017-11-03 21:15:20.000000000","message":"You\u0027re right. I now changed it and it\u0027s fine.\nI must be tired when I was testing it then, sorry :)","commit_id":"6c3b37091c50ebb40701f94ce207e793b670adf9"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cf042546e1158d22cbe70135c6b95e3fc8f81606","unresolved":false,"context_lines":[{"line_number":1016,"context_line":"            # since there is no FK relationship"},{"line_number":1017,"context_line":"            self.ipam.delete_subnet(context, subnet.id)"},{"line_number":1018,"context_line":"        registry.notify(resources.SUBNET, events.AFTER_DELETE,"},{"line_number":1019,"context_line":"                        self, context\u003dcontext, subnet\u003dsubnet)"},{"line_number":1020,"context_line":""},{"line_number":1021,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1022,"context_line":"    def get_subnet(self, context, id, fields\u003dNone):"}],"source_content_type":"text/x-python","patch_set":37,"id":"3f4b6375_94425b67","line":1019,"range":{"start_line":1019,"start_character":54,"end_line":1019,"end_character":60},"in_reply_to":"3f4b6375_f242db0e","updated":"2017-11-03 19:29:12.000000000","message":"I agree with Miguel. I just missed it in my review because of all the patchsets and lazy habit of checking just diff between versions. ;)\n\nI just tried to pass subnet.to_dict() and it seems to work for the test class you specified. Maybe it\u0027s not an issue anymore?","commit_id":"6c3b37091c50ebb40701f94ce207e793b670adf9"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"16c74c4aef31c591e88efde837577e4f3d098b0e","unresolved":false,"context_lines":[{"line_number":1016,"context_line":"            # since there is no FK relationship"},{"line_number":1017,"context_line":"            self.ipam.delete_subnet(context, subnet.id)"},{"line_number":1018,"context_line":"        registry.notify(resources.SUBNET, events.AFTER_DELETE,"},{"line_number":1019,"context_line":"                        self, context\u003dcontext, subnet\u003dsubnet)"},{"line_number":1020,"context_line":""},{"line_number":1021,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1022,"context_line":"    def get_subnet(self, context, id, fields\u003dNone):"}],"source_content_type":"text/x-python","patch_set":37,"id":"3f4b6375_f242db0e","line":1019,"range":{"start_line":1019,"start_character":54,"end_line":1019,"end_character":60},"in_reply_to":"3f4b6375_f7de4d3c","updated":"2017-11-02 21:53:29.000000000","message":"I think that it is fine like now.\nAt least all tests are passing :)\nWhen I tried to change it to subnet_dict there was a lot of test failing. For example tests like neutron.tests.unit.plugins.ml2.test_tracked_resources.TestTrackedResourcesEventHandler was failing.\n\n@Ihar: can You confirm as \"best expert\" in this topic?","commit_id":"6c3b37091c50ebb40701f94ce207e793b670adf9"}],"neutron/db/ipam_backend_mixin.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f290d92ec78ce37adb9bd599c2b23a239c7089ba","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        if \"service_types\" in s:"},{"line_number":210,"context_line":"            changes[\u0027service_types\u0027] \u003d ("},{"line_number":211,"context_line":"                self._update_subnet_service_types(context, subnet_id, s))"},{"line_number":212,"context_line":"        subnet_object \u003d self._get_subnet_object(context, subnet_id)"},{"line_number":213,"context_line":"        subnet_object.update_fields(s)"},{"line_number":214,"context_line":"        subnet_object.update()"},{"line_number":215,"context_line":"        return subnet_object, changes"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_c762da3e","line":212,"updated":"2017-10-11 19:38:59.000000000","message":"I suggest we try to split the changes into several clearly defined patches. The ipam changes should go in a separate one.","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"842a0ed4ca5973a1464159227951c652c4f99376","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        if \"service_types\" in s:"},{"line_number":210,"context_line":"            changes[\u0027service_types\u0027] \u003d ("},{"line_number":211,"context_line":"                self._update_subnet_service_types(context, subnet_id, s))"},{"line_number":212,"context_line":"        subnet_object \u003d self._get_subnet_object(context, subnet_id)"},{"line_number":213,"context_line":"        subnet_object.update_fields(s)"},{"line_number":214,"context_line":"        subnet_object.update()"},{"line_number":215,"context_line":"        return subnet_object, changes"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_1d35c2f7","line":212,"in_reply_to":"5f4e5783_c762da3e","updated":"2017-10-13 08:29:34.000000000","message":"Ok, I will try to do separate patch for IPAM","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"403862ee25c21ecf37611371ff2cf9edac99bf88","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        if \"service_types\" in s:"},{"line_number":210,"context_line":"            changes[\u0027service_types\u0027] \u003d ("},{"line_number":211,"context_line":"                self._update_subnet_service_types(context, subnet_id, s))"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"        subnet \u003d self._get_subnet(context, subnet_id)"},{"line_number":214,"context_line":"        subnet.update(s)"},{"line_number":215,"context_line":"        return subnet, changes"}],"source_content_type":"text/x-python","patch_set":34,"id":"3f4b6375_2738823b","side":"PARENT","line":212,"updated":"2017-10-20 18:50:27.000000000","message":"nit: unrelated change","commit_id":"62b788192014705ae1c31bed05fd5f6dbba9a2d9"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"805883834ae8136ebe887263497c078e9e0e0a76","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        if \"service_types\" in s:"},{"line_number":210,"context_line":"            changes[\u0027service_types\u0027] \u003d ("},{"line_number":211,"context_line":"                self._update_subnet_service_types(context, subnet_id, s))"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"        subnet \u003d self._get_subnet(context, subnet_id)"},{"line_number":214,"context_line":"        subnet.update(s)"},{"line_number":215,"context_line":"        return subnet, changes"}],"source_content_type":"text/x-python","patch_set":34,"id":"3f4b6375_b01a236c","side":"PARENT","line":212,"in_reply_to":"3f4b6375_2738823b","updated":"2017-10-24 14:23:33.000000000","message":"Done","commit_id":"62b788192014705ae1c31bed05fd5f6dbba9a2d9"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"403862ee25c21ecf37611371ff2cf9edac99bf88","unresolved":false,"context_lines":[{"line_number":235,"context_line":"        if cfg.CONF.allow_overlapping_ips:"},{"line_number":236,"context_line":"            subnet_list \u003d network.subnets"},{"line_number":237,"context_line":"        else:"},{"line_number":238,"context_line":"            subnet_list \u003d self._get_subnets(context)"},{"line_number":239,"context_line":"        for subnet in subnet_list:"},{"line_number":240,"context_line":"            if ((netaddr.IPSet([subnet.cidr]) \u0026 new_subnet_ipset) and"},{"line_number":241,"context_line":"                str(subnet.cidr) !\u003d constants.PROVISIONAL_IPV6_PD_PREFIX):"}],"source_content_type":"text/x-python","patch_set":34,"id":"3f4b6375_a74352af","line":238,"updated":"2017-10-20 18:50:27.000000000","message":"isn\u0027t the result of _get_subnets a list of dicts?..","commit_id":"bd04ecb005147e305bafb50c449422032eb92b7e"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"805883834ae8136ebe887263497c078e9e0e0a76","unresolved":false,"context_lines":[{"line_number":235,"context_line":"        if cfg.CONF.allow_overlapping_ips:"},{"line_number":236,"context_line":"            subnet_list \u003d network.subnets"},{"line_number":237,"context_line":"        else:"},{"line_number":238,"context_line":"            subnet_list \u003d self._get_subnets(context)"},{"line_number":239,"context_line":"        for subnet in subnet_list:"},{"line_number":240,"context_line":"            if ((netaddr.IPSet([subnet.cidr]) \u0026 new_subnet_ipset) and"},{"line_number":241,"context_line":"                str(subnet.cidr) !\u003d constants.PROVISIONAL_IPV6_PD_PREFIX):"}],"source_content_type":"text/x-python","patch_set":34,"id":"3f4b6375_102577ab","line":238,"in_reply_to":"3f4b6375_a74352af","updated":"2017-10-24 14:23:33.000000000","message":"it returns list of objects now","commit_id":"bd04ecb005147e305bafb50c449422032eb92b7e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"403862ee25c21ecf37611371ff2cf9edac99bf88","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        else:"},{"line_number":238,"context_line":"            subnet_list \u003d self._get_subnets(context)"},{"line_number":239,"context_line":"        for subnet in subnet_list:"},{"line_number":240,"context_line":"            if ((netaddr.IPSet([subnet.cidr]) \u0026 new_subnet_ipset) and"},{"line_number":241,"context_line":"                str(subnet.cidr) !\u003d constants.PROVISIONAL_IPV6_PD_PREFIX):"},{"line_number":242,"context_line":"                # don\u0027t give out details of the overlapping subnet"},{"line_number":243,"context_line":"                err_msg \u003d (\"Requested subnet with cidr: %(cidr)s for \""}],"source_content_type":"text/x-python","patch_set":34,"id":"3f4b6375_470ede8d","line":240,"updated":"2017-10-20 18:50:27.000000000","message":"I suspect that subnet is a dict, so __getattr__ will fail.","commit_id":"bd04ecb005147e305bafb50c449422032eb92b7e"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"805883834ae8136ebe887263497c078e9e0e0a76","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        else:"},{"line_number":238,"context_line":"            subnet_list \u003d self._get_subnets(context)"},{"line_number":239,"context_line":"        for subnet in subnet_list:"},{"line_number":240,"context_line":"            if ((netaddr.IPSet([subnet.cidr]) \u0026 new_subnet_ipset) and"},{"line_number":241,"context_line":"                str(subnet.cidr) !\u003d constants.PROVISIONAL_IPV6_PD_PREFIX):"},{"line_number":242,"context_line":"                # don\u0027t give out details of the overlapping subnet"},{"line_number":243,"context_line":"                err_msg \u003d (\"Requested subnet with cidr: %(cidr)s for \""}],"source_content_type":"text/x-python","patch_set":34,"id":"3f4b6375_704f0b6b","line":240,"in_reply_to":"3f4b6375_470ede8d","updated":"2017-10-24 14:23:33.000000000","message":"subnet is OVO object now so it should works","commit_id":"bd04ecb005147e305bafb50c449422032eb92b7e"}],"neutron/objects/subnet.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f96d2a5eb25ea3242674c03fe413de8d57837f56","unresolved":false,"context_lines":[{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def __init__(self, context\u003dNone, **kwargs):"},{"line_number":186,"context_line":"        super(Subnet, self).__init__(context, **kwargs)"},{"line_number":187,"context_line":"        self.add_extra_filter_name(\u0027tenant_id\u0027)"},{"line_number":188,"context_line":"        self.add_extra_filter_name(\u0027shared\u0027)"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    def obj_load_attr(self, attrname):"}],"source_content_type":"text/x-python","patch_set":10,"id":"3aaa91ec_eda06cf6","line":187,"updated":"2016-06-30 11:53:11.000000000","message":"I prefer we keep the filtering API of the object more strict, allowing just project-id as a filter. I know that it will require some more changes in db and test code, but I think it\u0027s good for the sake of consistent usage story to stick to the actual field.","commit_id":"9a1ae9ffa05aa9d262f37f3579903ea8b3347392"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f96d2a5eb25ea3242674c03fe413de8d57837f56","unresolved":false,"context_lines":[{"line_number":216,"context_line":"        # TODO(korzen) remove this method when IP and CIDR decorator ready"},{"line_number":217,"context_line":"        result \u003d super(Subnet, cls).modify_fields_from_db(db_obj)"},{"line_number":218,"context_line":"        if \u0027cidr\u0027 in result:"},{"line_number":219,"context_line":"            result[\u0027cidr\u0027] \u003d netaddr.IPNetwork(result[\u0027cidr\u0027])"},{"line_number":220,"context_line":"        if \u0027gateway_ip\u0027 in result and result[\u0027gateway_ip\u0027] is not None:"},{"line_number":221,"context_line":"            result[\u0027gateway_ip\u0027] \u003d netaddr.IPAddress(result[\u0027gateway_ip\u0027])"},{"line_number":222,"context_line":"        return result"}],"source_content_type":"text/x-python","patch_set":10,"id":"3aaa91ec_2d9b9467","line":219,"updated":"2016-06-30 11:53:11.000000000","message":"Shouldn\u0027t we also use Authentic version of the class to avoid loosing formatting?","commit_id":"9a1ae9ffa05aa9d262f37f3579903ea8b3347392"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"50abef440ecb6d168800ebe3d3cea2d62c250d17","unresolved":false,"context_lines":[{"line_number":216,"context_line":"        # TODO(korzen) remove this method when IP and CIDR decorator ready"},{"line_number":217,"context_line":"        result \u003d super(Subnet, cls).modify_fields_from_db(db_obj)"},{"line_number":218,"context_line":"        if \u0027cidr\u0027 in result:"},{"line_number":219,"context_line":"            result[\u0027cidr\u0027] \u003d netaddr.IPNetwork(result[\u0027cidr\u0027])"},{"line_number":220,"context_line":"        if \u0027gateway_ip\u0027 in result and result[\u0027gateway_ip\u0027] is not None:"},{"line_number":221,"context_line":"            result[\u0027gateway_ip\u0027] \u003d netaddr.IPAddress(result[\u0027gateway_ip\u0027])"},{"line_number":222,"context_line":"        return result"}],"source_content_type":"text/x-python","patch_set":10,"id":"3aaa91ec_7ea420a5","line":219,"in_reply_to":"3aaa91ec_2d9b9467","updated":"2016-06-30 12:47:49.000000000","message":"What test is checking for formatting? I wanted to check this formatting issue, but did not see any test failing because of it...","commit_id":"9a1ae9ffa05aa9d262f37f3579903ea8b3347392"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"6dd3d693ea363b9a64117095d852e7eb5f97a5ab","unresolved":false,"context_lines":[{"line_number":216,"context_line":"        # TODO(korzen) remove this method when IP and CIDR decorator ready"},{"line_number":217,"context_line":"        result \u003d super(Subnet, cls).modify_fields_from_db(db_obj)"},{"line_number":218,"context_line":"        if \u0027cidr\u0027 in result:"},{"line_number":219,"context_line":"            result[\u0027cidr\u0027] \u003d netaddr.IPNetwork(result[\u0027cidr\u0027])"},{"line_number":220,"context_line":"        if \u0027gateway_ip\u0027 in result and result[\u0027gateway_ip\u0027] is not None:"},{"line_number":221,"context_line":"            result[\u0027gateway_ip\u0027] \u003d netaddr.IPAddress(result[\u0027gateway_ip\u0027])"},{"line_number":222,"context_line":"        return result"}],"source_content_type":"text/x-python","patch_set":10,"id":"3aaa91ec_7401e004","line":219,"in_reply_to":"3aaa91ec_7ea420a5","updated":"2016-06-30 12:55:35.000000000","message":"So maybe it suggests we need a test for that.","commit_id":"9a1ae9ffa05aa9d262f37f3579903ea8b3347392"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f96d2a5eb25ea3242674c03fe413de8d57837f56","unresolved":false,"context_lines":[{"line_number":218,"context_line":"        if \u0027cidr\u0027 in result:"},{"line_number":219,"context_line":"            result[\u0027cidr\u0027] \u003d netaddr.IPNetwork(result[\u0027cidr\u0027])"},{"line_number":220,"context_line":"        if \u0027gateway_ip\u0027 in result and result[\u0027gateway_ip\u0027] is not None:"},{"line_number":221,"context_line":"            result[\u0027gateway_ip\u0027] \u003d netaddr.IPAddress(result[\u0027gateway_ip\u0027])"},{"line_number":222,"context_line":"        return result"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":10,"id":"3aaa91ec_8da448a6","line":221,"updated":"2016-06-30 11:53:11.000000000","message":"ditto","commit_id":"9a1ae9ffa05aa9d262f37f3579903ea8b3347392"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7b4e1278f5fcf485ffbb84f3a0b6acc35d98069f","unresolved":false,"context_lines":[{"line_number":177,"context_line":"    fields_no_update \u003d [\u0027project_id\u0027]"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    fields_need_translation \u003d {"},{"line_number":180,"context_line":"        \u0027project_id\u0027: \u0027tenant_id\u0027,"},{"line_number":181,"context_line":"        \u0027host_routes\u0027: \u0027routes\u0027"},{"line_number":182,"context_line":"    }"},{"line_number":183,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"bacf61ea_7e7f4b66","line":180,"updated":"2016-08-04 07:36:19.000000000","message":"this should be killed since now models have project_id attribute.","commit_id":"ef944496c423e98dfc4dbcd5996cfa68a9484522"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"2179da04e76ed2c2440a06bd45cf946d963ad4bc","unresolved":false,"context_lines":[{"line_number":177,"context_line":"    fields_no_update \u003d [\u0027project_id\u0027]"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    fields_need_translation \u003d {"},{"line_number":180,"context_line":"        \u0027project_id\u0027: \u0027tenant_id\u0027,"},{"line_number":181,"context_line":"        \u0027host_routes\u0027: \u0027routes\u0027"},{"line_number":182,"context_line":"    }"},{"line_number":183,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"bacf61ea_3eecb328","line":180,"in_reply_to":"bacf61ea_7e7f4b66","updated":"2016-08-04 07:36:52.000000000","message":"Actually... https://review.openstack.org/#/c/350989/","commit_id":"ef944496c423e98dfc4dbcd5996cfa68a9484522"}],"neutron/objects/utils.py":[{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"31ef013bf2f8ec6e4895256451fa244699cd605b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":17,"id":"9ad45d7e_dc033f0c","updated":"2016-08-08 13:49:08.000000000","message":"Copied from: https://review.openstack.org/350423 and added remove_unknown_filters","commit_id":"431e2e7366cb0ab7be33c6ed7073dd1d10bf175b"}],"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f290d92ec78ce37adb9bd599c2b23a239c7089ba","unresolved":false,"context_lines":[{"line_number":643,"context_line":"    @resource_extend.extends([subnet_def.COLLECTION_NAME])"},{"line_number":644,"context_line":"    def _ml2_md_extend_subnet_dict(result, subnetdb):"},{"line_number":645,"context_line":"        plugin \u003d directory.get_plugin()"},{"line_number":646,"context_line":"        session \u003d plugin._object_session_or_new_session(subnetdb)"},{"line_number":647,"context_line":"        plugin.extension_manager.extend_subnet_dict(session, subnetdb, result)"},{"line_number":648,"context_line":""},{"line_number":649,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_e74a76aa","side":"PARENT","line":646,"updated":"2017-10-11 19:38:59.000000000","message":"why do we need this change?","commit_id":"41d28f4f9912e47eb30595b7afd4521062e6c47b"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"842a0ed4ca5973a1464159227951c652c4f99376","unresolved":false,"context_lines":[{"line_number":643,"context_line":"    @resource_extend.extends([subnet_def.COLLECTION_NAME])"},{"line_number":644,"context_line":"    def _ml2_md_extend_subnet_dict(result, subnetdb):"},{"line_number":645,"context_line":"        plugin \u003d directory.get_plugin()"},{"line_number":646,"context_line":"        session \u003d plugin._object_session_or_new_session(subnetdb)"},{"line_number":647,"context_line":"        plugin.extension_manager.extend_subnet_dict(session, subnetdb, result)"},{"line_number":648,"context_line":""},{"line_number":649,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_2b55c61d","side":"PARENT","line":646,"in_reply_to":"5f4e5783_e74a76aa","updated":"2017-10-13 08:29:34.000000000","message":"I don\u0027t remember exactly now but I think that some tests were failing without it. But now it\u0027s all fine so maybe real fix was somewhere else in code :)","commit_id":"41d28f4f9912e47eb30595b7afd4521062e6c47b"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"403862ee25c21ecf37611371ff2cf9edac99bf88","unresolved":false,"context_lines":[{"line_number":1098,"context_line":"    @registry.receives(resources.SUBNET, [events.PRECOMMIT_DELETE])"},{"line_number":1099,"context_line":"    def _subnet_delete_precommit_handler(self, rtype, event, trigger,"},{"line_number":1100,"context_line":"                                         context, subnet_id, **kwargs):"},{"line_number":1101,"context_line":"        record \u003d self._get_subnet_object(context, subnet_id)"},{"line_number":1102,"context_line":"        subnet \u003d self._make_subnet_dict(record, context\u003dcontext)"},{"line_number":1103,"context_line":"        network \u003d self.get_network(context, subnet[\u0027network_id\u0027])"},{"line_number":1104,"context_line":"        mech_context \u003d driver_context.SubnetContext(self, context,"}],"source_content_type":"text/x-python","patch_set":34,"id":"3f4b6375_0728e6df","line":1101,"range":{"start_line":1101,"start_character":8,"end_line":1101,"end_character":14},"updated":"2017-10-20 18:50:27.000000000","message":"since now it\u0027s an object and not a db record, consider renaming the variable","commit_id":"bd04ecb005147e305bafb50c449422032eb92b7e"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"805883834ae8136ebe887263497c078e9e0e0a76","unresolved":false,"context_lines":[{"line_number":1098,"context_line":"    @registry.receives(resources.SUBNET, [events.PRECOMMIT_DELETE])"},{"line_number":1099,"context_line":"    def _subnet_delete_precommit_handler(self, rtype, event, trigger,"},{"line_number":1100,"context_line":"                                         context, subnet_id, **kwargs):"},{"line_number":1101,"context_line":"        record \u003d self._get_subnet_object(context, subnet_id)"},{"line_number":1102,"context_line":"        subnet \u003d self._make_subnet_dict(record, context\u003dcontext)"},{"line_number":1103,"context_line":"        network \u003d self.get_network(context, subnet[\u0027network_id\u0027])"},{"line_number":1104,"context_line":"        mech_context \u003d driver_context.SubnetContext(self, context,"}],"source_content_type":"text/x-python","patch_set":34,"id":"3f4b6375_f042db3d","line":1101,"range":{"start_line":1101,"start_character":8,"end_line":1101,"end_character":14},"in_reply_to":"3f4b6375_0728e6df","updated":"2017-10-24 14:23:33.000000000","message":"Done","commit_id":"bd04ecb005147e305bafb50c449422032eb92b7e"}],"neutron/services/timestamp/timestamp_plugin.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f290d92ec78ce37adb9bd599c2b23a239c7089ba","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        super(TimeStampPlugin, self).__init__()"},{"line_number":30,"context_line":"        self.register_db_events()"},{"line_number":31,"context_line":"        # TODO(jlibosva): Move this to register_model_query_hook"},{"line_number":32,"context_line":"        for model in [models_v2.Subnet, models_v2.SubnetPool]:"},{"line_number":33,"context_line":"            base_obj.register_filter_hook_on_model("},{"line_number":34,"context_line":"                model, ts_db.CHANGED_SINCE)"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_27ff6e35","line":32,"updated":"2017-10-11 19:38:59.000000000","message":"how is this relevant to the OVO switch?","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"842a0ed4ca5973a1464159227951c652c4f99376","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        super(TimeStampPlugin, self).__init__()"},{"line_number":30,"context_line":"        self.register_db_events()"},{"line_number":31,"context_line":"        # TODO(jlibosva): Move this to register_model_query_hook"},{"line_number":32,"context_line":"        for model in [models_v2.Subnet, models_v2.SubnetPool]:"},{"line_number":33,"context_line":"            base_obj.register_filter_hook_on_model("},{"line_number":34,"context_line":"                model, ts_db.CHANGED_SINCE)"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_b041353c","line":32,"in_reply_to":"5f4e5783_27ff6e35","updated":"2017-10-13 08:29:34.000000000","message":"it\u0027s not. It was probably done after rebasing this very old patch on top of current master branch","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"}],"neutron/tests/functional/db/test_ipam.py":[{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"3da863a5923a93c3d0c59cbb9e905465af40f81a","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        else:"},{"line_number":48,"context_line":"            self._turn_off_pluggable_ipam()"},{"line_number":49,"context_line":"        self.plugin \u003d base_plugin.NeutronDbPluginV2()"},{"line_number":50,"context_line":"        self.setup_coreplugin(\u0027neutron.db.db_base_plugin_v2.NeutronDbPluginV2\u0027)"},{"line_number":51,"context_line":"        self.cxt \u003d context.Context(user_id\u003dNone,"},{"line_number":52,"context_line":"                                   tenant_id\u003dNone,"},{"line_number":53,"context_line":"                                   is_admin\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_1650d25d","line":50,"range":{"start_line":50,"start_character":8,"end_line":50,"end_character":79},"updated":"2016-07-28 20:28:35.000000000","message":"This line is common among some unit tests, we can start thinking in ways to share it.","commit_id":"760909e3a30cec4f0f731b9d623e02cdc309d6b7"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"a640c868434caf36bf52c996f9fdf415d294202c","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        else:"},{"line_number":48,"context_line":"            self._turn_off_pluggable_ipam()"},{"line_number":49,"context_line":"        self.plugin \u003d base_plugin.NeutronDbPluginV2()"},{"line_number":50,"context_line":"        self.setup_coreplugin(\u0027neutron.db.db_base_plugin_v2.NeutronDbPluginV2\u0027)"},{"line_number":51,"context_line":"        self.cxt \u003d context.Context(user_id\u003dNone,"},{"line_number":52,"context_line":"                                   tenant_id\u003dNone,"},{"line_number":53,"context_line":"                                   is_admin\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_b514ea4c","line":50,"range":{"start_line":50,"start_character":8,"end_line":50,"end_character":79},"in_reply_to":"bacf61ea_1650d25d","updated":"2016-08-01 13:20:37.000000000","message":"good point.","commit_id":"760909e3a30cec4f0f731b9d623e02cdc309d6b7"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f290d92ec78ce37adb9bd599c2b23a239c7089ba","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        DB_PLUGIN_KLASS \u003d \u0027neutron.db.db_base_plugin_v2.NeutronDbPluginV2\u0027"},{"line_number":46,"context_line":"        self.setup_coreplugin(DB_PLUGIN_KLASS)"},{"line_number":47,"context_line":"        self.plugin \u003d base_plugin.NeutronDbPluginV2()"},{"line_number":48,"context_line":"        self.setup_coreplugin(\u0027neutron.db.db_base_plugin_v2.NeutronDbPluginV2\u0027)"},{"line_number":49,"context_line":"        self.cxt \u003d context.Context(user_id\u003dNone,"},{"line_number":50,"context_line":"                                   tenant_id\u003dNone,"},{"line_number":51,"context_line":"                                   is_admin\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_c7953ae6","line":48,"updated":"2017-10-11 19:38:59.000000000","message":"isn\u0027t it already done in line 46?","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"842a0ed4ca5973a1464159227951c652c4f99376","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        DB_PLUGIN_KLASS \u003d \u0027neutron.db.db_base_plugin_v2.NeutronDbPluginV2\u0027"},{"line_number":46,"context_line":"        self.setup_coreplugin(DB_PLUGIN_KLASS)"},{"line_number":47,"context_line":"        self.plugin \u003d base_plugin.NeutronDbPluginV2()"},{"line_number":48,"context_line":"        self.setup_coreplugin(\u0027neutron.db.db_base_plugin_v2.NeutronDbPluginV2\u0027)"},{"line_number":49,"context_line":"        self.cxt \u003d context.Context(user_id\u003dNone,"},{"line_number":50,"context_line":"                                   tenant_id\u003dNone,"},{"line_number":51,"context_line":"                                   is_admin\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_307785a3","line":48,"in_reply_to":"5f4e5783_c7953ae6","updated":"2017-10-13 08:29:34.000000000","message":"yes, my mistake :) fixed","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"}],"neutron/tests/tempest/api/test_auto_allocated_topology.py":[{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"37dd2b9728f75911b863621c4634ca9928b881d6","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        up \u003d {\u0027admin_state_up\u0027: True}"},{"line_number":62,"context_line":"        networks \u003d _count(self.client.list_networks(**up)[\u0027networks\u0027])"},{"line_number":63,"context_line":"        subnets \u003d _count(self.client.list_subnets()[\u0027subnets\u0027])"},{"line_number":64,"context_line":"        routers \u003d _count(self.client.list_routers(**up)[\u0027routers\u0027])"},{"line_number":65,"context_line":"        return networks, subnets, routers"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_e0117f5e","line":63,"updated":"2016-08-01 15:05:51.000000000","message":"Newbie question: Why are we changing this? Not clear to me why we no longer use the admin_state_up filter.","commit_id":"760909e3a30cec4f0f731b9d623e02cdc309d6b7"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"7286232b730ccefca64aa2ca86a8e8b65cff08cb","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        up \u003d {\u0027admin_state_up\u0027: True}"},{"line_number":62,"context_line":"        networks \u003d _count(self.client.list_networks(**up)[\u0027networks\u0027])"},{"line_number":63,"context_line":"        subnets \u003d _count(self.client.list_subnets()[\u0027subnets\u0027])"},{"line_number":64,"context_line":"        routers \u003d _count(self.client.list_routers(**up)[\u0027routers\u0027])"},{"line_number":65,"context_line":"        return networks, subnets, routers"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_985b36f6","line":63,"in_reply_to":"bacf61ea_b1564904","updated":"2016-08-04 07:19:11.000000000","message":"In PS14 leaving passing the admin_state_up as filter to Subnet API, and added removal of unknown filters at db_base_plugin layer.","commit_id":"760909e3a30cec4f0f731b9d623e02cdc309d6b7"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"d58005786c05495817677f988f2919a4a6d075d2","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        up \u003d {\u0027admin_state_up\u0027: True}"},{"line_number":62,"context_line":"        networks \u003d _count(self.client.list_networks(**up)[\u0027networks\u0027])"},{"line_number":63,"context_line":"        subnets \u003d _count(self.client.list_subnets()[\u0027subnets\u0027])"},{"line_number":64,"context_line":"        routers \u003d _count(self.client.list_routers(**up)[\u0027routers\u0027])"},{"line_number":65,"context_line":"        return networks, subnets, routers"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_b1564904","line":63,"in_reply_to":"bacf61ea_e0117f5e","updated":"2016-08-03 11:01:22.000000000","message":"admin_state_up filter is not valid for subnet filtration. Currently API is passing every filter to plugin and when invalid filter is passed to OVO, it raises exception.\n\nI have removed the invalid filter from test, but another option would be to remove invalid filters in db_base_plugin before passing it to Subnet OVO.","commit_id":"760909e3a30cec4f0f731b9d623e02cdc309d6b7"}],"neutron/tests/unit/db/test_db_base_plugin_v2.py":[{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"1bbadb1d495eedcdd8a37683e58b0656cb9d619f","unresolved":false,"context_lines":[{"line_number":4822,"context_line":"        with self.network() as network:"},{"line_number":4823,"context_line":"            with self.subnet(network\u003dnetwork,"},{"line_number":4824,"context_line":"                             gateway_ip\u003d\u002710.0.0.1\u0027,"},{"line_number":4825,"context_line":"                             cidr\u003d\u002710.0.0.0/24\u0027) as v1,\\"},{"line_number":4826,"context_line":"                    self.subnet(network\u003dnetwork,"},{"line_number":4827,"context_line":"                                gateway_ip\u003d\u002710.0.1.1\u0027,"},{"line_number":4828,"context_line":"                                cidr\u003d\u002710.0.1.0/24\u0027) as v2:"}],"source_content_type":"text/x-python","patch_set":16,"id":"bacf61ea_9679e995","line":4825,"range":{"start_line":4825,"start_character":55,"end_line":4825,"end_character":56},"updated":"2016-08-05 17:28:59.000000000","message":"nit: can you break this without using \"\\\".  I couldn\u0027t find the reference to hacking document.","commit_id":"a7479f72e72f773ab33b7074042eccfeff01ba88"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"1bbadb1d495eedcdd8a37683e58b0656cb9d619f","unresolved":false,"context_lines":[{"line_number":4840,"context_line":"        with self.network() as network:"},{"line_number":4841,"context_line":"            with self.subnet(network\u003dnetwork,"},{"line_number":4842,"context_line":"                             gateway_ip\u003d\u002710.0.0.1\u0027,"},{"line_number":4843,"context_line":"                             cidr\u003d\u002710.0.0.0/24\u0027) as v1,\\"},{"line_number":4844,"context_line":"                    self.subnet(network\u003dnetwork,"},{"line_number":4845,"context_line":"                                gateway_ip\u003d\u002710.0.1.1\u0027,"},{"line_number":4846,"context_line":"                                cidr\u003d\u002710.0.1.0/24\u0027) as v2:"}],"source_content_type":"text/x-python","patch_set":16,"id":"bacf61ea_366bddb8","line":4843,"range":{"start_line":4843,"start_character":55,"end_line":4843,"end_character":56},"updated":"2016-08-05 17:28:59.000000000","message":"ditto: line 4825","commit_id":"a7479f72e72f773ab33b7074042eccfeff01ba88"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f290d92ec78ce37adb9bd599c2b23a239c7089ba","unresolved":false,"context_lines":[{"line_number":615,"context_line":"    @contextlib.contextmanager"},{"line_number":616,"context_line":"    def subnet(self, network\u003dNone,"},{"line_number":617,"context_line":"               gateway_ip\u003dconstants.ATTR_NOT_SPECIFIED,"},{"line_number":618,"context_line":"               cidr\u003dnetaddr.IPNetwork(\u002710.0.0.0/24\u0027),"},{"line_number":619,"context_line":"               subnetpool_id\u003dNone,"},{"line_number":620,"context_line":"               segment_id\u003dNone,"},{"line_number":621,"context_line":"               fmt\u003dNone,"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_e78dd6d3","line":618,"updated":"2017-10-11 19:38:59.000000000","message":"you already convert it to IPNetwork in line 634, so why do you need this here?","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"842a0ed4ca5973a1464159227951c652c4f99376","unresolved":false,"context_lines":[{"line_number":615,"context_line":"    @contextlib.contextmanager"},{"line_number":616,"context_line":"    def subnet(self, network\u003dNone,"},{"line_number":617,"context_line":"               gateway_ip\u003dconstants.ATTR_NOT_SPECIFIED,"},{"line_number":618,"context_line":"               cidr\u003dnetaddr.IPNetwork(\u002710.0.0.0/24\u0027),"},{"line_number":619,"context_line":"               subnetpool_id\u003dNone,"},{"line_number":620,"context_line":"               segment_id\u003dNone,"},{"line_number":621,"context_line":"               fmt\u003dNone,"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_f07e8d69","line":618,"in_reply_to":"5f4e5783_e78dd6d3","updated":"2017-10-13 08:29:34.000000000","message":"right, changed","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f290d92ec78ce37adb9bd599c2b23a239c7089ba","unresolved":false,"context_lines":[{"line_number":631,"context_line":"               service_types\u003dNone,"},{"line_number":632,"context_line":"               set_context\u003dFalse):"},{"line_number":633,"context_line":""},{"line_number":634,"context_line":"        cidr \u003d netaddr.IPNetwork(cidr) if cidr else None"},{"line_number":635,"context_line":"        if (gateway_ip is not None and"},{"line_number":636,"context_line":"                gateway_ip !\u003d constants.ATTR_NOT_SPECIFIED):"},{"line_number":637,"context_line":"            gateway_ip \u003d netaddr.IPAddress(gateway_ip)"},{"line_number":638,"context_line":""},{"line_number":639,"context_line":"        with optional_ctx(network, self.network,"},{"line_number":640,"context_line":"                          set_context\u003dset_context,"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_07811290","line":637,"range":{"start_line":634,"start_character":9,"end_line":637,"end_character":54},"updated":"2017-10-11 19:38:59.000000000","message":"not sure why it\u0027s needed. doesn\u0027t _make_subnet still expect simple strings?","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"842a0ed4ca5973a1464159227951c652c4f99376","unresolved":false,"context_lines":[{"line_number":631,"context_line":"               service_types\u003dNone,"},{"line_number":632,"context_line":"               set_context\u003dFalse):"},{"line_number":633,"context_line":""},{"line_number":634,"context_line":"        cidr \u003d netaddr.IPNetwork(cidr) if cidr else None"},{"line_number":635,"context_line":"        if (gateway_ip is not None and"},{"line_number":636,"context_line":"                gateway_ip !\u003d constants.ATTR_NOT_SPECIFIED):"},{"line_number":637,"context_line":"            gateway_ip \u003d netaddr.IPAddress(gateway_ip)"},{"line_number":638,"context_line":""},{"line_number":639,"context_line":"        with optional_ctx(network, self.network,"},{"line_number":640,"context_line":"                          set_context\u003dset_context,"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_f0a56d05","line":637,"range":{"start_line":634,"start_character":9,"end_line":637,"end_character":54},"in_reply_to":"5f4e5783_07811290","updated":"2017-10-13 08:29:34.000000000","message":"_make_subnet calls _create_subnet method and this will raise exception if it will be simple string. At least I had some test failures without this change but I will check it once again","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f290d92ec78ce37adb9bd599c2b23a239c7089ba","unresolved":false,"context_lines":[{"line_number":4983,"context_line":"                self._test_list_resources(\u0027subnet\u0027, [],"},{"line_number":4984,"context_line":"                                          query_params\u003dquery_params)"},{"line_number":4985,"context_line":""},{"line_number":4986,"context_line":"    def test_list_subnets_filtering_by_tenant_id(self):"},{"line_number":4987,"context_line":"        with self.network() as network:"},{"line_number":4988,"context_line":"            with self.subnet(network\u003dnetwork,"},{"line_number":4989,"context_line":"                             gateway_ip\u003d\u002710.0.0.1\u0027,"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_47602a02","line":4986,"updated":"2017-10-11 19:38:59.000000000","message":"nice that you add more test cases here. That being said, it would be even better if we split them in a separate base patch so that we can be sure there was no regression during the switch. (We should not need to modify the test cases when switching to OVO.)","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"842a0ed4ca5973a1464159227951c652c4f99376","unresolved":false,"context_lines":[{"line_number":4983,"context_line":"                self._test_list_resources(\u0027subnet\u0027, [],"},{"line_number":4984,"context_line":"                                          query_params\u003dquery_params)"},{"line_number":4985,"context_line":""},{"line_number":4986,"context_line":"    def test_list_subnets_filtering_by_tenant_id(self):"},{"line_number":4987,"context_line":"        with self.network() as network:"},{"line_number":4988,"context_line":"            with self.subnet(network\u003dnetwork,"},{"line_number":4989,"context_line":"                             gateway_ip\u003d\u002710.0.0.1\u0027,"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_d0a831dc","line":4986,"in_reply_to":"5f4e5783_47602a02","updated":"2017-10-13 08:29:34.000000000","message":"So do You think that it\u0027s worth to propose those tests as separate patch before this patch and then use it in this patch, right?","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"e2398eb950566237e67ed15b9caec7397a684042","unresolved":false,"context_lines":[{"line_number":4983,"context_line":"                self._test_list_resources(\u0027subnet\u0027, [],"},{"line_number":4984,"context_line":"                                          query_params\u003dquery_params)"},{"line_number":4985,"context_line":""},{"line_number":4986,"context_line":"    def test_list_subnets_filtering_by_tenant_id(self):"},{"line_number":4987,"context_line":"        with self.network() as network:"},{"line_number":4988,"context_line":"            with self.subnet(network\u003dnetwork,"},{"line_number":4989,"context_line":"                             gateway_ip\u003d\u002710.0.0.1\u0027,"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_78deed6d","line":4986,"in_reply_to":"5f4e5783_d0a831dc","updated":"2017-10-13 13:32:00.000000000","message":"New patch with those tests: https://review.openstack.org/#/c/511845/\nPlease review it :)","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"}],"neutron/tests/unit/db/test_ipam_pluggable_backend.py":[{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"37dd2b9728f75911b863621c4634ca9928b881d6","unresolved":false,"context_lines":[{"line_number":699,"context_line":""},{"line_number":700,"context_line":"        mocks \u003d self._prepare_mocks_with_pool_mock("},{"line_number":701,"context_line":"            pool_mock, subnet_factory\u003dsubnet_factory)"},{"line_number":702,"context_line":"        from neutron.objects.db import api as db_obj_api"},{"line_number":703,"context_line":"        db_pools \u003d ["},{"line_number":704,"context_line":"            {\u0027first_ip\u0027: netaddr.IPAddress(p.first, p.version).format(),"},{"line_number":705,"context_line":"             \u0027last_ip\u0027: netaddr.IPAddress(p.last, p.version).format()}"}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_3bc8e8a5","line":702,"updated":"2016-08-01 15:05:51.000000000","message":"Why are we importing inline here; is there a circular dependency or something? If so maybe it\u0027s worth a comment.","commit_id":"760909e3a30cec4f0f731b9d623e02cdc309d6b7"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"7286232b730ccefca64aa2ca86a8e8b65cff08cb","unresolved":false,"context_lines":[{"line_number":699,"context_line":""},{"line_number":700,"context_line":"        mocks \u003d self._prepare_mocks_with_pool_mock("},{"line_number":701,"context_line":"            pool_mock, subnet_factory\u003dsubnet_factory)"},{"line_number":702,"context_line":"        from neutron.objects.db import api as db_obj_api"},{"line_number":703,"context_line":"        db_pools \u003d ["},{"line_number":704,"context_line":"            {\u0027first_ip\u0027: netaddr.IPAddress(p.first, p.version).format(),"},{"line_number":705,"context_line":"             \u0027last_ip\u0027: netaddr.IPAddress(p.last, p.version).format()}"}],"source_content_type":"text/x-python","patch_set":13,"id":"bacf61ea_1868e686","line":702,"in_reply_to":"bacf61ea_3bc8e8a5","updated":"2016-08-04 07:19:11.000000000","message":"Moved import to proper place.","commit_id":"760909e3a30cec4f0f731b9d623e02cdc309d6b7"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"1bbadb1d495eedcdd8a37683e58b0656cb9d619f","unresolved":false,"context_lines":[{"line_number":714,"context_line":"        expected_subnet_db \u003d expected_subnet.copy()"},{"line_number":715,"context_line":"        expected_subnet_db[\u0027allocation_pools\u0027] \u003d allocation_pools"},{"line_number":716,"context_line":"        with mock.patch.object(db_obj_api, \u0027get_object\u0027,"},{"line_number":717,"context_line":"                               return_value\u003dsubnet),\\"},{"line_number":718,"context_line":"            mock.patch.object(db_obj_api, \u0027get_objects\u0027,"},{"line_number":719,"context_line":"                              return_value\u003ddb_pools),\\"},{"line_number":720,"context_line":"            mock.patch.object(db_obj_api, \u0027update_object\u0027,"}],"source_content_type":"text/x-python","patch_set":16,"id":"bacf61ea_d6a6c10d","line":717,"range":{"start_line":717,"start_character":52,"end_line":717,"end_character":53},"updated":"2016-08-05 17:28:59.000000000","message":"ditto","commit_id":"a7479f72e72f773ab33b7074042eccfeff01ba88"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"1bbadb1d495eedcdd8a37683e58b0656cb9d619f","unresolved":false,"context_lines":[{"line_number":716,"context_line":"        with mock.patch.object(db_obj_api, \u0027get_object\u0027,"},{"line_number":717,"context_line":"                               return_value\u003dsubnet),\\"},{"line_number":718,"context_line":"            mock.patch.object(db_obj_api, \u0027get_objects\u0027,"},{"line_number":719,"context_line":"                              return_value\u003ddb_pools),\\"},{"line_number":720,"context_line":"            mock.patch.object(db_obj_api, \u0027update_object\u0027,"},{"line_number":721,"context_line":"                              return_value\u003dexpected_subnet_db):"},{"line_number":722,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"bacf61ea_d67d216e","line":719,"range":{"start_line":719,"start_character":53,"end_line":719,"end_character":54},"updated":"2016-08-05 17:28:59.000000000","message":"ditto","commit_id":"a7479f72e72f773ab33b7074042eccfeff01ba88"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"926db0907bbbe68b918b9a836dd19b86f79c890f","unresolved":false,"context_lines":[{"line_number":31,"context_line":"from neutron.db import models_v2"},{"line_number":32,"context_line":"from neutron.ipam import requests as ipam_req"},{"line_number":33,"context_line":"from neutron.objects import subnet as obj_subnet"},{"line_number":34,"context_line":"from neutron.objects.db import api as db_obj_api"},{"line_number":35,"context_line":"from neutron.tests.unit.db import test_db_base_plugin_v2 as test_db_base"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"3f1d235d_efc5f35c","line":34,"range":{"start_line":34,"start_character":0,"end_line":34,"end_character":48},"updated":"2017-06-29 14:51:51.000000000","message":"Move this one line above and it will pass pep8: http://logs.openstack.org/01/321001/25/check/gate-neutron-pep8-ubuntu-xenial/c843662/console.html#_2017-06-28_20_06_21_356378","commit_id":"281c0110ab993654747aeb79bb7519d7700f446d"}],"neutron/tests/unit/plugins/ml2/drivers/ext_test.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f290d92ec78ce37adb9bd599c2b23a239c7089ba","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        assert(result[\u0027id\u0027] is not None)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _check_extend(self, session, result, entry,"},{"line_number":64,"context_line":"                      expected_db_entry_class, expected_obj_entry_class\u003dNone):"},{"line_number":65,"context_line":"        assert(isinstance(session, oslo_db.sqlalchemy.session.Session))"},{"line_number":66,"context_line":"        assert(isinstance(result, dict))"},{"line_number":67,"context_line":"        assert(result[\u0027id\u0027] is not None)"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_62d434be","line":64,"updated":"2017-10-11 19:38:59.000000000","message":"I believe we should reuse the same argument, and make it so that we don\u0027t call to extensions with two different types. It\u0027s error prone.","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"842a0ed4ca5973a1464159227951c652c4f99376","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        assert(result[\u0027id\u0027] is not None)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _check_extend(self, session, result, entry,"},{"line_number":64,"context_line":"                      expected_db_entry_class, expected_obj_entry_class\u003dNone):"},{"line_number":65,"context_line":"        assert(isinstance(session, oslo_db.sqlalchemy.session.Session))"},{"line_number":66,"context_line":"        assert(isinstance(result, dict))"},{"line_number":67,"context_line":"        assert(result[\u0027id\u0027] is not None)"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f4e5783_90c19983","line":64,"in_reply_to":"5f4e5783_62d434be","updated":"2017-10-13 08:29:34.000000000","message":"yes, but problem which I had was that sometimes this method was called with models_v2.Subnet as entry and sometimes it was subnet_obj.Subnet.\nI think that it\u0027s \"temporary\" solution until we will not move all to subnet OVO and then we will be able to switch to subnet_obj.Subnet always in L111. Than this additional argument will not be necessary anymore.\nI can add TODO here if You think that it\u0027s reasonable.","commit_id":"07304ba9ac8b8c3d9ba83fc9b5e1e9a1f396d50c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"403862ee25c21ecf37611371ff2cf9edac99bf88","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        assert(result[\u0027id\u0027] is not None)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _check_extend(self, session, result, entry,"},{"line_number":64,"context_line":"                      expected_db_entry_class, expected_obj_entry_class\u003dNone):"},{"line_number":65,"context_line":"        assert(isinstance(session, oslo_db.sqlalchemy.session.Session))"},{"line_number":66,"context_line":"        assert(isinstance(result, dict))"},{"line_number":67,"context_line":"        assert(result[\u0027id\u0027] is not None)"}],"source_content_type":"text/x-python","patch_set":34,"id":"3f4b6375_27ed228b","line":64,"updated":"2017-10-20 18:50:27.000000000","message":"add todo to clean it up","commit_id":"bd04ecb005147e305bafb50c449422032eb92b7e"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"805883834ae8136ebe887263497c078e9e0e0a76","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        assert(result[\u0027id\u0027] is not None)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _check_extend(self, session, result, entry,"},{"line_number":64,"context_line":"                      expected_db_entry_class, expected_obj_entry_class\u003dNone):"},{"line_number":65,"context_line":"        assert(isinstance(session, oslo_db.sqlalchemy.session.Session))"},{"line_number":66,"context_line":"        assert(isinstance(result, dict))"},{"line_number":67,"context_line":"        assert(result[\u0027id\u0027] is not None)"}],"source_content_type":"text/x-python","patch_set":34,"id":"3f4b6375_503e4f8c","line":64,"in_reply_to":"3f4b6375_27ed228b","updated":"2017-10-24 14:23:33.000000000","message":"Done","commit_id":"bd04ecb005147e305bafb50c449422032eb92b7e"}]}
