)]}'
{"cinder/tests/test_vmware_vmdk.py":[{"author":{"_account_id":7173,"name":"Scott DAngelo","email":"scott.dangelo@gmail.com","username":"scottda"},"change_message_id":"27ead5b19c7363ac857acbab95fa30d8c37713b0","unresolved":false,"context_lines":[{"line_number":1239,"context_line":"        self.assertFalse(self._driver.retype(context, vol, new_type, diff,"},{"line_number":1240,"context_line":"                                             host))"},{"line_number":1241,"context_line":""},{"line_number":1242,"context_line":"        # Test with no backing."},{"line_number":1243,"context_line":"        vops.get_backing.return_value \u003d None"},{"line_number":1244,"context_line":"        vol[\u0027volume_attachment\u0027] \u003d None"},{"line_number":1245,"context_line":"        self.assertTrue(self._driver.retype(context, vol, new_type, diff,"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9b358b_750a47d4","line":1242,"updated":"2015-03-30 15:50:36.000000000","message":"Since there is a check for:\nvolume[\u0027volume_attachment\u0027] \u003e 0\nin vmdk.py, it seems there should be a unit test for the case where:\nvolume[\u0027volume_attachment\u0027] \u003d []","commit_id":"6323e4a81261ec2153908e010355c8a8040ced93"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"ec77547af004fb22f4364392b54d9506faa56ba7","unresolved":false,"context_lines":[{"line_number":1239,"context_line":"        self.assertFalse(self._driver.retype(context, vol, new_type, diff,"},{"line_number":1240,"context_line":"                                             host))"},{"line_number":1241,"context_line":""},{"line_number":1242,"context_line":"        # Test with no backing."},{"line_number":1243,"context_line":"        vops.get_backing.return_value \u003d None"},{"line_number":1244,"context_line":"        vol[\u0027volume_attachment\u0027] \u003d None"},{"line_number":1245,"context_line":"        self.assertTrue(self._driver.retype(context, vol, new_type, diff,"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9b358b_10f9c980","line":1242,"in_reply_to":"da9b358b_750a47d4","updated":"2015-03-30 16:09:43.000000000","message":"Done","commit_id":"6323e4a81261ec2153908e010355c8a8040ced93"}],"cinder/volume/drivers/vmware/vmdk.py":[{"author":{"_account_id":14271,"name":"Kallebe Monteiro","email":"kallebe.monteiro@lsbd.ufc.br","username":"kallebe"},"change_message_id":"538b62ea8ebb36b31146f32aeea30cea4168d1ad","unresolved":false,"context_lines":[{"line_number":1350,"context_line":""},{"line_number":1351,"context_line":"    def _in_use(self, volume):"},{"line_number":1352,"context_line":"        \"\"\"Check if the given volume is in use.\"\"\""},{"line_number":1353,"context_line":"        return (volume[\u0027volume_attachment\u0027] and"},{"line_number":1354,"context_line":"                len(volume[\u0027volume_attachment\u0027]) \u003e 0)"},{"line_number":1355,"context_line":""},{"line_number":1356,"context_line":"    def retype(self, ctxt, volume, new_type, diff, host):"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9b358b_a92cfcab","line":1353,"updated":"2015-03-30 14:44:22.000000000","message":"I think you can use a cleaner check here.\nYou can use:\n\nreturn bool(volume[\u0027volume_attachment\u0027])\n\nbecause in the case where the list is [] it will return False and when it is None it will also return False. See https://review.openstack.org/#/c/167883/6/cinder/volume/drivers/hitachi/hbsd_fc.py,cm","commit_id":"6323e4a81261ec2153908e010355c8a8040ced93"},{"author":{"_account_id":7173,"name":"Scott DAngelo","email":"scott.dangelo@gmail.com","username":"scottda"},"change_message_id":"27ead5b19c7363ac857acbab95fa30d8c37713b0","unresolved":false,"context_lines":[{"line_number":1351,"context_line":"    def _in_use(self, volume):"},{"line_number":1352,"context_line":"        \"\"\"Check if the given volume is in use.\"\"\""},{"line_number":1353,"context_line":"        return (volume[\u0027volume_attachment\u0027] and"},{"line_number":1354,"context_line":"                len(volume[\u0027volume_attachment\u0027]) \u003e 0)"},{"line_number":1355,"context_line":""},{"line_number":1356,"context_line":"    def retype(self, ctxt, volume, new_type, diff, host):"},{"line_number":1357,"context_line":"        \"\"\"Convert the volume to be of the new type."}],"source_content_type":"text/x-python","patch_set":1,"id":"da9b358b_75eec723","line":1354,"updated":"2015-03-30 15:50:36.000000000","message":"I\u0027ve seen this check implemented in a few different ways. I think it\u0027d be wise to add a unit test for the case where:\nvolume[\u0027volume_attachment\u0027] \u003d []","commit_id":"6323e4a81261ec2153908e010355c8a8040ced93"}]}
