)]}'
{"openstack_dashboard/dashboards/project/volumes/volumes/forms.py":[{"author":{"_account_id":9622,"name":"Cindy Lu","email":"clu@us.ibm.com","username":"clu14"},"change_message_id":"2b39c8508edfb2eb7825a9d9d72f1f997a82fe0b","unresolved":false,"context_lines":[{"line_number":516,"context_line":"            availableGB \u003d usages[\u0027maxTotalVolumeGigabytes\u0027] - \\"},{"line_number":517,"context_line":"                usages[\u0027gigabytesUsed\u0027]"},{"line_number":518,"context_line":"            if availableGB \u003c (data[\u0027new_size\u0027] - self.initial[\u0027orig_size\u0027]):"},{"line_number":519,"context_line":"                error_message \u003d _(\u0027Volume cannot be extened to %(req)iGB as \u0027"},{"line_number":520,"context_line":"                                  \u0027you only have %(avail)iGB of your quota \u0027"},{"line_number":521,"context_line":"                                  \u0027available.\u0027)"},{"line_number":522,"context_line":"                params \u003d {\u0027req\u0027: data[\u0027new_size\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2FnSo%3D","line":519,"updated":"2014-02-25 17:04:01.000000000","message":"typo, should be \"extended\"","commit_id":"bc8a7408a1c52e0817235d4c1d41e2da11c39591"},{"author":{"_account_id":4264,"name":"Matthias Runge","email":"mrunge@redhat.com","username":"mrunge"},"change_message_id":"08cd871bf21af7c34aa3deeca6e11f940ca2ba15","unresolved":false,"context_lines":[{"line_number":526,"context_line":"            message \u003d _(\u0027Successfully extended volume: \"%s\"\u0027) % data[\u0027name\u0027]"},{"line_number":527,"context_line":"            messages.success(request, message)"},{"line_number":528,"context_line":"            return volume"},{"line_number":529,"context_line":"        except ValidationError as e:"},{"line_number":530,"context_line":"            self.api_error(e.messages[0])"},{"line_number":531,"context_line":"            return False"},{"line_number":532,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVn%2F%2FCpM%3D","line":529,"updated":"2014-03-10 14:19:24.000000000","message":"Please don\u0027t forward the exception directly to the user. You can not contron them, nor you can\u0027t translate them.","commit_id":"9c0058bed8a78ab7369c4d75023e9e5921195f0f"},{"author":{"_account_id":4264,"name":"Matthias Runge","email":"mrunge@redhat.com","username":"mrunge"},"change_message_id":"538040ff384709923d4e9e4ba86a3624f00dffd6","unresolved":false,"context_lines":[{"line_number":526,"context_line":"            message \u003d _(\u0027Successfully extended volume: \"%s\"\u0027) % data[\u0027name\u0027]"},{"line_number":527,"context_line":"            messages.success(request, message)"},{"line_number":528,"context_line":"            return volume"},{"line_number":529,"context_line":"        except ValidationError as e:"},{"line_number":530,"context_line":"            self.api_error(e.messages[0])"},{"line_number":531,"context_line":"            return False"},{"line_number":532,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVn%2F%2B6w0%3D","line":529,"in_reply_to":"AAAAVn%2F%2FBi8%3D","updated":"2014-03-11 09:58:15.000000000","message":"Mariam: In short: somehow. It\u0027s still wrong and should be removed everywhere else, too.","commit_id":"9c0058bed8a78ab7369c4d75023e9e5921195f0f"},{"author":{"_account_id":10295,"name":"mariam john","email":"mariamj@us.ibm.com","username":"mariamj"},"change_message_id":"26599d5062e688a24a2e5742277696e5895130c7","unresolved":false,"context_lines":[{"line_number":526,"context_line":"            message \u003d _(\u0027Successfully extended volume: \"%s\"\u0027) % data[\u0027name\u0027]"},{"line_number":527,"context_line":"            messages.success(request, message)"},{"line_number":528,"context_line":"            return volume"},{"line_number":529,"context_line":"        except ValidationError as e:"},{"line_number":530,"context_line":"            self.api_error(e.messages[0])"},{"line_number":531,"context_line":"            return False"},{"line_number":532,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVn%2F%2FBi8%3D","line":529,"in_reply_to":"AAAAVn%2F%2FCpM%3D","updated":"2014-03-10 16:19:28.000000000","message":"Isnt this consistent with the way ValidationError is handled in other parts of the code","commit_id":"9c0058bed8a78ab7369c4d75023e9e5921195f0f"},{"author":{"_account_id":10247,"name":"Santiago Baldassin","email":"santiago.b.baldassin@intel.com","username":"santibaldassin"},"change_message_id":"f9fc2fbffb4a6d0be8d105fdb0a3c42aa59a2043","unresolved":false,"context_lines":[{"line_number":505,"context_line":"            raise ValidationError("},{"line_number":506,"context_line":"                _(\"New size for extend must be greater than current size.\"))"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"        usages \u003d quotas.tenant_limit_usages(self.request)"},{"line_number":509,"context_line":"        availableGB \u003d usages[\u0027maxTotalVolumeGigabytes\u0027] - \\"},{"line_number":510,"context_line":"            usages[\u0027gigabytesUsed\u0027]"},{"line_number":511,"context_line":"        if availableGB \u003c (new_size - orig_size):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2FV9I%3D","line":508,"updated":"2014-03-18 14:02:02.000000000","message":"Cinder is already making sure that the quaota is not exceeded. I don\u0027t think we should do a double check","commit_id":"fa634323f8a6479ec6ae2ae5840db1ca4231353c"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"9299a240a5683d2532fc323537814f4636d92e6d","unresolved":false,"context_lines":[{"line_number":505,"context_line":"            raise ValidationError("},{"line_number":506,"context_line":"                _(\"New size for extend must be greater than current size.\"))"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"        usages \u003d quotas.tenant_limit_usages(self.request)"},{"line_number":509,"context_line":"        availableGB \u003d usages[\u0027maxTotalVolumeGigabytes\u0027] - \\"},{"line_number":510,"context_line":"            usages[\u0027gigabytesUsed\u0027]"},{"line_number":511,"context_line":"        if availableGB \u003c (new_size - orig_size):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAW3%2F%2FhIk%3D","line":508,"in_reply_to":"AAAAW3%2F%2Fid0%3D","updated":"2014-04-14 01:59:05.000000000","message":"Thanks Santiago, Let\u0027s discuss this in the IRC meeting.","commit_id":"fa634323f8a6479ec6ae2ae5840db1ca4231353c"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"a6f42b1b9471daa1baeadd1486ed100bc297fe79","unresolved":false,"context_lines":[{"line_number":505,"context_line":"            raise ValidationError("},{"line_number":506,"context_line":"                _(\"New size for extend must be greater than current size.\"))"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"        usages \u003d quotas.tenant_limit_usages(self.request)"},{"line_number":509,"context_line":"        availableGB \u003d usages[\u0027maxTotalVolumeGigabytes\u0027] - \\"},{"line_number":510,"context_line":"            usages[\u0027gigabytesUsed\u0027]"},{"line_number":511,"context_line":"        if availableGB \u003c (new_size - orig_size):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F9zBo%3D","line":508,"in_reply_to":"AAAAWH%2F%2FEi0%3D","updated":"2014-04-02 03:30:53.000000000","message":"Hi Santiago Baldassin, there is a discusstion in yesterday\u0027s meeting. http://eavesdrop.openstack.org/meetings/horizon/2014/horizon.2014-04-01-16.00.log.txt  thanks Cindy Lu for that.","commit_id":"fa634323f8a6479ec6ae2ae5840db1ca4231353c"},{"author":{"_account_id":10247,"name":"Santiago Baldassin","email":"santiago.b.baldassin@intel.com","username":"santibaldassin"},"change_message_id":"302478d79c01b4066dc03913afaff6c86ed570af","unresolved":false,"context_lines":[{"line_number":505,"context_line":"            raise ValidationError("},{"line_number":506,"context_line":"                _(\"New size for extend must be greater than current size.\"))"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"        usages \u003d quotas.tenant_limit_usages(self.request)"},{"line_number":509,"context_line":"        availableGB \u003d usages[\u0027maxTotalVolumeGigabytes\u0027] - \\"},{"line_number":510,"context_line":"            usages[\u0027gigabytesUsed\u0027]"},{"line_number":511,"context_line":"        if availableGB \u003c (new_size - orig_size):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2FEi0%3D","line":508,"in_reply_to":"AAAAWH%2F%2FIRo%3D","updated":"2014-03-20 13:49:42.000000000","message":"Let\u0027s discuss this in the IRC. I think we need someone to weigh in here :)","commit_id":"fa634323f8a6479ec6ae2ae5840db1ca4231353c"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"4b5fa693cc1d9661613c60524389f654ecb741b9","unresolved":false,"context_lines":[{"line_number":505,"context_line":"            raise ValidationError("},{"line_number":506,"context_line":"                _(\"New size for extend must be greater than current size.\"))"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"        usages \u003d quotas.tenant_limit_usages(self.request)"},{"line_number":509,"context_line":"        availableGB \u003d usages[\u0027maxTotalVolumeGigabytes\u0027] - \\"},{"line_number":510,"context_line":"            usages[\u0027gigabytesUsed\u0027]"},{"line_number":511,"context_line":"        if availableGB \u003c (new_size - orig_size):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2FIRo%3D","line":508,"in_reply_to":"AAAAWH%2F%2FN74%3D","updated":"2014-03-20 02:51:05.000000000","message":"Sure, this kind of validations make things slower. but they can show more infomation about the overlimit like \"cannot be extended to 1000GB you only have 500GB of your quota\". I know cinder api returns also contain this. but you can\u0027t directly forward the exception to users, you can\u0027t control them nor you can\u0027t translate them. In this situation, you may find overlimit exception with response status_code, and pop up a message like \"Volume quota exceeded.\".","commit_id":"fa634323f8a6479ec6ae2ae5840db1ca4231353c"},{"author":{"_account_id":10247,"name":"Santiago Baldassin","email":"santiago.b.baldassin@intel.com","username":"santibaldassin"},"change_message_id":"63c24fc23207a728937cac8560593c49617f9369","unresolved":false,"context_lines":[{"line_number":505,"context_line":"            raise ValidationError("},{"line_number":506,"context_line":"                _(\"New size for extend must be greater than current size.\"))"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"        usages \u003d quotas.tenant_limit_usages(self.request)"},{"line_number":509,"context_line":"        availableGB \u003d usages[\u0027maxTotalVolumeGigabytes\u0027] - \\"},{"line_number":510,"context_line":"            usages[\u0027gigabytesUsed\u0027]"},{"line_number":511,"context_line":"        if availableGB \u003c (new_size - orig_size):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2FN74%3D","line":508,"in_reply_to":"AAAAWH%2F%2FQuM%3D","updated":"2014-03-19 11:28:23.000000000","message":"The way I see it, we should call the api and let them do the validation. Including this kind of validations in horizon make things slower and does not make sense to me...we are basically doing the exact same thing twice. Moreover, if Cinder change the way they do the validation, let\u0027s say they add a quota per user, we would have to also change horizon to be compliant with that.","commit_id":"fa634323f8a6479ec6ae2ae5840db1ca4231353c"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"7e8ed94acebbd24f61018ebe4edb7d945bb7f921","unresolved":false,"context_lines":[{"line_number":505,"context_line":"            raise ValidationError("},{"line_number":506,"context_line":"                _(\"New size for extend must be greater than current size.\"))"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"        usages \u003d quotas.tenant_limit_usages(self.request)"},{"line_number":509,"context_line":"        availableGB \u003d usages[\u0027maxTotalVolumeGigabytes\u0027] - \\"},{"line_number":510,"context_line":"            usages[\u0027gigabytesUsed\u0027]"},{"line_number":511,"context_line":"        if availableGB \u003c (new_size - orig_size):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWH%2F%2FQuM%3D","line":508,"in_reply_to":"AAAAWH%2F%2FV9I%3D","updated":"2014-03-19 02:26:31.000000000","message":"You mean we should directly call the cinder api and display the error message to users?  I don\u0027t think so, it would be better to do quota check first before triggering the action, we should avoid that.","commit_id":"fa634323f8a6479ec6ae2ae5840db1ca4231353c"},{"author":{"_account_id":10247,"name":"Santiago Baldassin","email":"santiago.b.baldassin@intel.com","username":"santibaldassin"},"change_message_id":"3e7e2231ec0d6a7d4959cc302c1fe5ee05c521d9","unresolved":false,"context_lines":[{"line_number":505,"context_line":"            raise ValidationError("},{"line_number":506,"context_line":"                _(\"New size for extend must be greater than current size.\"))"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"        usages \u003d quotas.tenant_limit_usages(self.request)"},{"line_number":509,"context_line":"        availableGB \u003d usages[\u0027maxTotalVolumeGigabytes\u0027] - \\"},{"line_number":510,"context_line":"            usages[\u0027gigabytesUsed\u0027]"},{"line_number":511,"context_line":"        if availableGB \u003c (new_size - orig_size):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAW3%2F%2Fid0%3D","line":508,"in_reply_to":"AAAAWH%2F9zBo%3D","updated":"2014-04-13 11:41:16.000000000","message":"Hi Zhengou Niu, I\u0027m so sorry I missed this one.\nSo....I do agree that we could improve the error message shown to the users...but in the discussion attached there are a couple of points missing:\nA. If cinder change the way they do the validation, we\u0027d need to change that in Horizon too\nB. In this particular case, we are duplicating the amount of request with the call to tenant_limit_usages. Another advantage of doing client side validations is to reduce the amount of requests which in this case is actually not happening\n\nIn this particular case, we could improve the user experience by modifying the handle exception message.  Now it only says: \"Unable to extend volume\" and we could replace it with something like \"Unable to extend volume. Make sure that the new value is greater than the old value and that it is not exceeding the project quota\"\nI\u0027ll attend the next horizon meeting next Tuesday and throw the topic again. We\u0027ll get this over with before the end of the week :)","commit_id":"fa634323f8a6479ec6ae2ae5840db1ca4231353c"}],"openstack_dashboard/dashboards/project/volumes/volumes/tests.py":[{"author":{"_account_id":9622,"name":"Cindy Lu","email":"clu@us.ibm.com","username":"clu14"},"change_message_id":"2b39c8508edfb2eb7825a9d9d72f1f997a82fe0b","unresolved":false,"context_lines":[{"line_number":1036,"context_line":"                      args\u003d[volume.id])"},{"line_number":1037,"context_line":"        res \u003d self.client.post(url, formData)"},{"line_number":1038,"context_line":"        self.assertFormError(res, \u0027form\u0027, None,"},{"line_number":1039,"context_line":"                             \"Volume cannot be extened to 1000GB as you only \""},{"line_number":1040,"context_line":"                             \"have 80GB of your quota available.\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2FnRo%3D","line":1039,"updated":"2014-02-25 17:04:01.000000000","message":"typo, should be \"extended\"","commit_id":"bc8a7408a1c52e0817235d4c1d41e2da11c39591"},{"author":{"_account_id":9214,"name":"Sergio Cazzolato","email":"sergiocazzolato@gmail.com","username":"sjcazzol"},"change_message_id":"166c854fd727764c1122be9e28e4e83a74c8410e","unresolved":false,"context_lines":[{"line_number":1035,"context_line":""},{"line_number":1036,"context_line":"    @test.create_stubs({cinder: (\u0027volume_get\u0027,),"},{"line_number":1037,"context_line":"                        quotas: (\u0027tenant_limit_usages\u0027,)})"},{"line_number":1038,"context_line":"    def test_extend_volume_with_size_out_of_quota(self):"},{"line_number":1039,"context_line":"        volume \u003d self.volumes.first()"},{"line_number":1040,"context_line":"        usage_limit \u003d {\u0027maxTotalVolumeGigabytes\u0027: 100,"},{"line_number":1041,"context_line":"                       \u0027gigabytesUsed\u0027: 20,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2Fz%2Bk%3D","line":1038,"updated":"2014-03-13 16:49:55.000000000","message":"I would like to see a test case when the remaining quota is equals to the extension requested.","commit_id":"47daa4331e9bd98580081a298c6f56b3c8fa2a95"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"31dabd527767e31787df999cec43fd43e84e217a","unresolved":false,"context_lines":[{"line_number":1035,"context_line":""},{"line_number":1036,"context_line":"    @test.create_stubs({cinder: (\u0027volume_get\u0027,),"},{"line_number":1037,"context_line":"                        quotas: (\u0027tenant_limit_usages\u0027,)})"},{"line_number":1038,"context_line":"    def test_extend_volume_with_size_out_of_quota(self):"},{"line_number":1039,"context_line":"        volume \u003d self.volumes.first()"},{"line_number":1040,"context_line":"        usage_limit \u003d {\u0027maxTotalVolumeGigabytes\u0027: 100,"},{"line_number":1041,"context_line":"                       \u0027gigabytesUsed\u0027: 20,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F%2FvzQ%3D","line":1038,"in_reply_to":"AAAAWH%2F%2Fz%2Bk%3D","updated":"2014-03-14 02:54:46.000000000","message":"Sergio, thanks for the suggestion, I\u0027ll increase the new_size of test_extend_volume (#L983) to 120 to satisfy your request.\n\norig_size \u003d 40.\n\nremaining quota \u003d 100 - 20 \u003d 80.","commit_id":"47daa4331e9bd98580081a298c6f56b3c8fa2a95"}]}
