)]}'
{"tempest/api/volume/test_snapshot_metadata.py":[{"author":{"_account_id":7350,"name":"Jordan Pittier","email":"jordan.pittier@gmail.com","username":"JordanP"},"change_message_id":"e7d9f8c7214595b0ae64b7532be7d6a8410f33db","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            self.snapshot_id, update)"},{"line_number":82,"context_line":"        # Get the metadata of the snapshot"},{"line_number":83,"context_line":"        body \u003d self.client.show_snapshot_metadata(self.snapshot_id)"},{"line_number":84,"context_line":"        self.assertThat(body.items(), matchers.ContainsAll(update.items()))"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    @test.idempotent_id(\u0027e8ff85c5-8f97-477f-806a-3ac364a949ed\u0027)"},{"line_number":87,"context_line":"    def test_update_snapshot_metadata_item(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_33261d17","line":84,"range":{"start_line":84,"start_character":11,"end_line":84,"end_character":17},"updated":"2015-05-27 08:25:12.000000000","message":"This really should be an assertEqual here. the client update_snapshot_metadata() calls https://github.com/openstack/cinder/blob/master/cinder/api/v2/router.py#L83 which overwrite all the metadata. It doesn\u0027t merge the metadata.","commit_id":"9fa685a765681ad8f5094a6f753e04905f16e3ca"},{"author":{"_account_id":15903,"name":"Earle F. Philhower, III","email":"earle.philhower.iii@hgst.com","username":"earlephilhower"},"change_message_id":"ce42a365109035fee48af752598106c003f9f23e","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            self.snapshot_id, update)"},{"line_number":82,"context_line":"        # Get the metadata of the snapshot"},{"line_number":83,"context_line":"        body \u003d self.client.show_snapshot_metadata(self.snapshot_id)"},{"line_number":84,"context_line":"        self.assertThat(body.items(), matchers.ContainsAll(update.items()))"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    @test.idempotent_id(\u0027e8ff85c5-8f97-477f-806a-3ac364a949ed\u0027)"},{"line_number":87,"context_line":"    def test_update_snapshot_metadata_item(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_653cb2bf","line":84,"in_reply_to":"7a016987_33261d17","updated":"2015-05-27 16:26:41.000000000","message":"Very good catch, you are correct.  I believe there\u0027s actually the same issue in test_volume_metadata.py::test_update_volume_metadata where it is only using ContainsAll and not assertEqual which I\u0027ll open up after updating this patch.","commit_id":"9fa685a765681ad8f5094a6f753e04905f16e3ca"},{"author":{"_account_id":7872,"name":"Marc Koderer","email":"marc@koderer.com","username":"mkoderer"},"change_message_id":"fc705784016012e1d42193eca40869392db838e9","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            self.snapshot_id, update)"},{"line_number":82,"context_line":"        # Get the metadata of the snapshot"},{"line_number":83,"context_line":"        body \u003d self.client.show_snapshot_metadata(self.snapshot_id)"},{"line_number":84,"context_line":"        self.assertEqual(update, body)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    @test.idempotent_id(\u0027e8ff85c5-8f97-477f-806a-3ac364a949ed\u0027)"},{"line_number":87,"context_line":"    def test_update_snapshot_metadata_item(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_27dc6c11","line":84,"updated":"2015-05-28 04:18:56.000000000","message":"I think you should use the matcher here too","commit_id":"568865ffaee26b5da26211d9d33e13d3314a52c0"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"6808f285991b9c48894ec5eb2e0bf365b0431ec4","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            self.snapshot_id, update)"},{"line_number":82,"context_line":"        # Get the metadata of the snapshot"},{"line_number":83,"context_line":"        body \u003d self.client.show_snapshot_metadata(self.snapshot_id)"},{"line_number":84,"context_line":"        self.assertEqual(update, body)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    @test.idempotent_id(\u0027e8ff85c5-8f97-477f-806a-3ac364a949ed\u0027)"},{"line_number":87,"context_line":"    def test_update_snapshot_metadata_item(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_c374659d","line":84,"in_reply_to":"7a016987_27dc6c11","updated":"2015-05-28 08:35:12.000000000","message":"I think it is fine as for update metadata call, all old ones are supposed to be deleted.","commit_id":"568865ffaee26b5da26211d9d33e13d3314a52c0"},{"author":{"_account_id":15903,"name":"Earle F. Philhower, III","email":"earle.philhower.iii@hgst.com","username":"earlephilhower"},"change_message_id":"89df0bc485aa55b95412601b443fea1affc51b42","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            self.snapshot_id, update)"},{"line_number":82,"context_line":"        # Get the metadata of the snapshot"},{"line_number":83,"context_line":"        body \u003d self.client.show_snapshot_metadata(self.snapshot_id)"},{"line_number":84,"context_line":"        self.assertEqual(update, body)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    @test.idempotent_id(\u0027e8ff85c5-8f97-477f-806a-3ac364a949ed\u0027)"},{"line_number":87,"context_line":"    def test_update_snapshot_metadata_item(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_4c9e56b9","line":84,"in_reply_to":"7a016987_c374659d","updated":"2015-05-28 15:33:03.000000000","message":"The matcher is necessary but not sufficient.  We need an assertEqual because this call should throw out any existing values...\n\nupdate_snapshot_metadata call turns into a \"update_all\" @\nhttps://github.com/openstack/cinder/blob/master/cinder/api/v2/router.py#L83\n\nWhich calls the internal method w/the delete\u003dtrue flag @\nhttps://github.com/openstack/cinder/blob/master/cinder/api/v2/snapshot_metadata.py#L93\n\nThat ends up completely replacing the stored values w/the passed in ones, not merging them as it does when delete\u003dfalse.","commit_id":"568865ffaee26b5da26211d9d33e13d3314a52c0"}]}
