)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"bc348f32a5af049bea950e3220cfed44b5a40283","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"APIImpact"},{"line_number":34,"context_line":"1. For all above apis 400 response will be returned."},{"line_number":35,"context_line":"2. Earlier is was possible to pass only whitespaces or leading-trailing"},{"line_number":36,"context_line":"   spaces to name parameter. Now it will raise 400 error if"},{"line_number":37,"context_line":"   only whitespaces are passed or remove leading-trailing spaces"},{"line_number":38,"context_line":"   from name."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa32b979_5672f412","line":35,"updated":"2015-06-25 20:51:55.000000000","message":"s/is/it","commit_id":"43d9b50ae030d834ccfca71285f39b4e21ad2843"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"bc348f32a5af049bea950e3220cfed44b5a40283","unresolved":false,"context_lines":[{"line_number":34,"context_line":"1. For all above apis 400 response will be returned."},{"line_number":35,"context_line":"2. Earlier is was possible to pass only whitespaces or leading-trailing"},{"line_number":36,"context_line":"   spaces to name parameter. Now it will raise 400 error if"},{"line_number":37,"context_line":"   only whitespaces are passed or remove leading-trailing spaces"},{"line_number":38,"context_line":"   from name."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"Closes-Bug: 1466351"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa32b979_71db827e","line":37,"updated":"2015-06-25 20:51:55.000000000","message":"It\u0027s easier to understand the meaning if we replace \u0027or\u0027 for \u0027and\u0027 and add at the end of the sentence \u0027in other cases.\u0027","commit_id":"43d9b50ae030d834ccfca71285f39b4e21ad2843"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"5a137036e69db9bfa19b14b99f7217869a117a26","unresolved":false,"context_lines":[{"line_number":27,"context_line":"   c. qos-create"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Added a check to validate string and integer limit and returned"},{"line_number":30,"context_line":"400 if limit exceeds. Also added check to remove leading or trailing"},{"line_number":31,"context_line":"whitespaces and string containing only whitespaces."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"APIImpact"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"fa32b979_ed50f5d6","line":30,"updated":"2015-06-26 13:34:57.000000000","message":"I suggest rephrasing to \"...400 if it exceeds the limit.\"","commit_id":"b8dc42aab070ccd77fd4c18dffa564902afd1e5e"},{"author":{"_account_id":16258,"name":"nikesh","email":"nike.niec@gmail.com","username":"nikem"},"change_message_id":"d92149eb7c7bb1c676c11ea17c50bf70c08ce10d","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"1. If you pass name or description parameters with more than"},{"line_number":10,"context_line":"   255 characters to the below apis, then it returns"},{"line_number":11,"context_line":"   500 error code."},{"line_number":12,"context_line":"   a. consisgroup-create"},{"line_number":13,"context_line":"   b. consisgroup-update"},{"line_number":14,"context_line":"   c. cgsnapshot-create"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ba3cc151_9ca1f2fa","line":11,"updated":"2015-07-08 09:01:28.000000000","message":"Below apis will return 500 error code on passing name or description\nparameters with more than 255 characters:\n\nIf you want, you can modify like above, but subsequent lines should be wrapped at 72 characters.","commit_id":"215a8bc48382394a3c7b7bebea14545c8cf4f9e6"},{"author":{"_account_id":16258,"name":"nikesh","email":"nike.niec@gmail.com","username":"nikem"},"change_message_id":"d92149eb7c7bb1c676c11ea17c50bf70c08ce10d","unresolved":false,"context_lines":[{"line_number":19,"context_line":"   h. volume-transfer"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"2. If you pass \u0027hard_limit\u0027 value above mysql INT type to below"},{"line_number":22,"context_line":"   apis, then it returns 500 error code."},{"line_number":23,"context_line":"   a. quota-class-update"},{"line_number":24,"context_line":"   b. quota-update"},{"line_number":25,"context_line":"   c. encryption-type-create"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ba3cc151_dce1ba2b","line":22,"updated":"2015-07-08 09:01:28.000000000","message":"Below apis will return 500 error code on passing \u0027hard_limit\u0027 value above mysql INT type:\n\nIf you want, you can modify like above, but subsequent lines should be wrapped at 72 characters.","commit_id":"215a8bc48382394a3c7b7bebea14545c8cf4f9e6"},{"author":{"_account_id":16258,"name":"nikesh","email":"nike.niec@gmail.com","username":"nikem"},"change_message_id":"d92149eb7c7bb1c676c11ea17c50bf70c08ce10d","unresolved":false,"context_lines":[{"line_number":24,"context_line":"   b. quota-update"},{"line_number":25,"context_line":"   c. encryption-type-create"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"3. Below apis accept string with whitespaces,"},{"line_number":28,"context_line":"   a. consisgroup-create"},{"line_number":29,"context_line":"   b. cgsnapshot-create"},{"line_number":30,"context_line":"   c. qos-create"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ba3cc151_dcb8da13","line":27,"updated":"2015-07-08 09:01:28.000000000","message":"Below apis accept string with whitespaces:","commit_id":"215a8bc48382394a3c7b7bebea14545c8cf4f9e6"},{"author":{"_account_id":16258,"name":"nikesh","email":"nike.niec@gmail.com","username":"nikem"},"change_message_id":"d92149eb7c7bb1c676c11ea17c50bf70c08ce10d","unresolved":false,"context_lines":[{"line_number":31,"context_line":"   d. volume-transfer"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"4. If you pass key or value with more than 255 characters to"},{"line_number":34,"context_line":"   type-key api, then it returns 500 error code."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"Added a check to validate string and integer limit and returned"},{"line_number":37,"context_line":"400 if it exceeds the limit. Also added check to remove leading or trailing"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ba3cc151_423944d6","line":34,"updated":"2015-07-08 09:01:28.000000000","message":"Type-key api will return 500 error code on passing key or value with more than 255 characters.\n\nIf you want, you can modify like above, but subsequent lines should be wrapped at 72 characters.","commit_id":"215a8bc48382394a3c7b7bebea14545c8cf4f9e6"},{"author":{"_account_id":16258,"name":"nikesh","email":"nike.niec@gmail.com","username":"nikem"},"change_message_id":"d92149eb7c7bb1c676c11ea17c50bf70c08ce10d","unresolved":false,"context_lines":[{"line_number":34,"context_line":"   type-key api, then it returns 500 error code."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"Added a check to validate string and integer limit and returned"},{"line_number":37,"context_line":"400 if it exceeds the limit. Also added check to remove leading or trailing"},{"line_number":38,"context_line":"whitespaces and string containing only whitespaces."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"APIImpact"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ba3cc151_ad4b6ab0","line":37,"updated":"2015-07-08 09:01:28.000000000","message":"Subsequent lines should be wrapped at 72 characters. Below is link: https://wiki.openstack.org/wiki/GitCommitMessages","commit_id":"215a8bc48382394a3c7b7bebea14545c8cf4f9e6"},{"author":{"_account_id":16258,"name":"nikesh","email":"nike.niec@gmail.com","username":"nikem"},"change_message_id":"d92149eb7c7bb1c676c11ea17c50bf70c08ce10d","unresolved":false,"context_lines":[{"line_number":40,"context_line":"APIImpact"},{"line_number":41,"context_line":"1. For all above apis 400 response will be returned."},{"line_number":42,"context_line":"2. Earlier it was possible to pass only whitespaces or leading-trailing"},{"line_number":43,"context_line":"   spaces to \u0027name\u0027 parameter or \u0027key\u0027 while updating key-value in type-key api."},{"line_number":44,"context_line":"   Now it will raise 400 error if only whitespaces are passed and will remove"},{"line_number":45,"context_line":"   leading-trailing spaces if present in other cases."},{"line_number":46,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ba3cc151_0d5db646","line":43,"updated":"2015-07-08 09:01:28.000000000","message":"Subsequent lines should be wrapped at 72 characters. Below is link: https://wiki.openstack.org/wiki/GitCommitMessages","commit_id":"215a8bc48382394a3c7b7bebea14545c8cf4f9e6"},{"author":{"_account_id":16258,"name":"nikesh","email":"nike.niec@gmail.com","username":"nikem"},"change_message_id":"d92149eb7c7bb1c676c11ea17c50bf70c08ce10d","unresolved":false,"context_lines":[{"line_number":41,"context_line":"1. For all above apis 400 response will be returned."},{"line_number":42,"context_line":"2. Earlier it was possible to pass only whitespaces or leading-trailing"},{"line_number":43,"context_line":"   spaces to \u0027name\u0027 parameter or \u0027key\u0027 while updating key-value in type-key api."},{"line_number":44,"context_line":"   Now it will raise 400 error if only whitespaces are passed and will remove"},{"line_number":45,"context_line":"   leading-trailing spaces if present in other cases."},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"Closes-Bug: 1466351"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ba3cc151_ad55aa1e","line":44,"updated":"2015-07-08 09:01:28.000000000","message":"Subsequent lines should be wrapped at 72 characters. Below is link: https://wiki.openstack.org/wiki/GitCommitMessages","commit_id":"215a8bc48382394a3c7b7bebea14545c8cf4f9e6"},{"author":{"_account_id":16258,"name":"nikesh","email":"nike.niec@gmail.com","username":"nikem"},"change_message_id":"4ee6e995c016f5494e22e9455792262ce7c07758","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2015-08-03 23:46:56 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Validate string, integer limit for input parameter"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"1. Below apis will return 500 error code on passing name or description"},{"line_number":10,"context_line":"   parameters with more than 255 characters:"},{"line_number":11,"context_line":"   a. consisgroup-create"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"1a4dcd0f_e0046a16","line":8,"updated":"2015-08-04 11:18:56.000000000","message":"Subsequent lines should be wrapped at 72 characters.\nMany places, it is exceeding this limit.\nhttps://wiki.openstack.org/wiki/GitCommitMessages","commit_id":"3946f51d87ce4f4e13744ca690e0ff20e05a4883"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"94fb5fde378b5645388dca4c71e5c37f566eb655","unresolved":false,"context_lines":[{"line_number":35,"context_line":"Added new method"},{"line_number":36,"context_line":"1. validate_name_and_description() in"},{"line_number":37,"context_line":"   cinder.api.openstack.wsgi.Controller to validate length of name and"},{"line_number":38,"context_line":"   description and returned 400 if it exceeds the limit and removing"},{"line_number":39,"context_line":"   leading or trailing whitespaces and string containing only"},{"line_number":40,"context_line":"   whitespaces."},{"line_number":41,"context_line":"2. validate_string_length() in cinder.api.openstack.wsgi.Controller to"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"1a4dcd0f_a885fb59","line":38,"updated":"2015-08-14 08:33:08.000000000","message":"s/returned/return","commit_id":"cf67960607844ef3426cae4d6e2ab96f16187b99"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"94fb5fde378b5645388dca4c71e5c37f566eb655","unresolved":false,"context_lines":[{"line_number":39,"context_line":"   leading or trailing whitespaces and string containing only"},{"line_number":40,"context_line":"   whitespaces."},{"line_number":41,"context_line":"2. validate_string_length() in cinder.api.openstack.wsgi.Controller to"},{"line_number":42,"context_line":"   validate length of string and returned 400 if it exceeds the limit."},{"line_number":43,"context_line":"3. validate_integer() method in cinder.utils to validate integer"},{"line_number":44,"context_line":"   limit and returned 400 if limit exceeds."},{"line_number":45,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"1a4dcd0f_08dc2f73","line":42,"updated":"2015-08-14 08:33:08.000000000","message":"s/returned/return","commit_id":"cf67960607844ef3426cae4d6e2ab96f16187b99"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"94fb5fde378b5645388dca4c71e5c37f566eb655","unresolved":false,"context_lines":[{"line_number":41,"context_line":"2. validate_string_length() in cinder.api.openstack.wsgi.Controller to"},{"line_number":42,"context_line":"   validate length of string and returned 400 if it exceeds the limit."},{"line_number":43,"context_line":"3. validate_integer() method in cinder.utils to validate integer"},{"line_number":44,"context_line":"   limit and returned 400 if limit exceeds."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"APIImpact"},{"line_number":47,"context_line":"1. For all above apis 400 response will be returned."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"1a4dcd0f_c8e5e738","line":44,"updated":"2015-08-14 08:33:08.000000000","message":"s/returned/return","commit_id":"cf67960607844ef3426cae4d6e2ab96f16187b99"}],"cinder/api/contrib/cgsnapshots.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"bc348f32a5af049bea950e3220cfed44b5a40283","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            raise exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"        name \u003d cgsnapshot.get(\u0027name\u0027, None)"},{"line_number":184,"context_line":"        if name is not None and isinstance(name, six.string_types):"},{"line_number":185,"context_line":"            name \u003d name.strip()"},{"line_number":186,"context_line":"            try:"},{"line_number":187,"context_line":"                utils.check_string_length(name, \u0027cgsnapshot name\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_b6cee02b","line":184,"updated":"2015-06-25 20:51:55.000000000","message":"No need to check for None, isinstance will return False if name is None.","commit_id":"43d9b50ae030d834ccfca71285f39b4e21ad2843"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"bc348f32a5af049bea950e3220cfed44b5a40283","unresolved":false,"context_lines":[{"line_number":190,"context_line":"                raise exc.HTTPBadRequest(explanation\u003derror.msg)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        description \u003d cgsnapshot.get(\u0027description\u0027, None)"},{"line_number":193,"context_line":"        if description is not None:"},{"line_number":194,"context_line":"            try:"},{"line_number":195,"context_line":"                utils.check_string_length(description,"},{"line_number":196,"context_line":"                                          \u0027cgsnapshot description\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_3153bae4","line":193,"updated":"2015-06-25 20:51:55.000000000","message":"Why don\u0027t you check for description to be six.string_types?","commit_id":"43d9b50ae030d834ccfca71285f39b4e21ad2843"},{"author":{"_account_id":10300,"name":"Pranali Deore","email":"pranalideore@gmail.com","username":"PranaliDeore"},"change_message_id":"45f50f28445d63ca91f7326aca8dc9d07c354fae","unresolved":false,"context_lines":[{"line_number":190,"context_line":"                raise exc.HTTPBadRequest(explanation\u003derror.msg)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        description \u003d cgsnapshot.get(\u0027description\u0027, None)"},{"line_number":193,"context_line":"        if description is not None:"},{"line_number":194,"context_line":"            try:"},{"line_number":195,"context_line":"                utils.check_string_length(description,"},{"line_number":196,"context_line":"                                          \u0027cgsnapshot description\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_e1532438","line":193,"in_reply_to":"fa32b979_3153bae4","updated":"2015-06-26 11:55:09.000000000","message":"For description I am not using .strip() to remove leading and trailing spaces so I have not added this check here.","commit_id":"43d9b50ae030d834ccfca71285f39b4e21ad2843"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f83624f23c2b89086eabb20f6fa5bb547ef777ee","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            raise exc.HTTPNotFound(explanation\u003derror.msg)"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"        name \u003d cgsnapshot.get(\u0027name\u0027, None)"},{"line_number":182,"context_line":"        if isinstance(name, six.string_types):"},{"line_number":183,"context_line":"            name \u003d name.strip()"},{"line_number":184,"context_line":"            utils.validate_string(name, \u0027cgsnapshot name\u0027,"},{"line_number":185,"context_line":"                                  min_length\u003d1, max_length\u003d255)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_d337a44b","line":182,"updated":"2015-07-07 08:25:21.000000000","message":"I don\u0027t think this way of doing it is correct, since if it\u0027s not a string type we\u0027ll not be raising exception InvalidInput as we should.","commit_id":"215a8bc48382394a3c7b7bebea14545c8cf4f9e6"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"3e7630e33b2b0a26d3ce33945a43d217b18bec40","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            utils.validate_string(name, \u0027Cgsnapshot name\u0027,"},{"line_number":180,"context_line":"                                  min_length\u003d1, max_length\u003d255)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        if description is not None:"},{"line_number":183,"context_line":"            utils.validate_string(description, \u0027Cgsnapshot description\u0027,"},{"line_number":184,"context_line":"                                  min_length\u003d0, max_length\u003d255)"},{"line_number":185,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_cf3cadca","line":182,"updated":"2015-07-14 13:49:12.000000000","message":"Huh... I would\u0027ve thought we\u0027d make a zero length string None.  Seems like a good detail you have here to check 0 length.  Thanks!","commit_id":"479fee2ab23dec0eb5010d11e24b00050dc002e5"},{"author":{"_account_id":14377,"name":"Apoorva","email":"apps.desh@gmail.com","username":"apoorvad"},"change_message_id":"0a0ef4dea4716b9db4d86832275ad5ec30192994","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        except exception.ConsistencyGroupNotFound as error:"},{"line_number":172,"context_line":"            raise exc.HTTPNotFound(explanation\u003derror.msg)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"        self.validate_name_and_description(cgsnapshot)"},{"line_number":175,"context_line":"        name \u003d cgsnapshot.get(\u0027name\u0027, None)"},{"line_number":176,"context_line":"        description \u003d cgsnapshot.get(\u0027description\u0027, None)"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3a50d1a3_1b6ad7b5","line":174,"updated":"2015-08-02 17:56:24.000000000","message":"Can we do this right after line#161? To avoid call on 170 if validation fails.","commit_id":"e8f444f77dad792b3eb0cb9a7e39363389bb124e"},{"author":{"_account_id":10300,"name":"Pranali Deore","email":"pranalideore@gmail.com","username":"PranaliDeore"},"change_message_id":"2e8daa17c22ec4e2820273abef06b9769e90b3b4","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        except exception.ConsistencyGroupNotFound as error:"},{"line_number":172,"context_line":"            raise exc.HTTPNotFound(explanation\u003derror.msg)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"        self.validate_name_and_description(cgsnapshot)"},{"line_number":175,"context_line":"        name \u003d cgsnapshot.get(\u0027name\u0027, None)"},{"line_number":176,"context_line":"        description \u003d cgsnapshot.get(\u0027description\u0027, None)"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3a50d1a3_bed86754","line":174,"in_reply_to":"3a50d1a3_1b6ad7b5","updated":"2015-08-03 07:03:48.000000000","message":"Done","commit_id":"e8f444f77dad792b3eb0cb9a7e39363389bb124e"}],"cinder/api/contrib/qos_specs_manage.py":[{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"641aaf0cd8c67fc4ecd919c1582ffb66ca861626","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            msg \u003d _(\"Please specify a name for QoS specs.\")"},{"line_number":132,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        if isinstance(name, six.string_types):"},{"line_number":135,"context_line":"            name \u003d name.strip()"},{"line_number":136,"context_line":"            utils.validate_string(name, \u0027QoS specs name\u0027,"},{"line_number":137,"context_line":"                                  min_length\u003d1, max_length\u003d255)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_bb53a2e1","line":134,"updated":"2015-07-14 16:12:54.000000000","message":"I think this should just be \"else:\" .\n\nWe were already making the assumption that this was a string by comparing it to \"\".\nIf it\u0027s not a string, we want the validation to fail anyway.","commit_id":"479fee2ab23dec0eb5010d11e24b00050dc002e5"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"9e65ee97336acd8a9c45c35eb08f4f25821b3698","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            msg \u003d _(\"Please specify a name for QoS specs.\")"},{"line_number":132,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        if isinstance(name, six.string_types):"},{"line_number":135,"context_line":"            name \u003d name.strip()"},{"line_number":136,"context_line":"            utils.validate_string(name, \u0027QoS specs name\u0027,"},{"line_number":137,"context_line":"                                  min_length\u003d1, max_length\u003d255)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_9a947d43","line":134,"in_reply_to":"9a41bdd9_bb53a2e1","updated":"2015-07-15 03:33:27.000000000","message":"I agree, else makes more sense here","commit_id":"479fee2ab23dec0eb5010d11e24b00050dc002e5"}],"cinder/api/contrib/quota_classes.py":[{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"62af65547ac83aa5af9f3e6dba74a0b34dfeeae9","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                     \" in request body.\"))"},{"line_number":78,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        for key in body[\u0027quota_class_set\u0027].keys():"},{"line_number":81,"context_line":"            if key in QUOTAS:"},{"line_number":82,"context_line":"                try:"},{"line_number":83,"context_line":"                    value \u003d utils.validate_integer("}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_1b10f058","line":80,"updated":"2015-06-26 15:10:03.000000000","message":"you could do for key, value in body[\u0027quota_class_set\u0027].iteritems()","commit_id":"ab3d7ebedd4d1507f0132383b6a267b87148c45c"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"1a50c5056c59b587fd9cb717c2f42a362546d91b","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                     \" in request body.\"))"},{"line_number":78,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        for key in body[\u0027quota_class_set\u0027].keys():"},{"line_number":81,"context_line":"            if key in QUOTAS:"},{"line_number":82,"context_line":"                try:"},{"line_number":83,"context_line":"                    value \u003d utils.validate_integer("}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_185fab73","line":80,"in_reply_to":"fa32b979_1b10f058","updated":"2015-06-29 11:55:14.000000000","message":"If you do that, please use items() instead of iteritems(). We don\u0027t want to break Python 3 support: https://review.openstack.org/#/c/191063/","commit_id":"ab3d7ebedd4d1507f0132383b6a267b87148c45c"},{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"62af65547ac83aa5af9f3e6dba74a0b34dfeeae9","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            if key in QUOTAS:"},{"line_number":82,"context_line":"                try:"},{"line_number":83,"context_line":"                    value \u003d utils.validate_integer("},{"line_number":84,"context_line":"                        body[\u0027quota_class_set\u0027][key], key,"},{"line_number":85,"context_line":"                        min_value\u003d-1, max_value\u003ddb.MAX_INT)"},{"line_number":86,"context_line":"                    db.quota_class_update(context, quota_class, key, value)"},{"line_number":87,"context_line":"                except exception.InvalidInput as error:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_3b15b448","line":84,"updated":"2015-06-26 15:10:03.000000000","message":"then use value here instead of body[\u0027quota_class_set\u0027][key]","commit_id":"ab3d7ebedd4d1507f0132383b6a267b87148c45c"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"a1f12cf9337a4a6a309978f08e2a40c610851be1","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                    value \u003d self.validate_integer(value, key, min_value\u003d-1,"},{"line_number":84,"context_line":"                                                  max_value\u003ddb.MAX_INT)"},{"line_number":85,"context_line":"                    db.quota_class_update(context, quota_class, key, value)"},{"line_number":86,"context_line":"                except exception.InvalidInput as error:"},{"line_number":87,"context_line":"                    raise webob.exc.HTTPBadRequest(explanation\u003derror.msg)"},{"line_number":88,"context_line":"                except exception.QuotaClassNotFound:"},{"line_number":89,"context_line":"                    db.quota_class_create(context, quota_class, key, value)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_eb234156","line":86,"updated":"2015-07-29 13:02:34.000000000","message":"I suggest raise  HTTPBadRequest  from validate_integer to avoid code duplication, also imo it\u0027s confused when validate_string_length throw HTTPBadRequest  and validate_integer InvalidInput.","commit_id":"7488dacb40e172720499d2842449579d056a6f88"}],"cinder/api/contrib/types_extra_specs.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f83624f23c2b89086eabb20f6fa5bb547ef777ee","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            utils.validate_string(key, \u0027Key\u0027,"},{"line_number":91,"context_line":"                                  min_length\u003d1, max_length\u003d255)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"            specs[key] \u003d value.strip()"},{"line_number":94,"context_line":"            utils.validate_string(specs[key], \u0027Value\u0027,"},{"line_number":95,"context_line":"                                  min_length\u003d0, max_length\u003d255)"},{"line_number":96,"context_line":"        db.volume_type_extra_specs_update_or_create(context,"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_53e07496","line":93,"updated":"2015-07-07 08:25:21.000000000","message":"You haven\u0027t checked that value is a string type.","commit_id":"215a8bc48382394a3c7b7bebea14545c8cf4f9e6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f83624f23c2b89086eabb20f6fa5bb547ef777ee","unresolved":false,"context_lines":[{"line_number":121,"context_line":"            utils.validate_string(key, \u0027Key\u0027,"},{"line_number":122,"context_line":"                                  min_length\u003d1, max_length\u003d255)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"            body[key] \u003d value.strip()"},{"line_number":125,"context_line":"            utils.validate_string(body[key], \u0027Value\u0027,"},{"line_number":126,"context_line":"                                  min_length\u003d0, max_length\u003d255)"},{"line_number":127,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_d3ea4474","line":124,"updated":"2015-07-07 08:25:21.000000000","message":"Same here","commit_id":"215a8bc48382394a3c7b7bebea14545c8cf4f9e6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6f62769a3418b86c3ae141b4407a508343b9e35f","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        \"\"\"Validating key and value of extra specs.\"\"\""},{"line_number":79,"context_line":"        for key, value in specs.items():"},{"line_number":80,"context_line":"            if key is not None:"},{"line_number":81,"context_line":"                self.validate_string_length(key, \u0027Key\u0027,"},{"line_number":82,"context_line":"                                            min_length\u003d1, max_length\u003d255)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"            if value is not None:"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_b74064a6","line":81,"updated":"2015-07-28 17:51:57.000000000","message":"We shold add the key that failed","commit_id":"669fc817482fd1e85395e7258ee120f38ffd9781"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6f62769a3418b86c3ae141b4407a508343b9e35f","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                                            min_length\u003d1, max_length\u003d255)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"            if value is not None:"},{"line_number":85,"context_line":"                self.validate_string_length(value, \u0027Value\u0027,"},{"line_number":86,"context_line":"                                            min_length\u003d0, max_length\u003d255)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    @wsgi.serializers(xml\u003dVolumeTypeExtraSpecsTemplate)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_771dfcbc","line":85,"updated":"2015-07-28 17:51:57.000000000","message":"We should add the key which value failed","commit_id":"669fc817482fd1e85395e7258ee120f38ffd9781"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"726cf8a8fec961d2e79fd9cc6dcde5e27192be9b","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        \"\"\"Validating key and value of extra specs.\"\"\""},{"line_number":79,"context_line":"        for key, value in specs.items():"},{"line_number":80,"context_line":"            if key is not None:"},{"line_number":81,"context_line":"                self.validate_string_length(key, key,"},{"line_number":82,"context_line":"                                            min_length\u003d1, max_length\u003d255)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"            if value is not None:"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a50d1a3_206b3bf3","line":81,"updated":"2015-07-30 17:36:42.000000000","message":"Wouldn\u0027t it be better to be a little more descriptive, as in  u\u0027Key %s\u0027 % key","commit_id":"e3d37dca7ce932b8ce1c8456ff2469da1c29ce39"},{"author":{"_account_id":10300,"name":"Pranali Deore","email":"pranalideore@gmail.com","username":"PranaliDeore"},"change_message_id":"4b300049273f820db38d03580217eb7f5ebb6506","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        \"\"\"Validating key and value of extra specs.\"\"\""},{"line_number":79,"context_line":"        for key, value in specs.items():"},{"line_number":80,"context_line":"            if key is not None:"},{"line_number":81,"context_line":"                self.validate_string_length(key, key,"},{"line_number":82,"context_line":"                                            min_length\u003d1, max_length\u003d255)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"            if value is not None:"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a50d1a3_3bb910ed","line":81,"in_reply_to":"3a50d1a3_206b3bf3","updated":"2015-07-31 09:24:28.000000000","message":"Done","commit_id":"e3d37dca7ce932b8ce1c8456ff2469da1c29ce39"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"726cf8a8fec961d2e79fd9cc6dcde5e27192be9b","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                                            min_length\u003d1, max_length\u003d255)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"            if value is not None:"},{"line_number":85,"context_line":"                self.validate_string_length(value, key,"},{"line_number":86,"context_line":"                                            min_length\u003d0, max_length\u003d255)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    @wsgi.serializers(xml\u003dVolumeTypeExtraSpecsTemplate)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a50d1a3_60baa373","line":85,"updated":"2015-07-30 17:36:42.000000000","message":"Won\u0027t this send an incorrect error message talking about the key when the failure is on the value?  I meant something like u\u0027Value for key %s failed\u0027 % key","commit_id":"e3d37dca7ce932b8ce1c8456ff2469da1c29ce39"},{"author":{"_account_id":10300,"name":"Pranali Deore","email":"pranalideore@gmail.com","username":"PranaliDeore"},"change_message_id":"4b300049273f820db38d03580217eb7f5ebb6506","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                                            min_length\u003d1, max_length\u003d255)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"            if value is not None:"},{"line_number":85,"context_line":"                self.validate_string_length(value, key,"},{"line_number":86,"context_line":"                                            min_length\u003d0, max_length\u003d255)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    @wsgi.serializers(xml\u003dVolumeTypeExtraSpecsTemplate)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a50d1a3_dbc82c78","line":85,"in_reply_to":"3a50d1a3_60baa373","updated":"2015-07-31 09:24:28.000000000","message":"Done","commit_id":"e3d37dca7ce932b8ce1c8456ff2469da1c29ce39"}],"cinder/api/contrib/volume_manage.py":[{"author":{"_account_id":14377,"name":"Apoorva","email":"apps.desh@gmail.com","username":"apoorvad"},"change_message_id":"0a0ef4dea4716b9db4d86832275ad5ec30192994","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        else:"},{"line_number":129,"context_line":"            kwargs[\u0027volume_type\u0027] \u003d {}"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        self.validate_name_and_description(volume)"},{"line_number":132,"context_line":"        kwargs[\u0027name\u0027] \u003d volume.get(\u0027name\u0027, None)"},{"line_number":133,"context_line":"        kwargs[\u0027description\u0027] \u003d volume.get(\u0027description\u0027, None)"},{"line_number":134,"context_line":"        kwargs[\u0027metadata\u0027] \u003d volume.get(\u0027metadata\u0027, None)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a50d1a3_fb65abe0","line":131,"updated":"2015-08-02 17:56:24.000000000","message":"Similarly can we do this right after #101?","commit_id":"e8f444f77dad792b3eb0cb9a7e39363389bb124e"},{"author":{"_account_id":10300,"name":"Pranali Deore","email":"pranalideore@gmail.com","username":"PranaliDeore"},"change_message_id":"2e8daa17c22ec4e2820273abef06b9769e90b3b4","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        else:"},{"line_number":129,"context_line":"            kwargs[\u0027volume_type\u0027] \u003d {}"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        self.validate_name_and_description(volume)"},{"line_number":132,"context_line":"        kwargs[\u0027name\u0027] \u003d volume.get(\u0027name\u0027, None)"},{"line_number":133,"context_line":"        kwargs[\u0027description\u0027] \u003d volume.get(\u0027description\u0027, None)"},{"line_number":134,"context_line":"        kwargs[\u0027metadata\u0027] \u003d volume.get(\u0027metadata\u0027, None)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a50d1a3_deed33f1","line":131,"in_reply_to":"3a50d1a3_fb65abe0","updated":"2015-08-03 07:03:48.000000000","message":"Done","commit_id":"e8f444f77dad792b3eb0cb9a7e39363389bb124e"}],"cinder/api/contrib/volume_type_encryption.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f83624f23c2b89086eabb20f6fa5bb547ef777ee","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def _check_encryption_input(self, encryption, create\u003dTrue):"},{"line_number":61,"context_line":"        if \u0027key_size\u0027 in encryption.keys():"},{"line_number":62,"context_line":"            if encryption[\u0027key_size\u0027] is not None:"},{"line_number":63,"context_line":"                try:"},{"line_number":64,"context_line":"                    encryption[\u0027key_size\u0027] \u003d utils.validate_integer("},{"line_number":65,"context_line":"                        encryption[\u0027key_size\u0027], \u0027key_size\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_30e5a6a7","line":62,"updated":"2015-07-07 08:25:21.000000000","message":"I believe we can replace these 2 lines with:\n\n if encryption.get(\u0027key_size\u0027) is not None:","commit_id":"215a8bc48382394a3c7b7bebea14545c8cf4f9e6"}],"cinder/api/openstack/wsgi.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6f62769a3418b86c3ae141b4407a508343b9e35f","unresolved":false,"context_lines":[{"line_number":1218,"context_line":"                              \"request body.\") % entity_name)"},{"line_number":1219,"context_line":""},{"line_number":1220,"context_line":"    @staticmethod"},{"line_number":1221,"context_line":"    def validate_name_and_description(body):"},{"line_number":1222,"context_line":"        name \u003d body.get(\u0027name\u0027)"},{"line_number":1223,"context_line":"        if name is not None:"},{"line_number":1224,"context_line":"            if isinstance(name, six.string_types):"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_bcc5ab8e","line":1221,"updated":"2015-07-28 17:51:57.000000000","message":"You are already adding this in another patch, you should rebase this patch on top of the other one to have this method instead of adding it again.","commit_id":"669fc817482fd1e85395e7258ee120f38ffd9781"},{"author":{"_account_id":10300,"name":"Pranali Deore","email":"pranalideore@gmail.com","username":"PranaliDeore"},"change_message_id":"faf44767a3d10f417b603689fcc6d21bd53d5f01","unresolved":false,"context_lines":[{"line_number":1218,"context_line":"                              \"request body.\") % entity_name)"},{"line_number":1219,"context_line":""},{"line_number":1220,"context_line":"    @staticmethod"},{"line_number":1221,"context_line":"    def validate_name_and_description(body):"},{"line_number":1222,"context_line":"        name \u003d body.get(\u0027name\u0027)"},{"line_number":1223,"context_line":"        if name is not None:"},{"line_number":1224,"context_line":"            if isinstance(name, six.string_types):"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_4c5932fc","line":1221,"in_reply_to":"3a50d1a3_bcc5ab8e","updated":"2015-07-29 11:49:06.000000000","message":"Done","commit_id":"669fc817482fd1e85395e7258ee120f38ffd9781"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6f62769a3418b86c3ae141b4407a508343b9e35f","unresolved":false,"context_lines":[{"line_number":1268,"context_line":"        :returns: integer"},{"line_number":1269,"context_line":"        \"\"\""},{"line_number":1270,"context_line":"        try:"},{"line_number":1271,"context_line":"            value \u003d int(str(value))"},{"line_number":1272,"context_line":"        except (ValueError, UnicodeEncodeError):"},{"line_number":1273,"context_line":"            raise exception.InvalidInput(reason\u003d("},{"line_number":1274,"context_line":"                _(\u0027%s must be an integer\u0027) % name))"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_fca7b3b9","line":1271,"updated":"2015-07-28 17:51:57.000000000","message":"You should probably use `six.string_type` instead of `str`","commit_id":"669fc817482fd1e85395e7258ee120f38ffd9781"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"d222becdb1a35ab8c1570e448bef4c45336c8692","unresolved":false,"context_lines":[{"line_number":1268,"context_line":"        :returns: integer"},{"line_number":1269,"context_line":"        \"\"\""},{"line_number":1270,"context_line":"        try:"},{"line_number":1271,"context_line":"            value \u003d int(str(value))"},{"line_number":1272,"context_line":"        except (ValueError, UnicodeEncodeError):"},{"line_number":1273,"context_line":"            raise exception.InvalidInput(reason\u003d("},{"line_number":1274,"context_line":"                _(\u0027%s must be an integer\u0027) % name))"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_a0566b28","line":1271,"in_reply_to":"3a50d1a3_ccbd42b2","updated":"2015-07-30 17:36:23.000000000","message":"I agree there is no need to convert it, but if you wanted to, I would use string_type, not string_types, there is a difference.  ;-)","commit_id":"669fc817482fd1e85395e7258ee120f38ffd9781"},{"author":{"_account_id":10300,"name":"Pranali Deore","email":"pranalideore@gmail.com","username":"PranaliDeore"},"change_message_id":"faf44767a3d10f417b603689fcc6d21bd53d5f01","unresolved":false,"context_lines":[{"line_number":1268,"context_line":"        :returns: integer"},{"line_number":1269,"context_line":"        \"\"\""},{"line_number":1270,"context_line":"        try:"},{"line_number":1271,"context_line":"            value \u003d int(str(value))"},{"line_number":1272,"context_line":"        except (ValueError, UnicodeEncodeError):"},{"line_number":1273,"context_line":"            raise exception.InvalidInput(reason\u003d("},{"line_number":1274,"context_line":"                _(\u0027%s must be an integer\u0027) % name))"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_ccbd42b2","line":1271,"in_reply_to":"3a50d1a3_fca7b3b9","updated":"2015-07-29 11:49:06.000000000","message":"six.string_types is a \u0027tuple\u0027 object, so if we check if isinstance(value, six.string_types) it will only check for string type and for all other data types we will have to check such conditions.\n\nIMO, here there is no need to convert \u0027value\u0027 to \u0027str\u0027 before converting to \u0027int\u0027.","commit_id":"669fc817482fd1e85395e7258ee120f38ffd9781"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"2275411ddd14e8a5cd1d43c7705295eeb31781fc","unresolved":false,"context_lines":[{"line_number":1271,"context_line":"            value \u003d int(str(value))"},{"line_number":1272,"context_line":"        except (ValueError, UnicodeEncodeError):"},{"line_number":1273,"context_line":"            raise exception.InvalidInput(reason\u003d("},{"line_number":1274,"context_line":"                _(\u0027%s must be an integer\u0027) % name))"},{"line_number":1275,"context_line":""},{"line_number":1276,"context_line":"        if min_value is not None and value \u003c min_value:"},{"line_number":1277,"context_line":"            raise exception.InvalidInput("}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_53ab7889","line":1274,"updated":"2015-07-27 14:55:26.000000000","message":"\".\" at EOL","commit_id":"669fc817482fd1e85395e7258ee120f38ffd9781"},{"author":{"_account_id":10300,"name":"Pranali Deore","email":"pranalideore@gmail.com","username":"PranaliDeore"},"change_message_id":"faf44767a3d10f417b603689fcc6d21bd53d5f01","unresolved":false,"context_lines":[{"line_number":1271,"context_line":"            value \u003d int(str(value))"},{"line_number":1272,"context_line":"        except (ValueError, UnicodeEncodeError):"},{"line_number":1273,"context_line":"            raise exception.InvalidInput(reason\u003d("},{"line_number":1274,"context_line":"                _(\u0027%s must be an integer\u0027) % name))"},{"line_number":1275,"context_line":""},{"line_number":1276,"context_line":"        if min_value is not None and value \u003c min_value:"},{"line_number":1277,"context_line":"            raise exception.InvalidInput("}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_8ce2dad3","line":1274,"in_reply_to":"3a50d1a3_53ab7889","updated":"2015-07-29 11:49:06.000000000","message":"Done","commit_id":"669fc817482fd1e85395e7258ee120f38ffd9781"},{"author":{"_account_id":16883,"name":"huyang","email":"huyang1@huawei.com","username":"huyang"},"change_message_id":"50d793c4feb14df812a3b0b6155721ec4769addf","unresolved":false,"context_lines":[{"line_number":1243,"context_line":"    @staticmethod"},{"line_number":1244,"context_line":"    def validate_string_length(value, entity_name, min_length\u003d0,"},{"line_number":1245,"context_line":"                               max_length\u003dNone, remove_whitespaces\u003dFalse):"},{"line_number":1246,"context_line":"        \"\"\"Check the length of specified string"},{"line_number":1247,"context_line":""},{"line_number":1248,"context_line":"        :param value: the value of the string"},{"line_number":1249,"context_line":"        :param entity_name: the name of the string"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a4dcd0f_5ea3f19e","line":1246,"updated":"2015-08-03 14:09:17.000000000","message":"Missing . at EOL.","commit_id":"5670c376340b467815dc65a342fb79590c8884e8"},{"author":{"_account_id":10300,"name":"Pranali Deore","email":"pranalideore@gmail.com","username":"PranaliDeore"},"change_message_id":"a53ac3666c1346446a1e9384470a3faeda846f17","unresolved":false,"context_lines":[{"line_number":1243,"context_line":"    @staticmethod"},{"line_number":1244,"context_line":"    def validate_string_length(value, entity_name, min_length\u003d0,"},{"line_number":1245,"context_line":"                               max_length\u003dNone, remove_whitespaces\u003dFalse):"},{"line_number":1246,"context_line":"        \"\"\"Check the length of specified string"},{"line_number":1247,"context_line":""},{"line_number":1248,"context_line":"        :param value: the value of the string"},{"line_number":1249,"context_line":"        :param entity_name: the name of the string"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a4dcd0f_ce588f59","line":1246,"in_reply_to":"1a4dcd0f_5ea3f19e","updated":"2015-08-04 07:00:41.000000000","message":"Done","commit_id":"5670c376340b467815dc65a342fb79590c8884e8"},{"author":{"_account_id":16883,"name":"huyang","email":"huyang1@huawei.com","username":"huyang"},"change_message_id":"50d793c4feb14df812a3b0b6155721ec4769addf","unresolved":false,"context_lines":[{"line_number":1249,"context_line":"        :param entity_name: the name of the string"},{"line_number":1250,"context_line":"        :param min_length: the min_length of the string"},{"line_number":1251,"context_line":"        :param max_length: the max_length of the string"},{"line_number":1252,"context_line":"        :remove_whitespaces: True if trimming whitespaces is needed else False"},{"line_number":1253,"context_line":"        \"\"\""},{"line_number":1254,"context_line":"        if isinstance(value, six.string_types) and remove_whitespaces:"},{"line_number":1255,"context_line":"            value \u003d value.strip()"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a4dcd0f_c1a966e1","line":1252,"updated":"2015-08-03 14:09:17.000000000","message":":param remove_whitespaces?","commit_id":"5670c376340b467815dc65a342fb79590c8884e8"},{"author":{"_account_id":10300,"name":"Pranali Deore","email":"pranalideore@gmail.com","username":"PranaliDeore"},"change_message_id":"a53ac3666c1346446a1e9384470a3faeda846f17","unresolved":false,"context_lines":[{"line_number":1249,"context_line":"        :param entity_name: the name of the string"},{"line_number":1250,"context_line":"        :param min_length: the min_length of the string"},{"line_number":1251,"context_line":"        :param max_length: the max_length of the string"},{"line_number":1252,"context_line":"        :remove_whitespaces: True if trimming whitespaces is needed else False"},{"line_number":1253,"context_line":"        \"\"\""},{"line_number":1254,"context_line":"        if isinstance(value, six.string_types) and remove_whitespaces:"},{"line_number":1255,"context_line":"            value \u003d value.strip()"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a4dcd0f_ee554b1d","line":1252,"in_reply_to":"1a4dcd0f_c1a966e1","updated":"2015-08-04 07:00:41.000000000","message":"Done","commit_id":"5670c376340b467815dc65a342fb79590c8884e8"},{"author":{"_account_id":16883,"name":"huyang","email":"huyang1@huawei.com","username":"huyang"},"change_message_id":"50d793c4feb14df812a3b0b6155721ec4769addf","unresolved":false,"context_lines":[{"line_number":1250,"context_line":"        :param min_length: the min_length of the string"},{"line_number":1251,"context_line":"        :param max_length: the max_length of the string"},{"line_number":1252,"context_line":"        :remove_whitespaces: True if trimming whitespaces is needed else False"},{"line_number":1253,"context_line":"        \"\"\""},{"line_number":1254,"context_line":"        if isinstance(value, six.string_types) and remove_whitespaces:"},{"line_number":1255,"context_line":"            value \u003d value.strip()"},{"line_number":1256,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a4dcd0f_e17342b3","line":1253,"updated":"2015-08-03 14:09:17.000000000","message":"Missing a blank line. Keep consistent with line 1273.","commit_id":"5670c376340b467815dc65a342fb79590c8884e8"},{"author":{"_account_id":10300,"name":"Pranali Deore","email":"pranalideore@gmail.com","username":"PranaliDeore"},"change_message_id":"a53ac3666c1346446a1e9384470a3faeda846f17","unresolved":false,"context_lines":[{"line_number":1250,"context_line":"        :param min_length: the min_length of the string"},{"line_number":1251,"context_line":"        :param max_length: the max_length of the string"},{"line_number":1252,"context_line":"        :remove_whitespaces: True if trimming whitespaces is needed else False"},{"line_number":1253,"context_line":"        \"\"\""},{"line_number":1254,"context_line":"        if isinstance(value, six.string_types) and remove_whitespaces:"},{"line_number":1255,"context_line":"            value \u003d value.strip()"},{"line_number":1256,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a4dcd0f_ce064f20","line":1253,"in_reply_to":"1a4dcd0f_e17342b3","updated":"2015-08-04 07:00:41.000000000","message":"Removed blank line from line 1273 as per docstring standard","commit_id":"5670c376340b467815dc65a342fb79590c8884e8"}],"cinder/db/api.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"7e10d49847a2604400e7b96162e5ce4ed7b42271","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"IMPL \u003d db_concurrency.TpoolDbapiWrapper(CONF, _BACKEND_MAPPING)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"# The maximum value a signed INT type may have"},{"line_number":70,"context_line":"MAX_INT \u003d 0x7FFFFFFF"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"###################"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_661791ee","line":69,"updated":"2015-06-24 13:39:05.000000000","message":"The wording of this is a little confusing. Reword or remove \"may have\".","commit_id":"77aa2c5af61aea1da10f7242f3db0e80ab01b0e6"}],"cinder/tests/unit/api/contrib/test_cgsnapshots.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"7e10d49847a2604400e7b96162e5ce4ed7b42271","unresolved":false,"context_lines":[{"line_number":403,"context_line":"        res \u003d req.get_response(fakes.wsgi_app())"},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"        res_dict \u003d json.loads(res.body)"},{"line_number":406,"context_line":"        LOG.info(res_dict)"},{"line_number":407,"context_line":""},{"line_number":408,"context_line":"        self.assertEqual(res.status_int, 400)"},{"line_number":409,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_e6b2c195","line":406,"updated":"2015-06-24 13:39:05.000000000","message":"Please remove logging from unit tests.","commit_id":"77aa2c5af61aea1da10f7242f3db0e80ab01b0e6"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"7e10d49847a2604400e7b96162e5ce4ed7b42271","unresolved":false,"context_lines":[{"line_number":405,"context_line":"        res_dict \u003d json.loads(res.body)"},{"line_number":406,"context_line":"        LOG.info(res_dict)"},{"line_number":407,"context_line":""},{"line_number":408,"context_line":"        self.assertEqual(res.status_int, 400)"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"    def test_create_cgsnapshot_with_only_whitespace_as_name(self):"},{"line_number":411,"context_line":"        consistencygroup_id \u003d utils.create_consistencygroup(self.context)[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_66a79150","line":408,"updated":"2015-06-24 13:39:05.000000000","message":"assertEqual argument order should be (expected, actual).","commit_id":"77aa2c5af61aea1da10f7242f3db0e80ab01b0e6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6f62769a3418b86c3ae141b4407a508343b9e35f","unresolved":false,"context_lines":[{"line_number":341,"context_line":"                                    consistencygroup_id)"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"    @mock.patch("},{"line_number":344,"context_line":"        \u0027cinder.api.openstack.wsgi.Controller.validate_name_and_description\u0027)"},{"line_number":345,"context_line":"    def test_create_cgsnapshot_json(self, mock_validate):"},{"line_number":346,"context_line":"        cgsnapshot_id \u003d \"1\""},{"line_number":347,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_5cbca7ba","line":344,"updated":"2015-07-28 17:51:57.000000000","message":"Why do we need to mock it?","commit_id":"669fc817482fd1e85395e7258ee120f38ffd9781"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"d222becdb1a35ab8c1570e448bef4c45336c8692","unresolved":false,"context_lines":[{"line_number":341,"context_line":"                                    consistencygroup_id)"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"    @mock.patch("},{"line_number":344,"context_line":"        \u0027cinder.api.openstack.wsgi.Controller.validate_name_and_description\u0027)"},{"line_number":345,"context_line":"    def test_create_cgsnapshot_json(self, mock_validate):"},{"line_number":346,"context_line":"        cgsnapshot_id \u003d \"1\""},{"line_number":347,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_a02d0baa","line":344,"in_reply_to":"3a50d1a3_4cd292d2","updated":"2015-07-30 17:36:23.000000000","message":"Sorry, I went away for a week and apparently I forgot everything  :-(","commit_id":"669fc817482fd1e85395e7258ee120f38ffd9781"},{"author":{"_account_id":10300,"name":"Pranali Deore","email":"pranalideore@gmail.com","username":"PranaliDeore"},"change_message_id":"faf44767a3d10f417b603689fcc6d21bd53d5f01","unresolved":false,"context_lines":[{"line_number":341,"context_line":"                                    consistencygroup_id)"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"    @mock.patch("},{"line_number":344,"context_line":"        \u0027cinder.api.openstack.wsgi.Controller.validate_name_and_description\u0027)"},{"line_number":345,"context_line":"    def test_create_cgsnapshot_json(self, mock_validate):"},{"line_number":346,"context_line":"        cgsnapshot_id \u003d \"1\""},{"line_number":347,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_4cd292d2","line":344,"in_reply_to":"3a50d1a3_5cbca7ba","updated":"2015-07-29 11:49:06.000000000","message":"As per your review comment on https://review.openstack.org/#/c/182994/8 ,\n\"test the method once (not 12 times) and in all those classes just assert that the method is called.\"\n\nFor checking whether the method is called or not we need to mock that method here.","commit_id":"669fc817482fd1e85395e7258ee120f38ffd9781"}],"cinder/tests/unit/api/contrib/test_types_extra_specs.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f83624f23c2b89086eabb20f6fa5bb547ef777ee","unresolved":false,"context_lines":[{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        body \u003d {\"extra_specs\": {key: \"value1\"}}"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        self.assertEqual(len(self.notifier.notifications), 0)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"        req \u003d fakes.HTTPRequest.blank(self.api_path)"},{"line_number":195,"context_line":"        self.assertRaises(webob.exc.HTTPBadRequest, self.controller.create,"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_30584656","line":192,"updated":"2015-07-07 08:25:21.000000000","message":"I don\u0027t see the necessity of this assert in this test.  And assert\u0027s argument order should be expected, actual.  If you add another assert like this after asserting the exception it could make sense.","commit_id":"215a8bc48382394a3c7b7bebea14545c8cf4f9e6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f83624f23c2b89086eabb20f6fa5bb547ef777ee","unresolved":false,"context_lines":[{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        body \u003d {\"extra_specs\": {\" \": \"value1\"}}"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"        self.assertEqual(len(self.notifier.notifications), 0)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        req \u003d fakes.HTTPRequest.blank(self.api_path)"},{"line_number":205,"context_line":"        self.assertRaises(webob.exc.HTTPBadRequest, self.controller.create,"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_f0309e09","line":202,"updated":"2015-07-07 08:25:21.000000000","message":"Nor here","commit_id":"215a8bc48382394a3c7b7bebea14545c8cf4f9e6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f83624f23c2b89086eabb20f6fa5bb547ef777ee","unresolved":false,"context_lines":[{"line_number":208,"context_line":"    def test_create_value_of_key_with_long_string(self):"},{"line_number":209,"context_line":"        body \u003d {\"extra_specs\": {\"key1\": \u0027a\u0027 * 256}}"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        self.assertEqual(len(self.notifier.notifications), 0)"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"        req \u003d fakes.HTTPRequest.blank(self.api_path)"},{"line_number":214,"context_line":"        self.assertRaises(webob.exc.HTTPBadRequest, self.controller.create,"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_d03d5ade","line":211,"updated":"2015-07-07 08:25:21.000000000","message":"Or here","commit_id":"215a8bc48382394a3c7b7bebea14545c8cf4f9e6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f83624f23c2b89086eabb20f6fa5bb547ef777ee","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        self.assertRaises(webob.exc.HTTPBadRequest, self.controller.create,"},{"line_number":215,"context_line":"                          req, 1, body)"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    @mock.patch.object(cinder.db, \u0027volume_type_extra_specs_update_or_create\u0027)"},{"line_number":218,"context_line":"    def test_create_value_of_key_with_only_whitespaces("},{"line_number":219,"context_line":"            self, volume_type_extra_specs_update_or_create):"},{"line_number":220,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_13ec2c28","line":217,"updated":"2015-07-07 08:25:21.000000000","message":"We should check the call to this mock.","commit_id":"215a8bc48382394a3c7b7bebea14545c8cf4f9e6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f83624f23c2b89086eabb20f6fa5bb547ef777ee","unresolved":false,"context_lines":[{"line_number":223,"context_line":"            return_value \u003d mock_return_value"},{"line_number":224,"context_line":"        body \u003d {\"extra_specs\": {\"key1\": \" \"}}"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        self.assertEqual(len(self.notifier.notifications), 0)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        req \u003d fakes.HTTPRequest.blank(self.api_path)"},{"line_number":229,"context_line":"        res_dict \u003d self.controller.create(req, 1, body)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_b356a004","line":226,"updated":"2015-07-07 08:25:21.000000000","message":"Order is expected, actual.","commit_id":"215a8bc48382394a3c7b7bebea14545c8cf4f9e6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f83624f23c2b89086eabb20f6fa5bb547ef777ee","unresolved":false,"context_lines":[{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        req \u003d fakes.HTTPRequest.blank(self.api_path)"},{"line_number":229,"context_line":"        res_dict \u003d self.controller.create(req, 1, body)"},{"line_number":230,"context_line":"        self.assertEqual(len(self.notifier.notifications), 1)"},{"line_number":231,"context_line":"        self.assertEqual(\u0027\u0027,"},{"line_number":232,"context_line":"                         res_dict[\u0027extra_specs\u0027][\u0027key1\u0027])"},{"line_number":233,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_d359e436","line":230,"updated":"2015-07-07 08:25:21.000000000","message":"Order is expected, actual.","commit_id":"215a8bc48382394a3c7b7bebea14545c8cf4f9e6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f83624f23c2b89086eabb20f6fa5bb547ef777ee","unresolved":false,"context_lines":[{"line_number":259,"context_line":""},{"line_number":260,"context_line":"        body \u003d {key: \"value1\"}"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        self.assertEqual(len(self.notifier.notifications), 0)"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"        req \u003d fakes.HTTPRequest.blank(self.api_path)"},{"line_number":265,"context_line":"        self.assertRaises(webob.exc.HTTPBadRequest, self.controller.update,"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_b36d40ce","line":262,"updated":"2015-07-07 08:25:21.000000000","message":"Not needed","commit_id":"215a8bc48382394a3c7b7bebea14545c8cf4f9e6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f83624f23c2b89086eabb20f6fa5bb547ef777ee","unresolved":false,"context_lines":[{"line_number":268,"context_line":"    def test_update_key_with_only_whitespaces(self):"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"        body \u003d {\" \": \"value1\"}"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"        self.assertEqual(len(self.notifier.notifications), 0)"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"        req \u003d fakes.HTTPRequest.blank(self.api_path)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_336290d9","line":271,"updated":"2015-07-07 08:25:21.000000000","message":"Not needed","commit_id":"215a8bc48382394a3c7b7bebea14545c8cf4f9e6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f83624f23c2b89086eabb20f6fa5bb547ef777ee","unresolved":false,"context_lines":[{"line_number":278,"context_line":"    def test_update_value_of_key_with_long_string(self):"},{"line_number":279,"context_line":"        body \u003d {\"key1\": \u0027a\u0027 * 256}"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"        self.assertEqual(len(self.notifier.notifications), 0)"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        req \u003d fakes.HTTPRequest.blank(self.api_path)"},{"line_number":284,"context_line":"        self.assertRaises(webob.exc.HTTPBadRequest, self.controller.update,"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_535dd413","line":281,"updated":"2015-07-07 08:25:21.000000000","message":"Not needed","commit_id":"215a8bc48382394a3c7b7bebea14545c8cf4f9e6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f83624f23c2b89086eabb20f6fa5bb547ef777ee","unresolved":false,"context_lines":[{"line_number":284,"context_line":"        self.assertRaises(webob.exc.HTTPBadRequest, self.controller.update,"},{"line_number":285,"context_line":"                          req, 1, \u0027key1\u0027, body)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    @mock.patch.object(cinder.db, \u0027volume_type_extra_specs_update_or_create\u0027)"},{"line_number":288,"context_line":"    def test_update_value_of_key_with_only_whitespaces("},{"line_number":289,"context_line":"            self, volume_type_extra_specs_update_or_create):"},{"line_number":290,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_f3e8a818","line":287,"updated":"2015-07-07 08:25:21.000000000","message":"We should check the call to this mock.","commit_id":"215a8bc48382394a3c7b7bebea14545c8cf4f9e6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f83624f23c2b89086eabb20f6fa5bb547ef777ee","unresolved":false,"context_lines":[{"line_number":293,"context_line":"            return_value \u003d mock_return_value"},{"line_number":294,"context_line":"        body \u003d {\"key1\": \" \"}"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"        self.assertEqual(len(self.notifier.notifications), 0)"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        req \u003d fakes.HTTPRequest.blank(self.api_path + \u0027/key1\u0027)"},{"line_number":299,"context_line":"        res_dict \u003d self.controller.update(req, 1, \u0027key1\u0027, body)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_d3a7a409","line":296,"updated":"2015-07-07 08:25:21.000000000","message":"Order is expected, actual","commit_id":"215a8bc48382394a3c7b7bebea14545c8cf4f9e6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f83624f23c2b89086eabb20f6fa5bb547ef777ee","unresolved":false,"context_lines":[{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        req \u003d fakes.HTTPRequest.blank(self.api_path + \u0027/key1\u0027)"},{"line_number":299,"context_line":"        res_dict \u003d self.controller.update(req, 1, \u0027key1\u0027, body)"},{"line_number":300,"context_line":"        self.assertEqual(len(self.notifier.notifications), 1)"},{"line_number":301,"context_line":"        self.assertEqual(\u0027\u0027,"},{"line_number":302,"context_line":"                         res_dict[\u0027key1\u0027])"},{"line_number":303,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_73afb8e3","line":300,"updated":"2015-07-07 08:25:21.000000000","message":"Order is expected, actual.  Shouldn\u0027t we check the notification.","commit_id":"215a8bc48382394a3c7b7bebea14545c8cf4f9e6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f83624f23c2b89086eabb20f6fa5bb547ef777ee","unresolved":false,"context_lines":[{"line_number":299,"context_line":"        res_dict \u003d self.controller.update(req, 1, \u0027key1\u0027, body)"},{"line_number":300,"context_line":"        self.assertEqual(len(self.notifier.notifications), 1)"},{"line_number":301,"context_line":"        self.assertEqual(\u0027\u0027,"},{"line_number":302,"context_line":"                         res_dict[\u0027key1\u0027])"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"    def test_update_item_body_uri_mismatch(self):"},{"line_number":305,"context_line":"        self.stubs.Set(cinder.db,"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_73dd786f","line":302,"updated":"2015-07-07 08:25:21.000000000","message":"This could go in line above.","commit_id":"215a8bc48382394a3c7b7bebea14545c8cf4f9e6"}],"cinder/tests/unit/api/contrib/test_volume_manage.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f83624f23c2b89086eabb20f6fa5bb547ef777ee","unresolved":false,"context_lines":[{"line_number":220,"context_line":"                           \u0027ref\u0027: \u0027fake_ref\u0027,"},{"line_number":221,"context_line":"                           \u0027name\u0027: \u0027a\u0027 * 256}}"},{"line_number":222,"context_line":"        res \u003d self._get_resp(body)"},{"line_number":223,"context_line":"        self.assertEqual(res.status_int, 400, res)"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    def test_manage_volume_with_description_too_long(self):"},{"line_number":226,"context_line":"        body \u003d {\u0027volume\u0027: {\u0027host\u0027: \u0027host_ok\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_b3c9c0ae","line":223,"updated":"2015-07-07 08:25:21.000000000","message":"Order is expected, actual in all five asserts of this file: \n\n  self.assertEqual(400, res.status_int, res)","commit_id":"215a8bc48382394a3c7b7bebea14545c8cf4f9e6"}],"cinder/tests/unit/api/contrib/test_volume_transfer.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f83624f23c2b89086eabb20f6fa5bb547ef777ee","unresolved":false,"context_lines":[{"line_number":377,"context_line":"        res_dict \u003d json.loads(res.body)"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"        self.assertEqual(res.status_int, 400)"},{"line_number":380,"context_line":"        self.assertEqual(res_dict[\u0027badRequest\u0027][\u0027code\u0027], 400)"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def test_create_transfer_with_name_only_whitespace(self):"},{"line_number":383,"context_line":"        volume_id \u003d self._create_volume(status\u003d\u0027attached\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_931b5c1c","line":380,"updated":"2015-07-07 08:25:21.000000000","message":"Please change asserts argument order in this file to expected, actual.","commit_id":"215a8bc48382394a3c7b7bebea14545c8cf4f9e6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f83624f23c2b89086eabb20f6fa5bb547ef777ee","unresolved":false,"context_lines":[{"line_number":405,"context_line":"        res \u003d req.get_response(fakes.wsgi_app())"},{"line_number":406,"context_line":""},{"line_number":407,"context_line":"        self.assertEqual(res.status_int, 202)"},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"        db.volume_destroy(context.get_admin_context(), volume_id)"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"    def test_delete_transfer_awaiting_transfer(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_13a42cb7","line":408,"updated":"2015-07-07 08:25:21.000000000","message":"You should check that it is created correctly (without trailing space).","commit_id":"215a8bc48382394a3c7b7bebea14545c8cf4f9e6"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"3980a228ac9c080850805670e584224833cb35ee","unresolved":false,"context_lines":[{"line_number":315,"context_line":"        self.assertEqual(res_dict[\u0027badRequest\u0027][\u0027code\u0027], 400)"},{"line_number":316,"context_line":"        self.assertEqual(\"Missing required element \u0027transfer\u0027 in \""},{"line_number":317,"context_line":"                         \"request body.\","},{"line_number":318,"context_line":"                         res_dict[\u0027badRequest\u0027][\u0027message\u0027])"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"    def test_create_transfer_with_body_KeyError(self):"},{"line_number":321,"context_line":"        body \u003d {\"transfer\": {\"display_name\": \"transfer1\"}}"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_fee6fd13","line":318,"updated":"2015-07-14 15:23:56.000000000","message":"This type of assert statement is kind of dangerous. If the message in the dictionary gets changed, this assert will fail. Might want to contemplate going about checking the message another way.","commit_id":"479fee2ab23dec0eb5010d11e24b00050dc002e5"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"3980a228ac9c080850805670e584224833cb35ee","unresolved":false,"context_lines":[{"line_number":509,"context_line":"        self.assertEqual(res.status_int, 400)"},{"line_number":510,"context_line":"        self.assertEqual(res_dict[\u0027badRequest\u0027][\u0027code\u0027], 400)"},{"line_number":511,"context_line":"        self.assertEqual(\"Missing required element \u0027accept\u0027 in request body.\","},{"line_number":512,"context_line":"                         res_dict[\u0027badRequest\u0027][\u0027message\u0027])"},{"line_number":513,"context_line":""},{"line_number":514,"context_line":"        db.volume_destroy(context.get_admin_context(), volume_id)"},{"line_number":515,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_5ebcc9db","line":512,"updated":"2015-07-14 15:23:56.000000000","message":"Same comment here as I made above.","commit_id":"479fee2ab23dec0eb5010d11e24b00050dc002e5"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"3980a228ac9c080850805670e584224833cb35ee","unresolved":false,"context_lines":[{"line_number":531,"context_line":"        self.assertEqual(res.status_int, 400)"},{"line_number":532,"context_line":"        self.assertEqual(res_dict[\u0027badRequest\u0027][\u0027code\u0027], 400)"},{"line_number":533,"context_line":"        self.assertEqual(\"Missing required element \u0027accept\u0027 in request body.\","},{"line_number":534,"context_line":"                         res_dict[\u0027badRequest\u0027][\u0027message\u0027])"},{"line_number":535,"context_line":""},{"line_number":536,"context_line":"    def test_accept_transfer_invalid_id_auth_key(self):"},{"line_number":537,"context_line":"        volume_id \u003d self._create_volume()"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_bec39556","line":534,"updated":"2015-07-14 15:23:56.000000000","message":"Same comment here as I made above.","commit_id":"479fee2ab23dec0eb5010d11e24b00050dc002e5"}],"cinder/utils.py":[{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"9e65ee97336acd8a9c45c35eb08f4f25821b3698","unresolved":false,"context_lines":[{"line_number":695,"context_line":""},{"line_number":696,"context_line":""},{"line_number":697,"context_line":"def validate_string(value, name, min_length\u003d0, max_length\u003dNone):"},{"line_number":698,"context_line":"    \"\"\"Validates given string."},{"line_number":699,"context_line":"    :param value: the value of the string"},{"line_number":700,"context_line":"    :param name: the name of the string"},{"line_number":701,"context_line":"    :param min_length: the min_length of the string"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_ba96213c","line":698,"updated":"2015-07-15 03:33:27.000000000","message":"Maybe worth documenting that it raises HTTPBadRequest... cinder/utils.py is used for more things than just the top level apis, probably a good warning to someone thinking to validate a string in like a driver or something.","commit_id":"479fee2ab23dec0eb5010d11e24b00050dc002e5"}]}
