)]}'
{"nova/tests/unit/virt/libvirt/test_volume.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"e4ef716b96e72e53565a80cb1965350e4c5b270b","unresolved":false,"context_lines":[{"line_number":1431,"context_line":"        # Test the scenario where multipath_id is returned during"},{"line_number":1432,"context_line":"        # connect volume"},{"line_number":1433,"context_line":"        with mock.patch.object("},{"line_number":1434,"context_line":"                linuxscsi, \u0027find_multipath_device\u0027) as mock_find:"},{"line_number":1435,"context_line":"            mock_find.return_value \u003d devices"},{"line_number":1436,"context_line":"            libvirt_driver.connect_volume(connection_info, self.disk_info)"},{"line_number":1437,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_a1fb7b79","line":1434,"updated":"2015-03-03 20:03:11.000000000","message":"not sure ,only a question\n\ncan we mock at beginning? then we don\u0027t need to use \n\u0027with xxx\u0027 twice?","commit_id":"352c11bb817510f5a5ba6a4bd7eac04279a1946c"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"ae20928061b2e41bf0d06efaa5bcffcd802dd76f","unresolved":false,"context_lines":[{"line_number":1431,"context_line":"        # Test the scenario where multipath_id is returned during"},{"line_number":1432,"context_line":"        # connect volume"},{"line_number":1433,"context_line":"        with mock.patch.object("},{"line_number":1434,"context_line":"                linuxscsi, \u0027find_multipath_device\u0027) as mock_find:"},{"line_number":1435,"context_line":"            mock_find.return_value \u003d devices"},{"line_number":1436,"context_line":"            libvirt_driver.connect_volume(connection_info, self.disk_info)"},{"line_number":1437,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_1703a510","line":1434,"in_reply_to":"ba7be1f8_971dd564","updated":"2015-03-03 20:56:03.000000000","message":"ok, thanks","commit_id":"352c11bb817510f5a5ba6a4bd7eac04279a1946c"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"1ff46d2921fcc30fcca3d413c80cf90311084131","unresolved":false,"context_lines":[{"line_number":1431,"context_line":"        # Test the scenario where multipath_id is returned during"},{"line_number":1432,"context_line":"        # connect volume"},{"line_number":1433,"context_line":"        with mock.patch.object("},{"line_number":1434,"context_line":"                linuxscsi, \u0027find_multipath_device\u0027) as mock_find:"},{"line_number":1435,"context_line":"            mock_find.return_value \u003d devices"},{"line_number":1436,"context_line":"            libvirt_driver.connect_volume(connection_info, self.disk_info)"},{"line_number":1437,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_971dd564","line":1434,"in_reply_to":"ba7be1f8_a1fb7b79","updated":"2015-03-03 20:37:08.000000000","message":"@jichenjc, i did this separately on purpose, so the distinction between the return_value in the first and the second is clear.","commit_id":"352c11bb817510f5a5ba6a4bd7eac04279a1946c"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"e4ef716b96e72e53565a80cb1965350e4c5b270b","unresolved":false,"context_lines":[{"line_number":1442,"context_line":"                linuxscsi, \u0027find_multipath_device\u0027) as mock_find:"},{"line_number":1443,"context_line":"            mock_find.return_value \u003d None"},{"line_number":1444,"context_line":"            libvirt_driver.disconnect_volume(connection_info, \"vde\")"},{"line_number":1445,"context_line":""},{"line_number":1446,"context_line":"    @mock.patch.object(volume.LibvirtFibreChannelVolumeDriver,"},{"line_number":1447,"context_line":"                       \u0027_remove_lun_from_s390\u0027)"},{"line_number":1448,"context_line":"    def _test_libvirt_fibrechan_driver_s390(self, mock_remove_lun):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_a1ad3b86","line":1445,"updated":"2015-03-03 20:03:11.000000000","message":"should we add a test here?\n\nlike mutlpath_id not in  ?","commit_id":"352c11bb817510f5a5ba6a4bd7eac04279a1946c"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"1ff46d2921fcc30fcca3d413c80cf90311084131","unresolved":false,"context_lines":[{"line_number":1442,"context_line":"                linuxscsi, \u0027find_multipath_device\u0027) as mock_find:"},{"line_number":1443,"context_line":"            mock_find.return_value \u003d None"},{"line_number":1444,"context_line":"            libvirt_driver.disconnect_volume(connection_info, \"vde\")"},{"line_number":1445,"context_line":""},{"line_number":1446,"context_line":"    @mock.patch.object(volume.LibvirtFibreChannelVolumeDriver,"},{"line_number":1447,"context_line":"                       \u0027_remove_lun_from_s390\u0027)"},{"line_number":1448,"context_line":"    def _test_libvirt_fibrechan_driver_s390(self, mock_remove_lun):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_f7ac51ef","line":1445,"in_reply_to":"ba7be1f8_a1ad3b86","updated":"2015-03-03 20:37:08.000000000","message":"Not sure if it is needed.","commit_id":"352c11bb817510f5a5ba6a4bd7eac04279a1946c"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"ae20928061b2e41bf0d06efaa5bcffcd802dd76f","unresolved":false,"context_lines":[{"line_number":1442,"context_line":"                linuxscsi, \u0027find_multipath_device\u0027) as mock_find:"},{"line_number":1443,"context_line":"            mock_find.return_value \u003d None"},{"line_number":1444,"context_line":"            libvirt_driver.disconnect_volume(connection_info, \"vde\")"},{"line_number":1445,"context_line":""},{"line_number":1446,"context_line":"    @mock.patch.object(volume.LibvirtFibreChannelVolumeDriver,"},{"line_number":1447,"context_line":"                       \u0027_remove_lun_from_s390\u0027)"},{"line_number":1448,"context_line":"    def _test_libvirt_fibrechan_driver_s390(self, mock_remove_lun):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_926b23b8","line":1445,"in_reply_to":"ba7be1f8_f7ac51ef","updated":"2015-03-03 20:56:03.000000000","message":"ok, but comments at 1440 and 1431 make me thought there might be a missing test..anyway, let me remove my -1, thanks for the info","commit_id":"352c11bb817510f5a5ba6a4bd7eac04279a1946c"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e7eb2a2acd5120f8615b2ed66b92f4272017abec","unresolved":false,"context_lines":[{"line_number":1424,"context_line":"                                \u0027address\u0027: \u00271:0:0:1\u0027,"},{"line_number":1425,"context_line":"                                \u0027host\u0027: 1, \u0027channel\u0027: 0,"},{"line_number":1426,"context_line":"                                \u0027id\u0027: 0, \u0027lun\u0027: 1}]}"},{"line_number":1427,"context_line":"        self.stubs.Set(linuxscsi, \u0027remove_device\u0027, lambda x: None)"},{"line_number":1428,"context_line":"        connection_info \u003d self.fibrechan_connection(self.vol,"},{"line_number":1429,"context_line":"                                                    self.location,"},{"line_number":1430,"context_line":"                                                    \u00271234567890123456\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"bab921fb_3304f813","line":1427,"updated":"2015-04-23 03:35:16.000000000","message":"If this were mocked with mock, we could assert after disconnect_volume that remove_device was not called. Otherwise, I think this test is only testing \"doesn\u0027t raise an exception if None is returned.\"","commit_id":"7f5dba5dc7ebfcde0e8dd0955036f6578242c8c0"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"2ecd883d0ab330fd4472aef0e4a60a65dc62325e","unresolved":false,"context_lines":[{"line_number":1434,"context_line":"        # connect volume"},{"line_number":1435,"context_line":"        mock_find.return_value \u003d devices"},{"line_number":1436,"context_line":"        libvirt_driver.connect_volume(connection_info, self.disk_info)"},{"line_number":1437,"context_line":"        self.assertEqual(0, mock_remove.call_count)"},{"line_number":1438,"context_line":""},{"line_number":1439,"context_line":"        self.assertIn(\u0027multipath_id\u0027, connection_info[\u0027data\u0027])"},{"line_number":1440,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"3acd31a7_6d837257","line":1437,"updated":"2015-05-01 14:54:36.000000000","message":"self.assertFalse(mock_remove.called)","commit_id":"144dd4f02b3ee9b79e64de830c31984f86ec3001"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"36cbcf152821805dc956b1408fd8ddfcdc6f6547","unresolved":false,"context_lines":[{"line_number":1434,"context_line":"        # connect volume"},{"line_number":1435,"context_line":"        mock_find.return_value \u003d devices"},{"line_number":1436,"context_line":"        libvirt_driver.connect_volume(connection_info, self.disk_info)"},{"line_number":1437,"context_line":"        self.assertEqual(0, mock_remove.call_count)"},{"line_number":1438,"context_line":""},{"line_number":1439,"context_line":"        self.assertIn(\u0027multipath_id\u0027, connection_info[\u0027data\u0027])"},{"line_number":1440,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"3acd31a7_7d299636","line":1437,"in_reply_to":"3acd31a7_6d837257","updated":"2015-05-05 12:55:06.000000000","message":"Agreed, I prefer this pattern","commit_id":"144dd4f02b3ee9b79e64de830c31984f86ec3001"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"36cbcf152821805dc956b1408fd8ddfcdc6f6547","unresolved":false,"context_lines":[{"line_number":1438,"context_line":""},{"line_number":1439,"context_line":"        self.assertIn(\u0027multipath_id\u0027, connection_info[\u0027data\u0027])"},{"line_number":1440,"context_line":""},{"line_number":1441,"context_line":"        # But NOT during disconnect_volume"},{"line_number":1442,"context_line":"        mock_find.return_value \u003d None"},{"line_number":1443,"context_line":"        libvirt_driver.disconnect_volume(connection_info, \"vde\")"},{"line_number":1444,"context_line":"        self.assertEqual(0, mock_remove.call_count)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3acd31a7_9db23205","line":1441,"updated":"2015-05-05 12:55:06.000000000","message":"Ideally 2 tests would be nice calling both the same private method","commit_id":"144dd4f02b3ee9b79e64de830c31984f86ec3001"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"2ecd883d0ab330fd4472aef0e4a60a65dc62325e","unresolved":false,"context_lines":[{"line_number":1441,"context_line":"        # But NOT during disconnect_volume"},{"line_number":1442,"context_line":"        mock_find.return_value \u003d None"},{"line_number":1443,"context_line":"        libvirt_driver.disconnect_volume(connection_info, \"vde\")"},{"line_number":1444,"context_line":"        self.assertEqual(0, mock_remove.call_count)"},{"line_number":1445,"context_line":""},{"line_number":1446,"context_line":"    @mock.patch.object(volume.LibvirtFibreChannelVolumeDriver,"},{"line_number":1447,"context_line":"                       \u0027_remove_lun_from_s390\u0027)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3acd31a7_cdaba6d5","line":1444,"updated":"2015-05-01 14:54:36.000000000","message":"self.assertFalse(mock_remove.called)","commit_id":"144dd4f02b3ee9b79e64de830c31984f86ec3001"}],"nova/virt/libvirt/volume.py":[{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"c88f697feeb090344ed873e46cd9ee38bde7088d","unresolved":false,"context_lines":[{"line_number":1399,"context_line":"        if \u0027multipath_id\u0027 in connection_info[\u0027data\u0027]:"},{"line_number":1400,"context_line":"            multipath_id \u003d connection_info[\u0027data\u0027][\u0027multipath_id\u0027]"},{"line_number":1401,"context_line":"            mdev_info \u003d linuxscsi.find_multipath_device(multipath_id)"},{"line_number":1402,"context_line":"            devices \u003d mdev_info[\u0027devices\u0027] if mdev_info else []"},{"line_number":1403,"context_line":"            LOG.debug(\"devices to remove \u003d %s\", devices)"},{"line_number":1404,"context_line":"        else:"},{"line_number":1405,"context_line":"            # only needed when multipath-tools work improperly"}],"source_content_type":"text/x-python","patch_set":9,"id":"9aa53dc9_5175a0f7","line":1402,"updated":"2015-04-09 18:21:48.000000000","message":"how about: \n\n    devices \u003d mdev_info.get(\u0027devices\u0027, [])\n\nlooks cleaner. :)","commit_id":"7f5dba5dc7ebfcde0e8dd0955036f6578242c8c0"},{"author":{"_account_id":14027,"name":"Michal Rostecki","email":"mrostecki@suse.de","username":"mrostecki"},"change_message_id":"5fe7b33888e0a7017f78cc7de6c66ade76f36667","unresolved":false,"context_lines":[{"line_number":1399,"context_line":"        if \u0027multipath_id\u0027 in connection_info[\u0027data\u0027]:"},{"line_number":1400,"context_line":"            multipath_id \u003d connection_info[\u0027data\u0027][\u0027multipath_id\u0027]"},{"line_number":1401,"context_line":"            mdev_info \u003d linuxscsi.find_multipath_device(multipath_id)"},{"line_number":1402,"context_line":"            devices \u003d mdev_info[\u0027devices\u0027] if mdev_info else []"},{"line_number":1403,"context_line":"            LOG.debug(\"devices to remove \u003d %s\", devices)"},{"line_number":1404,"context_line":"        else:"},{"line_number":1405,"context_line":"            # only needed when multipath-tools work improperly"}],"source_content_type":"text/x-python","patch_set":9,"id":"dac4157f_2736f803","line":1402,"in_reply_to":"9aa53dc9_5175a0f7","updated":"2015-04-20 07:59:14.000000000","message":"linuxscsi.find_multipath_device may return None, it\u0027s not always a dict: https://github.com/openstack/nova/blob/master/nova/storage/linuxscsi.py#L164","commit_id":"7f5dba5dc7ebfcde0e8dd0955036f6578242c8c0"}]}
