)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"d915558c6d17e097af74be379d56163ffe9432a8","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Optimize validate_networks"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"\u0027list_ports\u0027 is expensive, so if neutron port quotas is -1,"},{"line_number":10,"context_line":"it should not check the free ports."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Id815059695c787c86fd36888a531d5f8fefe5a80"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3acd31a7_4449c830","line":10,"updated":"2015-04-30 16:31:25.000000000","message":"The commit message is actually not true anymore. Please make sure it describes what the patch does now.","commit_id":"fcebbbaa5693743fbeab2ce2f7be6ffdd13130a8"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"9e05b11bab5467fd0d23452ab1cbe664220e33e5","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Optimize validate_networks"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"\u0027list_ports\u0027 is expensive, so if neutron port quotas is -1,"},{"line_number":10,"context_line":"it should not check the free ports."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Id815059695c787c86fd36888a531d5f8fefe5a80"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3acd31a7_3a83559a","line":10,"in_reply_to":"3acd31a7_4449c830","updated":"2015-05-04 01:17:10.000000000","message":"agree, thanks very much for your review!","commit_id":"fcebbbaa5693743fbeab2ce2f7be6ffdd13130a8"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2e9286eed17f2e5fb48b8f1d2ec40d3c2fe803a9","unresolved":false,"context_lines":[{"line_number":9,"context_line":"when nova use neutronv2 api, it can\u0027t check port\u0027s quota exactly in some"},{"line_number":10,"context_line":"cases,the previous checking port\u0027s quota method is expensive when a tenant"},{"line_number":11,"context_line":"has a mas of ports, so this patch remove the port\u0027s quota check."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Id815059695c787c86fd36888a531d5f8fefe5a80"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3acd31a7_40973f48","line":12,"updated":"2015-05-04 07:24:11.000000000","message":"Please see commit https://github.com/openstack/nova/commit/1d9a0a620d78ab54f7a3da61b803a97cdbdd01f2\nThis added that original support\n\nI am in favor of the original approach and the fact that you did not query the quota\u0027s","commit_id":"6ac826a111eb6ed53456717a80798a005bf2beec"}],"nova/network/neutronv2/api.py":[{"author":{"_account_id":9775,"name":"Sudipta Biswas","email":"sbiswas7@in.ibm.com","username":"sudswas"},"change_message_id":"164d199bc3c9fb58b7a6b9e8a59653f13f5ed862","unresolved":false,"context_lines":[{"line_number":1094,"context_line":"                # Unlimited Port Quota"},{"line_number":1095,"context_line":"                return num_instances"},{"line_number":1096,"context_line":"            else:"},{"line_number":1097,"context_line":"                ports \u003d neutron.list_ports("},{"line_number":1098,"context_line":"                    tenant_id\u003dcontext.project_id)[\u0027ports\u0027]"},{"line_number":1099,"context_line":"                free_ports \u003d quotas.get(\u0027port\u0027) - len(ports)"},{"line_number":1100,"context_line":"                if free_ports \u003c 0:"}],"source_content_type":"text/x-python","patch_set":1,"id":"dac4157f_67eddeee","line":1097,"updated":"2015-04-21 08:25:29.000000000","message":"The change looks good but should not affect the UTs?","commit_id":"7a29a975ac96fe367e94a076403f786f94108c65"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"405895c3ef78003a3720f28872b86af43e1c720d","unresolved":false,"context_lines":[{"line_number":1094,"context_line":"                # Unlimited Port Quota"},{"line_number":1095,"context_line":"                return num_instances"},{"line_number":1096,"context_line":"            else:"},{"line_number":1097,"context_line":"                ports \u003d neutron.list_ports("},{"line_number":1098,"context_line":"                    tenant_id\u003dcontext.project_id)[\u0027ports\u0027]"},{"line_number":1099,"context_line":"                free_ports \u003d quotas.get(\u0027port\u0027) - len(ports)"},{"line_number":1100,"context_line":"                if free_ports \u003c 0:"}],"source_content_type":"text/x-python","patch_set":1,"id":"dac4157f_60193f88","line":1097,"in_reply_to":"dac4157f_67eddeee","updated":"2015-04-21 12:20:57.000000000","message":"hi Sudipta Biswas, thanks for your review, I am adding UT","commit_id":"7a29a975ac96fe367e94a076403f786f94108c65"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"9ef2191437ee21566340a379f9c783e2aad06fa0","unresolved":false,"context_lines":[{"line_number":1002,"context_line":"            request_net.pci_request_id \u003d pci_request_id"},{"line_number":1003,"context_line":""},{"line_number":1004,"context_line":"    def _ports_needed_per_instance(self, context, neutron, requested_networks):"},{"line_number":1005,"context_line":"        ports_needed_per_instance \u003d 0"},{"line_number":1006,"context_line":"        if requested_networks is None or len(requested_networks) \u003d\u003d 0:"},{"line_number":1007,"context_line":"            nets \u003d self._get_available_networks(context, context.project_id,"},{"line_number":1008,"context_line":"                                                neutron\u003dneutron)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3acd31a7_0449905f","side":"PARENT","line":1005,"updated":"2015-04-30 16:29:45.000000000","message":"completely changing the return value of this method (that is not exactly straightforward) produced the need for NO changes in tests.\n\nThat\u0027s just worrying! \n\nCould we get some tests for this now that it\u0027s not mixed in with the quota nonsense?","commit_id":"93610787de148c4bb01f2b9ee903c2d7e27e172a"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"9e05b11bab5467fd0d23452ab1cbe664220e33e5","unresolved":false,"context_lines":[{"line_number":1002,"context_line":"            request_net.pci_request_id \u003d pci_request_id"},{"line_number":1003,"context_line":""},{"line_number":1004,"context_line":"    def _ports_needed_per_instance(self, context, neutron, requested_networks):"},{"line_number":1005,"context_line":"        ports_needed_per_instance \u003d 0"},{"line_number":1006,"context_line":"        if requested_networks is None or len(requested_networks) \u003d\u003d 0:"},{"line_number":1007,"context_line":"            nets \u003d self._get_available_networks(context, context.project_id,"},{"line_number":1008,"context_line":"                                                neutron\u003dneutron)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3acd31a7_ba452571","side":"PARENT","line":1005,"in_reply_to":"3acd31a7_0449905f","updated":"2015-05-04 01:17:10.000000000","message":"I agree with you that add some tests in a separate set of patches","commit_id":"93610787de148c4bb01f2b9ee903c2d7e27e172a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7dfb53fc46707922469a74a2281c55ccac39d3a1","unresolved":false,"context_lines":[{"line_number":1116,"context_line":"        # from the hypervisor.  So we just check the quota and return"},{"line_number":1117,"context_line":"        # how many of the requested number of instances can be created"},{"line_number":1118,"context_line":"        if ports_needed_per_instance:"},{"line_number":1119,"context_line":"            ports \u003d neutron.list_ports(tenant_id\u003dcontext.project_id)[\u0027ports\u0027]"},{"line_number":1120,"context_line":"            quotas \u003d neutron.show_quota(tenant_id\u003dcontext.project_id)[\u0027quota\u0027]"},{"line_number":1121,"context_line":"            if quotas.get(\u0027port\u0027, -1) \u003d\u003d -1:"},{"line_number":1122,"context_line":"                # Unlimited Port Quota"}],"source_content_type":"text/x-python","patch_set":3,"id":"3acd31a7_f4ef5fae","side":"PARENT","line":1119,"updated":"2015-04-30 18:00:42.000000000","message":"Couldn\u0027t we just move this line into the else below if quotas !\u003d -1?  Then that\u0027s a much simpler fix to not running list_ports when port quota is unlimited.","commit_id":"93610787de148c4bb01f2b9ee903c2d7e27e172a"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"9e05b11bab5467fd0d23452ab1cbe664220e33e5","unresolved":false,"context_lines":[{"line_number":1116,"context_line":"        # from the hypervisor.  So we just check the quota and return"},{"line_number":1117,"context_line":"        # how many of the requested number of instances can be created"},{"line_number":1118,"context_line":"        if ports_needed_per_instance:"},{"line_number":1119,"context_line":"            ports \u003d neutron.list_ports(tenant_id\u003dcontext.project_id)[\u0027ports\u0027]"},{"line_number":1120,"context_line":"            quotas \u003d neutron.show_quota(tenant_id\u003dcontext.project_id)[\u0027quota\u0027]"},{"line_number":1121,"context_line":"            if quotas.get(\u0027port\u0027, -1) \u003d\u003d -1:"},{"line_number":1122,"context_line":"                # Unlimited Port Quota"}],"source_content_type":"text/x-python","patch_set":3,"id":"3acd31a7_da4ea195","side":"PARENT","line":1119,"in_reply_to":"3acd31a7_390940de","updated":"2015-05-04 01:17:10.000000000","message":"Nikola, thanks for your explaining!","commit_id":"93610787de148c4bb01f2b9ee903c2d7e27e172a"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"fd8a0efc36e4ce6351b482117046c600113b9cb0","unresolved":false,"context_lines":[{"line_number":1116,"context_line":"        # from the hypervisor.  So we just check the quota and return"},{"line_number":1117,"context_line":"        # how many of the requested number of instances can be created"},{"line_number":1118,"context_line":"        if ports_needed_per_instance:"},{"line_number":1119,"context_line":"            ports \u003d neutron.list_ports(tenant_id\u003dcontext.project_id)[\u0027ports\u0027]"},{"line_number":1120,"context_line":"            quotas \u003d neutron.show_quota(tenant_id\u003dcontext.project_id)[\u0027quota\u0027]"},{"line_number":1121,"context_line":"            if quotas.get(\u0027port\u0027, -1) \u003d\u003d -1:"},{"line_number":1122,"context_line":"                # Unlimited Port Quota"}],"source_content_type":"text/x-python","patch_set":3,"id":"3acd31a7_390940de","side":"PARENT","line":1119,"in_reply_to":"3acd31a7_f4ef5fae","updated":"2015-05-01 11:46:16.000000000","message":"IMHO - no!\n\nThis is what the original patch proposed and I am -1 on it. for the reasons described on previous reviews that can be succinctly described as:\n\n\"let\u0027s not shovel crap, let\u0027s get rid of the crap\"","commit_id":"93610787de148c4bb01f2b9ee903c2d7e27e172a"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"547eef16c1c1f242122846777d86dc15561cb12a","unresolved":false,"context_lines":[{"line_number":1128,"context_line":"                                      \"is over the limit: %(quota)d\"),"},{"line_number":1129,"context_line":"                                      {\u0027ports\u0027: len(ports),"},{"line_number":1130,"context_line":"                                       \u0027quota\u0027: quotas.get(\u0027port\u0027)})"},{"line_number":1131,"context_line":"                    raise exception.PortLimitExceeded(msg)"},{"line_number":1132,"context_line":"                ports_needed \u003d ports_needed_per_instance * num_instances"},{"line_number":1133,"context_line":"                if free_ports \u003e\u003d ports_needed:"},{"line_number":1134,"context_line":"                    return num_instances"}],"source_content_type":"text/x-python","patch_set":5,"id":"3acd31a7_dfe0a598","side":"PARENT","line":1131,"updated":"2015-05-05 10:44:07.000000000","message":"This will no longer be raised and should not be handled in the nova/compute/api.py","commit_id":"93610787de148c4bb01f2b9ee903c2d7e27e172a"}],"nova/tests/unit/network/test_neutronv2.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"6d9f5164e42de73380db8f004cb47424ec910568","unresolved":false,"context_lines":[{"line_number":1444,"context_line":"        self.moxed_client.list_networks("},{"line_number":1445,"context_line":"            id\u003dmox.SameElementsAs(ids)).AndReturn("},{"line_number":1446,"context_line":"                {\u0027networks\u0027: self.nets2})"},{"line_number":1447,"context_line":"        self.moxed_client.list_ports(tenant_id\u003d\u0027my_tenantid\u0027).AndReturn("},{"line_number":1448,"context_line":"                    {\u0027ports\u0027: []})"},{"line_number":1449,"context_line":"        self.moxed_client.show_quota("},{"line_number":1450,"context_line":"            tenant_id\u003d\u0027my_tenantid\u0027).AndReturn("}],"source_content_type":"text/x-python","patch_set":2,"id":"dac4157f_1e309be7","side":"PARENT","line":1447,"updated":"2015-04-21 15:29:07.000000000","message":":)\ni was going to ask if this flow was tested.","commit_id":"c73407b6ce325d77d646eea0a9bd08318ddb7a65"}]}
