)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"d98d5bb013f9fd66cb53fa157e75920c6dd9503e","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add units tests to increase coverage for"},{"line_number":10,"context_line":"cinder.api.v2.volumes.VolumeController.create."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I7c4225de5d32ecd0ad78fc7c0ff847a8bee7b7da"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"ba3cc151_c557d3c8","line":11,"updated":"2015-07-07 11:22:23.000000000","message":"BP or bug links?","commit_id":"8961b0c867724822ebd6fdbc5aafccadfdad6839"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"c2221f75c58fdf37934da3da3b63025827036116","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add units tests to increase coverage for"},{"line_number":10,"context_line":"cinder.api.v2.volumes.VolumeController.create."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I7c4225de5d32ecd0ad78fc7c0ff847a8bee7b7da"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"ba3cc151_5df4f385","line":11,"in_reply_to":"ba3cc151_c557d3c8","updated":"2015-07-07 13:42:38.000000000","message":"As discussed in an earlier patch, I don\u0027t think we need a bug/bp for patches improving unit test coverage.","commit_id":"8961b0c867724822ebd6fdbc5aafccadfdad6839"}],"cinder/tests/unit/api/v2/stubs.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"9cd68b35ec8d1558361a61297920a2c879c107b9","unresolved":false,"context_lines":[{"line_number":181,"context_line":"    return stub_snapshot(snapshot_id)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"def stub_consistencygroup_get_notfound(self, context, cg_id):"},{"line_number":185,"context_line":"    raise exc.ConsistencyGroupNotFound(consistencygroup_id\u003dcg_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_4cfa5c45","line":184,"updated":"2015-07-10 09:10:00.000000000","message":"We don\u0027t really need this method, but I can understand if you want to keep it.","commit_id":"21bdf3b4edc2ddc517fe818effb9128775be2f80"}],"cinder/tests/unit/api/v2/test_volumes.py":[{"author":{"_account_id":2861,"name":"Vincent Hou","email":"shou@us.ibm.com","username":"houshengbo"},"change_message_id":"d98d5bb013f9fd66cb53fa157e75920c6dd9503e","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v2/volumes/detail\u0027)"},{"line_number":171,"context_line":"        res_dict \u003d self.controller.detail(req)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    def test_volume_creation_from_snapshot(self):"},{"line_number":174,"context_line":"        self.stubs.Set(volume_api.API, \u0027get_snapshot\u0027, stubs.stub_snapshot_get)"},{"line_number":175,"context_line":"        self.stubs.Set(volume_api.API, \"create\", stubs.stub_volume_create)"},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_854b0b2b","line":173,"updated":"2015-07-07 11:22:23.000000000","message":"Vipin, we do not any changes about the style like self.stubs.Set.\nPlease change it to the mock way, like with mock.patch or with mock.patch.object.","commit_id":"8961b0c867724822ebd6fdbc5aafccadfdad6839"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"c2221f75c58fdf37934da3da3b63025827036116","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v2/volumes/detail\u0027)"},{"line_number":171,"context_line":"        res_dict \u003d self.controller.detail(req)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    def test_volume_creation_from_snapshot(self):"},{"line_number":174,"context_line":"        self.stubs.Set(volume_api.API, \u0027get_snapshot\u0027, stubs.stub_snapshot_get)"},{"line_number":175,"context_line":"        self.stubs.Set(volume_api.API, \"create\", stubs.stub_volume_create)"},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_7d353744","line":173,"in_reply_to":"ba3cc151_854b0b2b","updated":"2015-07-07 13:42:38.000000000","message":"Done","commit_id":"8961b0c867724822ebd6fdbc5aafccadfdad6839"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"9cd68b35ec8d1558361a61297920a2c879c107b9","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        name \u003d \"Volume Test Name\""},{"line_number":182,"context_line":"        description \u003d \"Volume Test Desc\""},{"line_number":183,"context_line":"        availability_zone \u003d \"zone1:host1\""},{"line_number":184,"context_line":"        vol \u003d {"},{"line_number":185,"context_line":"            \"size\": size,"},{"line_number":186,"context_line":"            \"name\": name,"},{"line_number":187,"context_line":"            \"description\": description,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_d291229c","line":184,"updated":"2015-07-10 09:10:00.000000000","message":"This and ex dictionary should be set as instance attributes in setUp method and then methods should make the small differences they require.  We cannot keep adding these 20 lines of code to every test.","commit_id":"21bdf3b4edc2ddc517fe818effb9128775be2f80"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"272679de6c5487c216f52c2a065bb39e100133f6","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        name \u003d \"Volume Test Name\""},{"line_number":182,"context_line":"        description \u003d \"Volume Test Desc\""},{"line_number":183,"context_line":"        availability_zone \u003d \"zone1:host1\""},{"line_number":184,"context_line":"        vol \u003d {"},{"line_number":185,"context_line":"            \"size\": size,"},{"line_number":186,"context_line":"            \"name\": name,"},{"line_number":187,"context_line":"            \"description\": description,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_83c2d032","line":184,"in_reply_to":"9a41bdd9_600b028f","updated":"2015-07-15 09:48:49.000000000","message":"Even I\u0027m not concerned :) My point was that not all tests need that initialization.","commit_id":"21bdf3b4edc2ddc517fe818effb9128775be2f80"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e94a4b2166b2e8e4274449755c38e5285e03c81f","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        name \u003d \"Volume Test Name\""},{"line_number":182,"context_line":"        description \u003d \"Volume Test Desc\""},{"line_number":183,"context_line":"        availability_zone \u003d \"zone1:host1\""},{"line_number":184,"context_line":"        vol \u003d {"},{"line_number":185,"context_line":"            \"size\": size,"},{"line_number":186,"context_line":"            \"name\": name,"},{"line_number":187,"context_line":"            \"description\": description,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_b27e3817","line":184,"in_reply_to":"9a41bdd9_83c2d032","updated":"2015-07-15 11:04:41.000000000","message":"Ok, good point.","commit_id":"21bdf3b4edc2ddc517fe818effb9128775be2f80"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"a747d4af54af16db0a209b8bbb7623f5189dbbc1","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        name \u003d \"Volume Test Name\""},{"line_number":182,"context_line":"        description \u003d \"Volume Test Desc\""},{"line_number":183,"context_line":"        availability_zone \u003d \"zone1:host1\""},{"line_number":184,"context_line":"        vol \u003d {"},{"line_number":185,"context_line":"            \"size\": size,"},{"line_number":186,"context_line":"            \"name\": name,"},{"line_number":187,"context_line":"            \"description\": description,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_600b028f","line":184,"in_reply_to":"9a41bdd9_a595a687","updated":"2015-07-15 09:16:27.000000000","message":"I\u0027m ok either way, and I don\u0027t usually mind the nanoseconds that takes to create those variables when they are not being used by the tests.  ;-)","commit_id":"21bdf3b4edc2ddc517fe818effb9128775be2f80"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"03d28aa6e73e2e8c92a1a094a9516fb83627ddcc","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        name \u003d \"Volume Test Name\""},{"line_number":182,"context_line":"        description \u003d \"Volume Test Desc\""},{"line_number":183,"context_line":"        availability_zone \u003d \"zone1:host1\""},{"line_number":184,"context_line":"        vol \u003d {"},{"line_number":185,"context_line":"            \"size\": size,"},{"line_number":186,"context_line":"            \"name\": name,"},{"line_number":187,"context_line":"            \"description\": description,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_a595a687","line":184,"in_reply_to":"ba3cc151_d291229c","updated":"2015-07-15 03:54:04.000000000","message":"Done.\n\nI prefer helper methods instead of instance variables. There can be tests which do not require these variables.","commit_id":"21bdf3b4edc2ddc517fe818effb9128775be2f80"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"9cd68b35ec8d1558361a61297920a2c879c107b9","unresolved":false,"context_lines":[{"line_number":324,"context_line":"    def test_volume_creation_fails_with_invalid_source_volume(self,"},{"line_number":325,"context_line":"                                                              get_volume):"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        get_volume.side_effect \u003d stubs.stub_volume_get_notfound"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"        source_volid \u003d \"fake_id\""},{"line_number":330,"context_line":"        vol \u003d {"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_8cae242e","line":327,"updated":"2015-07-10 09:10:00.000000000","message":"You don\u0027t need that method, here or in any of the following methods:\n\n get_volume.return_value \u003d exc.ConsistencyGroupNotFound","commit_id":"21bdf3b4edc2ddc517fe818effb9128775be2f80"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"00fea9ae679a2a2180dee6a76a1d56c4289eed85","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v2/volumes/detail\u0027)"},{"line_number":176,"context_line":"        res_dict \u003d self.controller.detail(req)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def _mock_vol(self, size\u003dDEFAULT_VOL_SIZE, name\u003dDEFAULT_VOL_NAME,"},{"line_number":179,"context_line":"                  description\u003dDEFAULT_VOL_DESCRIPTION,"},{"line_number":180,"context_line":"                  availability_zone\u003dDEFAULT_AZ, snapshot_id\u003dNone,"},{"line_number":181,"context_line":"                  source_volid\u003dNone, source_replica\u003dNone,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a41bdd9_600c62ed","line":178,"updated":"2015-07-15 09:16:47.000000000","message":"This name is not very appropriate, since we are not mocking the volume or even using this for a mock.  We use this for the body of a request.","commit_id":"0c79e4798656d80325e7e3f5c6fea80fad494661"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"fd5baae3cccf08d90263e46f95ffff37274e808c","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v2/volumes/detail\u0027)"},{"line_number":176,"context_line":"        res_dict \u003d self.controller.detail(req)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def _mock_vol(self, size\u003dDEFAULT_VOL_SIZE, name\u003dDEFAULT_VOL_NAME,"},{"line_number":179,"context_line":"                  description\u003dDEFAULT_VOL_DESCRIPTION,"},{"line_number":180,"context_line":"                  availability_zone\u003dDEFAULT_AZ, snapshot_id\u003dNone,"},{"line_number":181,"context_line":"                  source_volid\u003dNone, source_replica\u003dNone,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a41bdd9_66c1da53","line":178,"in_reply_to":"9a41bdd9_600c62ed","updated":"2015-07-15 09:51:32.000000000","message":"Done","commit_id":"0c79e4798656d80325e7e3f5c6fea80fad494661"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"00fea9ae679a2a2180dee6a76a1d56c4289eed85","unresolved":false,"context_lines":[{"line_number":190,"context_line":"                \"consistencygroup_id\": consistencygroup_id,"},{"line_number":191,"context_line":"                }"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def _expected_vol(self, size\u003dDEFAULT_VOL_SIZE,"},{"line_number":194,"context_line":"                      availability_zone\u003dDEFAULT_AZ,"},{"line_number":195,"context_line":"                      description\u003dDEFAULT_VOL_DESCRIPTION,"},{"line_number":196,"context_line":"                      name\u003dDEFAULT_VOL_NAME,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a41bdd9_80aba674","line":193,"updated":"2015-07-15 09:16:47.000000000","message":"Maybe this should have a similar name as the next method, where we can tell that this is expected response from the volume create call.","commit_id":"0c79e4798656d80325e7e3f5c6fea80fad494661"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"fd5baae3cccf08d90263e46f95ffff37274e808c","unresolved":false,"context_lines":[{"line_number":190,"context_line":"                \"consistencygroup_id\": consistencygroup_id,"},{"line_number":191,"context_line":"                }"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def _expected_vol(self, size\u003dDEFAULT_VOL_SIZE,"},{"line_number":194,"context_line":"                      availability_zone\u003dDEFAULT_AZ,"},{"line_number":195,"context_line":"                      description\u003dDEFAULT_VOL_DESCRIPTION,"},{"line_number":196,"context_line":"                      name\u003dDEFAULT_VOL_NAME,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a41bdd9_06b24e06","line":193,"in_reply_to":"9a41bdd9_80aba674","updated":"2015-07-15 09:51:32.000000000","message":"Done","commit_id":"0c79e4798656d80325e7e3f5c6fea80fad494661"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"00fea9ae679a2a2180dee6a76a1d56c4289eed85","unresolved":false,"context_lines":[{"line_number":258,"context_line":"            stubs.stub_snapshot(snapshot_id))"},{"line_number":259,"context_line":"        create.assert_called_once_with(self.controller.volume_api, context,"},{"line_number":260,"context_line":"                                       DEFAULT_VOL_SIZE, DEFAULT_VOL_NAME,"},{"line_number":261,"context_line":"                                       DEFAULT_VOL_DESCRIPTION, **kwargs)"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    @mock.patch.object(volume_api.API, \u0027get_snapshot\u0027, autospec\u003dTrue)"},{"line_number":264,"context_line":"    def test_volume_creation_fails_with_invalid_snapshot(self, get_snapshot):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a41bdd9_409d9eba","line":261,"updated":"2015-07-15 09:16:47.000000000","message":"These could reference vol variable, as in vol[\u0027size\u0027]","commit_id":"0c79e4798656d80325e7e3f5c6fea80fad494661"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"fd5baae3cccf08d90263e46f95ffff37274e808c","unresolved":false,"context_lines":[{"line_number":258,"context_line":"            stubs.stub_snapshot(snapshot_id))"},{"line_number":259,"context_line":"        create.assert_called_once_with(self.controller.volume_api, context,"},{"line_number":260,"context_line":"                                       DEFAULT_VOL_SIZE, DEFAULT_VOL_NAME,"},{"line_number":261,"context_line":"                                       DEFAULT_VOL_DESCRIPTION, **kwargs)"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    @mock.patch.object(volume_api.API, \u0027get_snapshot\u0027, autospec\u003dTrue)"},{"line_number":264,"context_line":"    def test_volume_creation_fails_with_invalid_snapshot(self, get_snapshot):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a41bdd9_c3977846","line":261,"in_reply_to":"9a41bdd9_409d9eba","updated":"2015-07-15 09:51:32.000000000","message":"Done.\n\nWe could do that for size, but name and description keys are deleted after   create. So I thought of using constants for consistency.","commit_id":"0c79e4798656d80325e7e3f5c6fea80fad494661"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"5ce79e8249abe5cbb33407b5de4c5cee289b836a","unresolved":false,"context_lines":[{"line_number":258,"context_line":"            stubs.stub_snapshot(snapshot_id))"},{"line_number":259,"context_line":"        create.assert_called_once_with(self.controller.volume_api, context,"},{"line_number":260,"context_line":"                                       DEFAULT_VOL_SIZE, DEFAULT_VOL_NAME,"},{"line_number":261,"context_line":"                                       DEFAULT_VOL_DESCRIPTION, **kwargs)"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    @mock.patch.object(volume_api.API, \u0027get_snapshot\u0027, autospec\u003dTrue)"},{"line_number":264,"context_line":"    def test_volume_creation_fails_with_invalid_snapshot(self, get_snapshot):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a41bdd9_d2e65c14","line":261,"in_reply_to":"9a41bdd9_c3977846","updated":"2015-07-15 11:04:59.000000000","message":"If that\u0027s the case, then it makes sense. And using ex instead would probably make it look worse.","commit_id":"0c79e4798656d80325e7e3f5c6fea80fad494661"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"00fea9ae679a2a2180dee6a76a1d56c4289eed85","unresolved":false,"context_lines":[{"line_number":300,"context_line":"        kwargs \u003d self._expected_volume_api_create_kwargs("},{"line_number":301,"context_line":"            source_volume\u003dstubs.stub_volume(source_volid))"},{"line_number":302,"context_line":"        create.assert_called_once_with(self.controller.volume_api, context,"},{"line_number":303,"context_line":"                                       DEFAULT_VOL_SIZE, DEFAULT_VOL_NAME,"},{"line_number":304,"context_line":"                                       DEFAULT_VOL_DESCRIPTION, **kwargs)"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"    @mock.patch.object(volume_api.API, \u0027get_volume\u0027, autospec\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a41bdd9_40391ea3","line":303,"updated":"2015-07-15 09:16:47.000000000","message":"Here you could reference vol variable as well","commit_id":"0c79e4798656d80325e7e3f5c6fea80fad494661"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"fd5baae3cccf08d90263e46f95ffff37274e808c","unresolved":false,"context_lines":[{"line_number":300,"context_line":"        kwargs \u003d self._expected_volume_api_create_kwargs("},{"line_number":301,"context_line":"            source_volume\u003dstubs.stub_volume(source_volid))"},{"line_number":302,"context_line":"        create.assert_called_once_with(self.controller.volume_api, context,"},{"line_number":303,"context_line":"                                       DEFAULT_VOL_SIZE, DEFAULT_VOL_NAME,"},{"line_number":304,"context_line":"                                       DEFAULT_VOL_DESCRIPTION, **kwargs)"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"    @mock.patch.object(volume_api.API, \u0027get_volume\u0027, autospec\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a41bdd9_06800ef6","line":303,"in_reply_to":"9a41bdd9_40391ea3","updated":"2015-07-15 09:51:32.000000000","message":"Done","commit_id":"0c79e4798656d80325e7e3f5c6fea80fad494661"}]}
