)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"2de6fe8b4dce0b92823f90b0d1a6e7d08995d474","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     PranaliDeore \u003cpranali11.deore@nttdata.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-05-14 02:53:01 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Cinder v2 create and update api returns 500"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If you pass name or description parameter with long string"},{"line_number":10,"context_line":"of more than 255 characters to volume create api and volume"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7a016987_79e24fd7","line":7,"updated":"2015-05-14 18:53:49.000000000","message":"Please use a summary line that describes what this patch does rather than the failure that occurred.\n\n\"Validate name and description strings for volume create\" or similar.","commit_id":"d3f3e2961c1d74f03f19737fbda7a9bda7108c3d"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"0273e90d3dfaf8b7556f11323f201e13d39c4769","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Added a check to validate string limit and returned 400 if"},{"line_number":15,"context_line":"limit exceeds."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Closes-Bug: 1454244"},{"line_number":18,"context_line":"Change-Id: Iaf7159e816f69fd776a09828c3bc1d27fc9fdcdb"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"7a016987_3e7ae4f1","line":16,"updated":"2015-05-30 02:22:41.000000000","message":"We should add API Impact here. As API behavior has changed.","commit_id":"a4d14a3fd9074dfc2eed5b962745241c4ff289f3"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"e034f5d9ba06f3a37ba471f385e0dbafbd7fc432","unresolved":false,"context_lines":[{"line_number":14,"context_line":"Added a check to validate string limit and returned 400 if"},{"line_number":15,"context_line":"limit exceeds."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"APIImpact"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Closes-Bug: 1454244"},{"line_number":20,"context_line":"Change-Id: Iaf7159e816f69fd776a09828c3bc1d27fc9fdcdb"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5afe65bd_4b22d5ba","line":17,"updated":"2015-06-03 16:28:44.000000000","message":"You need to include little more info here.\n\nSee https://wiki.openstack.org/wiki/GitCommitMessages#Including_external_references","commit_id":"e0e7de635de8c05fabaed9c00074e5ec9544d249"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"38803ec1c866ecf54392cc944d63d501c99edb25","unresolved":false,"context_lines":[{"line_number":14,"context_line":"Added a check to validate string limit and returned 400 if"},{"line_number":15,"context_line":"limit exceeds."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"APIImpact"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Closes-Bug: 1454244"},{"line_number":20,"context_line":"Change-Id: Iaf7159e816f69fd776a09828c3bc1d27fc9fdcdb"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"ba3cc151_783277f4","line":17,"in_reply_to":"5afe65bd_4b22d5ba","updated":"2015-07-10 10:02:13.000000000","message":"I agree, you should do it like in your newer patch: https://review.openstack.org/#/c/194968/","commit_id":"e0e7de635de8c05fabaed9c00074e5ec9544d249"},{"author":{"_account_id":16258,"name":"nikesh","email":"nike.niec@gmail.com","username":"nikem"},"change_message_id":"85abd9ef4a85d38cc00f60f77b4d7884ae071340","unresolved":false,"context_lines":[{"line_number":11,"context_line":"and create api of backup, then it returns 500 error code."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Added new method validate_name_and_description() in"},{"line_number":14,"context_line":"cinder.api.openstack.wsgi.Controllera to validate string limit and"},{"line_number":15,"context_line":"returned 400 if limit exceeds and also removing leading or trailing"},{"line_number":16,"context_line":"whitespaces and string containing only whitespaces."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"3a50d1a3_a7d5ba1c","line":14,"updated":"2015-07-22 07:55:40.000000000","message":"s/Controllera/Controller","commit_id":"48bd755fb4e564cedfd9cc0c9edd71a0d6c90a15"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"7581b2115d0fa568cec598933925620f59411e6e","unresolved":false,"context_lines":[{"line_number":16,"context_line":"whitespaces and string containing only whitespaces."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"APIImpact"},{"line_number":19,"context_line":"1. For all above apis 400 response will be returned."},{"line_number":20,"context_line":"2. Earlier it was possible to pass only whitespaces or leading-trailing"},{"line_number":21,"context_line":"   spaces to \u0027name\u0027 parameter."},{"line_number":22,"context_line":"   Now it will raise 400 error if only whitespaces are passed and will"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"1a4dcd0f_74676e4d","line":19,"updated":"2015-08-05 14:19:40.000000000","message":"APIs","commit_id":"20b3995b7662af8c12894364d4d08ccf127b4ebb"},{"author":{"_account_id":17444,"name":"Jay.Shen","email":"shenhong09@huawei.com","username":"Jay.Shen"},"change_message_id":"2c38a7628923c4bca8129358a4ba4cfd54a7184c","unresolved":false,"context_lines":[{"line_number":19,"context_line":"1. For all above apis 400 response will be returned."},{"line_number":20,"context_line":"2. Earlier it was possible to pass only whitespaces or leading-trailing"},{"line_number":21,"context_line":"   spaces to \u0027name\u0027 parameter."},{"line_number":22,"context_line":"   Now it will raise 400 error if only whitespaces are passed and will"},{"line_number":23,"context_line":"   remove leading-trailing spaces if present in other cases."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Closes-Bug: 1454244"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"1a4dcd0f_11b4fc7f","line":22,"updated":"2015-08-05 14:07:19.000000000","message":"S/error/errors","commit_id":"20b3995b7662af8c12894364d4d08ccf127b4ebb"}],"cinder/api/contrib/backups.py":[{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"0273e90d3dfaf8b7556f11323f201e13d39c4769","unresolved":false,"context_lines":[{"line_number":255,"context_line":"        name \u003d backup.get(\u0027name\u0027, None)"},{"line_number":256,"context_line":"        if name is not None:"},{"line_number":257,"context_line":"            utils.check_string_length(name, \u0027Backup name\u0027,"},{"line_number":258,"context_line":"                                      min_length\u003d0, max_length\u003d255)"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"        description \u003d backup.get(\u0027description\u0027, None)"},{"line_number":261,"context_line":"        if description is not None:"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a016987_dea07044","line":258,"updated":"2015-05-30 02:22:41.000000000","message":"There is many place to use this value of max_length in this patch. Could we add it as a CONF option. And if we extend the length of name string in future, we can suit that more easier.","commit_id":"a4d14a3fd9074dfc2eed5b962745241c4ff289f3"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"25bf3c6d9811bb4f915a8d87f3402e8c04eb8c4d","unresolved":false,"context_lines":[{"line_number":255,"context_line":"        name \u003d backup.get(\u0027name\u0027, None)"},{"line_number":256,"context_line":"        if name is not None:"},{"line_number":257,"context_line":"            utils.check_string_length(name, \u0027Backup name\u0027,"},{"line_number":258,"context_line":"                                      min_length\u003d0, max_length\u003d255)"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"        description \u003d backup.get(\u0027description\u0027, None)"},{"line_number":261,"context_line":"        if description is not None:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5afe65bd_50040f7d","line":258,"in_reply_to":"7a016987_49deec3e","updated":"2015-06-02 07:45:22.000000000","message":"Emm, Sure, it\u0027s reasonable.","commit_id":"a4d14a3fd9074dfc2eed5b962745241c4ff289f3"},{"author":{"_account_id":10300,"name":"Pranali Deore","email":"pranalideore@gmail.com","username":"PranaliDeore"},"change_message_id":"7fc41554b2bd1e4835bd6d9e11b7e54bf1cbaab7","unresolved":false,"context_lines":[{"line_number":255,"context_line":"        name \u003d backup.get(\u0027name\u0027, None)"},{"line_number":256,"context_line":"        if name is not None:"},{"line_number":257,"context_line":"            utils.check_string_length(name, \u0027Backup name\u0027,"},{"line_number":258,"context_line":"                                      min_length\u003d0, max_length\u003d255)"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"        description \u003d backup.get(\u0027description\u0027, None)"},{"line_number":261,"context_line":"        if description is not None:"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a016987_49deec3e","line":258,"in_reply_to":"7a016987_dea07044","updated":"2015-06-01 13:07:14.000000000","message":"Hi wanghao,\n\nIMO, this change should be addressed in different patch because at so many places \u0027max_length is used.","commit_id":"a4d14a3fd9074dfc2eed5b962745241c4ff289f3"},{"author":{"_account_id":14377,"name":"Apoorva","email":"apps.desh@gmail.com","username":"apoorvad"},"change_message_id":"d13324a778ad5ae6888610725de6276cf86d4aa4","unresolved":false,"context_lines":[{"line_number":252,"context_line":"            msg \u003d _(\"Incorrect request body format\")"},{"line_number":253,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":254,"context_line":"        container \u003d backup.get(\u0027container\u0027, None)"},{"line_number":255,"context_line":"        self.validate_name_and_description(backup)"},{"line_number":256,"context_line":"        name \u003d backup.get(\u0027name\u0027, None)"},{"line_number":257,"context_line":"        description \u003d backup.get(\u0027description\u0027, None)"},{"line_number":258,"context_line":"        incremental \u003d backup.get(\u0027incremental\u0027, False)"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a4dcd0f_85ab4f75","line":255,"updated":"2015-08-14 05:29:30.000000000","message":"Preferably right after 247","commit_id":"a1bb185a1f0311c36fd590d48531ded6ccccc5c6"}],"cinder/api/openstack/wsgi.py":[{"author":{"_account_id":16258,"name":"nikesh","email":"nike.niec@gmail.com","username":"nikem"},"change_message_id":"85abd9ef4a85d38cc00f60f77b4d7884ae071340","unresolved":false,"context_lines":[{"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):"},{"line_number":1225,"context_line":"                body[\u0027name\u0027] \u003d name.strip()"},{"line_number":1226,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_07e10e9a","line":1223,"updated":"2015-07-22 07:55:40.000000000","message":"shall we use only \u0027if name\u0027 inspite of \u0027if name is not None\u0027","commit_id":"48bd755fb4e564cedfd9cc0c9edd71a0d6c90a15"},{"author":{"_account_id":10300,"name":"Pranali Deore","email":"pranalideore@gmail.com","username":"PranaliDeore"},"change_message_id":"69b628841de0a0b57ec645405393a4daf11898e7","unresolved":false,"context_lines":[{"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):"},{"line_number":1225,"context_line":"                body[\u0027name\u0027] \u003d name.strip()"},{"line_number":1226,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_cd9d8767","line":1223,"in_reply_to":"3a50d1a3_07e10e9a","updated":"2015-07-22 08:50:40.000000000","message":"If we use \u0027if name\u0027 inspite of \u0027if name is not None\u0027 then it will not validate for empty string, i.e. name \u003d \u0027\u0027","commit_id":"48bd755fb4e564cedfd9cc0c9edd71a0d6c90a15"},{"author":{"_account_id":16258,"name":"nikesh","email":"nike.niec@gmail.com","username":"nikem"},"change_message_id":"85abd9ef4a85d38cc00f60f77b4d7884ae071340","unresolved":false,"context_lines":[{"line_number":1230,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003derror.msg)"},{"line_number":1231,"context_line":""},{"line_number":1232,"context_line":"        description \u003d body.get(\u0027description\u0027)"},{"line_number":1233,"context_line":"        if description is not None:"},{"line_number":1234,"context_line":"            try:"},{"line_number":1235,"context_line":"                utils.check_string_length(description, \u0027Description\u0027,"},{"line_number":1236,"context_line":"                                          min_length\u003d0, max_length\u003d255)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_e7e3c2a2","line":1233,"updated":"2015-07-22 07:55:40.000000000","message":"same thing here","commit_id":"48bd755fb4e564cedfd9cc0c9edd71a0d6c90a15"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"67c13225825c5e5045c8fbd2f2d6dfb0068c2961","unresolved":false,"context_lines":[{"line_number":1228,"context_line":"                body[\u0027name\u0027] \u003d name.strip()"},{"line_number":1229,"context_line":"            try:"},{"line_number":1230,"context_line":"                utils.check_string_length(body[\u0027name\u0027], \u0027Name\u0027,"},{"line_number":1231,"context_line":"                                          min_length\u003d1, max_length\u003d255)"},{"line_number":1232,"context_line":"            except exception.InvalidInput as error:"},{"line_number":1233,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003derror.msg)"},{"line_number":1234,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa1b9901_b7433f6c","line":1231,"updated":"2015-08-17 14:04:56.000000000","message":"This is a backwards incompatible API change and it breaks Nova, see bug 1485198 - you can no longer boot from snapshot/image BDM where the volume name is the empty string.\n\nIf Cinder wants to validate this it should happen in a v2.1 API or something, not the v2 API when zero-length name was always allowed, ugly as it may seem.","commit_id":"a1bb185a1f0311c36fd590d48531ded6ccccc5c6"}],"cinder/api/v2/snapshots.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"071fb16df6d374c966719276039678c8f6bf4576","unresolved":false,"context_lines":[{"line_number":212,"context_line":""},{"line_number":213,"context_line":"        name \u003d snapshot.get(\u0027name\u0027)"},{"line_number":214,"context_line":"        if isinstance(name, six.string_types):"},{"line_number":215,"context_line":"            snapshot[\u0027name\u0027] \u003d name.strip()"},{"line_number":216,"context_line":"        self._validate_name_and_description(snapshot)"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a41bdd9_7c735016","line":215,"updated":"2015-07-16 17:32:00.000000000","message":"Why aren\u0027t you trimming the name in the _validate_name_and_description method?","commit_id":"02012f47135a4982d1e4429623e45315ea024f5b"},{"author":{"_account_id":10300,"name":"Pranali Deore","email":"pranalideore@gmail.com","username":"PranaliDeore"},"change_message_id":"68c5cb5fd2c5fba397d3efbecb2a92aed1e4ceed","unresolved":false,"context_lines":[{"line_number":212,"context_line":""},{"line_number":213,"context_line":"        name \u003d snapshot.get(\u0027name\u0027)"},{"line_number":214,"context_line":"        if isinstance(name, six.string_types):"},{"line_number":215,"context_line":"            snapshot[\u0027name\u0027] \u003d name.strip()"},{"line_number":216,"context_line":"        self._validate_name_and_description(snapshot)"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a41bdd9_5a9430e7","line":215,"in_reply_to":"9a41bdd9_7c735016","updated":"2015-07-17 08:48:44.000000000","message":"Done","commit_id":"02012f47135a4982d1e4429623e45315ea024f5b"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"071fb16df6d374c966719276039678c8f6bf4576","unresolved":false,"context_lines":[{"line_number":267,"context_line":""},{"line_number":268,"context_line":"        name \u003d snapshot.get(\u0027name\u0027)"},{"line_number":269,"context_line":"        if isinstance(name, six.string_types):"},{"line_number":270,"context_line":"            snapshot[\u0027name\u0027] \u003d name.strip()"},{"line_number":271,"context_line":"        self._validate_name_and_description(snapshot)"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"        for key in valid_update_keys:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a41bdd9_1c5fa476","line":270,"updated":"2015-07-16 17:32:00.000000000","message":"Same here","commit_id":"02012f47135a4982d1e4429623e45315ea024f5b"},{"author":{"_account_id":10300,"name":"Pranali Deore","email":"pranalideore@gmail.com","username":"PranaliDeore"},"change_message_id":"68c5cb5fd2c5fba397d3efbecb2a92aed1e4ceed","unresolved":false,"context_lines":[{"line_number":267,"context_line":""},{"line_number":268,"context_line":"        name \u003d snapshot.get(\u0027name\u0027)"},{"line_number":269,"context_line":"        if isinstance(name, six.string_types):"},{"line_number":270,"context_line":"            snapshot[\u0027name\u0027] \u003d name.strip()"},{"line_number":271,"context_line":"        self._validate_name_and_description(snapshot)"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"        for key in valid_update_keys:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a41bdd9_7a99f41e","line":270,"in_reply_to":"9a41bdd9_1c5fa476","updated":"2015-07-17 08:48:44.000000000","message":"Done","commit_id":"02012f47135a4982d1e4429623e45315ea024f5b"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"2e4351079d75695596360b21b27e4ef0214d1ebb","unresolved":false,"context_lines":[{"line_number":211,"context_line":"        force \u003d snapshot.get(\u0027force\u0027, False)"},{"line_number":212,"context_line":"        msg \u003d _LI(\"Create snapshot from volume %s\")"},{"line_number":213,"context_line":"        LOG.info(msg, volume_id, context\u003dcontext)"},{"line_number":214,"context_line":"        self._validate_name_and_description(snapshot)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        try:"},{"line_number":217,"context_line":"            force \u003d strutils.bool_from_string(force, strict\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a41bdd9_fb7df4b1","line":214,"updated":"2015-07-17 15:18:20.000000000","message":"This isn\u0027t right.  Previously we were modifying the volume_name/name fields in the snapshot object that gets passed into volume_api.create_snapshot below.  Now we are not.","commit_id":"b06662b1afd444adcec88448466892990e18581e"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"2c2b8c807be493d7e3fdd4ccdd588f2097c1e7f4","unresolved":false,"context_lines":[{"line_number":211,"context_line":"        force \u003d snapshot.get(\u0027force\u0027, False)"},{"line_number":212,"context_line":"        msg \u003d _LI(\"Create snapshot from volume %s\")"},{"line_number":213,"context_line":"        LOG.info(msg, volume_id, context\u003dcontext)"},{"line_number":214,"context_line":"        self._validate_name_and_description(snapshot)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        try:"},{"line_number":217,"context_line":"            force \u003d strutils.bool_from_string(force, strict\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a41bdd9_1de9ab1a","line":214,"in_reply_to":"9a41bdd9_fb7df4b1","updated":"2015-07-17 15:46:23.000000000","message":"We are still modifying it, now we do it in line 171","commit_id":"b06662b1afd444adcec88448466892990e18581e"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"4c4bc1b85e14edf3c4894cd85d9c97fe140afac7","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        force \u003d snapshot.get(\u0027force\u0027, False)"},{"line_number":186,"context_line":"        msg \u003d _LI(\"Create snapshot from volume %s\")"},{"line_number":187,"context_line":"        LOG.info(msg, volume_id, context\u003dcontext)"},{"line_number":188,"context_line":"        self.validate_name_and_description(snapshot)"},{"line_number":189,"context_line":"        if \u0027name\u0027 in snapshot:"},{"line_number":190,"context_line":"            snapshot[\u0027display_name\u0027] \u003d snapshot.pop(\u0027name\u0027)"},{"line_number":191,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"1a4dcd0f_27437fb0","line":188,"updated":"2015-08-07 17:13:21.000000000","message":"Please leave this comment. It\u0027s purpose is to remind people of this behavior in v2.","commit_id":"20b3995b7662af8c12894364d4d08ccf127b4ebb"},{"author":{"_account_id":14377,"name":"Apoorva","email":"apps.desh@gmail.com","username":"apoorvad"},"change_message_id":"d13324a778ad5ae6888610725de6276cf86d4aa4","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        force \u003d snapshot.get(\u0027force\u0027, False)"},{"line_number":186,"context_line":"        msg \u003d _LI(\"Create snapshot from volume %s\")"},{"line_number":187,"context_line":"        LOG.info(msg, volume_id, context\u003dcontext)"},{"line_number":188,"context_line":"        self.validate_name_and_description(snapshot)"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        # NOTE(thingee): v2 API allows name instead of display_name"},{"line_number":191,"context_line":"        if \u0027name\u0027 in snapshot:"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a4dcd0f_a571ab46","line":188,"updated":"2015-08-14 05:29:30.000000000","message":"Preferably right after #172 or atleast before logging the log info message on 188","commit_id":"a1bb185a1f0311c36fd590d48531ded6ccccc5c6"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"7086a8b981f54d6121b33d864d4daa4dd493561c","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        force \u003d snapshot.get(\u0027force\u0027, False)"},{"line_number":186,"context_line":"        msg \u003d _LI(\"Create snapshot from volume %s\")"},{"line_number":187,"context_line":"        LOG.info(msg, volume_id, context\u003dcontext)"},{"line_number":188,"context_line":"        self.validate_name_and_description(snapshot)"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        # NOTE(thingee): v2 API allows name instead of display_name"},{"line_number":191,"context_line":"        if \u0027name\u0027 in snapshot:"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a4dcd0f_e51b2ec9","line":188,"in_reply_to":"1a4dcd0f_a571ab46","updated":"2015-08-14 08:21:58.000000000","message":"Very good point, I agree","commit_id":"a1bb185a1f0311c36fd590d48531ded6ccccc5c6"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"f3bd9fcb8ce8fcc3e848fcb2a5777223ca5a098a","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        force \u003d snapshot.get(\u0027force\u0027, False)"},{"line_number":186,"context_line":"        msg \u003d _LI(\"Create snapshot from volume %s\")"},{"line_number":187,"context_line":"        LOG.info(msg, volume_id, context\u003dcontext)"},{"line_number":188,"context_line":"        self.validate_name_and_description(snapshot)"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        # NOTE(thingee): v2 API allows name instead of display_name"},{"line_number":191,"context_line":"        if \u0027name\u0027 in snapshot:"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a4dcd0f_8db82d13","line":188,"in_reply_to":"1a4dcd0f_e51b2ec9","updated":"2015-08-14 20:38:29.000000000","message":"One could argue though, that there is no need to validate the name and description if you can\u0027t find the volume that you are creating from.","commit_id":"a1bb185a1f0311c36fd590d48531ded6ccccc5c6"}],"cinder/api/v2/volumes.py":[{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"2de6fe8b4dce0b92823f90b0d1a6e7d08995d474","unresolved":false,"context_lines":[{"line_number":305,"context_line":"        \"\"\"Validates given string."},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        Removes leading and trailing spaces if present and validates the"},{"line_number":308,"context_line":"        string length."},{"line_number":309,"context_line":"        \"\"\""},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"        if isinstance(value, six.string_types):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_590c3394","line":308,"updated":"2015-05-14 18:53:49.000000000","message":"Removing leading spaces sounds like an unexpected change in behavior... I\u0027m not sure we should be doing that to fix this problem.","commit_id":"d3f3e2961c1d74f03f19737fbda7a9bda7108c3d"},{"author":{"_account_id":7219,"name":"git-harry","email":"git-harry@live.co.uk","username":"git-harry"},"change_message_id":"d98912f956413bc7efd942c0f8d9ba2536d8706b","unresolved":false,"context_lines":[{"line_number":317,"context_line":""},{"line_number":318,"context_line":"        # NOTE(thingee): v2 API allows name instead of display_name"},{"line_number":319,"context_line":"        if volume.get(\u0027name\u0027):"},{"line_number":320,"context_line":"            utils.check_string_length(volume.get(\u0027name\u0027), \u0027Volume name\u0027,"},{"line_number":321,"context_line":"                                      min_length\u003d1, max_length\u003d255)"},{"line_number":322,"context_line":"            volume[\u0027display_name\u0027] \u003d volume.pop(\u0027name\u0027)"},{"line_number":323,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_3dffce68","line":320,"updated":"2015-05-18 17:20:16.000000000","message":"I think this check is in the wrong place. You should put it below this if-block  and do the string check only if display_name isn\u0027t None.\n\nmin_length should be 0 otherwise you\u0027re changing the API.","commit_id":"70573ce170b0979e9c00ef8c33d1451159cde454"},{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"1d8f52a30b91897a8654e641261243323beb4c21","unresolved":false,"context_lines":[{"line_number":317,"context_line":""},{"line_number":318,"context_line":"        # NOTE(thingee): v2 API allows name instead of display_name"},{"line_number":319,"context_line":"        if volume.get(\u0027name\u0027):"},{"line_number":320,"context_line":"            utils.check_string_length(volume.get(\u0027name\u0027), \u0027Volume name\u0027,"},{"line_number":321,"context_line":"                                      min_length\u003d1, max_length\u003d255)"},{"line_number":322,"context_line":"            volume[\u0027display_name\u0027] \u003d volume.pop(\u0027name\u0027)"},{"line_number":323,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_804e556d","line":320,"in_reply_to":"7a016987_3dffce68","updated":"2015-05-18 17:56:00.000000000","message":"Yeah now I got clear picture. Thanks git-harry.","commit_id":"70573ce170b0979e9c00ef8c33d1451159cde454"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"071fb16df6d374c966719276039678c8f6bf4576","unresolved":false,"context_lines":[{"line_number":350,"context_line":"        kwargs \u003d {}"},{"line_number":351,"context_line":"        name \u003d volume.get(\u0027name\u0027)"},{"line_number":352,"context_line":"        if isinstance(name, six.string_types):"},{"line_number":353,"context_line":"            volume[\u0027name\u0027] \u003d name.strip()"},{"line_number":354,"context_line":"        self._validate_name_and_description(volume)"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        if \u0027image_id\u0027 in volume:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a41bdd9_5c4d2cc3","line":353,"updated":"2015-07-16 17:32:00.000000000","message":"This should go in _validate_name_and_description","commit_id":"02012f47135a4982d1e4429623e45315ea024f5b"},{"author":{"_account_id":10300,"name":"Pranali Deore","email":"pranalideore@gmail.com","username":"PranaliDeore"},"change_message_id":"68c5cb5fd2c5fba397d3efbecb2a92aed1e4ceed","unresolved":false,"context_lines":[{"line_number":350,"context_line":"        kwargs \u003d {}"},{"line_number":351,"context_line":"        name \u003d volume.get(\u0027name\u0027)"},{"line_number":352,"context_line":"        if isinstance(name, six.string_types):"},{"line_number":353,"context_line":"            volume[\u0027name\u0027] \u003d name.strip()"},{"line_number":354,"context_line":"        self._validate_name_and_description(volume)"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        if \u0027image_id\u0027 in volume:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a41bdd9_5abbd075","line":353,"in_reply_to":"9a41bdd9_5c4d2cc3","updated":"2015-07-17 08:48:44.000000000","message":"Done","commit_id":"02012f47135a4982d1e4429623e45315ea024f5b"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"071fb16df6d374c966719276039678c8f6bf4576","unresolved":false,"context_lines":[{"line_number":489,"context_line":"        name \u003d update_dict.get(\u0027name\u0027)"},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"        if isinstance(name, six.string_types):"},{"line_number":492,"context_line":"            update_dict[\u0027name\u0027] \u003d name.strip()"},{"line_number":493,"context_line":"        self._validate_name_and_description(update_dict)"},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a41bdd9_1cc6c416","line":492,"updated":"2015-07-16 17:32:00.000000000","message":"Same here","commit_id":"02012f47135a4982d1e4429623e45315ea024f5b"},{"author":{"_account_id":10300,"name":"Pranali Deore","email":"pranalideore@gmail.com","username":"PranaliDeore"},"change_message_id":"68c5cb5fd2c5fba397d3efbecb2a92aed1e4ceed","unresolved":false,"context_lines":[{"line_number":489,"context_line":"        name \u003d update_dict.get(\u0027name\u0027)"},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"        if isinstance(name, six.string_types):"},{"line_number":492,"context_line":"            update_dict[\u0027name\u0027] \u003d name.strip()"},{"line_number":493,"context_line":"        self._validate_name_and_description(update_dict)"},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a41bdd9_7dd7ae23","line":492,"in_reply_to":"9a41bdd9_1cc6c416","updated":"2015-07-17 08:48:44.000000000","message":"Done","commit_id":"02012f47135a4982d1e4429623e45315ea024f5b"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"2e4351079d75695596360b21b27e4ef0214d1ebb","unresolved":false,"context_lines":[{"line_number":350,"context_line":"        volume \u003d body[\u0027volume\u0027]"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"        kwargs \u003d {}"},{"line_number":353,"context_line":"        self._validate_name_and_description(volume)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"        if \u0027image_id\u0027 in volume:"},{"line_number":356,"context_line":"            volume[\u0027imageRef\u0027] \u003d volume.get(\u0027image_id\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a41bdd9_7b3fa4d6","line":353,"updated":"2015-07-17 15:18:20.000000000","message":"Same issue I noted in snapshots.","commit_id":"b06662b1afd444adcec88448466892990e18581e"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"2c2b8c807be493d7e3fdd4ccdd588f2097c1e7f4","unresolved":false,"context_lines":[{"line_number":350,"context_line":"        volume \u003d body[\u0027volume\u0027]"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"        kwargs \u003d {}"},{"line_number":353,"context_line":"        self._validate_name_and_description(volume)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"        if \u0027image_id\u0027 in volume:"},{"line_number":356,"context_line":"            volume[\u0027imageRef\u0027] \u003d volume.get(\u0027image_id\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a41bdd9_5de73340","line":353,"in_reply_to":"9a41bdd9_7b3fa4d6","updated":"2015-07-17 15:46:23.000000000","message":"See line 323","commit_id":"b06662b1afd444adcec88448466892990e18581e"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"4c4bc1b85e14edf3c4894cd85d9c97fe140afac7","unresolved":false,"context_lines":[{"line_number":327,"context_line":""},{"line_number":328,"context_line":"        kwargs \u003d {}"},{"line_number":329,"context_line":"        self.validate_name_and_description(volume)"},{"line_number":330,"context_line":"        if \u0027name\u0027 in volume:"},{"line_number":331,"context_line":"            volume[\u0027display_name\u0027] \u003d volume.pop(\u0027name\u0027)"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"        if \u0027description\u0027 in volume:"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a4dcd0f_a70d4f90","line":330,"updated":"2015-08-07 17:13:21.000000000","message":"Please leave the comments in here.","commit_id":"20b3995b7662af8c12894364d4d08ccf127b4ebb"}],"cinder/tests/unit/api/contrib/test_backups.py":[{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"42e5a43bb702491141e649a172f794ab3fcff230","unresolved":false,"context_lines":[{"line_number":643,"context_line":"        res \u003d req.get_response(fakes.wsgi_app())"},{"line_number":644,"context_line":"        res_dict \u003d json.loads(res.body)"},{"line_number":645,"context_line":""},{"line_number":646,"context_line":"        self.assertEqual(res.status_int, 400)"},{"line_number":647,"context_line":"        self.assertEqual(res_dict[\u0027badRequest\u0027][\u0027code\u0027], 400)"},{"line_number":648,"context_line":"        self.assertEqual(res_dict[\u0027badRequest\u0027][\u0027message\u0027],"},{"line_number":649,"context_line":"                         \u0027Backup name has more than 255 characters.\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a016987_5da70350","line":646,"updated":"2015-05-29 11:18:31.000000000","message":"The argument order is expected, observed.","commit_id":"49b8cf1a046e38ece8838022bfda4f2ee65b6959"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"42e5a43bb702491141e649a172f794ab3fcff230","unresolved":false,"context_lines":[{"line_number":644,"context_line":"        res_dict \u003d json.loads(res.body)"},{"line_number":645,"context_line":""},{"line_number":646,"context_line":"        self.assertEqual(res.status_int, 400)"},{"line_number":647,"context_line":"        self.assertEqual(res_dict[\u0027badRequest\u0027][\u0027code\u0027], 400)"},{"line_number":648,"context_line":"        self.assertEqual(res_dict[\u0027badRequest\u0027][\u0027message\u0027],"},{"line_number":649,"context_line":"                         \u0027Backup name has more than 255 characters.\u0027)"},{"line_number":650,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a016987_7d751fc9","line":647,"updated":"2015-05-29 11:18:31.000000000","message":"Same comment, please fix other places.","commit_id":"49b8cf1a046e38ece8838022bfda4f2ee65b6959"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"42e5a43bb702491141e649a172f794ab3fcff230","unresolved":false,"context_lines":[{"line_number":721,"context_line":"        req.body \u003d json.dumps(body)"},{"line_number":722,"context_line":"        res \u003d req.get_response(fakes.wsgi_app())"},{"line_number":723,"context_line":"        res_dict \u003d json.loads(res.body)"},{"line_number":724,"context_line":"        LOG.info(res_dict)"},{"line_number":725,"context_line":""},{"line_number":726,"context_line":"        self.assertIn(\u0027id\u0027, res_dict[\u0027backup\u0027])"},{"line_number":727,"context_line":"        self.assertIn(\u0027\u0027, res_dict[\u0027backup\u0027][\u0027name\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a016987_6031f2ec","line":724,"updated":"2015-05-29 11:18:31.000000000","message":"Why do you need a log message here?","commit_id":"49b8cf1a046e38ece8838022bfda4f2ee65b6959"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"e034f5d9ba06f3a37ba471f385e0dbafbd7fc432","unresolved":false,"context_lines":[{"line_number":692,"context_line":"        self.assertEqual(400, res_dict[\u0027badRequest\u0027][\u0027code\u0027])"},{"line_number":693,"context_line":""},{"line_number":694,"context_line":"    @mock.patch(\u0027cinder.db.service_get_all_by_topic\u0027)"},{"line_number":695,"context_line":"    def test_create_backup_with_zero_length_name("},{"line_number":696,"context_line":"            self, _mock_service_get_all_by_topic):"},{"line_number":697,"context_line":"        _mock_service_get_all_by_topic.return_value \u003d ["},{"line_number":698,"context_line":"            {\u0027availability_zone\u0027: \"fake_az\", \u0027host\u0027: \u0027test_host\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"5afe65bd_461d2c0e","line":695,"updated":"2015-06-03 16:28:44.000000000","message":"You can also test zero length description here similar to what you have done for snapshots and volumes.","commit_id":"e0e7de635de8c05fabaed9c00074e5ec9544d249"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"53121bef7f736f54b2db6498ade580cefc4ded04","unresolved":false,"context_lines":[{"line_number":634,"context_line":"        res_dict \u003d json.loads(res.body)"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"        self.assertEqual(400, res.status_int)"},{"line_number":637,"context_line":"        self.assertEqual(400, res_dict[\u0027badRequest\u0027][\u0027code\u0027])"},{"line_number":638,"context_line":""},{"line_number":639,"context_line":"    def test_create_backup_with_description_too_long(self):"},{"line_number":640,"context_line":"        volume_id \u003d utils.create_volume(self.context, size\u003d5)[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_bbe8c0e3","line":637,"updated":"2015-07-21 02:31:21.000000000","message":"I suggest we can extract the code line 628-637 to a util function. I see many duplicate codes here.","commit_id":"b06662b1afd444adcec88448466892990e18581e"}],"cinder/tests/unit/api/v2/test_snapshots.py":[{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"e034f5d9ba06f3a37ba471f385e0dbafbd7fc432","unresolved":false,"context_lines":[{"line_number":345,"context_line":"    @mock.patch(\u0027cinder.db.snapshot_metadata_get\u0027, return_value\u003ddict())"},{"line_number":346,"context_line":"    @mock.patch(\u0027cinder.objects.Volume.get_by_id\u0027)"},{"line_number":347,"context_line":"    @mock.patch(\u0027cinder.objects.Snapshot.get_by_id\u0027)"},{"line_number":348,"context_line":"    def test_snapshot_update_zero_length_name_and_description("},{"line_number":349,"context_line":"            self, snapshot_get_by_id, volume_get_by_id,"},{"line_number":350,"context_line":"            snapshot_metadata_get, update_snapshot):"},{"line_number":351,"context_line":"        snapshot \u003d {"}],"source_content_type":"text/x-python","patch_set":6,"id":"5afe65bd_86456418","line":348,"updated":"2015-06-03 16:28:44.000000000","message":"test_snapshot_update_*with*_ to be consistent with other method names in your patch.","commit_id":"e0e7de635de8c05fabaed9c00074e5ec9544d249"},{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"53121bef7f736f54b2db6498ade580cefc4ded04","unresolved":false,"context_lines":[{"line_number":390,"context_line":"        body \u003d {\"snapshot\": updates}"},{"line_number":391,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v2/snapshots/not-the-uuid\u0027)"},{"line_number":392,"context_line":"        self.assertRaises(webob.exc.HTTPBadRequest, self.controller.update,"},{"line_number":393,"context_line":"                          req, UUID, body)"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"    @mock.patch.object(volume.api.API, \"update_snapshot\","},{"line_number":396,"context_line":"                       side_effect\u003dstubs.stub_snapshot_update)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_db9fcc4e","line":393,"updated":"2015-07-21 02:31:21.000000000","message":"I think we can extract those code like:\n\ndef _update_snapshot_util(self, update_item, update_value):\n  updates \u003d { update_item: update_value}\n  req \u003d fakes.HTTPRequest.blank(\u0027/v2/snapshots/not-the-uuid\u0027)\n  self.assertRaises(webob.exc.HTTPBadRequest,\n       self.controller.update, req, UUID, body)","commit_id":"b06662b1afd444adcec88448466892990e18581e"}],"cinder/tests/unit/api/v2/test_volumes.py":[{"author":{"_account_id":8846,"name":"Hao Wang","display_name":"Hao Wang","email":"sxmatch1986@gmail.com","username":"sxmatch"},"change_message_id":"53121bef7f736f54b2db6498ade580cefc4ded04","unresolved":false,"context_lines":[{"line_number":515,"context_line":"        body \u003d {\"volume\": vol}"},{"line_number":516,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v2/volumes\u0027)"},{"line_number":517,"context_line":"        self.assertRaises(webob.exc.HTTPBadRequest,"},{"line_number":518,"context_line":"                          self.controller.create, req, body)"},{"line_number":519,"context_line":""},{"line_number":520,"context_line":"    @mock.patch(\u0027cinder.volume.api.API.create\u0027)"},{"line_number":521,"context_line":"    def test_volume_create_with_zero_length_description("}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_7bc5583a","line":518,"updated":"2015-07-21 02:31:21.000000000","message":"Like snapshot, we can extract some codes to help function.","commit_id":"b06662b1afd444adcec88448466892990e18581e"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"86e8371a2cdbcade4e7e2d09b4fe1d02c3046423","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        self.maxDiff \u003d None"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    @mock.patch("},{"line_number":68,"context_line":"        \u0027cinder.api.openstack.wsgi.Controller.validate_name_and_description\u0027)"},{"line_number":69,"context_line":"    def test_volume_create(self, mock_validate):"},{"line_number":70,"context_line":"        self.stubs.Set(volume_api.API, \u0027get\u0027, stubs.stub_volume_get)"},{"line_number":71,"context_line":"        self.stubs.Set(volume_api.API, \"create\", stubs.stub_volume_create)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a50d1a3_31d4641e","line":68,"updated":"2015-07-28 17:04:14.000000000","message":"Why do we need to mock it?  It should be able to validate name and description with no problem, right?","commit_id":"b50fd54c3fa68a90fd42c5e5cc23929be00b3f56"},{"author":{"_account_id":10300,"name":"Pranali Deore","email":"pranalideore@gmail.com","username":"PranaliDeore"},"change_message_id":"33f9efbab8abff7790e9bb630e755b3545e26a7a","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        self.maxDiff \u003d None"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    @mock.patch("},{"line_number":68,"context_line":"        \u0027cinder.api.openstack.wsgi.Controller.validate_name_and_description\u0027)"},{"line_number":69,"context_line":"    def test_volume_create(self, mock_validate):"},{"line_number":70,"context_line":"        self.stubs.Set(volume_api.API, \u0027get\u0027, stubs.stub_volume_get)"},{"line_number":71,"context_line":"        self.stubs.Set(volume_api.API, \"create\", stubs.stub_volume_create)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a50d1a3_d1add231","line":68,"in_reply_to":"3a50d1a3_31d4641e","updated":"2015-07-29 13:40:43.000000000","message":"As per your review,\n\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":"b50fd54c3fa68a90fd42c5e5cc23929be00b3f56"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"ac069952cdc46af78e56b2623d2b3f8c404ccc0f","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        self.maxDiff \u003d None"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    @mock.patch("},{"line_number":68,"context_line":"        \u0027cinder.api.openstack.wsgi.Controller.validate_name_and_description\u0027)"},{"line_number":69,"context_line":"    def test_volume_create(self, mock_validate):"},{"line_number":70,"context_line":"        self.stubs.Set(volume_api.API, \u0027get\u0027, stubs.stub_volume_get)"},{"line_number":71,"context_line":"        self.stubs.Set(volume_api.API, \"create\", stubs.stub_volume_create)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a50d1a3_1b6eb096","line":68,"in_reply_to":"3a50d1a3_d1add231","updated":"2015-07-30 17:42:42.000000000","message":"Sorry, I went away for a week and apparently I forgot everything.  :-(","commit_id":"b50fd54c3fa68a90fd42c5e5cc23929be00b3f56"}]}
