)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"284fbe24d04ed4666f963f7ed1158fb88fc61455","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Fix Quota error while running tests"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The test methods in the test class create networks and the cleanup"},{"line_number":10,"context_line":"takes place after all tests are run. As such the default quota of"},{"line_number":11,"context_line":"10 networks is hit and tests fail."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch makes sure cleanup takes place after the tests and the"},{"line_number":14,"context_line":"quota limit is not hit."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ffe62b97_8e984ec0","line":11,"range":{"start_line":10,"start_character":45,"end_line":11,"end_character":11},"updated":"2017-03-27 17:24:02.000000000","message":"it\u0027s no longer 10 networks. Reword to just refer to some installation specific default quota (that may be 10 or not).","commit_id":"19a4686620f838e93b333328028b9f5fb641bf62"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"284fbe24d04ed4666f963f7ed1158fb88fc61455","unresolved":false,"context_lines":[{"line_number":10,"context_line":"takes place after all tests are run. As such the default quota of"},{"line_number":11,"context_line":"10 networks is hit and tests fail."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch makes sure cleanup takes place after the tests and the"},{"line_number":14,"context_line":"quota limit is not hit."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I6ba2704c60c77d89e00842e28bece14c64ef98a6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ffe62b97_2e8dc27a","line":13,"range":{"start_line":13,"start_character":11,"end_line":13,"end_character":21},"updated":"2017-03-27 17:24:02.000000000","message":"it doesn\u0027t make sure that it won\u0027t hit the quota, it only reduces the chance of it","commit_id":"19a4686620f838e93b333328028b9f5fb641bf62"}],"neutron/tests/tempest/api/test_revisions.py":[{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"19b3633e039df58668836cf7aacdf46e9a41d5ae","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    @decorators.idempotent_id(\u0027e8c5d7db-2b8d-4615-a476-6e537437c4f2\u0027)"},{"line_number":62,"context_line":"    def test_update_subnetpool_bumps_revision(self):"},{"line_number":63,"context_line":"        sp \u003d self.create_subnetpool(\u0027subnetpool\u0027, default_prefixlen\u003d24,"},{"line_number":64,"context_line":"                                    prefixes\u003d[\u002710.0.0.0/8\u0027])"},{"line_number":65,"context_line":"        self.assertIn(\u0027revision_number\u0027, sp)"},{"line_number":66,"context_line":"        updated \u003d self.admin_client.update_subnetpool(sp[\u0027id\u0027], name\u003d\u0027sp2\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a1ced50_21b5197d","line":63,"range":{"start_line":63,"start_character":18,"end_line":63,"end_character":35},"updated":"2017-03-23 08:09:49.000000000","message":"care to clean this up?","commit_id":"3f497a57ce71ae4ad765f7f01228c28847fbe5a7"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"19b3633e039df58668836cf7aacdf46e9a41d5ae","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    @decorators.idempotent_id(\u0027e8c5d7db-2b8d-4567-a326-6e123437c4d1\u0027)"},{"line_number":71,"context_line":"    def test_update_subnet_bumps_network_revision(self):"},{"line_number":72,"context_line":"        net \u003d self.create_network()"},{"line_number":73,"context_line":"        subnet \u003d self.create_subnet(net)"},{"line_number":74,"context_line":"        updated \u003d self.client.show_network(net[\u0027id\u0027])"},{"line_number":75,"context_line":"        self.assertGreater(updated[\u0027network\u0027][\u0027revision_number\u0027],"},{"line_number":76,"context_line":"                           net[\u0027revision_number\u0027])"},{"line_number":77,"context_line":"        self.client.delete_subnet(subnet[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a1ced50_61b39198","line":74,"range":{"start_line":72,"start_character":2,"end_line":74,"end_character":2},"updated":"2017-03-23 08:09:49.000000000","message":"no clean here?","commit_id":"3f497a57ce71ae4ad765f7f01228c28847fbe5a7"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"19b3633e039df58668836cf7aacdf46e9a41d5ae","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        net \u003d self.create_network()"},{"line_number":183,"context_line":"        subnet \u003d self.create_subnet(net)"},{"line_number":184,"context_line":"        subgateway \u003d netaddr.IPAddress(subnet[\u0027gateway_ip\u0027])"},{"line_number":185,"context_line":"        router \u003d self.create_router(router_name\u003d\u0027test\u0027)"},{"line_number":186,"context_line":"        self.create_router_interface(router[\u0027id\u0027], subnet[\u0027id\u0027])"},{"line_number":187,"context_line":"        router \u003d self.client.show_router(router[\u0027id\u0027])[\u0027router\u0027]"},{"line_number":188,"context_line":"        updated \u003d self.client.update_extra_routes("},{"line_number":189,"context_line":"            router[\u0027id\u0027], str(subgateway + 1), \u00272.0.0.0/24\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a1ced50_0169fdf8","line":186,"range":{"start_line":185,"start_character":5,"end_line":186,"end_character":5},"updated":"2017-03-23 08:09:49.000000000","message":"what about a router?","commit_id":"3f497a57ce71ae4ad765f7f01228c28847fbe5a7"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7534284e9b856616bfb32bd74820600281793e45","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    @decorators.idempotent_id(\u00274a26a4be-9c53-483c-bc50-b53f1db10ac6\u0027)"},{"line_number":31,"context_line":"    def test_update_network_bumps_revision(self):"},{"line_number":32,"context_line":"        net \u003d self.create_network()"},{"line_number":33,"context_line":"        self.addCleanup(self.client.delete_network, net[\u0027id\u0027])"},{"line_number":34,"context_line":"        self.assertIn(\u0027revision_number\u0027, net)"},{"line_number":35,"context_line":"        updated \u003d self.client.update_network(net[\u0027id\u0027], name\u003d\u0027newnet\u0027)"},{"line_number":36,"context_line":"        self.assertGreater(updated[\u0027network\u0027][\u0027revision_number\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a1ced50_176cc435","line":33,"updated":"2017-03-23 16:36:50.000000000","message":"Should we make create_network, create_port etc. to register the cleanup? Also, can we make the cleanup in such a way that it also removes removed resources from cls.networks, cls.ports etc.? The latter will avoid some unnecessary DELETE operations for resources that are already gone.","commit_id":"04322233cd464013594ba9f9a50d3252d34a124e"},{"author":{"_account_id":20734,"name":"Prateek Arora","email":"1192prateek@gmail.com","username":"prateek_a"},"change_message_id":"41da0980760c1369bd498f3fd89751337df4d1ad","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    @decorators.idempotent_id(\u00274a26a4be-9c53-483c-bc50-b53f1db10ac6\u0027)"},{"line_number":31,"context_line":"    def test_update_network_bumps_revision(self):"},{"line_number":32,"context_line":"        net \u003d self.create_network()"},{"line_number":33,"context_line":"        self.addCleanup(self.client.delete_network, net[\u0027id\u0027])"},{"line_number":34,"context_line":"        self.assertIn(\u0027revision_number\u0027, net)"},{"line_number":35,"context_line":"        updated \u003d self.client.update_network(net[\u0027id\u0027], name\u003d\u0027newnet\u0027)"},{"line_number":36,"context_line":"        self.assertGreater(updated[\u0027network\u0027][\u0027revision_number\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffe62b97_4d006c35","line":33,"in_reply_to":"1a1ced50_176cc435","updated":"2017-03-24 10:46:26.000000000","message":"I can see three options here\n\n1)I tried doing this. All create_() are class methods and as such the addCleanup wont be registered on them. Let\u0027s stay with what I have written here\n\n2) Rather than staying with what i have written we can do what Brian has mentioned\n\n3) Another thing that can be done here is to do what base_security_groups.py is doing. That module is specifically written for the security_groups class and the create and delete methods are not classmethods and the create method adds the cleanup for the delete method itself. That would need to be done for all resources, that means making an equal number of classes as type of resources and making all code base use those particular methods which clean up resources.","commit_id":"04322233cd464013594ba9f9a50d3252d34a124e"},{"author":{"_account_id":20734,"name":"Prateek Arora","email":"1192prateek@gmail.com","username":"prateek_a"},"change_message_id":"f23dcac51b6758f26639e179772a69b0106029d0","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    @decorators.idempotent_id(\u00274a26a4be-9c53-483c-bc50-b53f1db10ac6\u0027)"},{"line_number":31,"context_line":"    def test_update_network_bumps_revision(self):"},{"line_number":32,"context_line":"        net \u003d self.create_network()"},{"line_number":33,"context_line":"        self.addCleanup(self.client.delete_network, net[\u0027id\u0027])"},{"line_number":34,"context_line":"        self.assertIn(\u0027revision_number\u0027, net)"},{"line_number":35,"context_line":"        updated \u003d self.client.update_network(net[\u0027id\u0027], name\u003d\u0027newnet\u0027)"},{"line_number":36,"context_line":"        self.assertGreater(updated[\u0027network\u0027][\u0027revision_number\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a1ced50_2f2404c5","line":33,"in_reply_to":"1a1ced50_176cc435","updated":"2017-03-23 18:36:27.000000000","message":"The over quota problem is only with this class which has more tests than the quotas. Adding cleanup to create_network etc would make each and every method to cleanup even though they are not over quota.","commit_id":"04322233cd464013594ba9f9a50d3252d34a124e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"689f1afa2ef9dcf2f5d2921a5e37a76d14435875","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    @decorators.idempotent_id(\u00274a26a4be-9c53-483c-bc50-b53f1db10ac6\u0027)"},{"line_number":31,"context_line":"    def test_update_network_bumps_revision(self):"},{"line_number":32,"context_line":"        net \u003d self.create_network()"},{"line_number":33,"context_line":"        self.addCleanup(self.client.delete_network, net[\u0027id\u0027])"},{"line_number":34,"context_line":"        self.assertIn(\u0027revision_number\u0027, net)"},{"line_number":35,"context_line":"        updated \u003d self.client.update_network(net[\u0027id\u0027], name\u003d\u0027newnet\u0027)"},{"line_number":36,"context_line":"        self.assertGreater(updated[\u0027network\u0027][\u0027revision_number\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a1ced50_8fa9787e","line":33,"in_reply_to":"1a1ced50_176cc435","updated":"2017-03-23 18:18:33.000000000","message":"Why can\u0027t we just add a call to self.resource_cleanup() in the BaseNetworkTest class at setup?  It will release everything.  This is what TrunkTestJSONBase does in it\u0027s setUp().  Looks like there are other classes that could use the same change.","commit_id":"04322233cd464013594ba9f9a50d3252d34a124e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7eaeff24b762a7f7136dc6a28cf385531674f4ce","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    @decorators.idempotent_id(\u00274a26a4be-9c53-483c-bc50-b53f1db10ac6\u0027)"},{"line_number":31,"context_line":"    def test_update_network_bumps_revision(self):"},{"line_number":32,"context_line":"        net \u003d self.create_network()"},{"line_number":33,"context_line":"        self.addCleanup(self.client.delete_network, net[\u0027id\u0027])"},{"line_number":34,"context_line":"        self.assertIn(\u0027revision_number\u0027, net)"},{"line_number":35,"context_line":"        updated \u003d self.client.update_network(net[\u0027id\u0027], name\u003d\u0027newnet\u0027)"},{"line_number":36,"context_line":"        self.assertGreater(updated[\u0027network\u0027][\u0027revision_number\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a1ced50_c207c77f","line":33,"in_reply_to":"1a1ced50_2f2404c5","updated":"2017-03-23 18:54:39.000000000","message":"Keeping resources for longer than they are actually used by the test case doesn\u0027t sound ideal to me, so what\u0027s the problem with cleaning them up for all test cases?","commit_id":"04322233cd464013594ba9f9a50d3252d34a124e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7eaeff24b762a7f7136dc6a28cf385531674f4ce","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    @decorators.idempotent_id(\u00274a26a4be-9c53-483c-bc50-b53f1db10ac6\u0027)"},{"line_number":31,"context_line":"    def test_update_network_bumps_revision(self):"},{"line_number":32,"context_line":"        net \u003d self.create_network()"},{"line_number":33,"context_line":"        self.addCleanup(self.client.delete_network, net[\u0027id\u0027])"},{"line_number":34,"context_line":"        self.assertIn(\u0027revision_number\u0027, net)"},{"line_number":35,"context_line":"        updated \u003d self.client.update_network(net[\u0027id\u0027], name\u003d\u0027newnet\u0027)"},{"line_number":36,"context_line":"        self.assertGreater(updated[\u0027network\u0027][\u0027revision_number\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a1ced50_0210ffa7","line":33,"in_reply_to":"1a1ced50_8fa9787e","updated":"2017-03-23 18:54:39.000000000","message":"I am not sure. In the trunks test class, resource_cleanup is a classmethod, and operates on cls.trunks, that is probably shared between multiple test cases. Does it mean that a cleanup from one test case may remove trunks that belong to another test case? Gotta understand how it works there.","commit_id":"04322233cd464013594ba9f9a50d3252d34a124e"},{"author":{"_account_id":20734,"name":"Prateek Arora","email":"1192prateek@gmail.com","username":"prateek_a"},"change_message_id":"f23dcac51b6758f26639e179772a69b0106029d0","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    @decorators.idempotent_id(\u00274a26a4be-9c53-483c-bc50-b53f1db10ac6\u0027)"},{"line_number":31,"context_line":"    def test_update_network_bumps_revision(self):"},{"line_number":32,"context_line":"        net \u003d self.create_network()"},{"line_number":33,"context_line":"        self.addCleanup(self.client.delete_network, net[\u0027id\u0027])"},{"line_number":34,"context_line":"        self.assertIn(\u0027revision_number\u0027, net)"},{"line_number":35,"context_line":"        updated \u003d self.client.update_network(net[\u0027id\u0027], name\u003d\u0027newnet\u0027)"},{"line_number":36,"context_line":"        self.assertGreater(updated[\u0027network\u0027][\u0027revision_number\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a1ced50_2f0b242d","line":33,"in_reply_to":"1a1ced50_8fa9787e","updated":"2017-03-23 18:36:27.000000000","message":"This sounds good, Ihar what do you think of this approach ?","commit_id":"04322233cd464013594ba9f9a50d3252d34a124e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"dca02bdfa06e5986842b21b2cc9eb5ef0621837d","unresolved":false,"context_lines":[{"line_number":346,"context_line":"    @test.requires_ext(extension\u003d\"qos\", service\u003d\"network\")"},{"line_number":347,"context_line":"    def test_update_qos_port_policy_binding_bumps_revision(self):"},{"line_number":348,"context_line":"        policy \u003d self.create_qos_policy(name\u003d\u0027port-policy\u0027, shared\u003dFalse)"},{"line_number":349,"context_line":"        self.addCleanup(self.client.delete_qos_policy, policy[\u0027id\u0027])"},{"line_number":350,"context_line":"        port \u003d self.create_port(self.create_network())"},{"line_number":351,"context_line":"        self.addCleanup(self.client.delete_port, port[\u0027id\u0027])"},{"line_number":352,"context_line":"        updated \u003d self.admin_client.update_port("}],"source_content_type":"text/x-python","patch_set":2,"id":"1a1ced50_123932d9","line":349,"updated":"2017-03-23 16:38:59.000000000","message":"if cleanup is triggered after class removes the resource, it will fail with 404/NotFound.","commit_id":"04322233cd464013594ba9f9a50d3252d34a124e"},{"author":{"_account_id":20734,"name":"Prateek Arora","email":"1192prateek@gmail.com","username":"prateek_a"},"change_message_id":"41da0980760c1369bd498f3fd89751337df4d1ad","unresolved":false,"context_lines":[{"line_number":346,"context_line":"    @test.requires_ext(extension\u003d\"qos\", service\u003d\"network\")"},{"line_number":347,"context_line":"    def test_update_qos_port_policy_binding_bumps_revision(self):"},{"line_number":348,"context_line":"        policy \u003d self.create_qos_policy(name\u003d\u0027port-policy\u0027, shared\u003dFalse)"},{"line_number":349,"context_line":"        self.addCleanup(self.client.delete_qos_policy, policy[\u0027id\u0027])"},{"line_number":350,"context_line":"        port \u003d self.create_port(self.create_network())"},{"line_number":351,"context_line":"        self.addCleanup(self.client.delete_port, port[\u0027id\u0027])"},{"line_number":352,"context_line":"        updated \u003d self.admin_client.update_port("}],"source_content_type":"text/x-python","patch_set":2,"id":"ffe62b97_702427c7","line":349,"in_reply_to":"1a1ced50_123932d9","updated":"2017-03-24 10:46:26.000000000","message":"I might not have understood you correctly here. But i would try to explain on what i understood.\nSince the class inherits from BaseTestCase I assume what you want to say here is what if after the last test case the tearDown method removes the resource and addCleanup hits a 404.\nAs per official Python docs, addCleanup is always called after tearDown. So there is no question of hitting the delete race condition and if the error would have popped up, it would come up everytime and not once in a while.\nAnd since it has not come up this time it should not come again(since the execution the two cleanup methods does not vary.)","commit_id":"04322233cd464013594ba9f9a50d3252d34a124e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"bf6e1001c7266a82cc899f5d2052ecc34236f92a","unresolved":false,"context_lines":[{"line_number":346,"context_line":"    @test.requires_ext(extension\u003d\"qos\", service\u003d\"network\")"},{"line_number":347,"context_line":"    def test_update_qos_port_policy_binding_bumps_revision(self):"},{"line_number":348,"context_line":"        policy \u003d self.create_qos_policy(name\u003d\u0027port-policy\u0027, shared\u003dFalse)"},{"line_number":349,"context_line":"        self.addCleanup(self.client.delete_qos_policy, policy[\u0027id\u0027])"},{"line_number":350,"context_line":"        port \u003d self.create_port(self.create_network())"},{"line_number":351,"context_line":"        self.addCleanup(self.client.delete_port, port[\u0027id\u0027])"},{"line_number":352,"context_line":"        updated \u003d self.admin_client.update_port("}],"source_content_type":"text/x-python","patch_set":2,"id":"ffe62b97_538fe2cb","line":349,"in_reply_to":"ffe62b97_702427c7","updated":"2017-03-24 15:24:41.000000000","message":"OK, see the test failure.","commit_id":"04322233cd464013594ba9f9a50d3252d34a124e"}]}
