)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8576,"name":"Yair Fried","email":"yfried@redhat.com","username":"yfried"},"change_message_id":"b80850326fd9af7af92ffbc0adaebbe1b0253d67","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Avoid overlapping subnets in class NetworksTestJSON"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When allow_overlapping_ips is Fale, some of the tests in"},{"line_number":10,"context_line":"\"NetworksTestJSON\" class are failing."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This class creates a subnet 10.100.0.0/28 as part of resource_setup."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a890539_06473e78","line":9,"updated":"2014-12-02 07:52:05.000000000","message":"False","commit_id":"04afd070ede7dfaecf53cc9c79a6a94cf822a3ea"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"9bebe5d328e3d91378fb371ab2cc30101cea1bc9","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Avoid overlapping subnets in class NetworksTestJSON"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When allow_overlapping_ips is Fale, some of the tests in"},{"line_number":10,"context_line":"\"NetworksTestJSON\" class are failing."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This class creates a subnet 10.100.0.0/28 as part of resource_setup."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a890539_ac73a9b2","line":9,"in_reply_to":"5a890539_06473e78","updated":"2014-12-02 08:32:02.000000000","message":"sure, Thanks","commit_id":"04afd070ede7dfaecf53cc9c79a6a94cf822a3ea"},{"author":{"_account_id":8576,"name":"Yair Fried","email":"yfried@redhat.com","username":"yfried"},"change_message_id":"b80850326fd9af7af92ffbc0adaebbe1b0253d67","unresolved":false,"context_lines":[{"line_number":10,"context_line":"\"NetworksTestJSON\" class are failing."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This class creates a subnet 10.100.0.0/28 as part of resource_setup."},{"line_number":13,"context_line":"This subnet is used in test_(list/show) tests. Other kind of tests"},{"line_number":14,"context_line":"(i.e tests_create_) first try with 10.100.0.0/28 subnet, it fails,"},{"line_number":15,"context_line":"then they try next subnet block i.e 10.100.0.16/28 but this also fails"},{"line_number":16,"context_line":"as the parameters(ex, gateway, allocation_pools) with which the tests"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a890539_5162e2d9","line":13,"updated":"2014-12-02 07:52:05.000000000","message":"please add: \"Other kind of tests in this class\"\n\nAlso, you might like to mention that having overlapping ips in the same tenant is bad practice even when allow_overlapping_ips is enabled.","commit_id":"04afd070ede7dfaecf53cc9c79a6a94cf822a3ea"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"9bebe5d328e3d91378fb371ab2cc30101cea1bc9","unresolved":false,"context_lines":[{"line_number":10,"context_line":"\"NetworksTestJSON\" class are failing."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This class creates a subnet 10.100.0.0/28 as part of resource_setup."},{"line_number":13,"context_line":"This subnet is used in test_(list/show) tests. Other kind of tests"},{"line_number":14,"context_line":"(i.e tests_create_) first try with 10.100.0.0/28 subnet, it fails,"},{"line_number":15,"context_line":"then they try next subnet block i.e 10.100.0.16/28 but this also fails"},{"line_number":16,"context_line":"as the parameters(ex, gateway, allocation_pools) with which the tests"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a890539_6c4aa156","line":13,"in_reply_to":"5a890539_5162e2d9","updated":"2014-12-02 08:32:02.000000000","message":"sure, thanks","commit_id":"04afd070ede7dfaecf53cc9c79a6a94cf822a3ea"}],"tempest/api/network/test_networks.py":[{"author":{"_account_id":8576,"name":"Yair Fried","email":"yfried@redhat.com","username":"yfried"},"change_message_id":"5297f3ba4c329fb053ad6341222be5b4796e91cd","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        _, body \u003d self.client.update_subnet(subnet_id, name\u003dnew_name)"},{"line_number":184,"context_line":"        updated_subnet \u003d body[\u0027subnet\u0027]"},{"line_number":185,"context_line":"        self.assertEqual(updated_subnet[\u0027name\u0027], new_name)"},{"line_number":186,"context_line":"        self.client.delete_network(net_id)"},{"line_number":187,"context_line":"        self.networks.pop()"},{"line_number":188,"context_line":"        self.subnets.pop()"},{"line_number":189,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_d13972a4","line":186,"updated":"2014-12-02 07:54:42.000000000","message":"maybe use addCleanup instead? in L170","commit_id":"04afd070ede7dfaecf53cc9c79a6a94cf822a3ea"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"9bebe5d328e3d91378fb371ab2cc30101cea1bc9","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        _, body \u003d self.client.update_subnet(subnet_id, name\u003dnew_name)"},{"line_number":184,"context_line":"        updated_subnet \u003d body[\u0027subnet\u0027]"},{"line_number":185,"context_line":"        self.assertEqual(updated_subnet[\u0027name\u0027], new_name)"},{"line_number":186,"context_line":"        self.client.delete_network(net_id)"},{"line_number":187,"context_line":"        self.networks.pop()"},{"line_number":188,"context_line":"        self.subnets.pop()"},{"line_number":189,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_f143ce69","line":186,"in_reply_to":"5a890539_d13972a4","updated":"2014-12-02 08:32:02.000000000","message":"sure. Thanks","commit_id":"04afd070ede7dfaecf53cc9c79a6a94cf822a3ea"},{"author":{"_account_id":8576,"name":"Yair Fried","email":"yfried@redhat.com","username":"yfried"},"change_message_id":"5297f3ba4c329fb053ad6341222be5b4796e91cd","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        updated_subnet \u003d body[\u0027subnet\u0027]"},{"line_number":185,"context_line":"        self.assertEqual(updated_subnet[\u0027name\u0027], new_name)"},{"line_number":186,"context_line":"        self.client.delete_network(net_id)"},{"line_number":187,"context_line":"        self.networks.pop()"},{"line_number":188,"context_line":"        self.subnets.pop()"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    @test.attr(type\u003d\u0027smoke\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_f1c90ead","line":187,"updated":"2014-12-02 07:54:42.000000000","message":"not sure if L187-L188 are required, since cleanup should now ignore NotFound exceptions","commit_id":"04afd070ede7dfaecf53cc9c79a6a94cf822a3ea"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"9bebe5d328e3d91378fb371ab2cc30101cea1bc9","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        updated_subnet \u003d body[\u0027subnet\u0027]"},{"line_number":185,"context_line":"        self.assertEqual(updated_subnet[\u0027name\u0027], new_name)"},{"line_number":186,"context_line":"        self.client.delete_network(net_id)"},{"line_number":187,"context_line":"        self.networks.pop()"},{"line_number":188,"context_line":"        self.subnets.pop()"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    @test.attr(type\u003d\u0027smoke\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_d14c12a0","line":187,"in_reply_to":"5a890539_f1c90ead","updated":"2014-12-02 08:32:02.000000000","message":"Let me retain these lines. Otherwise BaseNetworkTest.resource_cleanup() will try to delete these non existant network and subnet. These lines will avoid unnecessary cleanup in BaseNetworkTest.resource_cleanup().","commit_id":"04afd070ede7dfaecf53cc9c79a6a94cf822a3ea"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"64925a027aa5a2602c38e0a9d3c849b3ad783839","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        subnet_cidr \u003d list(cidr.subnet(mask_bits))[-1]"},{"line_number":112,"context_line":"        gateway_ip \u003d str(netaddr.IPAddress(subnet_cidr) + 1)"},{"line_number":113,"context_line":"        return cls.create_subnet(network, gateway\u003dgateway_ip,"},{"line_number":114,"context_line":"                                 cidr\u003dsubnet_cidr, mask_bits\u003dmask_bits)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_7851b861","line":113,"updated":"2014-12-09 09:40:23.000000000","message":"This cidr subnet settings allows exactly one subnet to be created by the create_subnet.\n\nWhy not change the create_subnet method to allow allocation from reverse order, when it gets a _revers\u003dTrue argument ?","commit_id":"1d2c52dc47a28d61ce83a62756cb09d84f846efb"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"76d15e566d0614ae5016f55baf6a9ab6aecc5e7f","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        subnet_cidr \u003d list(cidr.subnet(mask_bits))[-1]"},{"line_number":112,"context_line":"        gateway_ip \u003d str(netaddr.IPAddress(subnet_cidr) + 1)"},{"line_number":113,"context_line":"        return cls.create_subnet(network, gateway\u003dgateway_ip,"},{"line_number":114,"context_line":"                                 cidr\u003dsubnet_cidr, mask_bits\u003dmask_bits)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_8b4e0695","line":113,"in_reply_to":"3a961159_7851b861","updated":"2014-12-09 16:38:29.000000000","message":"Thanks. But that won\u0027t solve our problem here(Kindly see my comment in bug #1393564). \n \nwhen we are creating subnet in  resource_setup, there won\u0027t be any subnet with cidr 10.100.0.0/28, so both create_subnet(reverse\u003dTrue) and create_subnet(reverse\u003dFalse) can successfully create the subnet with cidr 10.100.0.0/28. We don\u0027t want 10.100.0.0/28 subnet here. \"create_subnet\" will go with smaller subnet blocks only when creating subnet with larger cidr fails(as subnet already exists with this cidr).  \n\nIn our case here, we don\u0027t want to create subnet with 10.100.0.0/28. So we explicitly choose our subnet CIDR(which is not overlapping i.e 10.100.255.240/28)for our test cases and call create_subnet with this CIDR, which will succed.  Later, other tests can create/delete 10.100.0.0/28, as that subnet is not present.\n\n So I think no need for any change here.","commit_id":"1d2c52dc47a28d61ce83a62756cb09d84f846efb"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"c9adf40ddecfa835eb69d575b93bd2b16d9ac09e","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        subnet_cidr \u003d list(cidr.subnet(mask_bits))[-1]"},{"line_number":112,"context_line":"        gateway_ip \u003d str(netaddr.IPAddress(subnet_cidr) + 1)"},{"line_number":113,"context_line":"        return cls.create_subnet(network, gateway\u003dgateway_ip,"},{"line_number":114,"context_line":"                                 cidr\u003dsubnet_cidr, mask_bits\u003dmask_bits)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_bab6a688","line":113,"in_reply_to":"3a961159_8b4e0695","updated":"2014-12-17 16:08:59.000000000","message":"The create_subnet helper method has a try next net logic on failure exists bacause of network drivers which cannot handle overlapping ips, for example with a kernel without network namespace support.\n\nIn forward order it expected to try \n 1. 10.100.0.0/28 \n 2. 10.100.0.16/28\n 3. 10.100.0.32/28\n...\n\nIn reverse order if the available sub-net is 10.100.0.0/16\n 1. 10.100.255.240/28\n 2. 10.100.255.224/28\n 3. 10.100.255.28/28\n n..\n\nThe logic you proposed can work if the 10.100.255.240/28 free, but it will fail if anything for example ctrl+c -ed test suit already created the 10.100.255.240/28.\n\nIf just this test class needs the _create_subnet_with_last_subnet_block it is ok for me,\nbut if we need similar logic other places the create_subnet method itself , should be able to handle the situation (including a 2th..nth tries)","commit_id":"1d2c52dc47a28d61ce83a62756cb09d84f846efb"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"64925a027aa5a2602c38e0a9d3c849b3ad783839","unresolved":false,"context_lines":[{"line_number":150,"context_line":"    def _delete_network(self, network):"},{"line_number":151,"context_line":"        # Deleting network also deletes its subnet if exists"},{"line_number":152,"context_line":"        self.client.delete_network(network[\u0027id\u0027])"},{"line_number":153,"context_line":"        self.networks.pop()"},{"line_number":154,"context_line":"        self.subnets.pop()"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def _create_verify_delete_subnet(self, cidr\u003dNone, mask_bits\u003dNone,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_58d15cfa","line":153,"updated":"2014-12-09 09:40:23.000000000","message":"A random network deleted from the list, in a function which gets a specific network.  (-1)\n\nOption A: delete the popped network, and do not have a network argument.\nOption B: Delete the specified net from the list (set).","commit_id":"1d2c52dc47a28d61ce83a62756cb09d84f846efb"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"76d15e566d0614ae5016f55baf6a9ab6aecc5e7f","unresolved":false,"context_lines":[{"line_number":150,"context_line":"    def _delete_network(self, network):"},{"line_number":151,"context_line":"        # Deleting network also deletes its subnet if exists"},{"line_number":152,"context_line":"        self.client.delete_network(network[\u0027id\u0027])"},{"line_number":153,"context_line":"        self.networks.pop()"},{"line_number":154,"context_line":"        self.subnets.pop()"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def _create_verify_delete_subnet(self, cidr\u003dNone, mask_bits\u003dNone,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_eedb18eb","line":153,"in_reply_to":"3a961159_58d15cfa","updated":"2014-12-09 16:38:29.000000000","message":"In all our tests in this class, we call create network only once in each test case. In create_network we append the created network to \u0027networks\u0027 list. And the same network(the last added network in the list) will be removed from list in  _delete_network. I have tested this. So I think no need for any change here.","commit_id":"1d2c52dc47a28d61ce83a62756cb09d84f846efb"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"4a2c4307b6d250ce9e0f0b52f9896cb7b6348eb9","unresolved":false,"context_lines":[{"line_number":150,"context_line":"    def _delete_network(self, network):"},{"line_number":151,"context_line":"        # Deleting network also deletes its subnet if exists"},{"line_number":152,"context_line":"        self.client.delete_network(network[\u0027id\u0027])"},{"line_number":153,"context_line":"        self.networks.pop()"},{"line_number":154,"context_line":"        self.subnets.pop()"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def _create_verify_delete_subnet(self, cidr\u003dNone, mask_bits\u003dNone,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_97e36a04","line":153,"in_reply_to":"3a961159_eedb18eb","updated":"2014-12-10 08:32:27.000000000","message":"Thanks afazekas. I will submit new patch with option B.","commit_id":"1d2c52dc47a28d61ce83a62756cb09d84f846efb"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"64925a027aa5a2602c38e0a9d3c849b3ad783839","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        # Deleting network also deletes its subnet if exists"},{"line_number":152,"context_line":"        self.client.delete_network(network[\u0027id\u0027])"},{"line_number":153,"context_line":"        self.networks.pop()"},{"line_number":154,"context_line":"        self.subnets.pop()"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def _create_verify_delete_subnet(self, cidr\u003dNone, mask_bits\u003dNone,"},{"line_number":157,"context_line":"                                     **kwargs):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_78ad3831","line":154,"updated":"2014-12-09 09:40:23.000000000","message":"A network may have multiple subnet.\nIf this is not the case now, at least warning message should be here for further contributors.","commit_id":"1d2c52dc47a28d61ce83a62756cb09d84f846efb"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"76d15e566d0614ae5016f55baf6a9ab6aecc5e7f","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        # Deleting network also deletes its subnet if exists"},{"line_number":152,"context_line":"        self.client.delete_network(network[\u0027id\u0027])"},{"line_number":153,"context_line":"        self.networks.pop()"},{"line_number":154,"context_line":"        self.subnets.pop()"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def _create_verify_delete_subnet(self, cidr\u003dNone, mask_bits\u003dNone,"},{"line_number":157,"context_line":"                                     **kwargs):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_da5b722c","line":154,"in_reply_to":"3a961159_78ad3831","updated":"2014-12-09 16:38:29.000000000","message":"Thanks for the suggestion. \u0027_delete_network\u0027 is called only from tests which create only one network and one subnet. I will change my comment in this function.","commit_id":"1d2c52dc47a28d61ce83a62756cb09d84f846efb"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"4a2c4307b6d250ce9e0f0b52f9896cb7b6348eb9","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        # Deleting network also deletes its subnet if exists"},{"line_number":152,"context_line":"        self.client.delete_network(network[\u0027id\u0027])"},{"line_number":153,"context_line":"        self.networks.pop()"},{"line_number":154,"context_line":"        self.subnets.pop()"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def _create_verify_delete_subnet(self, cidr\u003dNone, mask_bits\u003dNone,"},{"line_number":157,"context_line":"                                     **kwargs):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_37ad569d","line":154,"in_reply_to":"3a961159_da5b722c","updated":"2014-12-10 08:32:27.000000000","message":"Thanks afazekas. Deleting a network will delete all its subnets. So I will check for all subnets in \u0027subnets\u0027 list and remove them from list.","commit_id":"1d2c52dc47a28d61ce83a62756cb09d84f846efb"}]}
