)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"2bf6cce2d31fb06988358c204908bc713fb00ee4","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     LiuYong \u003cliu.yong8@zte.com.cn\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-06-03 07:43:57 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Give a message that \u0027subnet not found\u0027 while tenant A try delete a net"},{"line_number":8,"context_line":"which has a subnet which does not belongs to A"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"\u0027net-delete\u0027 command seems to cause dead loop"},{"line_number":11,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9abb7d3a_34109fa8","line":8,"range":{"start_line":7,"start_character":0,"end_line":8,"end_character":46},"updated":"2016-06-02 17:54:36.000000000","message":"Please change your commit message according to rules [1]\n\n[1] https://wiki.openstack.org/wiki/GitCommitMessages#Summary_of_Git_commit_message_structure","commit_id":"85e52f28d7aa016abfa0d3740750c4861cdc4278"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e6aacb1fa1d1bab71c5184f027ebe34b79dad29e","unresolved":false,"context_lines":[{"line_number":9,"context_line":""},{"line_number":10,"context_line":"Deleting a network anyway whatever its subnets"},{"line_number":11,"context_line":"belong to its tenant or not."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I43e865d07687152da993f62696d13d7bfad01017"},{"line_number":14,"context_line":"Closes-Bug: #1588228"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"5a9d85d2_47db12ee","line":12,"updated":"2016-06-19 12:42:35.000000000","message":"In the unit tests you give an example where a tenant creates a network and the admin creates the subnet. Maybe explain that here. Is this the scenario you are addressing?","commit_id":"4f97dda08974670c1529044e86709bcb14b2fd24"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9a37433d0f1a9dc56272d12f1ce17b39df74c7f7","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     liuyong \u003cliu.yong8@zte.com.cn\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-06-20 15:55:46 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix the problem that \u0027net-delete\u0027 command"},{"line_number":8,"context_line":"seems to cause dead loop"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"After a tenant creates a network and admin creates a subnet,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"5a9d85d2_617430cf","line":7,"updated":"2016-06-20 07:57:20.000000000","message":"please see https://wiki.openstack.org/wiki/GitCommitMessages","commit_id":"40026e949a3c2bcdbd194684df0f77625a2056aa"}],"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"de8083c8b49d834984efdb08d2179fee9419ca5e","unresolved":false,"context_lines":[{"line_number":860,"context_line":"                    LOG.debug(\"Subnets to auto-delete: %s\", subnets)"},{"line_number":861,"context_line":"                    for subnet in subnets:"},{"line_number":862,"context_line":"                        if subnet.tenant_id !\u003d net_tenant_id:"},{"line_number":863,"context_line":"                            raise exc.ObjectNotFound(id\u003dsubnet.id)"},{"line_number":864,"context_line":""},{"line_number":865,"context_line":"                    if not (ports or subnets):"},{"line_number":866,"context_line":"                        network \u003d self.get_network(context, id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9abb7d3a_c8408a38","line":863,"updated":"2016-06-02 19:45:39.000000000","message":"I don\u0027t think this is the right exception to raise if a user is trying to delete the network.  This will be quite confusing for an end-user to see.\n\nThis is an interesting edge case of what should happen though.  I\u0027m of the opinion that if a user wants the network deleted, and they own the network, then all the subnets should be deleted as well no matter who owns them.\n\nAnother alternative is to just fail operation if its found the network owner does not have rights to delete any of the subnets, but that can get hairy and I\u0027m not a big fan of it.","commit_id":"85e52f28d7aa016abfa0d3740750c4861cdc4278"},{"author":{"_account_id":20251,"name":"LiuYong","email":"liu.yong8@zte.com.cn","username":"LiuYong"},"change_message_id":"4de08827a42a81bc6b5875a9f28ffc73ea90c318","unresolved":false,"context_lines":[{"line_number":860,"context_line":"                    LOG.debug(\"Subnets to auto-delete: %s\", subnets)"},{"line_number":861,"context_line":"                    for subnet in subnets:"},{"line_number":862,"context_line":"                        if subnet.tenant_id !\u003d net_tenant_id:"},{"line_number":863,"context_line":"                            raise exc.ObjectNotFound(id\u003dsubnet.id)"},{"line_number":864,"context_line":""},{"line_number":865,"context_line":"                    if not (ports or subnets):"},{"line_number":866,"context_line":"                        network \u003d self.get_network(context, id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9abb7d3a_d1982e6d","line":863,"in_reply_to":"9abb7d3a_c8408a38","updated":"2016-06-02 22:42:30.000000000","message":"I tend to finish the deleting anyway, although it will be difficult to handle that deleting a subnet which does not belong to tenant of network. I will try to implement.","commit_id":"85e52f28d7aa016abfa0d3740750c4861cdc4278"},{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"1fcb127a901e8105398af89c8adec613623caade","unresolved":false,"context_lines":[{"line_number":885,"context_line":"                        LOG.warning(_LW(\"A concurrent port creation has \""},{"line_number":886,"context_line":"                                        \"occurred\"))"},{"line_number":887,"context_line":"                        continue"},{"line_number":888,"context_line":"            self._delete_ports(context, port_ids)"},{"line_number":889,"context_line":"            self._delete_subnets(context, subnet_ids)"},{"line_number":890,"context_line":""},{"line_number":891,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9abb7d3a_cfab341d","side":"PARENT","line":888,"updated":"2016-06-03 17:03:22.000000000","message":"So, why can we delete ports without an elevated context, yet we need elevated context for subnets? This tells me that we need to dig deeper on this issue.","commit_id":"96a195c064df65fb566defa839e8872750931f58"},{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"ebb760e7d34903bda15b89b95632e6f1473ed1b7","unresolved":false,"context_lines":[{"line_number":886,"context_line":"                                        \"occurred\"))"},{"line_number":887,"context_line":"                        continue"},{"line_number":888,"context_line":"            self._delete_ports(context, port_ids)"},{"line_number":889,"context_line":"            admin_ctx \u003d context.elevated()"},{"line_number":890,"context_line":"            self._delete_subnets(admin_ctx, subnet_ids)"},{"line_number":891,"context_line":""},{"line_number":892,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_c64b71af","line":889,"range":{"start_line":889,"start_character":12,"end_line":889,"end_character":42},"updated":"2016-06-06 03:52:19.000000000","message":"If I shared this network to other tenants with rbac, both of side didn\u0027t have admin permission, when delete this network why use admin_ctx...","commit_id":"83d328f7600bbfd5d9f516e715173bbb187a78cf"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"bdd886e689087f8e8441e3bba37f5f247910d2f2","unresolved":false,"context_lines":[{"line_number":886,"context_line":"                                        \"occurred\"))"},{"line_number":887,"context_line":"                        continue"},{"line_number":888,"context_line":"            self._delete_ports(context, port_ids)"},{"line_number":889,"context_line":"            admin_ctx \u003d context.elevated()"},{"line_number":890,"context_line":"            self._delete_subnets(admin_ctx, subnet_ids)"},{"line_number":891,"context_line":""},{"line_number":892,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9abb7d3a_e2df4638","line":889,"range":{"start_line":889,"start_character":12,"end_line":889,"end_character":42},"updated":"2016-06-03 11:53:55.000000000","message":"may add comment why need admin context","commit_id":"83d328f7600bbfd5d9f516e715173bbb187a78cf"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e6aacb1fa1d1bab71c5184f027ebe34b79dad29e","unresolved":false,"context_lines":[{"line_number":889,"context_line":"                        continue"},{"line_number":890,"context_line":"            # There may be some ports or subnets in port_ids or subnet_ids"},{"line_number":891,"context_line":"            # which tenant is not tenant of network."},{"line_number":892,"context_line":"            # So elevate the priviledge."},{"line_number":893,"context_line":"            admin_ctx \u003d context.elevated()"},{"line_number":894,"context_line":"            self._delete_ports(admin_ctx, port_ids)"},{"line_number":895,"context_line":"            self._delete_subnets(admin_ctx, subnet_ids)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a9d85d2_c7c6e215","line":892,"range":{"start_line":892,"start_character":29,"end_line":892,"end_character":39},"updated":"2016-06-19 12:42:35.000000000","message":"priviledge \u003d\u003e privilege","commit_id":"4f97dda08974670c1529044e86709bcb14b2fd24"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"d01a5bc2c422ac20f7011e9ab4a5f9613b689ffa","unresolved":false,"context_lines":[{"line_number":891,"context_line":"            # which tenant is not tenant of network."},{"line_number":892,"context_line":"            # So elevate the privilege."},{"line_number":893,"context_line":"            admin_ctx \u003d context.elevated()"},{"line_number":894,"context_line":"            self._delete_ports(admin_ctx, port_ids)"},{"line_number":895,"context_line":"            self._delete_subnets(admin_ctx, subnet_ids)"},{"line_number":896,"context_line":""},{"line_number":897,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":16,"id":"3ac371cc_4ded9fee","line":894,"updated":"2016-08-16 09:28:12.000000000","message":"the problem with elevating is that we are bypassing the whole policy engine. I suggest instead you detect the error condition and raise an appropriate inuse exception back to the user.","commit_id":"383dc716b0b5708cc46b3f6ed3892eb581978167"}],"neutron/tests/unit/plugins/ml2/test_plugin.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"bdd886e689087f8e8441e3bba37f5f247910d2f2","unresolved":false,"context_lines":[{"line_number":420,"context_line":"                       Ml2PluginV2TestCase):"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"    def test_delete_network_has_2_subnets_different_tenant(self):"},{"line_number":423,"context_line":"        ctx \u003d context.Context(user_id\u003d\u0027demo\u0027,"},{"line_number":424,"context_line":"                              tenant_id\u003d\u0027tenant1\u0027,"},{"line_number":425,"context_line":"                              is_admin\u003dFalse)"},{"line_number":426,"context_line":"        data \u003d {\u0027network\u0027: {\u0027name\u0027: \u0027net_demo\u0027}}"}],"source_content_type":"text/x-python","patch_set":4,"id":"9abb7d3a_e25aa6f1","line":423,"range":{"start_line":423,"start_character":8,"end_line":423,"end_character":11},"updated":"2016-06-03 11:53:55.000000000","message":"name this demo_ctx","commit_id":"83d328f7600bbfd5d9f516e715173bbb187a78cf"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"bdd886e689087f8e8441e3bba37f5f247910d2f2","unresolved":false,"context_lines":[{"line_number":432,"context_line":""},{"line_number":433,"context_line":"        network_id \u003d network_res[\u0027network\u0027][\u0027id\u0027]"},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"        ctx \u003d context.Context(user_id\u003d\u0027admin\u0027,"},{"line_number":436,"context_line":"                              tenant_id\u003d\u0027tenant2\u0027,"},{"line_number":437,"context_line":"                              is_admin\u003dTrue)"},{"line_number":438,"context_line":"        data \u003d {\u0027subnet\u0027: {\u0027network_id\u0027: network_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9abb7d3a_4272927d","line":435,"range":{"start_line":435,"start_character":8,"end_line":435,"end_character":11},"updated":"2016-06-03 11:53:55.000000000","message":"admin_ctx","commit_id":"83d328f7600bbfd5d9f516e715173bbb187a78cf"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"bdd886e689087f8e8441e3bba37f5f247910d2f2","unresolved":false,"context_lines":[{"line_number":444,"context_line":"        subnet_res \u003d subnet_req.get_response(self.api)"},{"line_number":445,"context_line":"        self.assertEqual(webob.exc.HTTPCreated.code, subnet_res.status_int)"},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"        ctx \u003d context.Context(user_id\u003d\u0027demo\u0027,"},{"line_number":448,"context_line":"                              tenant_id\u003d\u0027tenant1\u0027,"},{"line_number":449,"context_line":"                              is_admin\u003dFalse)"},{"line_number":450,"context_line":"        data \u003d {\u0027subnet\u0027: {\u0027network_id\u0027: network_id,"},{"line_number":451,"context_line":"                \u0027cidr\u0027: \u002720.0.2.0/24\u0027,"},{"line_number":452,"context_line":"                \u0027ip_version\u0027: \u00274\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9abb7d3a_8203dab7","line":449,"range":{"start_line":447,"start_character":8,"end_line":449,"end_character":45},"updated":"2016-06-03 11:53:55.000000000","message":"not needed after rename to demo_ctx","commit_id":"83d328f7600bbfd5d9f516e715173bbb187a78cf"}]}
