)]}'
{"openstackclient/common/quota.py":[{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"e876efc873096b30d6c3e1a07efc89e23f7d211a","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    def get_quota(self, client_name, parsed_args):"},{"line_number":157,"context_line":"        try:"},{"line_number":158,"context_line":"            client \u003d getattr(self.app.client_manager, client_name)"},{"line_number":159,"context_line":"            if client_name \u003d\u003d \u0027network\u0027:"},{"line_number":160,"context_line":"                return self.get_network_quota(client, parsed_args)"},{"line_number":161,"context_line":"            else:"},{"line_number":162,"context_line":"                return self.get_compute_volume_quota(client, parsed_args)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_2750765d","line":159,"updated":"2015-01-15 17:20:24.000000000","message":"what if it running nova-network, check if neutron service is available?","commit_id":"cab6123a04585a4c71bc8bfc1766e15161458a5f"},{"author":{"_account_id":12076,"name":"Zhiyuan Cai","email":"luckyvega.g@gmail.com","username":"zhiyuan_cai"},"change_message_id":"5cb433eb2735ff5d42900b4d6f5b77ad3583341b","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    def get_quota(self, client_name, parsed_args):"},{"line_number":157,"context_line":"        try:"},{"line_number":158,"context_line":"            client \u003d getattr(self.app.client_manager, client_name)"},{"line_number":159,"context_line":"            if client_name \u003d\u003d \u0027network\u0027:"},{"line_number":160,"context_line":"                return self.get_network_quota(client, parsed_args)"},{"line_number":161,"context_line":"            else:"},{"line_number":162,"context_line":"                return self.get_compute_volume_quota(client, parsed_args)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_89abf11c","line":159,"in_reply_to":"3a961159_2750765d","updated":"2015-01-16 02:41:55.000000000","message":"I think when nova-network is running, trying to call neutron client method will return an EndpointNotFound exception, which is handled in this method.","commit_id":"cab6123a04585a4c71bc8bfc1766e15161458a5f"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"0ab50c4942e859706d7e9d78f121de0c8b0c3b2d","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        return quota._info"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def get_network_quota(self, client, parsed_args):"},{"line_number":179,"context_line":"        return client.show_quota(parsed_args.project)[\u0027quota\u0027]"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def take_action(self, parsed_args):"},{"line_number":182,"context_line":"        self.log.debug(\u0027take_action(%s)\u0027, parsed_args)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_ef8724b4","line":179,"updated":"2015-01-15 18:40:42.000000000","message":"i guess neutron_client doesn\u0027t have a \u0027class\u0027 concept for quotas?","commit_id":"cab6123a04585a4c71bc8bfc1766e15161458a5f"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"e448bce4884260760c6bdd3732ceaeb28676d968","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        return quota._info"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def get_network_quota(self, client, parsed_args):"},{"line_number":179,"context_line":"        return client.show_quota(parsed_args.project)[\u0027quota\u0027]"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def take_action(self, parsed_args):"},{"line_number":182,"context_line":"        self.log.debug(\u0027take_action(%s)\u0027, parsed_args)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_cd99906e","line":179,"in_reply_to":"3a961159_72a077a5","updated":"2015-01-15 19:31:54.000000000","message":"actually i meant to handle parsed_args.quota_class","commit_id":"cab6123a04585a4c71bc8bfc1766e15161458a5f"},{"author":{"_account_id":12076,"name":"Zhiyuan Cai","email":"luckyvega.g@gmail.com","username":"zhiyuan_cai"},"change_message_id":"5cb433eb2735ff5d42900b4d6f5b77ad3583341b","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        return quota._info"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def get_network_quota(self, client, parsed_args):"},{"line_number":179,"context_line":"        return client.show_quota(parsed_args.project)[\u0027quota\u0027]"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def take_action(self, parsed_args):"},{"line_number":182,"context_line":"        self.log.debug(\u0027take_action(%s)\u0027, parsed_args)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_09cb811e","line":179,"in_reply_to":"3a961159_cd99906e","updated":"2015-01-16 02:41:55.000000000","message":"There are two strategies to handle parsed_args.quota_class. One is ignoring this parameter for Neutron resources, another is taking care of this parameter and if it is set we don\u0027t return quotas of Neutron resources since Neutron doesn\u0027t support class concept. Which one do you prefer?","commit_id":"cab6123a04585a4c71bc8bfc1766e15161458a5f"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"c4d305347fbfdef518cdc77bed01dbec43933041","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        return quota._info"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def get_network_quota(self, client, parsed_args):"},{"line_number":179,"context_line":"        return client.show_quota(parsed_args.project)[\u0027quota\u0027]"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def take_action(self, parsed_args):"},{"line_number":182,"context_line":"        self.log.debug(\u0027take_action(%s)\u0027, parsed_args)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_72a077a5","line":179,"in_reply_to":"3a961159_ef8724b4","updated":"2015-01-15 19:02:32.000000000","message":"All those Neutron methods return dicts.  They don\u0027t have a resource class.","commit_id":"cab6123a04585a4c71bc8bfc1766e15161458a5f"},{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"710d895fbe35dfc42807e5f2c8f7b25f0ae363c5","unresolved":false,"context_lines":[{"line_number":190,"context_line":"        clients \u003d [\u0027compute\u0027, \u0027volume\u0027, \u0027network\u0027]"},{"line_number":191,"context_line":"        info \u003d {}"},{"line_number":192,"context_line":"        for client in clients:"},{"line_number":193,"context_line":"            info.update(self.get_quota(client, parsed_args))"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"        # Map the internal quota names to the external ones"},{"line_number":196,"context_line":"        # COMPUTE_QUOTAS and NETWORK_QUOTAS share floating-ips,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_5250db2b","line":193,"updated":"2015-01-15 19:16:46.000000000","message":"I\u0027m thinking that adding the loop and trying to make get_quota() handle network too just complicates things.  compute and volume are nearly identical, but network is sooooo different that making get_network_quota() self-contained make sense to me.\n\nRenaming the old get_quota() to get_compute_volume_quota() would be helpful to make it clear what it does.","commit_id":"cab6123a04585a4c71bc8bfc1766e15161458a5f"},{"author":{"_account_id":12076,"name":"Zhiyuan Cai","email":"luckyvega.g@gmail.com","username":"zhiyuan_cai"},"change_message_id":"5cb433eb2735ff5d42900b4d6f5b77ad3583341b","unresolved":false,"context_lines":[{"line_number":190,"context_line":"        clients \u003d [\u0027compute\u0027, \u0027volume\u0027, \u0027network\u0027]"},{"line_number":191,"context_line":"        info \u003d {}"},{"line_number":192,"context_line":"        for client in clients:"},{"line_number":193,"context_line":"            info.update(self.get_quota(client, parsed_args))"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"        # Map the internal quota names to the external ones"},{"line_number":196,"context_line":"        # COMPUTE_QUOTAS and NETWORK_QUOTAS share floating-ips,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_7ba3e89d","line":193,"in_reply_to":"3a961159_5250db2b","updated":"2015-01-16 02:41:55.000000000","message":"OK, I will simplify the logic in next patch. For nova-network case, trying to call neutron client method will get an EndpointNotFound exception, just like the cinder case solved before, which is handled in \u0027get_quota\u0027, and we just show the quotas returned from nova client.  BTW, I reply to Steve about how to handle parsed_args.quota_class above. What\u0027s your opinion on it?","commit_id":"cab6123a04585a4c71bc8bfc1766e15161458a5f"}]}
