)]}'
{"tempest/api/network/test_networks.py":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"dc6173822b75ff33f40d598111962d834e74efee","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        cls.subnet \u003d cls.create_subnet(cls.network)"},{"line_number":63,"context_line":"        cls.cidr \u003d cls.subnet[\u0027cidr\u0027]"},{"line_number":64,"context_line":"        cls.port \u003d cls.create_port(cls.network)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def _delete_networks_or_subnets_or_ports(self, created_list,"},{"line_number":67,"context_line":"                                             item_to_delete):"},{"line_number":68,"context_line":"        if item_to_delete is \"networks\":"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAASn%2F%2FVMQ%3D","line":65,"updated":"2013-09-06 08:34:49.000000000","message":"Add the subnet and port in different function. Try to avoid the if condition as much as possible in your code. Follow the SRP principle.","commit_id":"aa2ec239d6908d8fb28cfd6e6ae6632de9d99122"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"f845d3e1e4b687cd091e42f1b984e91ed63cd4fe","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        cls.subnet \u003d cls.create_subnet(cls.network)"},{"line_number":63,"context_line":"        cls.cidr \u003d cls.subnet[\u0027cidr\u0027]"},{"line_number":64,"context_line":"        cls.port \u003d cls.create_port(cls.network)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def _delete_networks_or_subnets_or_ports(self, created_list,"},{"line_number":67,"context_line":"                                             item_to_delete):"},{"line_number":68,"context_line":"        if item_to_delete is \"networks\":"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAASn%2F%2FU3A%3D","line":65,"in_reply_to":"AAAASn%2F%2FVMQ%3D","updated":"2013-09-06 10:08:06.000000000","message":"Done","commit_id":"aa2ec239d6908d8fb28cfd6e6ae6632de9d99122"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"dc6173822b75ff33f40d598111962d834e74efee","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        network_names \u003d [rand_name(\u0027network-\u0027), rand_name(\u0027network-\u0027)]"},{"line_number":238,"context_line":"        resp, body \u003d self.client.create_bulk_network(2, network_names)"},{"line_number":239,"context_line":"        created_networks \u003d body[\u0027networks\u0027]"},{"line_number":240,"context_line":"        self.assertEqual(\u0027201\u0027, resp[\u0027status\u0027])"},{"line_number":241,"context_line":"        self.addCleanup(self._delete_networks_or_subnets_or_ports,"},{"line_number":242,"context_line":"                        created_networks, item_to_delete\u003d\"networks\")"},{"line_number":243,"context_line":"        # Asserting that the networks are found in the list after creation"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAASn%2F%2FVLU%3D","line":240,"updated":"2013-09-06 08:34:49.000000000","message":"Undo these changes based on above comment.","commit_id":"aa2ec239d6908d8fb28cfd6e6ae6632de9d99122"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"f845d3e1e4b687cd091e42f1b984e91ed63cd4fe","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        network_names \u003d [rand_name(\u0027network-\u0027), rand_name(\u0027network-\u0027)]"},{"line_number":238,"context_line":"        resp, body \u003d self.client.create_bulk_network(2, network_names)"},{"line_number":239,"context_line":"        created_networks \u003d body[\u0027networks\u0027]"},{"line_number":240,"context_line":"        self.assertEqual(\u0027201\u0027, resp[\u0027status\u0027])"},{"line_number":241,"context_line":"        self.addCleanup(self._delete_networks_or_subnets_or_ports,"},{"line_number":242,"context_line":"                        created_networks, item_to_delete\u003d\"networks\")"},{"line_number":243,"context_line":"        # Asserting that the networks are found in the list after creation"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAASn%2F%2FU28%3D","line":240,"in_reply_to":"AAAASn%2F%2FVLU%3D","updated":"2013-09-06 10:08:06.000000000","message":"Done","commit_id":"aa2ec239d6908d8fb28cfd6e6ae6632de9d99122"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"0b09bfa9d0705d82aa99ead7a9ab9f4d6473c203","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            self.assertEqual(204, resp.status)"},{"line_number":82,"context_line":"        # Asserting that the subnets are not found in the list after deletion"},{"line_number":83,"context_line":"        resp, body \u003d self.client.list_subnets()"},{"line_number":84,"context_line":"        subnets_list \u003d list()"},{"line_number":85,"context_line":"        for subnet in body[\u0027subnets\u0027]:"},{"line_number":86,"context_line":"            subnets_list.append(subnet[\u0027id\u0027])"},{"line_number":87,"context_line":"        for n in created_subnets:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2FP%2FE%3D","line":84,"updated":"2013-09-09 09:30:39.000000000","message":"List comprehensions might be simpler.","commit_id":"23611ca8b8ec51bddd8e19815768fee6cc95f9c0"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"16cfdc5d77476efdb821c756d6dcf0227e088648","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            self.assertEqual(204, resp.status)"},{"line_number":82,"context_line":"        # Asserting that the subnets are not found in the list after deletion"},{"line_number":83,"context_line":"        resp, body \u003d self.client.list_subnets()"},{"line_number":84,"context_line":"        subnets_list \u003d list()"},{"line_number":85,"context_line":"        for subnet in body[\u0027subnets\u0027]:"},{"line_number":86,"context_line":"            subnets_list.append(subnet[\u0027id\u0027])"},{"line_number":87,"context_line":"        for n in created_subnets:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2FP68%3D","line":84,"in_reply_to":"AAAASn%2F%2FP%2FE%3D","updated":"2013-09-09 09:48:28.000000000","message":"I followed _delete_networks function for this there is networks_list variable.","commit_id":"23611ca8b8ec51bddd8e19815768fee6cc95f9c0"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"0b09bfa9d0705d82aa99ead7a9ab9f4d6473c203","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            self.assertEqual(204, resp.status)"},{"line_number":94,"context_line":"        # Asserting that the ports are not found in the list after deletion"},{"line_number":95,"context_line":"        resp, body \u003d self.client.list_ports()"},{"line_number":96,"context_line":"        ports_list \u003d list()"},{"line_number":97,"context_line":"        for port in body[\u0027ports\u0027]:"},{"line_number":98,"context_line":"            ports_list.append(port[\u0027id\u0027])"},{"line_number":99,"context_line":"        for n in created_ports:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2FP%2B4%3D","line":96,"updated":"2013-09-09 09:30:39.000000000","message":"List comprehensions might be simpler.","commit_id":"23611ca8b8ec51bddd8e19815768fee6cc95f9c0"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"16cfdc5d77476efdb821c756d6dcf0227e088648","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            self.assertEqual(204, resp.status)"},{"line_number":94,"context_line":"        # Asserting that the ports are not found in the list after deletion"},{"line_number":95,"context_line":"        resp, body \u003d self.client.list_ports()"},{"line_number":96,"context_line":"        ports_list \u003d list()"},{"line_number":97,"context_line":"        for port in body[\u0027ports\u0027]:"},{"line_number":98,"context_line":"            ports_list.append(port[\u0027id\u0027])"},{"line_number":99,"context_line":"        for n in created_ports:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2FP64%3D","line":96,"in_reply_to":"AAAASn%2F%2FP%2B4%3D","updated":"2013-09-09 09:48:28.000000000","message":"same as above","commit_id":"23611ca8b8ec51bddd8e19815768fee6cc95f9c0"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"aa434221486dd76034611ba350c37021d1c82f55","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        cidrs \u003d []"},{"line_number":258,"context_line":"        for subnet_cidr in cidr.subnet(mask_bits):"},{"line_number":259,"context_line":"            cidrs.append(subnet_cidr)"},{"line_number":260,"context_line":"        resp, body \u003d self.client.create_bulk_subnet(self.network[\u0027id\u0027],"},{"line_number":261,"context_line":"                                                    cidrs, ip_version\u003d4,"},{"line_number":262,"context_line":"                                                    count\u003d2)"},{"line_number":263,"context_line":"        created_subnets \u003d body[\u0027subnets\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAASn%2F%2FMRs%3D","line":260,"updated":"2013-09-10 09:15:27.000000000","message":"Most of the logic from the .create_bulk_subnet should be moved to the test case.","commit_id":"f5a751db9bfdcf96e021d362642a5415f9a5ecfe"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"4563e64d913c7db9a92b4a3b4c16ae8ad6191897","unresolved":false,"context_lines":[{"line_number":264,"context_line":"        for i in range(len(networks)):"},{"line_number":265,"context_line":"            names.append(rand_name(\u0027subnet-\u0027))"},{"line_number":266,"context_line":"        subnet_list \u003d []"},{"line_number":267,"context_line":"#        ip_version \u003d [4, 6]"},{"line_number":268,"context_line":"#As there is no IPv6 support so I am taking IPv4 for both"},{"line_number":269,"context_line":"        ip_version \u003d [4, 4]"},{"line_number":270,"context_line":"        for i in range(len(names)):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAASn%2F%2FIxQ%3D","line":267,"updated":"2013-09-11 10:08:07.000000000","message":"Normally we do net keep real code in comment.\n\nIt would also need ipv6 cidr instead of v4","commit_id":"6aa512d7d283d3a517b43b3ad272c08e4d0d4fb0"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"4563e64d913c7db9a92b4a3b4c16ae8ad6191897","unresolved":false,"context_lines":[{"line_number":265,"context_line":"            names.append(rand_name(\u0027subnet-\u0027))"},{"line_number":266,"context_line":"        subnet_list \u003d []"},{"line_number":267,"context_line":"#        ip_version \u003d [4, 6]"},{"line_number":268,"context_line":"#As there is no IPv6 support so I am taking IPv4 for both"},{"line_number":269,"context_line":"        ip_version \u003d [4, 4]"},{"line_number":270,"context_line":"        for i in range(len(names)):"},{"line_number":271,"context_line":"            p1 \u003d {"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAASn%2F%2FIxM%3D","line":268,"updated":"2013-09-11 10:08:07.000000000","message":"Please use space after \u0027#\u0027 , and move the comment right.\n\nYou also can use # NOTE(nickname): format for this comment.","commit_id":"6aa512d7d283d3a517b43b3ad272c08e4d0d4fb0"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"4563e64d913c7db9a92b4a3b4c16ae8ad6191897","unresolved":false,"context_lines":[{"line_number":283,"context_line":"        resp, body \u003d self.client.list_subnets()"},{"line_number":284,"context_line":"        subnets_list \u003d list()"},{"line_number":285,"context_line":"        for subnet in body[\u0027subnets\u0027]:"},{"line_number":286,"context_line":"            subnets_list.append(subnet[\u0027id\u0027])"},{"line_number":287,"context_line":"        for n in created_subnets:"},{"line_number":288,"context_line":"            self.assertIsNotNone(n[\u0027id\u0027])"},{"line_number":289,"context_line":"            self.assertIn(n[\u0027id\u0027], subnets_list)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAASn%2F%2FIxA%3D","line":286,"updated":"2013-09-11 10:08:07.000000000","message":"verifying the additional attributes would be great addition.","commit_id":"6aa512d7d283d3a517b43b3ad272c08e4d0d4fb0"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"cca15cd93a8ed7740dab44f0b857a79b4dcb5cb8","unresolved":false,"context_lines":[{"line_number":264,"context_line":"        for i in range(len(networks)):"},{"line_number":265,"context_line":"            names.append(rand_name(\u0027subnet-\u0027))"},{"line_number":266,"context_line":"        subnet_list \u003d []"},{"line_number":267,"context_line":"# TODO(raies): \"for IPv6, version list [4, 6] will be used."},{"line_number":268,"context_line":"# and cidr for IPv6 will be of IPv6\""},{"line_number":269,"context_line":"        ip_version \u003d [4, 4]"},{"line_number":270,"context_line":"        for i in range(len(names)):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAASn%2F%2FInU%3D","line":267,"updated":"2013-09-11 11:41:15.000000000","message":"Can you add 8 space at the beginning of these comment lines ?","commit_id":"7c93184aa318d1675f2c095cf8c9d8690a2dee82"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"c0d32f74053c4851d48aa1c19c1e168ab9c671f4","unresolved":false,"context_lines":[{"line_number":264,"context_line":"        for i in range(len(networks)):"},{"line_number":265,"context_line":"            names.append(rand_name(\u0027subnet-\u0027))"},{"line_number":266,"context_line":"        subnet_list \u003d []"},{"line_number":267,"context_line":"# TODO(raies): \"for IPv6, version list [4, 6] will be used."},{"line_number":268,"context_line":"# and cidr for IPv6 will be of IPv6\""},{"line_number":269,"context_line":"        ip_version \u003d [4, 4]"},{"line_number":270,"context_line":"        for i in range(len(names)):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAASn%2F%2FImA%3D","line":267,"in_reply_to":"AAAASn%2F%2FInU%3D","updated":"2013-09-11 11:46:48.000000000","message":"Done","commit_id":"7c93184aa318d1675f2c095cf8c9d8690a2dee82"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"cca15cd93a8ed7740dab44f0b857a79b4dcb5cb8","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        resp, body \u003d self.client.create_bulk_subnet(subnet_list)"},{"line_number":279,"context_line":"        created_subnets \u003d body[\u0027subnets\u0027]"},{"line_number":280,"context_line":"        self.assertEqual(\u0027201\u0027, resp[\u0027status\u0027])"},{"line_number":281,"context_line":"        self.addCleanup(self._delete_subnets, created_subnets)"},{"line_number":282,"context_line":"        # Asserting that the subnets are found in the list after creation"},{"line_number":283,"context_line":"        resp, body \u003d self.client.list_subnets()"},{"line_number":284,"context_line":"        subnets_list \u003d list()"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAASn%2F%2FInI%3D","line":281,"updated":"2013-09-11 11:41:15.000000000","message":"Can you switch self.assertEqual and the self.addCleanup order ?","commit_id":"7c93184aa318d1675f2c095cf8c9d8690a2dee82"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"c0d32f74053c4851d48aa1c19c1e168ab9c671f4","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        resp, body \u003d self.client.create_bulk_subnet(subnet_list)"},{"line_number":279,"context_line":"        created_subnets \u003d body[\u0027subnets\u0027]"},{"line_number":280,"context_line":"        self.assertEqual(\u0027201\u0027, resp[\u0027status\u0027])"},{"line_number":281,"context_line":"        self.addCleanup(self._delete_subnets, created_subnets)"},{"line_number":282,"context_line":"        # Asserting that the subnets are found in the list after creation"},{"line_number":283,"context_line":"        resp, body \u003d self.client.list_subnets()"},{"line_number":284,"context_line":"        subnets_list \u003d list()"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAASn%2F%2FIl8%3D","line":281,"in_reply_to":"AAAASn%2F%2FInI%3D","updated":"2013-09-11 11:46:48.000000000","message":"Done","commit_id":"7c93184aa318d1675f2c095cf8c9d8690a2dee82"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"cca15cd93a8ed7740dab44f0b857a79b4dcb5cb8","unresolved":false,"context_lines":[{"line_number":306,"context_line":"            port_list.append(p1)"},{"line_number":307,"context_line":"        resp, body \u003d self.client.create_bulk_port(port_list)"},{"line_number":308,"context_line":"        created_ports \u003d body[\u0027ports\u0027]"},{"line_number":309,"context_line":"        self.assertEqual(\u0027201\u0027, resp[\u0027status\u0027])"},{"line_number":310,"context_line":"        self.addCleanup(self._delete_ports, created_ports)"},{"line_number":311,"context_line":"        # Asserting that the ports are found in the list after creation"},{"line_number":312,"context_line":"        resp, body \u003d self.client.list_ports()"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAASn%2F%2FInE%3D","line":309,"updated":"2013-09-11 11:41:15.000000000","message":"Can you switch self.assertEqual and the self.addCleanup order ?","commit_id":"7c93184aa318d1675f2c095cf8c9d8690a2dee82"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"449a705f9d25d6796e9135ab6f307f1d12d223f2","unresolved":false,"context_lines":[{"line_number":285,"context_line":"        subnets_list \u003d list()"},{"line_number":286,"context_line":"        for subnet in body[\u0027subnets\u0027]:"},{"line_number":287,"context_line":"            subnets_list.append(subnet[\u0027id\u0027])"},{"line_number":288,"context_line":"        for n in created_subnets:"},{"line_number":289,"context_line":"            self.assertIsNotNone(n[\u0027id\u0027])"},{"line_number":290,"context_line":"            self.assertIn(n[\u0027id\u0027], subnets_list)"},{"line_number":291,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAASn%2F%2FFpA%3D","line":288,"updated":"2013-09-12 07:37:11.000000000","message":"I wonder wouldn\u0027t be better to verify the cidr, name, network_id and ip_version when reading back the list.","commit_id":"487fba6dee3b23bda63400c5ede63c9b98b66013"}],"tempest/services/network/json/network_client.py":[{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"0b09bfa9d0705d82aa99ead7a9ab9f4d6473c203","unresolved":false,"context_lines":[{"line_number":322,"context_line":"        body \u003d json.loads(body)"},{"line_number":323,"context_line":"        return resp, body"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def create_bulk_subnet(self, net_id, list_cidr, count, names):"},{"line_number":326,"context_line":"        subnet_list \u003d list()"},{"line_number":327,"context_line":"        for i in range(count):"},{"line_number":328,"context_line":"            subnet_list.append({\"name\": names[i],"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2FP%2Bo%3D","line":325,"updated":"2013-09-09 09:30:39.000000000","message":"Is the name an optional parameter ?","commit_id":"23611ca8b8ec51bddd8e19815768fee6cc95f9c0"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"89f0360d1635e4979c0b3a2666e723bb498ca3e1","unresolved":false,"context_lines":[{"line_number":322,"context_line":"        body \u003d json.loads(body)"},{"line_number":323,"context_line":"        return resp, body"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def create_bulk_subnet(self, net_id, list_cidr, count, names):"},{"line_number":326,"context_line":"        subnet_list \u003d list()"},{"line_number":327,"context_line":"        for i in range(count):"},{"line_number":328,"context_line":"            subnet_list.append({\"name\": names[i],"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2FMmM%3D","line":325,"in_reply_to":"AAAASn%2F%2FOpg%3D","updated":"2013-09-10 08:44:15.000000000","message":"I have applied in patch3 the changes.\nBut instead of taking list of networks i have just taken single network, just because I wanted to avoid to merge bulk network creation test case with it as some other person has implemented that.","commit_id":"23611ca8b8ec51bddd8e19815768fee6cc95f9c0"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"16cfdc5d77476efdb821c756d6dcf0227e088648","unresolved":false,"context_lines":[{"line_number":322,"context_line":"        body \u003d json.loads(body)"},{"line_number":323,"context_line":"        return resp, body"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def create_bulk_subnet(self, net_id, list_cidr, count, names):"},{"line_number":326,"context_line":"        subnet_list \u003d list()"},{"line_number":327,"context_line":"        for i in range(count):"},{"line_number":328,"context_line":"            subnet_list.append({\"name\": names[i],"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2FP7k%3D","line":325,"in_reply_to":"AAAASn%2F%2FP%2Bo%3D","updated":"2013-09-09 09:48:28.000000000","message":"No, name are required parameter.","commit_id":"23611ca8b8ec51bddd8e19815768fee6cc95f9c0"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"96136666f966203097dee665ebf985752f47d724","unresolved":false,"context_lines":[{"line_number":322,"context_line":"        body \u003d json.loads(body)"},{"line_number":323,"context_line":"        return resp, body"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def create_bulk_subnet(self, net_id, list_cidr, count, names):"},{"line_number":326,"context_line":"        subnet_list \u003d list()"},{"line_number":327,"context_line":"        for i in range(count):"},{"line_number":328,"context_line":"            subnet_list.append({\"name\": names[i],"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2FOpg%3D","line":325,"in_reply_to":"AAAASn%2F%2FP7k%3D","updated":"2013-09-09 17:03:07.000000000","message":"Per the Neutron API Version 2 specification, there are only two mandatory parameters in a subnet creation: network and cidr. All the other parameters are optional (please see https://wiki.openstack.org/wiki/Neutron/APIv2-specification#Create_Subnet).\n\nAlso, the bulk operation can create subnets attached to different nets. The example in the API specification (https://wiki.openstack.org/wiki/Neutron/APIv2-specification#Bulk_version_2) is not a good one because uses the same net id for the two subnets. But the example given for port bulk creation (https://wiki.openstack.org/wiki/Neutron/APIv2-specification#Bulk_version_3) shows you what is also possible for subnets.\n\nAs a consequence of the previous two points, I think this method should be specified as something like:\n\ndef create_bulk_subnet(self, networks, cidrs, names\u003dNone, **kwargs):\n\nwhere networks, cidrs, names and all the items in kwargs should be lists of the same length \n\nSince the networks and cidrs lists are mandatory, you don\u0027t need a count argument","commit_id":"23611ca8b8ec51bddd8e19815768fee6cc95f9c0"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"96136666f966203097dee665ebf985752f47d724","unresolved":false,"context_lines":[{"line_number":327,"context_line":"        for i in range(count):"},{"line_number":328,"context_line":"            subnet_list.append({\"name\": names[i],"},{"line_number":329,"context_line":"                                \"network_id\": net_id,"},{"line_number":330,"context_line":"                                \"cidr\": str(list_cidr[(i + 1)]),"},{"line_number":331,"context_line":"                                \"ip_version\": 4"},{"line_number":332,"context_line":"                                })"},{"line_number":333,"context_line":"        post_body \u003d {\u0027subnets\u0027: subnet_list}"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2FOpU%3D","line":330,"updated":"2013-09-09 17:03:07.000000000","message":"I don\u0027t think this is correct. It should be list_cidr(i)","commit_id":"23611ca8b8ec51bddd8e19815768fee6cc95f9c0"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"89f0360d1635e4979c0b3a2666e723bb498ca3e1","unresolved":false,"context_lines":[{"line_number":327,"context_line":"        for i in range(count):"},{"line_number":328,"context_line":"            subnet_list.append({\"name\": names[i],"},{"line_number":329,"context_line":"                                \"network_id\": net_id,"},{"line_number":330,"context_line":"                                \"cidr\": str(list_cidr[(i + 1)]),"},{"line_number":331,"context_line":"                                \"ip_version\": 4"},{"line_number":332,"context_line":"                                })"},{"line_number":333,"context_line":"        post_body \u003d {\u0027subnets\u0027: subnet_list}"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2FMmc%3D","line":330,"in_reply_to":"AAAASn%2F%2FOpU%3D","updated":"2013-09-10 08:44:15.000000000","message":"when cidr(i) then error is there showing that overlapping subnet.\nwhen cidr(i+1) no error, thats why i+1 is used","commit_id":"23611ca8b8ec51bddd8e19815768fee6cc95f9c0"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"96136666f966203097dee665ebf985752f47d724","unresolved":false,"context_lines":[{"line_number":328,"context_line":"            subnet_list.append({\"name\": names[i],"},{"line_number":329,"context_line":"                                \"network_id\": net_id,"},{"line_number":330,"context_line":"                                \"cidr\": str(list_cidr[(i + 1)]),"},{"line_number":331,"context_line":"                                \"ip_version\": 4"},{"line_number":332,"context_line":"                                })"},{"line_number":333,"context_line":"        post_body \u003d {\u0027subnets\u0027: subnet_list}"},{"line_number":334,"context_line":"        body \u003d json.dumps(post_body)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2FOpE%3D","line":331,"updated":"2013-09-09 17:03:07.000000000","message":"ip_version 4 or 6 should be specified by the caller","commit_id":"23611ca8b8ec51bddd8e19815768fee6cc95f9c0"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"89f0360d1635e4979c0b3a2666e723bb498ca3e1","unresolved":false,"context_lines":[{"line_number":328,"context_line":"            subnet_list.append({\"name\": names[i],"},{"line_number":329,"context_line":"                                \"network_id\": net_id,"},{"line_number":330,"context_line":"                                \"cidr\": str(list_cidr[(i + 1)]),"},{"line_number":331,"context_line":"                                \"ip_version\": 4"},{"line_number":332,"context_line":"                                })"},{"line_number":333,"context_line":"        post_body \u003d {\u0027subnets\u0027: subnet_list}"},{"line_number":334,"context_line":"        body \u003d json.dumps(post_body)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2FMmY%3D","line":331,"in_reply_to":"AAAASn%2F%2FOpE%3D","updated":"2013-09-10 08:44:15.000000000","message":"Done","commit_id":"23611ca8b8ec51bddd8e19815768fee6cc95f9c0"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"96136666f966203097dee665ebf985752f47d724","unresolved":false,"context_lines":[{"line_number":337,"context_line":"        body \u003d json.loads(body)"},{"line_number":338,"context_line":"        return resp, body"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"    def create_bulk_port(self, net_id, count, names):"},{"line_number":341,"context_line":"        port_list \u003d list()"},{"line_number":342,"context_line":"        for i in range(count):"},{"line_number":343,"context_line":"            port_list.append({\"name\": names[i],"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2FOng%3D","line":340,"updated":"2013-09-09 17:03:07.000000000","message":"Per the Neutron API Version 2 specification (https://wiki.openstack.org/wiki/Neutron/APIv2-specification#Create_Port), there is only one mandatory parameter in the port create operation: network id. \n\nAs indicated above for subnet bulk creation, the ports created in bulk can be attached to different networks. \n\nFor these reasons, I think this method should be specified as something like:\n\ndef create_bulk_port(self, networks, names\u003dNone, **kwargs):\n\nwhere networks, names and all the items in kwargs should be lists of the same length\n\nAgain, you don\u0027t need a count argument","commit_id":"23611ca8b8ec51bddd8e19815768fee6cc95f9c0"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"89f0360d1635e4979c0b3a2666e723bb498ca3e1","unresolved":false,"context_lines":[{"line_number":337,"context_line":"        body \u003d json.loads(body)"},{"line_number":338,"context_line":"        return resp, body"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"    def create_bulk_port(self, net_id, count, names):"},{"line_number":341,"context_line":"        port_list \u003d list()"},{"line_number":342,"context_line":"        for i in range(count):"},{"line_number":343,"context_line":"            port_list.append({\"name\": names[i],"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2FMmQ%3D","line":340,"in_reply_to":"AAAASn%2F%2FOng%3D","updated":"2013-09-10 08:44:15.000000000","message":"Done","commit_id":"23611ca8b8ec51bddd8e19815768fee6cc95f9c0"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"aa434221486dd76034611ba350c37021d1c82f55","unresolved":false,"context_lines":[{"line_number":329,"context_line":"            count \u003d kwargs.get(\"count\")"},{"line_number":330,"context_line":"            del kwargs[\u0027count\u0027]"},{"line_number":331,"context_line":"        else:"},{"line_number":332,"context_line":"            count \u003d 2"},{"line_number":333,"context_line":"        subnet_names \u003d []"},{"line_number":334,"context_line":"        for i in range(count):"},{"line_number":335,"context_line":"            subnet_names.append(rand_name(\u0027subnet-\u0027))"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAASn%2F%2FMSQ%3D","line":332,"updated":"2013-09-10 09:15:27.000000000","message":"cidr is array and it has length.","commit_id":"f5a751db9bfdcf96e021d362642a5415f9a5ecfe"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"aa434221486dd76034611ba350c37021d1c82f55","unresolved":false,"context_lines":[{"line_number":332,"context_line":"            count \u003d 2"},{"line_number":333,"context_line":"        subnet_names \u003d []"},{"line_number":334,"context_line":"        for i in range(count):"},{"line_number":335,"context_line":"            subnet_names.append(rand_name(\u0027subnet-\u0027))"},{"line_number":336,"context_line":"        for i in range(count):"},{"line_number":337,"context_line":"            p1 \u003d {"},{"line_number":338,"context_line":"                \u0027subnet\u0027: {"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAASn%2F%2FMSI%3D","line":335,"updated":"2013-09-10 09:15:27.000000000","message":"The names should be controlled by the caller.","commit_id":"f5a751db9bfdcf96e021d362642a5415f9a5ecfe"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"aa434221486dd76034611ba350c37021d1c82f55","unresolved":false,"context_lines":[{"line_number":336,"context_line":"        for i in range(count):"},{"line_number":337,"context_line":"            p1 \u003d {"},{"line_number":338,"context_line":"                \u0027subnet\u0027: {"},{"line_number":339,"context_line":"                    \u0027network_id\u0027: net_id,"},{"line_number":340,"context_line":"                    \u0027cidr\u0027: str(cidrs[(i + 1)]),"},{"line_number":341,"context_line":"                    \u0027name\u0027: subnet_names[i],"},{"line_number":342,"context_line":"                }"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAASn%2F%2FMSA%3D","line":339,"updated":"2013-09-10 09:15:27.000000000","message":"different network_id are possible in bulk request.","commit_id":"f5a751db9bfdcf96e021d362642a5415f9a5ecfe"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"aa434221486dd76034611ba350c37021d1c82f55","unresolved":false,"context_lines":[{"line_number":344,"context_line":"            for key, val in kwargs.items():"},{"line_number":345,"context_line":"                p1[\u0027subnet\u0027][key] \u003d val"},{"line_number":346,"context_line":"            subnet_list.append(p1)"},{"line_number":347,"context_line":"        post_body \u003d {\u0027subnets\u0027: subnet_list}"},{"line_number":348,"context_line":"        body \u003d json.dumps(post_body)"},{"line_number":349,"context_line":"        uri \u003d \u0027%s/subnets\u0027 % (self.uri_prefix)"},{"line_number":350,"context_line":"        resp, body \u003d self.post(uri, headers\u003dself.headers, body\u003dbody)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAASn%2F%2FMSY%3D","line":347,"updated":"2013-09-10 09:15:27.000000000","message":"subnet_list should the create_bulk_subnet(self, sub_net_list) \u0027s argument.","commit_id":"f5a751db9bfdcf96e021d362642a5415f9a5ecfe"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"aa434221486dd76034611ba350c37021d1c82f55","unresolved":false,"context_lines":[{"line_number":351,"context_line":"        body \u003d json.loads(body)"},{"line_number":352,"context_line":"        return resp, body"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"    def create_bulk_port(self, net_id, **kwargs):"},{"line_number":355,"context_line":"        port_list \u003d list()"},{"line_number":356,"context_line":"        if \u0027count\u0027 in kwargs:"},{"line_number":357,"context_line":"            count \u003d kwargs.get(\"count\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAASn%2F%2FMR8%3D","line":354,"updated":"2013-09-10 09:15:27.000000000","message":"def create_bulk_port(self, port_list)","commit_id":"f5a751db9bfdcf96e021d362642a5415f9a5ecfe"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"dfed18b94436d45838007545e5f77ea6b0be8adf","unresolved":false,"context_lines":[{"line_number":322,"context_line":"        body \u003d json.loads(body)"},{"line_number":323,"context_line":"        return resp, body"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def create_bulk_subnet(self, networks, cidrs, names\u003dNone, **kwargs):"},{"line_number":326,"context_line":"        subnet_list \u003d []"},{"line_number":327,"context_line":"        for i in range(len(names)):"},{"line_number":328,"context_line":"            p1 \u003d {"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAASn%2F%2FK7s%3D","line":325,"updated":"2013-09-10 17:21:44.000000000","message":"if names is None, as it is in the default here, then line 327 will raise an exception (since NoneType has no attribute len). I think a cleaner call interface here would be to pass in a single \"networks\" parameter which is a list of dicts describing the networks to be created. Same problem exists below...","commit_id":"aea40bdfeb1ce0f3c722f94ea299e5518329bdf5"},{"author":{"_account_id":7872,"name":"Marc Koderer","email":"marc@koderer.com","username":"mkoderer"},"change_message_id":"96f6423ac691cb0f1ac775512330d51900d48023","unresolved":false,"context_lines":[{"line_number":370,"context_line":"        for key, value in kwargs.iteritems():"},{"line_number":371,"context_line":"            post_body[\u0027security_group_rule\u0027][str(key)] \u003d value"},{"line_number":372,"context_line":"        body \u003d json.dumps(post_body)"},{"line_number":373,"context_line":"        uri \u003d \u0027%s/security-group-rules\u0027 % (self.uri_prefix)"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"    def create_bulk_subnet(self, subnet_list):"},{"line_number":376,"context_line":"        post_body \u003d {\u0027subnets\u0027: subnet_list}"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAASn%2F%2FCR8%3D","line":373,"updated":"2013-09-13 05:42:20.000000000","message":"Your merge seems to delete the body of this function, please check again.","commit_id":"427f72fd46b5d0c4dea21d70dcc3df429c290ffd"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"c4ff8e3697b3d5700a0cfefb50c4e875f1b282a6","unresolved":false,"context_lines":[{"line_number":370,"context_line":"        for key, value in kwargs.iteritems():"},{"line_number":371,"context_line":"            post_body[\u0027security_group_rule\u0027][str(key)] \u003d value"},{"line_number":372,"context_line":"        body \u003d json.dumps(post_body)"},{"line_number":373,"context_line":"        uri \u003d \u0027%s/security-group-rules\u0027 % (self.uri_prefix)"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"    def create_bulk_subnet(self, subnet_list):"},{"line_number":376,"context_line":"        post_body \u003d {\u0027subnets\u0027: subnet_list}"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAASn%2F%2FCBo%3D","line":373,"in_reply_to":"AAAASn%2F%2FCR8%3D","updated":"2013-09-13 06:13:23.000000000","message":"Done","commit_id":"427f72fd46b5d0c4dea21d70dcc3df429c290ffd"}],"tempest/services/network/xml/network_client.py":[{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"0b09bfa9d0705d82aa99ead7a9ab9f4d6473c203","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        subnets \u003d {\"subnets\": subnets}"},{"line_number":181,"context_line":"        return resp, subnets"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def create_bulk_port(self, net_id, count, names):"},{"line_number":184,"context_line":"        uri \u003d \u0027%s/ports\u0027 % (self.uri_prefix)"},{"line_number":185,"context_line":"        post_body \u003d Element(\"ports\")"},{"line_number":186,"context_line":"        for i in range(count):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2FP%2Bk%3D","line":183,"updated":"2013-09-09 09:30:39.000000000","message":"is the name an optional parameter ?","commit_id":"23611ca8b8ec51bddd8e19815768fee6cc95f9c0"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"16cfdc5d77476efdb821c756d6dcf0227e088648","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        subnets \u003d {\"subnets\": subnets}"},{"line_number":181,"context_line":"        return resp, subnets"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def create_bulk_port(self, net_id, count, names):"},{"line_number":184,"context_line":"        uri \u003d \u0027%s/ports\u0027 % (self.uri_prefix)"},{"line_number":185,"context_line":"        post_body \u003d Element(\"ports\")"},{"line_number":186,"context_line":"        for i in range(count):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2FP7c%3D","line":183,"in_reply_to":"AAAASn%2F%2FP%2Bk%3D","updated":"2013-09-09 09:48:28.000000000","message":"No, it is required parameter.","commit_id":"23611ca8b8ec51bddd8e19815768fee6cc95f9c0"},{"author":{"_account_id":8205,"name":"Mh Raies","email":"raiesmh08@gmail.com","username":"raiesmh08"},"change_message_id":"89f0360d1635e4979c0b3a2666e723bb498ca3e1","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        subnets \u003d {\"subnets\": subnets}"},{"line_number":181,"context_line":"        return resp, subnets"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def create_bulk_port(self, net_id, count, names):"},{"line_number":184,"context_line":"        uri \u003d \u0027%s/ports\u0027 % (self.uri_prefix)"},{"line_number":185,"context_line":"        post_body \u003d Element(\"ports\")"},{"line_number":186,"context_line":"        for i in range(count):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2FMmI%3D","line":183,"in_reply_to":"AAAASn%2F%2FP7c%3D","updated":"2013-09-10 08:44:15.000000000","message":"I have incorporated in different way please check patch3","commit_id":"23611ca8b8ec51bddd8e19815768fee6cc95f9c0"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"aa434221486dd76034611ba350c37021d1c82f55","unresolved":false,"context_lines":[{"line_number":162,"context_line":"        body \u003d _root_tag_fetcher_and_xml_to_json_parse(body)"},{"line_number":163,"context_line":"        return resp, body"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def create_bulk_subnet(self, net_id, cidrs, **kwargs):"},{"line_number":166,"context_line":"        uri \u003d \u0027%s/subnets\u0027 % (self.uri_prefix)"},{"line_number":167,"context_line":"        post_body \u003d Element(\"subnets\")"},{"line_number":168,"context_line":"        if \u0027count\u0027 in kwargs:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAASn%2F%2FMR4%3D","line":165,"updated":"2013-09-10 09:15:27.000000000","message":"this methos should use the same subnet_list argument as the json, and convert it to xml Elements.","commit_id":"f5a751db9bfdcf96e021d362642a5415f9a5ecfe"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"aa434221486dd76034611ba350c37021d1c82f55","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        subnets \u003d {\"subnets\": subnets}"},{"line_number":190,"context_line":"        return resp, subnets"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    def create_bulk_port(self, net_id, **kwargs):"},{"line_number":193,"context_line":"        uri \u003d \u0027%s/ports\u0027 % (self.uri_prefix)"},{"line_number":194,"context_line":"        post_body \u003d Element(\"ports\")"},{"line_number":195,"context_line":"        if \u0027count\u0027 in kwargs:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAASn%2F%2FMR0%3D","line":192,"updated":"2013-09-10 09:15:27.000000000","message":"This method should use the same port_list argument as the json, and convert it to xml Elements.","commit_id":"f5a751db9bfdcf96e021d362642a5415f9a5ecfe"},{"author":{"_account_id":5803,"name":"Attila Fazekas","email":"afazekas@redhat.com","username":"afazekas"},"change_message_id":"4563e64d913c7db9a92b4a3b4c16ae8ad6191897","unresolved":false,"context_lines":[{"line_number":164,"context_line":"    def create_bulk_subnet(self, subnet_list):"},{"line_number":165,"context_line":"        uri \u003d \u0027%s/subnets\u0027 % (self.uri_prefix)"},{"line_number":166,"context_line":"        post_body \u003d Element(\"subnets\")"},{"line_number":167,"context_line":"#        p1 \u003d Element(\"subnet\")"},{"line_number":168,"context_line":"        for i in range(len(subnet_list)):"},{"line_number":169,"context_line":"            v \u003d subnet_list[i]"},{"line_number":170,"context_line":"            p1 \u003d Element(\"subnet\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAASn%2F%2FIw4%3D","line":167,"updated":"2013-09-11 10:08:07.000000000","message":"This comment line is unnecessary.","commit_id":"6aa512d7d283d3a517b43b3ad272c08e4d0d4fb0"}]}
