)]}'
{"nova/tests/unit/virt/vmwareapi/test_driver_api.py":[{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"dc344ce09188205b6ee6796a0fc17bc66a1515f7","unresolved":false,"context_lines":[{"line_number":1896,"context_line":"        self.conn.detach_volume(connection_info, self.instance, mount_point,"},{"line_number":1897,"context_line":"                                encryption\u003dNone)"},{"line_number":1898,"context_line":""},{"line_number":1899,"context_line":"    def test_attach_iscsi_disk_to_idecontroller(self):"},{"line_number":1900,"context_line":"        self._create_vm()"},{"line_number":1901,"context_line":"        vm \u003d self._get_vm_record()"},{"line_number":1902,"context_line":"        devices \u003d vm.get(\"config.hardware.device\").VirtualDevice"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_d2a136f8","line":1899,"updated":"2015-01-07 00:08:48.000000000","message":"Please for all new tests use `mock` instead `mox` and `stubs`.","commit_id":"4ce8a402374865ece9a2c6d89cf0e6990908edc7"},{"author":{"_account_id":10586,"name":"Jin Hui","email":"jinhuihh@cn.ibm.com","username":"Jinhui"},"change_message_id":"e1612ec810a140c4abaff910ddc0345764d835cc","unresolved":false,"context_lines":[{"line_number":1896,"context_line":"        self.conn.detach_volume(connection_info, self.instance, mount_point,"},{"line_number":1897,"context_line":"                                encryption\u003dNone)"},{"line_number":1898,"context_line":""},{"line_number":1899,"context_line":"    def test_attach_iscsi_disk_to_idecontroller(self):"},{"line_number":1900,"context_line":"        self._create_vm()"},{"line_number":1901,"context_line":"        vm \u003d self._get_vm_record()"},{"line_number":1902,"context_line":"        devices \u003d vm.get(\"config.hardware.device\").VirtualDevice"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_af319c5a","line":1899,"in_reply_to":"3a961159_d2a136f8","updated":"2015-01-07 10:49:15.000000000","message":"Done","commit_id":"4ce8a402374865ece9a2c6d89cf0e6990908edc7"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"dc344ce09188205b6ee6796a0fc17bc66a1515f7","unresolved":false,"context_lines":[{"line_number":1902,"context_line":"        devices \u003d vm.get(\"config.hardware.device\").VirtualDevice"},{"line_number":1903,"context_line":"        scsi_controller \u003d filter(lambda device:"},{"line_number":1904,"context_line":"            device.__class__.__name__ \u003d\u003d \u0027VirtualLsiLogicController\u0027, devices)"},{"line_number":1905,"context_line":"        self.assertEquals(1, len(scsi_controller),"},{"line_number":1906,"context_line":"                          \"There should be one scsi controller\")"},{"line_number":1907,"context_line":"        ide_controller \u003d vmwareapi_fake.\\"},{"line_number":1908,"context_line":"                      VirtualIDEController(scsi_controller[0].key)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_3248ba2c","line":1905,"updated":"2015-01-07 00:08:48.000000000","message":"H234  assertEquals is deprecated, use assertEqual","commit_id":"4ce8a402374865ece9a2c6d89cf0e6990908edc7"},{"author":{"_account_id":10586,"name":"Jin Hui","email":"jinhuihh@cn.ibm.com","username":"Jinhui"},"change_message_id":"e1612ec810a140c4abaff910ddc0345764d835cc","unresolved":false,"context_lines":[{"line_number":1902,"context_line":"        devices \u003d vm.get(\"config.hardware.device\").VirtualDevice"},{"line_number":1903,"context_line":"        scsi_controller \u003d filter(lambda device:"},{"line_number":1904,"context_line":"            device.__class__.__name__ \u003d\u003d \u0027VirtualLsiLogicController\u0027, devices)"},{"line_number":1905,"context_line":"        self.assertEquals(1, len(scsi_controller),"},{"line_number":1906,"context_line":"                          \"There should be one scsi controller\")"},{"line_number":1907,"context_line":"        ide_controller \u003d vmwareapi_fake.\\"},{"line_number":1908,"context_line":"                      VirtualIDEController(scsi_controller[0].key)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_6f2b34eb","line":1905,"in_reply_to":"3a961159_3248ba2c","updated":"2015-01-07 10:49:15.000000000","message":"Done","commit_id":"4ce8a402374865ece9a2c6d89cf0e6990908edc7"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"dc344ce09188205b6ee6796a0fc17bc66a1515f7","unresolved":false,"context_lines":[{"line_number":1930,"context_line":"        volumeops.VMwareVolumeOps._iscsi_get_target("},{"line_number":1931,"context_line":"            connection_info[\u0027data\u0027]).AndReturn(discover)"},{"line_number":1932,"context_line":"        self.mox.ReplayAll()"},{"line_number":1933,"context_line":"        self.assertRaises(exception.StorageError, self.conn.attach_volume, "},{"line_number":1934,"context_line":"                          None, connection_info, self.instance,"},{"line_number":1935,"context_line":"                                mount_point)"},{"line_number":1936,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_724ec239","line":1933,"range":{"start_line":1933,"start_character":73,"end_line":1933,"end_character":75},"updated":"2015-01-07 00:08:48.000000000","message":"W291 trailing whitespace","commit_id":"4ce8a402374865ece9a2c6d89cf0e6990908edc7"},{"author":{"_account_id":10586,"name":"Jin Hui","email":"jinhuihh@cn.ibm.com","username":"Jinhui"},"change_message_id":"e1612ec810a140c4abaff910ddc0345764d835cc","unresolved":false,"context_lines":[{"line_number":1930,"context_line":"        volumeops.VMwareVolumeOps._iscsi_get_target("},{"line_number":1931,"context_line":"            connection_info[\u0027data\u0027]).AndReturn(discover)"},{"line_number":1932,"context_line":"        self.mox.ReplayAll()"},{"line_number":1933,"context_line":"        self.assertRaises(exception.StorageError, self.conn.attach_volume, "},{"line_number":1934,"context_line":"                          None, connection_info, self.instance,"},{"line_number":1935,"context_line":"                                mount_point)"},{"line_number":1936,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_cf36e850","line":1933,"in_reply_to":"3a961159_724ec239","updated":"2015-01-07 10:49:15.000000000","message":"Done","commit_id":"4ce8a402374865ece9a2c6d89cf0e6990908edc7"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"21186f371c40504d60f5326407cb0a91c5862426","unresolved":false,"context_lines":[{"line_number":1856,"context_line":"        self.assertEqual(1, len(scsi_controller),"},{"line_number":1857,"context_line":"                          \"There should be one scsi controller\")"},{"line_number":1858,"context_line":"        ide_controller \u003d vmwareapi_fake.\\"},{"line_number":1859,"context_line":"                      VirtualIDEController(scsi_controller[0].key)"},{"line_number":1860,"context_line":"        devices.remove(scsi_controller[0])"},{"line_number":1861,"context_line":"        devices.append(ide_controller)"},{"line_number":1862,"context_line":"        vmwareapi_fake._update_object(\"VirtualMachine\", vm)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_df3b78e9","line":1859,"updated":"2015-02-20 21:14:20.000000000","message":"I suggest indentation of:\n\n    ide_controller \u003d vmwareapi_fake.VirtualIDEController(\n        scsi_controller[0].key)\n\nThat would eliminate the backslash continuation.","commit_id":"ceac77906658c720a502ba479e12b712b3a99fec"},{"author":{"_account_id":10586,"name":"Jin Hui","email":"jinhuihh@cn.ibm.com","username":"Jinhui"},"change_message_id":"9bbb4bdf25523a6cb17887b4e30451cce1be08a0","unresolved":false,"context_lines":[{"line_number":1856,"context_line":"        self.assertEqual(1, len(scsi_controller),"},{"line_number":1857,"context_line":"                          \"There should be one scsi controller\")"},{"line_number":1858,"context_line":"        ide_controller \u003d vmwareapi_fake.\\"},{"line_number":1859,"context_line":"                      VirtualIDEController(scsi_controller[0].key)"},{"line_number":1860,"context_line":"        devices.remove(scsi_controller[0])"},{"line_number":1861,"context_line":"        devices.append(ide_controller)"},{"line_number":1862,"context_line":"        vmwareapi_fake._update_object(\"VirtualMachine\", vm)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_1a68a220","line":1859,"in_reply_to":"ba7be1f8_df3b78e9","updated":"2015-02-28 08:49:23.000000000","message":"Done","commit_id":"ceac77906658c720a502ba479e12b712b3a99fec"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"21186f371c40504d60f5326407cb0a91c5862426","unresolved":false,"context_lines":[{"line_number":1876,"context_line":"                          None, connection_info, self.instance,"},{"line_number":1877,"context_line":"                                mount_point)"},{"line_number":1878,"context_line":"            get_target_calls \u003d ("},{"line_number":1879,"context_line":"                [call(connection_info[\u0027data\u0027]), call(connection_info[\u0027data\u0027])])"},{"line_number":1880,"context_line":"            # _iscsi_get_target is supposed to be called twice"},{"line_number":1881,"context_line":"            iscsi_get_target.assert_has_calls(get_target_calls)"},{"line_number":1882,"context_line":"            iscsi_rescan_hba.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_5f06a821","line":1879,"updated":"2015-02-20 21:14:20.000000000","message":"You could do:\n\n    get_target_calls \u003d [\n        call(connection_info[\u0027data\u0027]),\n        call(connection_info[\u0027data\u0027]),\n    ]","commit_id":"ceac77906658c720a502ba479e12b712b3a99fec"},{"author":{"_account_id":10586,"name":"Jin Hui","email":"jinhuihh@cn.ibm.com","username":"Jinhui"},"change_message_id":"9bbb4bdf25523a6cb17887b4e30451cce1be08a0","unresolved":false,"context_lines":[{"line_number":1876,"context_line":"                          None, connection_info, self.instance,"},{"line_number":1877,"context_line":"                                mount_point)"},{"line_number":1878,"context_line":"            get_target_calls \u003d ("},{"line_number":1879,"context_line":"                [call(connection_info[\u0027data\u0027]), call(connection_info[\u0027data\u0027])])"},{"line_number":1880,"context_line":"            # _iscsi_get_target is supposed to be called twice"},{"line_number":1881,"context_line":"            iscsi_get_target.assert_has_calls(get_target_calls)"},{"line_number":1882,"context_line":"            iscsi_rescan_hba.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_3a772604","line":1879,"in_reply_to":"ba7be1f8_5f06a821","updated":"2015-02-28 08:49:23.000000000","message":"Done","commit_id":"ceac77906658c720a502ba479e12b712b3a99fec"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"c07ef74b30db78300a65e5ce40511878bedb5d68","unresolved":false,"context_lines":[{"line_number":1840,"context_line":"        self.conn.detach_volume(connection_info, self.instance, mount_point,"},{"line_number":1841,"context_line":"                                encryption\u003dNone)"},{"line_number":1842,"context_line":""},{"line_number":1843,"context_line":"    def test_attach_iscsi_disk_to_idecontroller(self):"},{"line_number":1844,"context_line":"        self._create_vm()"},{"line_number":1845,"context_line":"        vm \u003d self._get_vm_record()"},{"line_number":1846,"context_line":"        devices \u003d vm.get(\"config.hardware.device\").VirtualDevice"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_19d045f5","line":1843,"updated":"2015-03-08 14:12:10.000000000","message":"i do not see a tests case when 15 is exceeded","commit_id":"0b7ac13d299306175f347c05905d22366cf002a7"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"29ea745eb3558275104a045f460257d16e71e659","unresolved":false,"context_lines":[{"line_number":1840,"context_line":"        self.conn.detach_volume(connection_info, self.instance, mount_point,"},{"line_number":1841,"context_line":"                                encryption\u003dNone)"},{"line_number":1842,"context_line":""},{"line_number":1843,"context_line":"    def test_attach_iscsi_disk_to_idecontroller(self):"},{"line_number":1844,"context_line":"        self._create_vm()"},{"line_number":1845,"context_line":"        vm \u003d self._get_vm_record()"},{"line_number":1846,"context_line":"        devices \u003d vm.get(\"config.hardware.device\").VirtualDevice"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_c20cf13d","line":1843,"in_reply_to":"9a80dd14_19d045f5","updated":"2015-03-09 05:03:18.000000000","message":"Done","commit_id":"0b7ac13d299306175f347c05905d22366cf002a7"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e5a23609ab895c4dbeac0926ae9912bd5f85026e","unresolved":false,"context_lines":[{"line_number":1866,"context_line":"            ) as (iscsi_get_target,"},{"line_number":1867,"context_line":"                  iscsi_rescan_hba):"},{"line_number":1868,"context_line":"            self.assertRaises(exception.StorageError, self.conn.attach_volume,"},{"line_number":1869,"context_line":"                          None, connection_info, self.instance,"},{"line_number":1870,"context_line":"                                mount_point)"},{"line_number":1871,"context_line":"            get_target_calls \u003d ["},{"line_number":1872,"context_line":"                call(connection_info[\u0027data\u0027]),"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_396ed7c9","line":1869,"updated":"2015-03-09 11:33:33.000000000","message":"indentation here is a little odd","commit_id":"6b87ea7551c45f3942f88de29b6c9f0e83005ca5"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"b1e077383f02dfd6e5e3cfd2aa11f149690169de","unresolved":false,"context_lines":[{"line_number":1866,"context_line":"            ) as (iscsi_get_target,"},{"line_number":1867,"context_line":"                  iscsi_rescan_hba):"},{"line_number":1868,"context_line":"            self.assertRaises(exception.StorageError, self.conn.attach_volume,"},{"line_number":1869,"context_line":"                          None, connection_info, self.instance,"},{"line_number":1870,"context_line":"                                mount_point)"},{"line_number":1871,"context_line":"            get_target_calls \u003d ["},{"line_number":1872,"context_line":"                call(connection_info[\u0027data\u0027]),"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_5c6e14ca","line":1869,"in_reply_to":"9a80dd14_396ed7c9","updated":"2015-03-09 14:29:50.000000000","message":"Done","commit_id":"6b87ea7551c45f3942f88de29b6c9f0e83005ca5"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e5a23609ab895c4dbeac0926ae9912bd5f85026e","unresolved":false,"context_lines":[{"line_number":1883,"context_line":"        devices \u003d vm.get(\"config.hardware.device\").VirtualDevice"},{"line_number":1884,"context_line":"        scsi_controller \u003d filter(lambda device:"},{"line_number":1885,"context_line":"            device.__class__.__name__ \u003d\u003d \u0027VirtualLsiLogicController\u0027, devices)"},{"line_number":1886,"context_line":"        # the controller is no suitable since the device under this controller"},{"line_number":1887,"context_line":"        # is exceed SCSI_MAX_CONNECT_NUMBER"},{"line_number":1888,"context_line":"        for i in range(0, constants.SCSI_MAX_CONNECT_NUMBER):"},{"line_number":1889,"context_line":"            scsi_controller[0].device.append(\u0027device\u0027 + str(i))"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_796befb6","line":1886,"updated":"2015-03-09 11:33:33.000000000","message":"no \u003d\u003e not","commit_id":"6b87ea7551c45f3942f88de29b6c9f0e83005ca5"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"b1e077383f02dfd6e5e3cfd2aa11f149690169de","unresolved":false,"context_lines":[{"line_number":1883,"context_line":"        devices \u003d vm.get(\"config.hardware.device\").VirtualDevice"},{"line_number":1884,"context_line":"        scsi_controller \u003d filter(lambda device:"},{"line_number":1885,"context_line":"            device.__class__.__name__ \u003d\u003d \u0027VirtualLsiLogicController\u0027, devices)"},{"line_number":1886,"context_line":"        # the controller is no suitable since the device under this controller"},{"line_number":1887,"context_line":"        # is exceed SCSI_MAX_CONNECT_NUMBER"},{"line_number":1888,"context_line":"        for i in range(0, constants.SCSI_MAX_CONNECT_NUMBER):"},{"line_number":1889,"context_line":"            scsi_controller[0].device.append(\u0027device\u0027 + str(i))"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_dc6124d4","line":1886,"in_reply_to":"9a80dd14_796befb6","updated":"2015-03-09 14:29:50.000000000","message":"Done","commit_id":"6b87ea7551c45f3942f88de29b6c9f0e83005ca5"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e5a23609ab895c4dbeac0926ae9912bd5f85026e","unresolved":false,"context_lines":[{"line_number":1884,"context_line":"        scsi_controller \u003d filter(lambda device:"},{"line_number":1885,"context_line":"            device.__class__.__name__ \u003d\u003d \u0027VirtualLsiLogicController\u0027, devices)"},{"line_number":1886,"context_line":"        # the controller is no suitable since the device under this controller"},{"line_number":1887,"context_line":"        # is exceed SCSI_MAX_CONNECT_NUMBER"},{"line_number":1888,"context_line":"        for i in range(0, constants.SCSI_MAX_CONNECT_NUMBER):"},{"line_number":1889,"context_line":"            scsi_controller[0].device.append(\u0027device\u0027 + str(i))"},{"line_number":1890,"context_line":"        connection_info \u003d self._test_vmdk_connection_info(\u0027iscsi\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_d95cdb1b","line":1887,"updated":"2015-03-09 11:33:33.000000000","message":"is exceed \u003d\u003e has exceeded","commit_id":"6b87ea7551c45f3942f88de29b6c9f0e83005ca5"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"b1e077383f02dfd6e5e3cfd2aa11f149690169de","unresolved":false,"context_lines":[{"line_number":1884,"context_line":"        scsi_controller \u003d filter(lambda device:"},{"line_number":1885,"context_line":"            device.__class__.__name__ \u003d\u003d \u0027VirtualLsiLogicController\u0027, devices)"},{"line_number":1886,"context_line":"        # the controller is no suitable since the device under this controller"},{"line_number":1887,"context_line":"        # is exceed SCSI_MAX_CONNECT_NUMBER"},{"line_number":1888,"context_line":"        for i in range(0, constants.SCSI_MAX_CONNECT_NUMBER):"},{"line_number":1889,"context_line":"            scsi_controller[0].device.append(\u0027device\u0027 + str(i))"},{"line_number":1890,"context_line":"        connection_info \u003d self._test_vmdk_connection_info(\u0027iscsi\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_1c9f3cb6","line":1887,"in_reply_to":"9a80dd14_d95cdb1b","updated":"2015-03-09 14:29:50.000000000","message":"Done","commit_id":"6b87ea7551c45f3942f88de29b6c9f0e83005ca5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"81199360287fd84d083d60ac2f873f14902fc3a3","unresolved":false,"context_lines":[{"line_number":1859,"context_line":"        self.conn.detach_volume(connection_info, self.instance, mount_point,"},{"line_number":1860,"context_line":"                                encryption\u003dNone)"},{"line_number":1861,"context_line":""},{"line_number":1862,"context_line":"    def test_attach_iscsi_disk_to_idecontroller(self):"},{"line_number":1863,"context_line":"        self._create_vm()"},{"line_number":1864,"context_line":"        vm \u003d self._get_vm_record()"},{"line_number":1865,"context_line":"        devices \u003d vm.get(\"config.hardware.device\").VirtualDevice"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6ced46_775b662e","line":1862,"updated":"2015-03-24 14:30:43.000000000","message":"It grosses me out that we have these two large unit tests in the driver API test module when the changes are not in the driver API or vmops but in volumeops and the utility module, we should just have unit tests for the changes isolated to those tests.  This isn\u0027t unit testing, it\u0027s more like functional/integration testing and when something changes in vm_util or volumeops we have to go possibly go back and change the driver API tests.","commit_id":"4d0a016244c4af4656e7ddd6d86fdd1ed7bb44bc"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"60dd8fe26176796808e1ba3d77a35e14a83f9e6e","unresolved":false,"context_lines":[{"line_number":1859,"context_line":"        self.conn.detach_volume(connection_info, self.instance, mount_point,"},{"line_number":1860,"context_line":"                                encryption\u003dNone)"},{"line_number":1861,"context_line":""},{"line_number":1862,"context_line":"    def test_attach_iscsi_disk_to_idecontroller(self):"},{"line_number":1863,"context_line":"        self._create_vm()"},{"line_number":1864,"context_line":"        vm \u003d self._get_vm_record()"},{"line_number":1865,"context_line":"        devices \u003d vm.get(\"config.hardware.device\").VirtualDevice"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6ced46_ef7f2364","line":1862,"in_reply_to":"1a6ced46_775b662e","updated":"2015-03-26 11:44:04.000000000","message":"Done","commit_id":"4d0a016244c4af4656e7ddd6d86fdd1ed7bb44bc"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"8217feaa79f58081e098a51c8beb3fcb30e5a02e","unresolved":false,"context_lines":[{"line_number":1877,"context_line":"        connection_info[\u0027data\u0027][\u0027target_iqn\u0027] \u003d \u0027fake_target_iqn\u0027"},{"line_number":1878,"context_line":"        mount_point \u003d \u0027/dev/vdc\u0027"},{"line_number":1879,"context_line":"        discover \u003d (\u0027fake_name\u0027, \u0027fake_uuid\u0027)"},{"line_number":1880,"context_line":"        call \u003d mock.call"},{"line_number":1881,"context_line":"        with contextlib.nested("},{"line_number":1882,"context_line":"            mock.patch.object(volumeops.VMwareVolumeOps, \u0027_iscsi_get_target\u0027,"},{"line_number":1883,"context_line":"                              side_effect\u003d[(None, None), discover]),"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6ced46_4cb181e0","line":1880,"updated":"2015-03-24 14:30:12.000000000","message":"I think that omitting this line and using \"mock.call\" below would be easier to follow.","commit_id":"4d0a016244c4af4656e7ddd6d86fdd1ed7bb44bc"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"60dd8fe26176796808e1ba3d77a35e14a83f9e6e","unresolved":false,"context_lines":[{"line_number":1877,"context_line":"        connection_info[\u0027data\u0027][\u0027target_iqn\u0027] \u003d \u0027fake_target_iqn\u0027"},{"line_number":1878,"context_line":"        mount_point \u003d \u0027/dev/vdc\u0027"},{"line_number":1879,"context_line":"        discover \u003d (\u0027fake_name\u0027, \u0027fake_uuid\u0027)"},{"line_number":1880,"context_line":"        call \u003d mock.call"},{"line_number":1881,"context_line":"        with contextlib.nested("},{"line_number":1882,"context_line":"            mock.patch.object(volumeops.VMwareVolumeOps, \u0027_iscsi_get_target\u0027,"},{"line_number":1883,"context_line":"                              side_effect\u003d[(None, None), discover]),"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6ced46_4fe59736","line":1880,"in_reply_to":"1a6ced46_4cb181e0","updated":"2015-03-26 11:44:04.000000000","message":"Follow Matt\u0027s comment above, I will remove the test here, and create some in test_vm_util, thanks!","commit_id":"4d0a016244c4af4656e7ddd6d86fdd1ed7bb44bc"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"8217feaa79f58081e098a51c8beb3fcb30e5a02e","unresolved":false,"context_lines":[{"line_number":1913,"context_line":"        with contextlib.nested("},{"line_number":1914,"context_line":"            mock.patch.object(volumeops.VMwareVolumeOps, \u0027_iscsi_get_target\u0027,"},{"line_number":1915,"context_line":"                              side_effect\u003d[(None, None), discover]),"},{"line_number":1916,"context_line":"            mock.patch.object(volumeops.VMwareVolumeOps, \u0027_iscsi_rescan_hba\u0027),"},{"line_number":1917,"context_line":"            ) as (iscsi_get_target,"},{"line_number":1918,"context_line":"                  iscsi_rescan_hba):"},{"line_number":1919,"context_line":"            self.assertRaises(exception.StorageError, self.conn.attach_volume,"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6ced46_ccf2d199","line":1916,"updated":"2015-03-24 14:30:12.000000000","message":"Is this patch necessary? It does not appear to be used below.","commit_id":"4d0a016244c4af4656e7ddd6d86fdd1ed7bb44bc"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"60dd8fe26176796808e1ba3d77a35e14a83f9e6e","unresolved":false,"context_lines":[{"line_number":1913,"context_line":"        with contextlib.nested("},{"line_number":1914,"context_line":"            mock.patch.object(volumeops.VMwareVolumeOps, \u0027_iscsi_get_target\u0027,"},{"line_number":1915,"context_line":"                              side_effect\u003d[(None, None), discover]),"},{"line_number":1916,"context_line":"            mock.patch.object(volumeops.VMwareVolumeOps, \u0027_iscsi_rescan_hba\u0027),"},{"line_number":1917,"context_line":"            ) as (iscsi_get_target,"},{"line_number":1918,"context_line":"                  iscsi_rescan_hba):"},{"line_number":1919,"context_line":"            self.assertRaises(exception.StorageError, self.conn.attach_volume,"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6ced46_8fd22f5a","line":1916,"in_reply_to":"1a6ced46_ccf2d199","updated":"2015-03-26 11:44:04.000000000","message":"ditto","commit_id":"4d0a016244c4af4656e7ddd6d86fdd1ed7bb44bc"}],"nova/tests/unit/virt/vmwareapi/test_vm_util.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"67362f389c1c19d2397ee51ad59dc960242a4baf","unresolved":false,"context_lines":[{"line_number":297,"context_line":"        self.assertEqual(constants.DEFAULT_ADAPTER_TYPE,"},{"line_number":298,"context_line":"                         vm_util.get_scsi_adapter_type(hardware_device))"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        # the controller is not suitable since the device under this controller"},{"line_number":301,"context_line":"        # has exceeded SCSI_MAX_CONNECT_NUMBER"},{"line_number":302,"context_line":"        for i in range(0, constants.SCSI_MAX_CONNECT_NUMBER):"},{"line_number":303,"context_line":"            scsi_controller.device.append(\u0027device\u0027 + str(i))"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa963961_13c9c978","line":300,"updated":"2015-03-27 18:14:21.000000000","message":"This could arguably be a separate test case.","commit_id":"eff8ddd787e46e4f9ab45eb53ea0e33eff6fc932"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"cb3a65e37624b603900ae161a22c6d4514a02563","unresolved":false,"context_lines":[{"line_number":297,"context_line":"        self.assertEqual(constants.DEFAULT_ADAPTER_TYPE,"},{"line_number":298,"context_line":"                         vm_util.get_scsi_adapter_type(hardware_device))"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        # the controller is not suitable since the device under this controller"},{"line_number":301,"context_line":"        # has exceeded SCSI_MAX_CONNECT_NUMBER"},{"line_number":302,"context_line":"        for i in range(0, constants.SCSI_MAX_CONNECT_NUMBER):"},{"line_number":303,"context_line":"            scsi_controller.device.append(\u0027device\u0027 + str(i))"}],"source_content_type":"text/x-python","patch_set":18,"id":"da9b358b_304bd6b2","line":300,"in_reply_to":"fa963961_13c9c978","updated":"2015-03-28 03:46:25.000000000","message":"Done","commit_id":"eff8ddd787e46e4f9ab45eb53ea0e33eff6fc932"}],"nova/tests/unit/virt/vmwareapi/test_volumeops.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2b8457a711ffa3f85cd1ad70459a46050631b285","unresolved":false,"context_lines":[{"line_number":236,"context_line":"                                               self._instance)"},{"line_number":237,"context_line":"            iscsi_discover_target.assert_called_once_with("},{"line_number":238,"context_line":"                connection_info[\u0027data\u0027])"},{"line_number":239,"context_line":"            self.assertTrue(get_vmdk_info.called)"},{"line_number":240,"context_line":"            attach_disk_to_vm.assert_called_once_with(vm_ref,"},{"line_number":241,"context_line":"                self._instance, adapter_type, \u0027rdmp\u0027,"},{"line_number":242,"context_line":"                device_name\u003dmock.sentinel.device_name)"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6ced46_068f6acd","side":"PARENT","line":239,"updated":"2015-03-24 13:58:05.000000000","message":"Why do we no longer assert that get_scsi_adapter_type is called?  If that\u0027s not hit then we have an untested patch in this method.","commit_id":"9802c9bc6f7ee4ee35c349d73e2abd48af5a1a76"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"60dd8fe26176796808e1ba3d77a35e14a83f9e6e","unresolved":false,"context_lines":[{"line_number":236,"context_line":"                                               self._instance)"},{"line_number":237,"context_line":"            iscsi_discover_target.assert_called_once_with("},{"line_number":238,"context_line":"                connection_info[\u0027data\u0027])"},{"line_number":239,"context_line":"            self.assertTrue(get_vmdk_info.called)"},{"line_number":240,"context_line":"            attach_disk_to_vm.assert_called_once_with(vm_ref,"},{"line_number":241,"context_line":"                self._instance, adapter_type, \u0027rdmp\u0027,"},{"line_number":242,"context_line":"                device_name\u003dmock.sentinel.device_name)"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6ced46_0f6abfb2","side":"PARENT","line":239,"in_reply_to":"1a6ced46_068f6acd","updated":"2015-03-26 11:44:04.000000000","message":"Done","commit_id":"9802c9bc6f7ee4ee35c349d73e2abd48af5a1a76"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2b8457a711ffa3f85cd1ad70459a46050631b285","unresolved":false,"context_lines":[{"line_number":224,"context_line":"            mock.patch.object(vm_util, \u0027get_scsi_adapter_type\u0027,"},{"line_number":225,"context_line":"                              return_value\u003dadapter_type),"},{"line_number":226,"context_line":"            mock.patch.object(self._volumeops, \u0027attach_disk_to_vm\u0027)"},{"line_number":227,"context_line":"        ) as (get_vm_ref, iscsi_discover_target, get_vmdk_info,"},{"line_number":228,"context_line":"              attach_disk_to_vm):"},{"line_number":229,"context_line":"            self._volumeops.attach_volume(connection_info, self._instance,"},{"line_number":230,"context_line":"                                          adapter_type)"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6ced46_86a35a4e","line":227,"updated":"2015-03-24 13:58:05.000000000","message":"The mock name \"get_vmdk_info\" should change.","commit_id":"4d0a016244c4af4656e7ddd6d86fdd1ed7bb44bc"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"60dd8fe26176796808e1ba3d77a35e14a83f9e6e","unresolved":false,"context_lines":[{"line_number":224,"context_line":"            mock.patch.object(vm_util, \u0027get_scsi_adapter_type\u0027,"},{"line_number":225,"context_line":"                              return_value\u003dadapter_type),"},{"line_number":226,"context_line":"            mock.patch.object(self._volumeops, \u0027attach_disk_to_vm\u0027)"},{"line_number":227,"context_line":"        ) as (get_vm_ref, iscsi_discover_target, get_vmdk_info,"},{"line_number":228,"context_line":"              attach_disk_to_vm):"},{"line_number":229,"context_line":"            self._volumeops.attach_volume(connection_info, self._instance,"},{"line_number":230,"context_line":"                                          adapter_type)"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6ced46_ef71e3a8","line":227,"in_reply_to":"1a6ced46_86a35a4e","updated":"2015-03-26 11:44:04.000000000","message":"Done","commit_id":"4d0a016244c4af4656e7ddd6d86fdd1ed7bb44bc"}],"nova/virt/vmwareapi/constants.py":[{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"8217feaa79f58081e098a51c8beb3fcb30e5a02e","unresolved":false,"context_lines":[{"line_number":57,"context_line":"EXTENSION_TYPE_INSTANCE \u003d \u0027instance\u0027"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"# The max number of devices that can be connnected to one controller"},{"line_number":60,"context_line":"SCSI_MAX_CONNECT_NUMBER \u003d 15"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"# This list was extracted from the installation iso image for ESX 5.5 Update 1."},{"line_number":63,"context_line":"# It is contained in s.v00, which is gzipped. The list was obtained by"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6ced46_f1184677","line":60,"updated":"2015-03-24 14:30:12.000000000","message":"Is this a SCSI standard or related specifically to VMware? I thought the limit was 16 devices per bus.","commit_id":"4d0a016244c4af4656e7ddd6d86fdd1ed7bb44bc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2b8457a711ffa3f85cd1ad70459a46050631b285","unresolved":false,"context_lines":[{"line_number":57,"context_line":"EXTENSION_TYPE_INSTANCE \u003d \u0027instance\u0027"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"# The max number of devices that can be connnected to one controller"},{"line_number":60,"context_line":"SCSI_MAX_CONNECT_NUMBER \u003d 15"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"# This list was extracted from the installation iso image for ESX 5.5 Update 1."},{"line_number":63,"context_line":"# It is contained in s.v00, which is gzipped. The list was obtained by"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6ced46_869d1a5c","line":60,"updated":"2015-03-24 13:58:05.000000000","message":"Where does this value come from?","commit_id":"4d0a016244c4af4656e7ddd6d86fdd1ed7bb44bc"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"3b5e6ebb7f7203b82d08b0d6d010f67a4c3e2f1a","unresolved":false,"context_lines":[{"line_number":57,"context_line":"EXTENSION_TYPE_INSTANCE \u003d \u0027instance\u0027"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"# The max number of devices that can be connnected to one controller"},{"line_number":60,"context_line":"SCSI_MAX_CONNECT_NUMBER \u003d 15"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"# This list was extracted from the installation iso image for ESX 5.5 Update 1."},{"line_number":63,"context_line":"# It is contained in s.v00, which is gzipped. The list was obtained by"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa963961_4281f28e","line":60,"in_reply_to":"1a6ced46_af7b6b8a","updated":"2015-03-27 14:04:02.000000000","message":"Thanks for the link. Might want to include it or your explanation (i.e., 16 slots but one reserved for controller) in a comment for the benefit of maintainers.","commit_id":"4d0a016244c4af4656e7ddd6d86fdd1ed7bb44bc"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"60dd8fe26176796808e1ba3d77a35e14a83f9e6e","unresolved":false,"context_lines":[{"line_number":57,"context_line":"EXTENSION_TYPE_INSTANCE \u003d \u0027instance\u0027"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"# The max number of devices that can be connnected to one controller"},{"line_number":60,"context_line":"SCSI_MAX_CONNECT_NUMBER \u003d 15"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"# This list was extracted from the installation iso image for ESX 5.5 Update 1."},{"line_number":63,"context_line":"# It is contained in s.v00, which is gzipped. The list was obtained by"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6ced46_af7b6b8a","line":60,"in_reply_to":"1a6ced46_f1184677","updated":"2015-03-26 11:44:04.000000000","message":"We can refer to this page:\nhttps://www.vmware.com/pdf/vsphere5/r51/vsphere-51-configuration-maximums.pdf\n\nthis line: Virtual SCSI targets per virtual SCSI adapter 15\n\nOne adapter has 16 slots, but one for controller.","commit_id":"4d0a016244c4af4656e7ddd6d86fdd1ed7bb44bc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"67362f389c1c19d2397ee51ad59dc960242a4baf","unresolved":false,"context_lines":[{"line_number":56,"context_line":"EXTENSION_KEY \u003d \u0027org.openstack.compute\u0027"},{"line_number":57,"context_line":"EXTENSION_TYPE_INSTANCE \u003d \u0027instance\u0027"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"# The max number of devices that can be connnected to one controller"},{"line_number":60,"context_line":"SCSI_MAX_CONNECT_NUMBER \u003d 15"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"# This list was extracted from the installation iso image for ESX 5.5 Update 1."}],"source_content_type":"text/x-python","patch_set":18,"id":"fa963961_7387f50f","line":59,"updated":"2015-03-27 18:14:21.000000000","message":"nit: as Joel noted in patch set 16, it would be helpful to put some more information in the comment here about what the restriction is (16 connections, one reserved for the controller).","commit_id":"eff8ddd787e46e4f9ab45eb53ea0e33eff6fc932"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"cb3a65e37624b603900ae161a22c6d4514a02563","unresolved":false,"context_lines":[{"line_number":56,"context_line":"EXTENSION_KEY \u003d \u0027org.openstack.compute\u0027"},{"line_number":57,"context_line":"EXTENSION_TYPE_INSTANCE \u003d \u0027instance\u0027"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"# The max number of devices that can be connnected to one controller"},{"line_number":60,"context_line":"SCSI_MAX_CONNECT_NUMBER \u003d 15"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"# This list was extracted from the installation iso image for ESX 5.5 Update 1."}],"source_content_type":"text/x-python","patch_set":18,"id":"da9b358b_504e5ac2","line":59,"in_reply_to":"fa963961_7387f50f","updated":"2015-03-28 03:46:25.000000000","message":"Done","commit_id":"eff8ddd787e46e4f9ab45eb53ea0e33eff6fc932"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"d6c955bf96452c27950febac4ed25360f6a11f04","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"# The max number of devices that can be connnected to one adapter"},{"line_number":60,"context_line":"# One adapter has 16 slots but one reserved for controller"},{"line_number":61,"context_line":"SCSI_MAX_CONNECT_NUMBER \u003d 15"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"# This list was extracted from the installation iso image for ESX 5.5 Update 1."},{"line_number":64,"context_line":"# It is contained in s.v00, which is gzipped. The list was obtained by"}],"source_content_type":"text/x-python","patch_set":19,"id":"da9b358b_8d104450","line":61,"updated":"2015-03-28 09:52:19.000000000","message":"shouldn\u0027t this be 16? Either 15 is fine, but then you will have to compare to this number using \u003c\u003d, or make this 16 and then compare using \u003c.\n\nOtherwise, one slot won\u0027t be used.","commit_id":"a10f076a7fa7dd7ed302c79d935a6dc9e5375732"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"113213afa5164972d4e35ace6804e9f21846f889","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"# The max number of devices that can be connnected to one adapter"},{"line_number":60,"context_line":"# One adapter has 16 slots but one reserved for controller"},{"line_number":61,"context_line":"SCSI_MAX_CONNECT_NUMBER \u003d 15"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"# This list was extracted from the installation iso image for ESX 5.5 Update 1."},{"line_number":64,"context_line":"# It is contained in s.v00, which is gzipped. The list was obtained by"}],"source_content_type":"text/x-python","patch_set":19,"id":"da9b358b_ad20a84a","line":61,"in_reply_to":"da9b358b_8d104450","updated":"2015-03-28 10:30:39.000000000","message":"One adapter has 16 slots but one reserved for controller, so only 15 targets can be connected.\n\nAnd the compare using \u003c  because only one adapter connected less than(\u003c) 15 targets can be a suitable adapter.\n\nHope this can explain why use 15 here, thanks!","commit_id":"a10f076a7fa7dd7ed302c79d935a6dc9e5375732"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"b57f3e5f29949648a7fdecb5966014852d07b236","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"# The max number of devices that can be connnected to one adapter"},{"line_number":60,"context_line":"# One adapter has 16 slots but one reserved for controller"},{"line_number":61,"context_line":"SCSI_MAX_CONNECT_NUMBER \u003d 15"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"# This list was extracted from the installation iso image for ESX 5.5 Update 1."},{"line_number":64,"context_line":"# It is contained in s.v00, which is gzipped. The list was obtained by"}],"source_content_type":"text/x-python","patch_set":19,"id":"da9b358b_ad3f8824","line":61,"in_reply_to":"da9b358b_ad20a84a","updated":"2015-03-28 11:13:42.000000000","message":"Ah, I see. Makes sense now. Thanks!\n\nBut then, I suggest you also include this explanation as a comment. :)","commit_id":"a10f076a7fa7dd7ed302c79d935a6dc9e5375732"}],"nova/virt/vmwareapi/vm_util.py":[{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"dc344ce09188205b6ee6796a0fc17bc66a1515f7","unresolved":false,"context_lines":[{"line_number":512,"context_line":"        if device.__class__.__name__ in scsi_controller_classes:"},{"line_number":513,"context_line":"            # find the controllers which still have available slots"},{"line_number":514,"context_line":"            if len(device.device) \u003c 15:"},{"line_number":515,"context_line":"                adapter_type_dict[device.__class__.__name__] \u003d \\"},{"line_number":516,"context_line":"                            scsi_controller_classes[device.__class__.__name__]"},{"line_number":517,"context_line":"    if len(adapter_type_dict) \u003d\u003d 0:"},{"line_number":518,"context_line":"        raise exception.StorageError("}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_52baa60b","line":515,"range":{"start_line":515,"start_character":63,"end_line":515,"end_character":64},"updated":"2015-01-07 00:08:48.000000000","message":"Please use `(...)` instead `\\`\n\n    adapter_type_dict[device.__class__.__name__] \u003d (\n        scsi_controller_classes[device.__class__.__name__])","commit_id":"4ce8a402374865ece9a2c6d89cf0e6990908edc7"},{"author":{"_account_id":10586,"name":"Jin Hui","email":"jinhuihh@cn.ibm.com","username":"Jinhui"},"change_message_id":"e1612ec810a140c4abaff910ddc0345764d835cc","unresolved":false,"context_lines":[{"line_number":512,"context_line":"        if device.__class__.__name__ in scsi_controller_classes:"},{"line_number":513,"context_line":"            # find the controllers which still have available slots"},{"line_number":514,"context_line":"            if len(device.device) \u003c 15:"},{"line_number":515,"context_line":"                adapter_type_dict[device.__class__.__name__] \u003d \\"},{"line_number":516,"context_line":"                            scsi_controller_classes[device.__class__.__name__]"},{"line_number":517,"context_line":"    if len(adapter_type_dict) \u003d\u003d 0:"},{"line_number":518,"context_line":"        raise exception.StorageError("}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_0ff55082","line":515,"in_reply_to":"3a961159_52baa60b","updated":"2015-01-07 10:49:15.000000000","message":"Done","commit_id":"4ce8a402374865ece9a2c6d89cf0e6990908edc7"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"dc344ce09188205b6ee6796a0fc17bc66a1515f7","unresolved":false,"context_lines":[{"line_number":514,"context_line":"            if len(device.device) \u003c 15:"},{"line_number":515,"context_line":"                adapter_type_dict[device.__class__.__name__] \u003d \\"},{"line_number":516,"context_line":"                            scsi_controller_classes[device.__class__.__name__]"},{"line_number":517,"context_line":"    if len(adapter_type_dict) \u003d\u003d 0:"},{"line_number":518,"context_line":"        raise exception.StorageError("},{"line_number":519,"context_line":"                    reason\u003d_(\"Can\u0027t find any available SCSI controller\"))"},{"line_number":520,"context_line":"    # returns the first available adapter type. Perhaps in future"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_d2ef761b","line":517,"range":{"start_line":517,"start_character":4,"end_line":517,"end_character":35},"updated":"2015-01-07 00:08:48.000000000","message":"Better -\u003e\n    if not adapter_type_dict:\n        ...","commit_id":"4ce8a402374865ece9a2c6d89cf0e6990908edc7"},{"author":{"_account_id":10586,"name":"Jin Hui","email":"jinhuihh@cn.ibm.com","username":"Jinhui"},"change_message_id":"e1612ec810a140c4abaff910ddc0345764d835cc","unresolved":false,"context_lines":[{"line_number":514,"context_line":"            if len(device.device) \u003c 15:"},{"line_number":515,"context_line":"                adapter_type_dict[device.__class__.__name__] \u003d \\"},{"line_number":516,"context_line":"                            scsi_controller_classes[device.__class__.__name__]"},{"line_number":517,"context_line":"    if len(adapter_type_dict) \u003d\u003d 0:"},{"line_number":518,"context_line":"        raise exception.StorageError("},{"line_number":519,"context_line":"                    reason\u003d_(\"Can\u0027t find any available SCSI controller\"))"},{"line_number":520,"context_line":"    # returns the first available adapter type. Perhaps in future"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_4febd8a3","line":517,"in_reply_to":"3a961159_d2ef761b","updated":"2015-01-07 10:49:15.000000000","message":"Done","commit_id":"4ce8a402374865ece9a2c6d89cf0e6990908edc7"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"21186f371c40504d60f5326407cb0a91c5862426","unresolved":false,"context_lines":[{"line_number":533,"context_line":"        \u0027ParaVirtualSCSIController\u0027: constants.ADAPTER_TYPE_PARAVIRTUAL,"},{"line_number":534,"context_line":"        \u0027VirtualLsiLogicController\u0027: constants.DEFAULT_ADAPTER_TYPE,"},{"line_number":535,"context_line":"        \u0027VirtualLsiLogicSASController\u0027: constants.ADAPTER_TYPE_LSILOGICSAS,"},{"line_number":536,"context_line":"        \u0027VirtualBusLogicController\u0027: constants.ADAPTER_TYPE_PARAVIRTUAL}"},{"line_number":537,"context_line":"    adapter_type_dict \u003d {}"},{"line_number":538,"context_line":"    for device in hardware_devices:"},{"line_number":539,"context_line":"        if device.__class__.__name__ in scsi_controller_classes:"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_7a5ffa0e","line":536,"updated":"2015-02-20 21:14:20.000000000","message":"I\u0027d recommend moving the close \u0027}\u0027 to the next line, dedented to line up with \"scsi_controller_classes\".  I\u0027d also recommend using a trailing comma.  That would change this to:\n\n    scsi_controller_classes \u003d {\n        \u0027ParaVirtualSCSIController\u0027: constants.ADAPTER_TYPE_PARAVIRTUAL,\n        \u0027VirtualLsiLogicController\u0027: constants.DEFAULT_ADAPTER_TYPE,\n        \u0027VirtualLsiLogicSASController\u0027: constants.ADAPTER_TYPE_LSILOGICSAS,\n        \u0027VirtualBusLogicController\u0027: constants.ADAPTER_TYPE_PARAVIRTUAL,\n    }\n\nSecond, I\u0027d recommend pulling this constant out of the function and into the global scope.  Finally—is there any way you could encode the constants directly into the classes, or are they coming from some place that\u0027s not in our control?","commit_id":"ceac77906658c720a502ba479e12b712b3a99fec"},{"author":{"_account_id":10586,"name":"Jin Hui","email":"jinhuihh@cn.ibm.com","username":"Jinhui"},"change_message_id":"9bbb4bdf25523a6cb17887b4e30451cce1be08a0","unresolved":false,"context_lines":[{"line_number":533,"context_line":"        \u0027ParaVirtualSCSIController\u0027: constants.ADAPTER_TYPE_PARAVIRTUAL,"},{"line_number":534,"context_line":"        \u0027VirtualLsiLogicController\u0027: constants.DEFAULT_ADAPTER_TYPE,"},{"line_number":535,"context_line":"        \u0027VirtualLsiLogicSASController\u0027: constants.ADAPTER_TYPE_LSILOGICSAS,"},{"line_number":536,"context_line":"        \u0027VirtualBusLogicController\u0027: constants.ADAPTER_TYPE_PARAVIRTUAL}"},{"line_number":537,"context_line":"    adapter_type_dict \u003d {}"},{"line_number":538,"context_line":"    for device in hardware_devices:"},{"line_number":539,"context_line":"        if device.__class__.__name__ in scsi_controller_classes:"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_faa2ee98","line":536,"in_reply_to":"ba7be1f8_7a5ffa0e","updated":"2015-02-28 08:49:23.000000000","message":"I\u0027m not very clear about \u0027is there any way you could encode the constants directly into the classes, or are they coming from some place that\u0027s not in our control?\u0027.","commit_id":"ceac77906658c720a502ba479e12b712b3a99fec"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"21186f371c40504d60f5326407cb0a91c5862426","unresolved":false,"context_lines":[{"line_number":546,"context_line":"                    reason\u003d_(\"Can\u0027t find any available SCSI controller\"))"},{"line_number":547,"context_line":"    # returns the first available adapter type. Perhaps in future"},{"line_number":548,"context_line":"    # needs to prioritize the adapter types"},{"line_number":549,"context_line":"    return adapter_type_dict.popitem()[1]"},{"line_number":550,"context_line":""},{"line_number":551,"context_line":""},{"line_number":552,"context_line":"def _find_controller_slot(controller_keys, taken, max_unit_number):"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_1a4b5e2c","line":549,"updated":"2015-02-20 21:14:20.000000000","message":"This is going to return an unpredictable value from adapter_type_dict.  Is this dictionary ever going to have more than one entry?  If it\u0027s not supposed to, perhaps there needs to be some sort of sanity check…","commit_id":"ceac77906658c720a502ba479e12b712b3a99fec"},{"author":{"_account_id":10586,"name":"Jin Hui","email":"jinhuihh@cn.ibm.com","username":"Jinhui"},"change_message_id":"9bbb4bdf25523a6cb17887b4e30451cce1be08a0","unresolved":false,"context_lines":[{"line_number":546,"context_line":"                    reason\u003d_(\"Can\u0027t find any available SCSI controller\"))"},{"line_number":547,"context_line":"    # returns the first available adapter type. Perhaps in future"},{"line_number":548,"context_line":"    # needs to prioritize the adapter types"},{"line_number":549,"context_line":"    return adapter_type_dict.popitem()[1]"},{"line_number":550,"context_line":""},{"line_number":551,"context_line":""},{"line_number":552,"context_line":"def _find_controller_slot(controller_keys, taken, max_unit_number):"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_fa6cae38","line":549,"in_reply_to":"ba7be1f8_1a4b5e2c","updated":"2015-02-28 08:49:23.000000000","message":"Those four controllers are all scsi controllers and so far VMware only supports those four controllers. Any of those controllers can be used to attach new scsi disk, only if they are installed on the VM. My logic is to find all the available scsi controllers from the VM, and use the first one. The \u0027available\u0027 means the controller should still have the capacity to many at least one more disk (that is ensured by the above \u0027if\u0027 sentence). Yes we could find more than one available controllers, but now we have no idea to judge which controller is more proper to fit the new disk. So I think the first one is OK. We need more information to know which controller is better, maybe a priority order, or an additional parameter which specifies user\u0027s preference. But I think that should be addressed by a new submission or even a new bp.","commit_id":"ceac77906658c720a502ba479e12b712b3a99fec"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"e7742c63cc323fdbbc87592371d3b2f6b2f5ee7a","unresolved":false,"context_lines":[{"line_number":533,"context_line":"        \u0027ParaVirtualSCSIController\u0027: constants.ADAPTER_TYPE_PARAVIRTUAL,"},{"line_number":534,"context_line":"        \u0027VirtualLsiLogicController\u0027: constants.DEFAULT_ADAPTER_TYPE,"},{"line_number":535,"context_line":"        \u0027VirtualLsiLogicSASController\u0027: constants.ADAPTER_TYPE_LSILOGICSAS,"},{"line_number":536,"context_line":"        \u0027VirtualBusLogicController\u0027: constants.ADAPTER_TYPE_PARAVIRTUAL"},{"line_number":537,"context_line":"    }"},{"line_number":538,"context_line":"    adapter_type_dict \u003d {}"},{"line_number":539,"context_line":"    for device in hardware_devices:"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_05b497cf","line":536,"updated":"2015-03-02 17:11:24.000000000","message":"One femtonit (meaning I don\u0027t really care if you address it): I like to put a comma after the last item in a list or dictionary, so that the addition of more entries to the dictionary at a later date doesn\u0027t need to modify any existing lines.\n\nI\u0027d like to reiterate my recommendation about pulling this constant—scsi_controller_classes—out of the function and into the global scope.\n\nFinally—I\u0027m not very clear on what I meant with \"is there any way you could encode the constants directly into the classes, or are they coming from some place that\u0027s not in our control?\" either :)  I think what I was hoping is that, e.g., the class ParaVirtualSCSIController could have added to it, as a class attribute, the value constants.ADAPTER_TYPE_PARAVIRTUAL; that way, all you\u0027d have to do at line 542 is determine that the attribute exists, then use the attribute\u0027s value at line 544, instead of having to maintain a separate dictionary with all this data in it.  Does that make more sense?","commit_id":"ca6dd84e4d07a0275071bb88fb4906e264b8691d"},{"author":{"_account_id":10586,"name":"Jin Hui","email":"jinhuihh@cn.ibm.com","username":"Jinhui"},"change_message_id":"9d026397870f015b1c4eec251a8832c044d1c4e9","unresolved":false,"context_lines":[{"line_number":533,"context_line":"        \u0027ParaVirtualSCSIController\u0027: constants.ADAPTER_TYPE_PARAVIRTUAL,"},{"line_number":534,"context_line":"        \u0027VirtualLsiLogicController\u0027: constants.DEFAULT_ADAPTER_TYPE,"},{"line_number":535,"context_line":"        \u0027VirtualLsiLogicSASController\u0027: constants.ADAPTER_TYPE_LSILOGICSAS,"},{"line_number":536,"context_line":"        \u0027VirtualBusLogicController\u0027: constants.ADAPTER_TYPE_PARAVIRTUAL"},{"line_number":537,"context_line":"    }"},{"line_number":538,"context_line":"    adapter_type_dict \u003d {}"},{"line_number":539,"context_line":"    for device in hardware_devices:"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_39eb6979","line":536,"in_reply_to":"ba7be1f8_05b497cf","updated":"2015-03-03 07:14:12.000000000","message":"The scsi controller classes are types of data object (there are two kind of objects in vsphere: managed object and data object), and the data objects are generated by suds automatically according wsdl. We perhaps could insert such a property into the class in our function but I think it is not good choice because that would impact the class\u0027s encapsulation. I\u0027m not sure whether I catch what you mean..","commit_id":"ca6dd84e4d07a0275071bb88fb4906e264b8691d"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"9ad5d6f38f0a408e6c6b55f47bfb0d0c2d7bebdc","unresolved":false,"context_lines":[{"line_number":533,"context_line":"        \u0027ParaVirtualSCSIController\u0027: constants.ADAPTER_TYPE_PARAVIRTUAL,"},{"line_number":534,"context_line":"        \u0027VirtualLsiLogicController\u0027: constants.DEFAULT_ADAPTER_TYPE,"},{"line_number":535,"context_line":"        \u0027VirtualLsiLogicSASController\u0027: constants.ADAPTER_TYPE_LSILOGICSAS,"},{"line_number":536,"context_line":"        \u0027VirtualBusLogicController\u0027: constants.ADAPTER_TYPE_PARAVIRTUAL"},{"line_number":537,"context_line":"    }"},{"line_number":538,"context_line":"    adapter_type_dict \u003d {}"},{"line_number":539,"context_line":"    for device in hardware_devices:"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_c0a230fb","line":536,"in_reply_to":"ba7be1f8_39eb6979","updated":"2015-03-03 17:54:42.000000000","message":"Yeah, I wasn\u0027t thinking of \"monkeypatching\" that data into classes from another library; I just wasn\u0027t sure where the classes were coming from :)  If the classes in question aren\u0027t in nova, then my suggested approach doesn\u0027t make sense and you can ignore that suggestion :)","commit_id":"ca6dd84e4d07a0275071bb88fb4906e264b8691d"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"e7742c63cc323fdbbc87592371d3b2f6b2f5ee7a","unresolved":false,"context_lines":[{"line_number":547,"context_line":"                    reason\u003d_(\"Can\u0027t find any available SCSI controller\"))"},{"line_number":548,"context_line":"    # returns the first available adapter type. Perhaps in future"},{"line_number":549,"context_line":"    # needs to prioritize the adapter types"},{"line_number":550,"context_line":"    return adapter_type_dict.popitem()[1]"},{"line_number":551,"context_line":""},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"def _find_controller_slot(controller_keys, taken, max_unit_number):"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_453a0f35","line":550,"updated":"2015-03-02 17:11:24.000000000","message":"Well, my point is that, with plain dictionaries, there\u0027s no such thing as \"the first one\"; popitem() returns an entry at random.  As long as that\u0027s fine, I have no problem with it; I just wanted to highlight that.  I would request that you adjust the comment, though—\"returns just one of the available adapter types\", and maybe include an explanation of why any of them is fine.","commit_id":"ca6dd84e4d07a0275071bb88fb4906e264b8691d"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"09ab3d0432aeb0e03186016900671c8b22657dc5","unresolved":false,"context_lines":[{"line_number":541,"context_line":""},{"line_number":542,"context_line":""},{"line_number":543,"context_line":"scsi_controller_classes \u003d {"},{"line_number":544,"context_line":"        \u0027ParaVirtualSCSIController\u0027: constants.ADAPTER_TYPE_PARAVIRTUAL,"},{"line_number":545,"context_line":"        \u0027VirtualLsiLogicController\u0027: constants.DEFAULT_ADAPTER_TYPE,"},{"line_number":546,"context_line":"        \u0027VirtualLsiLogicSASController\u0027: constants.ADAPTER_TYPE_LSILOGICSAS,"},{"line_number":547,"context_line":"        \u0027VirtualBusLogicController\u0027: constants.ADAPTER_TYPE_PARAVIRTUAL"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba7be1f8_c0f070ff","line":544,"updated":"2015-03-03 17:54:56.000000000","message":"Thanks for pulling this out into a constant.  I think you need to dedent everything by 4 spaces to satisfy pep8, however…","commit_id":"27752cd4cff69307fc52c9f6398564a3723aff89"},{"author":{"_account_id":10586,"name":"Jin Hui","email":"jinhuihh@cn.ibm.com","username":"Jinhui"},"change_message_id":"424cbc2d2ef4ba46c7bb23202b394f06eeb35306","unresolved":false,"context_lines":[{"line_number":541,"context_line":""},{"line_number":542,"context_line":""},{"line_number":543,"context_line":"scsi_controller_classes \u003d {"},{"line_number":544,"context_line":"        \u0027ParaVirtualSCSIController\u0027: constants.ADAPTER_TYPE_PARAVIRTUAL,"},{"line_number":545,"context_line":"        \u0027VirtualLsiLogicController\u0027: constants.DEFAULT_ADAPTER_TYPE,"},{"line_number":546,"context_line":"        \u0027VirtualLsiLogicSASController\u0027: constants.ADAPTER_TYPE_LSILOGICSAS,"},{"line_number":547,"context_line":"        \u0027VirtualBusLogicController\u0027: constants.ADAPTER_TYPE_PARAVIRTUAL"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a80dd14_e7e1c29b","line":544,"in_reply_to":"ba7be1f8_c0f070ff","updated":"2015-03-04 05:35:51.000000000","message":"yeah, I also realized that, but the network suddenly broke down so I can\u0027t submit a new patch:). Thanks!","commit_id":"27752cd4cff69307fc52c9f6398564a3723aff89"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"09ab3d0432aeb0e03186016900671c8b22657dc5","unresolved":false,"context_lines":[{"line_number":565,"context_line":"    if not adapter_type_dict:"},{"line_number":566,"context_line":"        raise exception.StorageError("},{"line_number":567,"context_line":"                    reason\u003d_(\"Can\u0027t find any available SCSI controller\"))"},{"line_number":568,"context_line":"    #we could get more than one available controllers here, but now we"},{"line_number":569,"context_line":"    #we don\u0027t know which controller is more proper to fit the new disk. In"},{"line_number":570,"context_line":"    #theory all found available controllers should be OK. So the first one"},{"line_number":571,"context_line":"    #is used. This would be changed if more information is provided,"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba7be1f8_40bba00e","line":568,"updated":"2015-03-03 17:54:56.000000000","message":"I believe our pep8 tool requires that the comment character (\u0027#\u0027) must be followed by a space…","commit_id":"27752cd4cff69307fc52c9f6398564a3723aff89"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"09ab3d0432aeb0e03186016900671c8b22657dc5","unresolved":false,"context_lines":[{"line_number":567,"context_line":"                    reason\u003d_(\"Can\u0027t find any available SCSI controller\"))"},{"line_number":568,"context_line":"    #we could get more than one available controllers here, but now we"},{"line_number":569,"context_line":"    #we don\u0027t know which controller is more proper to fit the new disk. In"},{"line_number":570,"context_line":"    #theory all found available controllers should be OK. So the first one"},{"line_number":571,"context_line":"    #is used. This would be changed if more information is provided,"},{"line_number":572,"context_line":"    #such as a priority order list, or an additional parameter which specifies"},{"line_number":573,"context_line":"    #user\u0027s preference in future."}],"source_content_type":"text/x-python","patch_set":9,"id":"ba7be1f8_00fa88bc","line":570,"updated":"2015-03-03 17:54:56.000000000","message":"I\u0027m again quibbling with the wording \"the first one\"; what you get out of this .popitem() expression is *not* \"the first one\", only a random one.  Rephrase this sentence as \"So a random one is used.\"","commit_id":"27752cd4cff69307fc52c9f6398564a3723aff89"},{"author":{"_account_id":10586,"name":"Jin Hui","email":"jinhuihh@cn.ibm.com","username":"Jinhui"},"change_message_id":"424cbc2d2ef4ba46c7bb23202b394f06eeb35306","unresolved":false,"context_lines":[{"line_number":567,"context_line":"                    reason\u003d_(\"Can\u0027t find any available SCSI controller\"))"},{"line_number":568,"context_line":"    #we could get more than one available controllers here, but now we"},{"line_number":569,"context_line":"    #we don\u0027t know which controller is more proper to fit the new disk. In"},{"line_number":570,"context_line":"    #theory all found available controllers should be OK. So the first one"},{"line_number":571,"context_line":"    #is used. This would be changed if more information is provided,"},{"line_number":572,"context_line":"    #such as a priority order list, or an additional parameter which specifies"},{"line_number":573,"context_line":"    #user\u0027s preference in future."}],"source_content_type":"text/x-python","patch_set":9,"id":"9a80dd14_6749528b","line":570,"in_reply_to":"ba7be1f8_00fa88bc","updated":"2015-03-04 05:35:51.000000000","message":"Oops I understand what you mean after check the python doc. I\u0027m a newbie for python, and my first instinct is that popitem just pop up the first one. But I\u0027m wrong...\nThank you very much!!","commit_id":"27752cd4cff69307fc52c9f6398564a3723aff89"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"d532a3b24405287b66d54eba7bc4bbd33dc452a5","unresolved":false,"context_lines":[{"line_number":545,"context_line":"    \u0027VirtualLsiLogicController\u0027: constants.DEFAULT_ADAPTER_TYPE,"},{"line_number":546,"context_line":"    \u0027VirtualLsiLogicSASController\u0027: constants.ADAPTER_TYPE_LSILOGICSAS,"},{"line_number":547,"context_line":"    \u0027VirtualBusLogicController\u0027: constants.ADAPTER_TYPE_PARAVIRTUAL"},{"line_number":548,"context_line":"    }"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":""},{"line_number":551,"context_line":"def get_scsi_adapter_type(hardware_devices):"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_38dbde1c","line":548,"updated":"2015-03-04 16:51:27.000000000","message":"femtonits: 1. I\u0027d like to see a comma at the end of line 547, just so any future additions to this dictionary don\u0027t need to change that line.  2. This close-brace on line 548 should be in the left-most column, not indented 4 spaces like this.\n\n(By \"femtonit\" I mean style nits that will not affect my vote; while I would prefer they be addressed, I don\u0027t consider them essential.)","commit_id":"6bb61b8f91fed3a37480026e8bab907a3e1a82b0"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"c07ef74b30db78300a65e5ce40511878bedb5d68","unresolved":false,"context_lines":[{"line_number":559,"context_line":"    for device in hardware_devices:"},{"line_number":560,"context_line":"        if device.__class__.__name__ in scsi_controller_classes:"},{"line_number":561,"context_line":"            # find the controllers which still have available slots"},{"line_number":562,"context_line":"            if len(device.device) \u003c 15:"},{"line_number":563,"context_line":"                adapter_type_dict[device.__class__.__name__] \u003d ("},{"line_number":564,"context_line":"                            scsi_controller_classes[device.__class__.__name__])"},{"line_number":565,"context_line":"    if not adapter_type_dict:"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_19c92559","line":562,"updated":"2015-03-08 14:12:10.000000000","message":"the \u003c 15 is pretty vague. Can you please have some kind of a constant or comment to explain why you have used 15 here","commit_id":"0b7ac13d299306175f347c05905d22366cf002a7"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"29ea745eb3558275104a045f460257d16e71e659","unresolved":false,"context_lines":[{"line_number":559,"context_line":"    for device in hardware_devices:"},{"line_number":560,"context_line":"        if device.__class__.__name__ in scsi_controller_classes:"},{"line_number":561,"context_line":"            # find the controllers which still have available slots"},{"line_number":562,"context_line":"            if len(device.device) \u003c 15:"},{"line_number":563,"context_line":"                adapter_type_dict[device.__class__.__name__] \u003d ("},{"line_number":564,"context_line":"                            scsi_controller_classes[device.__class__.__name__])"},{"line_number":565,"context_line":"    if not adapter_type_dict:"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_42180175","line":562,"in_reply_to":"9a80dd14_19c92559","updated":"2015-03-09 05:03:18.000000000","message":"15 means the max number of device that can be connected to one scsi controller.\nDone for create a new constant.","commit_id":"0b7ac13d299306175f347c05905d22366cf002a7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2b8457a711ffa3f85cd1ad70459a46050631b285","unresolved":false,"context_lines":[{"line_number":548,"context_line":"}"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":""},{"line_number":551,"context_line":"def get_scsi_adapter_type(hardware_devices):"},{"line_number":552,"context_line":"    \"\"\"Selects a proper iscsi adapter type from the existing"},{"line_number":553,"context_line":"       hardware devices"},{"line_number":554,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6ced46_4616c2a8","line":551,"updated":"2015-03-24 13:58:05.000000000","message":"Why isn\u0027t there a unit test in test_vm_util for this?\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/tests/unit/virt/vmwareapi/test_vm_util.py","commit_id":"4d0a016244c4af4656e7ddd6d86fdd1ed7bb44bc"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"60dd8fe26176796808e1ba3d77a35e14a83f9e6e","unresolved":false,"context_lines":[{"line_number":548,"context_line":"}"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":""},{"line_number":551,"context_line":"def get_scsi_adapter_type(hardware_devices):"},{"line_number":552,"context_line":"    \"\"\"Selects a proper iscsi adapter type from the existing"},{"line_number":553,"context_line":"       hardware devices"},{"line_number":554,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6ced46_2c5dc947","line":551,"in_reply_to":"1a6ced46_4616c2a8","updated":"2015-03-26 11:44:04.000000000","message":"Done","commit_id":"4d0a016244c4af4656e7ddd6d86fdd1ed7bb44bc"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"8217feaa79f58081e098a51c8beb3fcb30e5a02e","unresolved":false,"context_lines":[{"line_number":556,"context_line":"        hardware_devices \u003d hardware_devices.VirtualDevice"},{"line_number":557,"context_line":""},{"line_number":558,"context_line":"    adapter_type_dict \u003d {}"},{"line_number":559,"context_line":"    for device in hardware_devices:"},{"line_number":560,"context_line":"        if device.__class__.__name__ in scsi_controller_classes:"},{"line_number":561,"context_line":"            # find the controllers which still have available slots"},{"line_number":562,"context_line":"            if len(device.device) \u003c constants.SCSI_MAX_CONNECT_NUMBER:"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6ced46_acd83580","line":559,"updated":"2015-03-24 14:30:12.000000000","message":"What is the type of hardware_devices (list or dictionary or ...)?","commit_id":"4d0a016244c4af4656e7ddd6d86fdd1ed7bb44bc"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"60dd8fe26176796808e1ba3d77a35e14a83f9e6e","unresolved":false,"context_lines":[{"line_number":556,"context_line":"        hardware_devices \u003d hardware_devices.VirtualDevice"},{"line_number":557,"context_line":""},{"line_number":558,"context_line":"    adapter_type_dict \u003d {}"},{"line_number":559,"context_line":"    for device in hardware_devices:"},{"line_number":560,"context_line":"        if device.__class__.__name__ in scsi_controller_classes:"},{"line_number":561,"context_line":"            # find the controllers which still have available slots"},{"line_number":562,"context_line":"            if len(device.device) \u003c constants.SCSI_MAX_CONNECT_NUMBER:"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6ced46_cf1ee75e","line":559,"in_reply_to":"1a6ced46_acd83580","updated":"2015-03-26 11:44:04.000000000","message":"It\u0027s an instance, and is literable.","commit_id":"4d0a016244c4af4656e7ddd6d86fdd1ed7bb44bc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2b8457a711ffa3f85cd1ad70459a46050631b285","unresolved":false,"context_lines":[{"line_number":559,"context_line":"    for device in hardware_devices:"},{"line_number":560,"context_line":"        if device.__class__.__name__ in scsi_controller_classes:"},{"line_number":561,"context_line":"            # find the controllers which still have available slots"},{"line_number":562,"context_line":"            if len(device.device) \u003c constants.SCSI_MAX_CONNECT_NUMBER:"},{"line_number":563,"context_line":"                adapter_type_dict[device.__class__.__name__] \u003d ("},{"line_number":564,"context_line":"                            scsi_controller_classes[device.__class__.__name__])"},{"line_number":565,"context_line":"    if not adapter_type_dict:"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6ced46_e6c40e42","line":562,"updated":"2015-03-24 13:58:05.000000000","message":"Should this be \u003c\u003d?","commit_id":"4d0a016244c4af4656e7ddd6d86fdd1ed7bb44bc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"45d4693eb96b67ac461ef6db43794eb7a2abca70","unresolved":false,"context_lines":[{"line_number":559,"context_line":"    for device in hardware_devices:"},{"line_number":560,"context_line":"        if device.__class__.__name__ in scsi_controller_classes:"},{"line_number":561,"context_line":"            # find the controllers which still have available slots"},{"line_number":562,"context_line":"            if len(device.device) \u003c constants.SCSI_MAX_CONNECT_NUMBER:"},{"line_number":563,"context_line":"                adapter_type_dict[device.__class__.__name__] \u003d ("},{"line_number":564,"context_line":"                            scsi_controller_classes[device.__class__.__name__])"},{"line_number":565,"context_line":"    if not adapter_type_dict:"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6ced46_17ea320f","line":562,"in_reply_to":"1a6ced46_112de246","updated":"2015-03-24 14:32:41.000000000","message":"Oh right.","commit_id":"4d0a016244c4af4656e7ddd6d86fdd1ed7bb44bc"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"8217feaa79f58081e098a51c8beb3fcb30e5a02e","unresolved":false,"context_lines":[{"line_number":559,"context_line":"    for device in hardware_devices:"},{"line_number":560,"context_line":"        if device.__class__.__name__ in scsi_controller_classes:"},{"line_number":561,"context_line":"            # find the controllers which still have available slots"},{"line_number":562,"context_line":"            if len(device.device) \u003c constants.SCSI_MAX_CONNECT_NUMBER:"},{"line_number":563,"context_line":"                adapter_type_dict[device.__class__.__name__] \u003d ("},{"line_number":564,"context_line":"                            scsi_controller_classes[device.__class__.__name__])"},{"line_number":565,"context_line":"    if not adapter_type_dict:"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6ced46_112de246","line":562,"in_reply_to":"1a6ced46_e6c40e42","updated":"2015-03-24 14:30:12.000000000","message":"I think not. If we\u0027re already at the maximum, then we wouldn\u0027t want to return that device for use.","commit_id":"4d0a016244c4af4656e7ddd6d86fdd1ed7bb44bc"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"8217feaa79f58081e098a51c8beb3fcb30e5a02e","unresolved":false,"context_lines":[{"line_number":561,"context_line":"            # find the controllers which still have available slots"},{"line_number":562,"context_line":"            if len(device.device) \u003c constants.SCSI_MAX_CONNECT_NUMBER:"},{"line_number":563,"context_line":"                adapter_type_dict[device.__class__.__name__] \u003d ("},{"line_number":564,"context_line":"                            scsi_controller_classes[device.__class__.__name__])"},{"line_number":565,"context_line":"    if not adapter_type_dict:"},{"line_number":566,"context_line":"        raise exception.StorageError("},{"line_number":567,"context_line":"                    reason\u003d_(\"Can\u0027t find any available SCSI controller\"))"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6ced46_d1818a90","line":564,"updated":"2015-03-24 14:30:12.000000000","message":"Based on the comment below, why not just return the first available controller? A later refactoring can add prioritization if necessary. Or, why store in a dictionary if all we care about is the value?","commit_id":"4d0a016244c4af4656e7ddd6d86fdd1ed7bb44bc"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"60dd8fe26176796808e1ba3d77a35e14a83f9e6e","unresolved":false,"context_lines":[{"line_number":561,"context_line":"            # find the controllers which still have available slots"},{"line_number":562,"context_line":"            if len(device.device) \u003c constants.SCSI_MAX_CONNECT_NUMBER:"},{"line_number":563,"context_line":"                adapter_type_dict[device.__class__.__name__] \u003d ("},{"line_number":564,"context_line":"                            scsi_controller_classes[device.__class__.__name__])"},{"line_number":565,"context_line":"    if not adapter_type_dict:"},{"line_number":566,"context_line":"        raise exception.StorageError("},{"line_number":567,"context_line":"                    reason\u003d_(\"Can\u0027t find any available SCSI controller\"))"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6ced46_0f3c7fc7","line":564,"in_reply_to":"1a6ced46_17d15257","updated":"2015-03-26 11:44:04.000000000","message":"Done","commit_id":"4d0a016244c4af4656e7ddd6d86fdd1ed7bb44bc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"45d4693eb96b67ac461ef6db43794eb7a2abca70","unresolved":false,"context_lines":[{"line_number":561,"context_line":"            # find the controllers which still have available slots"},{"line_number":562,"context_line":"            if len(device.device) \u003c constants.SCSI_MAX_CONNECT_NUMBER:"},{"line_number":563,"context_line":"                adapter_type_dict[device.__class__.__name__] \u003d ("},{"line_number":564,"context_line":"                            scsi_controller_classes[device.__class__.__name__])"},{"line_number":565,"context_line":"    if not adapter_type_dict:"},{"line_number":566,"context_line":"        raise exception.StorageError("},{"line_number":567,"context_line":"                    reason\u003d_(\"Can\u0027t find any available SCSI controller\"))"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6ced46_17d15257","line":564,"in_reply_to":"1a6ced46_d1818a90","updated":"2015-03-24 14:32:41.000000000","message":"Good point. Find the first match and return that, else raise an error if we get past the for loop.","commit_id":"4d0a016244c4af4656e7ddd6d86fdd1ed7bb44bc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f2383dcfc09fde464824d0638ad43571e93af286","unresolved":false,"context_lines":[{"line_number":576,"context_line":"                # return the first match one"},{"line_number":577,"context_line":"                return scsi_controller_classes[device.__class__.__name__]"},{"line_number":578,"context_line":"    raise exception.StorageError("},{"line_number":579,"context_line":"                reason\u003d_(\"Can\u0027t find any available SCSI controller\"))"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":""},{"line_number":582,"context_line":"def _find_controller_slot(controller_keys, taken, max_unit_number):"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa963961_33e5ed08","line":579,"updated":"2015-03-27 18:19:08.000000000","message":"We are in string freeze now, so can you find an existing error message that can be re-used here?\n\nhttps://wiki.openstack.org/wiki/StringFreeze\n\nCan you re-use this?\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/locale/nova.pot#n6243\n\nmsgid \"Unable to find iSCSI Target\"","commit_id":"eff8ddd787e46e4f9ab45eb53ea0e33eff6fc932"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"cb3a65e37624b603900ae161a22c6d4514a02563","unresolved":false,"context_lines":[{"line_number":576,"context_line":"                # return the first match one"},{"line_number":577,"context_line":"                return scsi_controller_classes[device.__class__.__name__]"},{"line_number":578,"context_line":"    raise exception.StorageError("},{"line_number":579,"context_line":"                reason\u003d_(\"Can\u0027t find any available SCSI controller\"))"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":""},{"line_number":582,"context_line":"def _find_controller_slot(controller_keys, taken, max_unit_number):"}],"source_content_type":"text/x-python","patch_set":18,"id":"da9b358b_70515e62","line":579,"in_reply_to":"fa963961_33e5ed08","updated":"2015-03-28 03:46:25.000000000","message":"Done","commit_id":"eff8ddd787e46e4f9ab45eb53ea0e33eff6fc932"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"d6c955bf96452c27950febac4ed25360f6a11f04","unresolved":false,"context_lines":[{"line_number":576,"context_line":"                # return the first match one"},{"line_number":577,"context_line":"                return scsi_controller_classes[device.__class__.__name__]"},{"line_number":578,"context_line":"    raise exception.StorageError("},{"line_number":579,"context_line":"                reason\u003d_(\"Unable to find iSCSI Target\"))"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":""},{"line_number":582,"context_line":"def _find_controller_slot(controller_keys, taken, max_unit_number):"}],"source_content_type":"text/x-python","patch_set":19,"id":"da9b358b_aa0c0e43","line":579,"updated":"2015-03-28 09:52:19.000000000","message":"nit: overindented.","commit_id":"a10f076a7fa7dd7ed302c79d935a6dc9e5375732"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"54c2780f1710df1eb69893f56d3deb0c42dc3c25","unresolved":false,"context_lines":[{"line_number":576,"context_line":"                # return the first match one"},{"line_number":577,"context_line":"                return scsi_controller_classes[device.__class__.__name__]"},{"line_number":578,"context_line":"    raise exception.StorageError("},{"line_number":579,"context_line":"                reason\u003d_(\"Unable to find iSCSI Target\"))"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":""},{"line_number":582,"context_line":"def _find_controller_slot(controller_keys, taken, max_unit_number):"}],"source_content_type":"text/x-python","patch_set":19,"id":"da9b358b_79aeaf86","line":579,"in_reply_to":"da9b358b_aa0c0e43","updated":"2015-03-31 00:32:37.000000000","message":"Done","commit_id":"a10f076a7fa7dd7ed302c79d935a6dc9e5375732"},{"author":{"_account_id":642,"name":"Matt Dietz","email":"matthew.dietz@gmail.com","username":"cerberus"},"change_message_id":"154ae319b491ae2d6b15f3c8a1cb6c54d36f5b99","unresolved":false,"context_lines":[{"line_number":566,"context_line":"    \"\"\"Selects a proper iscsi adapter type from the existing"},{"line_number":567,"context_line":"       hardware devices"},{"line_number":568,"context_line":"    \"\"\""},{"line_number":569,"context_line":"    if hardware_devices.__class__.__name__ \u003d\u003d \"ArrayOfVirtualDevice\":"},{"line_number":570,"context_line":"        hardware_devices \u003d hardware_devices.VirtualDevice"},{"line_number":571,"context_line":""},{"line_number":572,"context_line":"    for device in hardware_devices:"}],"source_content_type":"text/x-python","patch_set":20,"id":"da9b358b_442be594","line":569,"updated":"2015-03-31 15:24:43.000000000","message":"I find myself wishing this was prettier. A hook to get the name or something, but it\u0027s not a deal breaker I suppose.","commit_id":"c00a2ea6f8965ddbb9ea55e31cbc863e894ffffe"}],"nova/virt/vmwareapi/volumeops.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"21186f371c40504d60f5326407cb0a91c5862426","unresolved":false,"context_lines":[{"line_number":346,"context_line":"                  instance\u003dinstance)"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"        data \u003d connection_info[\u0027data\u0027]"},{"line_number":349,"context_line":""},{"line_number":350,"context_line":"        # Discover iSCSI Target"},{"line_number":351,"context_line":"        device_name \u003d self._iscsi_discover_target(data)[0]"},{"line_number":352,"context_line":"        if device_name is None:"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_ba6332b0","side":"PARENT","line":349,"updated":"2015-02-20 21:14:20.000000000","message":"Why remove this line?","commit_id":"8232b618287663fae4e83642b07a490f1bb29103"},{"author":{"_account_id":10586,"name":"Jin Hui","email":"jinhuihh@cn.ibm.com","username":"Jinhui"},"change_message_id":"9bbb4bdf25523a6cb17887b4e30451cce1be08a0","unresolved":false,"context_lines":[{"line_number":346,"context_line":"                  instance\u003dinstance)"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"        data \u003d connection_info[\u0027data\u0027]"},{"line_number":349,"context_line":""},{"line_number":350,"context_line":"        # Discover iSCSI Target"},{"line_number":351,"context_line":"        device_name \u003d self._iscsi_discover_target(data)[0]"},{"line_number":352,"context_line":"        if device_name is None:"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_dad44abf","side":"PARENT","line":349,"in_reply_to":"ba7be1f8_ba6332b0","updated":"2015-02-28 08:49:23.000000000","message":"the original logic is to get the existing vmdk firstly, and then use the adapter type of that vmdk to attach the new disk. But that\u0027s wrong. That is root cause of this issue my code is going to fix. If the vmdk\u0027s disk type is IDE, then the new scsi disk will attach to the IDE controller.  The new logic is to find an available scsi controller, if no scsi controller is found an error will be thrown.","commit_id":"8232b618287663fae4e83642b07a490f1bb29103"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"c07ef74b30db78300a65e5ce40511878bedb5d68","unresolved":false,"context_lines":[{"line_number":358,"context_line":"        hardware_devices \u003d self._session._call_method(vim_util,"},{"line_number":359,"context_line":"                        \"get_dynamic_property\", vm_ref,"},{"line_number":360,"context_line":"                        \"VirtualMachine\", \"config.hardware.device\")"},{"line_number":361,"context_line":"        adapter_type \u003d vm_util.get_scsi_adapter_type(hardware_devices)"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"        self.attach_disk_to_vm(vm_ref, instance,"},{"line_number":364,"context_line":"                               adapter_type, \u0027rdmp\u0027,"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_b9e579dd","line":361,"updated":"2015-03-08 14:12:10.000000000","message":"this looks like it may break booting from block devices when a specific adapter is passed as part of the block device.\n\nthe code should be:\nadapter_type \u003d adapter_type or vm_util.get_scsi_adapter_type(hardware_devices) (obviously we should only read the hardware devices if the adapter type is None","commit_id":"0b7ac13d299306175f347c05905d22366cf002a7"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"29ea745eb3558275104a045f460257d16e71e659","unresolved":false,"context_lines":[{"line_number":358,"context_line":"        hardware_devices \u003d self._session._call_method(vim_util,"},{"line_number":359,"context_line":"                        \"get_dynamic_property\", vm_ref,"},{"line_number":360,"context_line":"                        \"VirtualMachine\", \"config.hardware.device\")"},{"line_number":361,"context_line":"        adapter_type \u003d vm_util.get_scsi_adapter_type(hardware_devices)"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"        self.attach_disk_to_vm(vm_ref, instance,"},{"line_number":364,"context_line":"                               adapter_type, \u0027rdmp\u0027,"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_822d9997","line":361,"in_reply_to":"9a80dd14_b9e579dd","updated":"2015-03-09 05:03:18.000000000","message":"Done","commit_id":"0b7ac13d299306175f347c05905d22366cf002a7"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e5a23609ab895c4dbeac0926ae9912bd5f85026e","unresolved":false,"context_lines":[{"line_number":354,"context_line":"        if device_name is None:"},{"line_number":355,"context_line":"            raise exception.StorageError("},{"line_number":356,"context_line":"                reason\u003d_(\"Unable to find iSCSI Target\"))"},{"line_number":357,"context_line":"        # Get the vmdk file name that the VM is pointing to"},{"line_number":358,"context_line":"        hardware_devices \u003d self._session._call_method(vim_util,"},{"line_number":359,"context_line":"                        \"get_dynamic_property\", vm_ref,"},{"line_number":360,"context_line":"                        \"VirtualMachine\", \"config.hardware.device\")"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_39f3370b","line":357,"updated":"2015-03-09 11:33:33.000000000","message":"This should be:\n\nif adapter_type is None:\n    hardware_devices \u003d self._session._call_method(vim_util,\n                        \"get_dynamic_property\", vm_ref,\n                        \"VirtualMachine\", \"config.hardware.device\")\n    adapter_type \u003d vm_util.get_scsi_adapter_type(hardware_devices)","commit_id":"6b87ea7551c45f3942f88de29b6c9f0e83005ca5"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"b1e077383f02dfd6e5e3cfd2aa11f149690169de","unresolved":false,"context_lines":[{"line_number":354,"context_line":"        if device_name is None:"},{"line_number":355,"context_line":"            raise exception.StorageError("},{"line_number":356,"context_line":"                reason\u003d_(\"Unable to find iSCSI Target\"))"},{"line_number":357,"context_line":"        # Get the vmdk file name that the VM is pointing to"},{"line_number":358,"context_line":"        hardware_devices \u003d self._session._call_method(vim_util,"},{"line_number":359,"context_line":"                        \"get_dynamic_property\", vm_ref,"},{"line_number":360,"context_line":"                        \"VirtualMachine\", \"config.hardware.device\")"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_3ca240fd","line":357,"in_reply_to":"9a80dd14_39f3370b","updated":"2015-03-09 14:29:50.000000000","message":"Done","commit_id":"6b87ea7551c45f3942f88de29b6c9f0e83005ca5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2b8457a711ffa3f85cd1ad70459a46050631b285","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                  instance\u003dinstance)"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"        data \u003d connection_info[\u0027data\u0027]"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"        # Discover iSCSI Target"},{"line_number":354,"context_line":"        device_name \u003d self._iscsi_discover_target(data)[0]"},{"line_number":355,"context_line":"        if device_name is None:"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6ced46_467de2e6","side":"PARENT","line":352,"updated":"2015-03-24 13:58:05.000000000","message":"nit: remove the unrelated whitespace change","commit_id":"9802c9bc6f7ee4ee35c349d73e2abd48af5a1a76"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"60dd8fe26176796808e1ba3d77a35e14a83f9e6e","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                  instance\u003dinstance)"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"        data \u003d connection_info[\u0027data\u0027]"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"        # Discover iSCSI Target"},{"line_number":354,"context_line":"        device_name \u003d self._iscsi_discover_target(data)[0]"},{"line_number":355,"context_line":"        if device_name is None:"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6ced46_6ca50146","side":"PARENT","line":352,"in_reply_to":"1a6ced46_467de2e6","updated":"2015-03-26 11:44:04.000000000","message":"Done","commit_id":"9802c9bc6f7ee4ee35c349d73e2abd48af5a1a76"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2b8457a711ffa3f85cd1ad70459a46050631b285","unresolved":false,"context_lines":[{"line_number":356,"context_line":"                reason\u003d_(\"Unable to find iSCSI Target\"))"},{"line_number":357,"context_line":"        if adapter_type is None:"},{"line_number":358,"context_line":"            # Get the vmdk file name that the VM is pointing to"},{"line_number":359,"context_line":"            hardware_devices \u003d self._session._call_method(vim_util,"},{"line_number":360,"context_line":"                               \"get_dynamic_property\", vm_ref,"},{"line_number":361,"context_line":"                               \"VirtualMachine\", \"config.hardware.device\")"},{"line_number":362,"context_line":"            adapter_type \u003d vm_util.get_scsi_adapter_type(hardware_devices)"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6ced46_26ef0689","line":359,"updated":"2015-03-24 13:58:05.000000000","message":"nit: not for this change, but we really need to move this call_method code to get hardware_devices into vm_util because this operation is copied all over this module, and it\u0027s also in vmops I think but at least there it\u0027s centralized in a private method.","commit_id":"4d0a016244c4af4656e7ddd6d86fdd1ed7bb44bc"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"60dd8fe26176796808e1ba3d77a35e14a83f9e6e","unresolved":false,"context_lines":[{"line_number":356,"context_line":"                reason\u003d_(\"Unable to find iSCSI Target\"))"},{"line_number":357,"context_line":"        if adapter_type is None:"},{"line_number":358,"context_line":"            # Get the vmdk file name that the VM is pointing to"},{"line_number":359,"context_line":"            hardware_devices \u003d self._session._call_method(vim_util,"},{"line_number":360,"context_line":"                               \"get_dynamic_property\", vm_ref,"},{"line_number":361,"context_line":"                               \"VirtualMachine\", \"config.hardware.device\")"},{"line_number":362,"context_line":"            adapter_type \u003d vm_util.get_scsi_adapter_type(hardware_devices)"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6ced46_4ca84520","line":359,"in_reply_to":"1a6ced46_26ef0689","updated":"2015-03-26 11:44:04.000000000","message":"I think do it  in other patch is better, thanks for the suggestion.","commit_id":"4d0a016244c4af4656e7ddd6d86fdd1ed7bb44bc"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"d6c955bf96452c27950febac4ed25360f6a11f04","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            # Get the vmdk file name that the VM is pointing to"},{"line_number":355,"context_line":"            hardware_devices \u003d self._session._call_method(vim_util,"},{"line_number":356,"context_line":"                               \"get_dynamic_property\", vm_ref,"},{"line_number":357,"context_line":"                               \"VirtualMachine\", \"config.hardware.device\")"},{"line_number":358,"context_line":"            adapter_type \u003d vm_util.get_scsi_adapter_type(hardware_devices)"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"        self.attach_disk_to_vm(vm_ref, instance,"}],"source_content_type":"text/x-python","patch_set":19,"id":"da9b358b_ed1fd059","line":357,"updated":"2015-03-28 09:52:19.000000000","message":"nit: how about:\n\n    adapter_type \u003d adapter_type or vmdk.adapter_type\n    hardware_devices \u003d self._session._call_method(\n        vim_util, \"get_dynamic_property\", vm_ref,\n        \"VirtualMachine\", \"config.hardware.device\")\n\nthis way it isn\u0027t overindented and it is consistent.","commit_id":"a10f076a7fa7dd7ed302c79d935a6dc9e5375732"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"54c2780f1710df1eb69893f56d3deb0c42dc3c25","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            # Get the vmdk file name that the VM is pointing to"},{"line_number":355,"context_line":"            hardware_devices \u003d self._session._call_method(vim_util,"},{"line_number":356,"context_line":"                               \"get_dynamic_property\", vm_ref,"},{"line_number":357,"context_line":"                               \"VirtualMachine\", \"config.hardware.device\")"},{"line_number":358,"context_line":"            adapter_type \u003d vm_util.get_scsi_adapter_type(hardware_devices)"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"        self.attach_disk_to_vm(vm_ref, instance,"}],"source_content_type":"text/x-python","patch_set":19,"id":"da9b358b_f9351f46","line":357,"in_reply_to":"da9b358b_ed1fd059","updated":"2015-03-31 00:32:37.000000000","message":"Done","commit_id":"a10f076a7fa7dd7ed302c79d935a6dc9e5375732"}]}
