)]}'
{"nova/tests/unit/virt/libvirt/test_utils.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ce7675466c0789b78224c76e7e39aa18297a46aa","unresolved":false,"context_lines":[{"line_number":722,"context_line":"        image_arch \u003d libvirt_utils.get_arch(image_meta)"},{"line_number":723,"context_line":"        self.assertEqual(arch.X86_64, image_arch)"},{"line_number":724,"context_line":""},{"line_number":725,"context_line":"    @mock.patch(\u0027nova.utils.execute\u0027)"},{"line_number":726,"context_line":"    def test_perform_unit_add_for_s390(self, mock_execute):"},{"line_number":727,"context_line":"        device_number \u003d \"0.0.2319\""},{"line_number":728,"context_line":"        target_wwn \u003d \"0x50014380242b9751\""}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_ec837fc8","line":725,"updated":"2015-02-19 19:07:07.000000000","message":"I don\u0027t like that we\u0027re mocking the execute method which means we need to know the internals of linuxscsi.echo_scsi_command, we should just be mocking out the call to linuxscsi.echo_scsi_command so we only need to assert the parameters passed to that.","commit_id":"0468f8106203084ed0afb23f5ec1c97ec6d5c489"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ce7675466c0789b78224c76e7e39aa18297a46aa","unresolved":false,"context_lines":[{"line_number":735,"context_line":"                                    run_as_root\u003dTrue,"},{"line_number":736,"context_line":"                                    process_input\u003d1)"},{"line_number":737,"context_line":""},{"line_number":738,"context_line":"    @mock.patch(\u0027nova.utils.execute\u0027)"},{"line_number":739,"context_line":"    def test_perform_unit_remove_for_s390(self, mock_execute):"},{"line_number":740,"context_line":"        device_number \u003d \"0.0.2319\""},{"line_number":741,"context_line":"        target_wwn \u003d \"0x50014380242b9751\""}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_4c748bfd","line":738,"updated":"2015-02-19 19:07:07.000000000","message":"ditto","commit_id":"0468f8106203084ed0afb23f5ec1c97ec6d5c489"}],"nova/tests/unit/virt/libvirt/test_volume.py":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"2e7d47fc458deb6a98724d9d5799f2d637b642cc","unresolved":false,"context_lines":[{"line_number":1406,"context_line":"        pci_num \u003d libvirt_driver._get_pci_num(hba)"},{"line_number":1407,"context_line":"        self.assertEqual(\"0000:06:00.6\", pci_num)"},{"line_number":1408,"context_line":""},{"line_number":1409,"context_line":"    def test_libvirt_fibrechan_get_device_file_path(self):"},{"line_number":1410,"context_line":"        libvirt_driver \u003d volume.LibvirtFibreChannelVolumeDriver(self.fake_conn)"},{"line_number":1411,"context_line":"        pci_num \u003d \"2310\""},{"line_number":1412,"context_line":"        wwn \u003d \u00271234567890123456\u0027"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_7dec08bc","line":1409,"updated":"2015-02-17 16:59:32.000000000","message":"In the code you note that you can have one wwn or a list.  Should there also be a test case for the case where ther eis more than one wwn?","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":11433,"name":"Stefan Amann","email":"stefan.amann@de.ibm.com","username":"StefanAmann"},"change_message_id":"46a11f27a80bb30fb33535038d4e9a44be9985b3","unresolved":false,"context_lines":[{"line_number":1406,"context_line":"        pci_num \u003d libvirt_driver._get_pci_num(hba)"},{"line_number":1407,"context_line":"        self.assertEqual(\"0000:06:00.6\", pci_num)"},{"line_number":1408,"context_line":""},{"line_number":1409,"context_line":"    def test_libvirt_fibrechan_get_device_file_path(self):"},{"line_number":1410,"context_line":"        libvirt_driver \u003d volume.LibvirtFibreChannelVolumeDriver(self.fake_conn)"},{"line_number":1411,"context_line":"        pci_num \u003d \"2310\""},{"line_number":1412,"context_line":"        wwn \u003d \u00271234567890123456\u0027"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_0961ee38","line":1409,"in_reply_to":"da86d52c_7dec08bc","updated":"2015-02-18 12:08:04.000000000","message":"Done","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ce7675466c0789b78224c76e7e39aa18297a46aa","unresolved":false,"context_lines":[{"line_number":1441,"context_line":"                         \"1234567890123456:1\")"},{"line_number":1442,"context_line":"        self.assertEqual(expected_path, file_path)"},{"line_number":1443,"context_line":""},{"line_number":1444,"context_line":"    @mock.patch(\u0027nova.utils.execute\u0027)"},{"line_number":1445,"context_line":"    def test_libvirt_fibrechan_remove_lun_from_s390(self, mock_execute):"},{"line_number":1446,"context_line":"        libvirt_driver \u003d volume.LibvirtFibreChannelVolumeDriver(self.fake_conn)"},{"line_number":1447,"context_line":"        self.stubs.Set(libvirt_utils, \u0027get_fc_hbas_info\u0027,"}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_6cddcfdc","line":1444,"updated":"2015-02-19 19:07:07.000000000","message":"Just mock out libvirt_utils.perform_unit_remove_for_s390 so we don\u0027t need to know what libvirt_utils.perform_unit_remove_for_s390 is doing.  libvirt_utils.perform_unit_remove_for_s390 should be testing itself in test_utils.py.","commit_id":"0468f8106203084ed0afb23f5ec1c97ec6d5c489"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ce7675466c0789b78224c76e7e39aa18297a46aa","unresolved":false,"context_lines":[{"line_number":1444,"context_line":"    @mock.patch(\u0027nova.utils.execute\u0027)"},{"line_number":1445,"context_line":"    def test_libvirt_fibrechan_remove_lun_from_s390(self, mock_execute):"},{"line_number":1446,"context_line":"        libvirt_driver \u003d volume.LibvirtFibreChannelVolumeDriver(self.fake_conn)"},{"line_number":1447,"context_line":"        self.stubs.Set(libvirt_utils, \u0027get_fc_hbas_info\u0027,"},{"line_number":1448,"context_line":"                       fake_libvirt_utils.get_fc_hbas_info)"},{"line_number":1449,"context_line":"        connection_info \u003d {"},{"line_number":1450,"context_line":"                \u0027driver_volume_type\u0027: \u0027fibrechan\u0027,"}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_2c50375d","line":1447,"updated":"2015-02-19 19:07:07.000000000","message":"nit: use mock with a side_effect.","commit_id":"0468f8106203084ed0afb23f5ec1c97ec6d5c489"}],"nova/virt/libvirt/utils.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"d29e5076f4eb52fa39d33d8d29afd5f084150a8c","unresolved":false,"context_lines":[{"line_number":587,"context_line":""},{"line_number":588,"context_line":"def configure_scsi_device(device_number, target_wwn, lun):"},{"line_number":589,"context_line":"    \"\"\"Write the LUN to the port\u0027s unit_add attribute.\"\"\""},{"line_number":590,"context_line":"    LOG.debug(\"configure target_lun: %s\" % lun)"},{"line_number":591,"context_line":"    zfcp_device_command \u003d (\"/sys/bus/ccw/drivers/zfcp/%s/%s/unit_add\" %"},{"line_number":592,"context_line":"                           (device_number, target_wwn))"},{"line_number":593,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa81d914_091d9e73","line":590,"updated":"2015-01-29 15:56:29.000000000","message":"the caller already debug , maybe put all debug info here is better","commit_id":"85cb5bf98e475d034efcbc10b1eb330b4c4d556d"},{"author":{"_account_id":11433,"name":"Stefan Amann","email":"stefan.amann@de.ibm.com","username":"StefanAmann"},"change_message_id":"247f7c5f5f2e2dbc32120333d9b72c0fe346ff09","unresolved":false,"context_lines":[{"line_number":587,"context_line":""},{"line_number":588,"context_line":"def configure_scsi_device(device_number, target_wwn, lun):"},{"line_number":589,"context_line":"    \"\"\"Write the LUN to the port\u0027s unit_add attribute.\"\"\""},{"line_number":590,"context_line":"    LOG.debug(\"configure target_lun: %s\" % lun)"},{"line_number":591,"context_line":"    zfcp_device_command \u003d (\"/sys/bus/ccw/drivers/zfcp/%s/%s/unit_add\" %"},{"line_number":592,"context_line":"                           (device_number, target_wwn))"},{"line_number":593,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_8f92d956","line":590,"in_reply_to":"fa81d914_091d9e73","updated":"2015-02-13 10:37:19.000000000","message":"Done","commit_id":"85cb5bf98e475d034efcbc10b1eb330b4c4d556d"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"d29e5076f4eb52fa39d33d8d29afd5f084150a8c","unresolved":false,"context_lines":[{"line_number":594,"context_line":"        linuxscsi.echo_scsi_command(zfcp_device_command, lun)"},{"line_number":595,"context_line":"    except processutils.ProcessExecutionError as exc:"},{"line_number":596,"context_line":"            msg \u003d _(\"unit_add call failed exit (%(code)s), \""},{"line_number":597,"context_line":"                    \"stderr (%(stderr)s)\")"},{"line_number":598,"context_line":"            LOG.warn(msg, {\u0027code\u0027: exc.exit_code, \u0027stderr\u0027: exc.stderr})"},{"line_number":599,"context_line":""},{"line_number":600,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa81d914_c951c6d9","line":597,"updated":"2015-01-29 15:56:29.000000000","message":"nit: indent move looks better","commit_id":"85cb5bf98e475d034efcbc10b1eb330b4c4d556d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1f47d56cc4b7b154771391329789093f4f3c83c6","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    hbas \u003d get_fc_hbas()"},{"line_number":114,"context_line":"    hbas_info \u003d []"},{"line_number":115,"context_line":"    for hba in hbas:"},{"line_number":116,"context_line":"        if (platform.machine() not in (arch.S390, arch.S390X)) or ("},{"line_number":117,"context_line":"                hba[\u0027port_state\u0027] \u003d\u003d \u0027Online\u0027):"},{"line_number":118,"context_line":"            wwpn \u003d hba[\u0027port_name\u0027].replace(\u00270x\u0027, \u0027\u0027)"},{"line_number":119,"context_line":"            wwnn \u003d hba[\u0027node_name\u0027].replace(\u00270x\u0027, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_ddb72b39","line":116,"updated":"2015-02-06 18:41:30.000000000","message":"Need some code comments/documentation here.","commit_id":"422753a011caa555a83835a756f9965e08d8fed3"},{"author":{"_account_id":11433,"name":"Stefan Amann","email":"stefan.amann@de.ibm.com","username":"StefanAmann"},"change_message_id":"e519a556848a225daf5cf6d5c325aa1f70c554a5","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    hbas \u003d get_fc_hbas()"},{"line_number":114,"context_line":"    hbas_info \u003d []"},{"line_number":115,"context_line":"    for hba in hbas:"},{"line_number":116,"context_line":"        if (platform.machine() not in (arch.S390, arch.S390X)) or ("},{"line_number":117,"context_line":"                hba[\u0027port_state\u0027] \u003d\u003d \u0027Online\u0027):"},{"line_number":118,"context_line":"            wwpn \u003d hba[\u0027port_name\u0027].replace(\u00270x\u0027, \u0027\u0027)"},{"line_number":119,"context_line":"            wwnn \u003d hba[\u0027node_name\u0027].replace(\u00270x\u0027, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_93d9fa85","line":116,"in_reply_to":"da86d52c_ddb72b39","updated":"2015-02-12 16:37:38.000000000","message":"I updated the comment accordingly","commit_id":"422753a011caa555a83835a756f9965e08d8fed3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1f47d56cc4b7b154771391329789093f4f3c83c6","unresolved":false,"context_lines":[{"line_number":591,"context_line":"                (device_number,"},{"line_number":592,"context_line":"                target_wwn,"},{"line_number":593,"context_line":"                lun))"},{"line_number":594,"context_line":"    zfcp_device_command \u003d (\"/sys/bus/ccw/drivers/zfcp/%s/%s/unit_add\" %"},{"line_number":595,"context_line":"                           (device_number, target_wwn))"},{"line_number":596,"context_line":"    try:"},{"line_number":597,"context_line":"        linuxscsi.echo_scsi_command(zfcp_device_command, lun)"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_fde22f2e","line":594,"updated":"2015-02-06 18:41:30.000000000","message":"Is this s390x specific?  If so, I\u0027d rename the method and/or update the docstring to point that out.","commit_id":"422753a011caa555a83835a756f9965e08d8fed3"},{"author":{"_account_id":11433,"name":"Stefan Amann","email":"stefan.amann@de.ibm.com","username":"StefanAmann"},"change_message_id":"e519a556848a225daf5cf6d5c325aa1f70c554a5","unresolved":false,"context_lines":[{"line_number":591,"context_line":"                (device_number,"},{"line_number":592,"context_line":"                target_wwn,"},{"line_number":593,"context_line":"                lun))"},{"line_number":594,"context_line":"    zfcp_device_command \u003d (\"/sys/bus/ccw/drivers/zfcp/%s/%s/unit_add\" %"},{"line_number":595,"context_line":"                           (device_number, target_wwn))"},{"line_number":596,"context_line":"    try:"},{"line_number":597,"context_line":"        linuxscsi.echo_scsi_command(zfcp_device_command, lun)"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_e209d195","line":594,"in_reply_to":"da86d52c_fde22f2e","updated":"2015-02-12 16:37:38.000000000","message":"done. I renamed the method.","commit_id":"422753a011caa555a83835a756f9965e08d8fed3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1f47d56cc4b7b154771391329789093f4f3c83c6","unresolved":false,"context_lines":[{"line_number":598,"context_line":"    except processutils.ProcessExecutionError as exc:"},{"line_number":599,"context_line":"            msg \u003d _(\"unit_add call failed exit (%(code)s), \""},{"line_number":600,"context_line":"                    \"stderr (%(stderr)s)\")"},{"line_number":601,"context_line":"            LOG.warn(msg, {\u0027code\u0027: exc.exit_code, \u0027stderr\u0027: exc.stderr})"},{"line_number":602,"context_line":""},{"line_number":603,"context_line":""},{"line_number":604,"context_line":"def deconfigure_scsi_device(device_number, target_wwn, lun):"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_bd91979c","line":601,"updated":"2015-02-06 18:41:30.000000000","message":"This is only a warning and not a failure?  What can go wrong if we don\u0027t raise an exception?","commit_id":"422753a011caa555a83835a756f9965e08d8fed3"},{"author":{"_account_id":11433,"name":"Stefan Amann","email":"stefan.amann@de.ibm.com","username":"StefanAmann"},"change_message_id":"e519a556848a225daf5cf6d5c325aa1f70c554a5","unresolved":false,"context_lines":[{"line_number":598,"context_line":"    except processutils.ProcessExecutionError as exc:"},{"line_number":599,"context_line":"            msg \u003d _(\"unit_add call failed exit (%(code)s), \""},{"line_number":600,"context_line":"                    \"stderr (%(stderr)s)\")"},{"line_number":601,"context_line":"            LOG.warn(msg, {\u0027code\u0027: exc.exit_code, \u0027stderr\u0027: exc.stderr})"},{"line_number":602,"context_line":""},{"line_number":603,"context_line":""},{"line_number":604,"context_line":"def deconfigure_scsi_device(device_number, target_wwn, lun):"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_56cf70b0","line":601,"in_reply_to":"da86d52c_bd91979c","updated":"2015-02-12 16:37:38.000000000","message":"In multipath configurations, a LUN is accessible through multiple virtual or real HBAs through multiple target ports. Typically, target ports are only accessible through some of the virtual or real HBAs. The unit_add call can be done for all HBA / target_port combinations. The unit_add call will fail if a target_port is not accessible through a particular HBA. This is only logged since it is not an error. \nFrom an overall point of view it is only relevant that one of the unit_add calls completes successfully.","commit_id":"422753a011caa555a83835a756f9965e08d8fed3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1f47d56cc4b7b154771391329789093f4f3c83c6","unresolved":false,"context_lines":[{"line_number":614,"context_line":"    except processutils.ProcessExecutionError as exc:"},{"line_number":615,"context_line":"            msg \u003d _(\"unit_remove call failed exit (%(code)s), \""},{"line_number":616,"context_line":"                    \"stderr (%(stderr)s)\")"},{"line_number":617,"context_line":"            LOG.warn(msg, {\u0027code\u0027: exc.exit_code, \u0027stderr\u0027: exc.stderr})"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_fd8b0f66","line":617,"updated":"2015-02-06 18:41:30.000000000","message":"Only a warning?","commit_id":"422753a011caa555a83835a756f9965e08d8fed3"},{"author":{"_account_id":11433,"name":"Stefan Amann","email":"stefan.amann@de.ibm.com","username":"StefanAmann"},"change_message_id":"e519a556848a225daf5cf6d5c325aa1f70c554a5","unresolved":false,"context_lines":[{"line_number":614,"context_line":"    except processutils.ProcessExecutionError as exc:"},{"line_number":615,"context_line":"            msg \u003d _(\"unit_remove call failed exit (%(code)s), \""},{"line_number":616,"context_line":"                    \"stderr (%(stderr)s)\")"},{"line_number":617,"context_line":"            LOG.warn(msg, {\u0027code\u0027: exc.exit_code, \u0027stderr\u0027: exc.stderr})"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_d6ba8009","line":617,"in_reply_to":"da86d52c_fd8b0f66","updated":"2015-02-12 16:37:38.000000000","message":"same as above.","commit_id":"422753a011caa555a83835a756f9965e08d8fed3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6631916578b2e421dcde051ed5ca0ba1146a1a80","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    hbas \u003d get_fc_hbas()"},{"line_number":117,"context_line":"    hbas_info \u003d []"},{"line_number":118,"context_line":"    for hba in hbas:"},{"line_number":119,"context_line":"        if (platform.machine() not in (arch.S390, arch.S390X)) or ("},{"line_number":120,"context_line":"                hba[\u0027port_state\u0027] \u003d\u003d \u0027Online\u0027):"},{"line_number":121,"context_line":"            wwpn \u003d hba[\u0027port_name\u0027].replace(\u00270x\u0027, \u0027\u0027)"},{"line_number":122,"context_line":"            wwnn \u003d hba[\u0027node_name\u0027].replace(\u00270x\u0027, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_27c35f8b","line":119,"updated":"2015-02-17 16:16:25.000000000","message":"nit: I\u0027d move the s390 comment from line 113-115 here so it\u0027s closer to the context of the s390 condition.","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":11433,"name":"Stefan Amann","email":"stefan.amann@de.ibm.com","username":"StefanAmann"},"change_message_id":"46a11f27a80bb30fb33535038d4e9a44be9985b3","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    hbas \u003d get_fc_hbas()"},{"line_number":117,"context_line":"    hbas_info \u003d []"},{"line_number":118,"context_line":"    for hba in hbas:"},{"line_number":119,"context_line":"        if (platform.machine() not in (arch.S390, arch.S390X)) or ("},{"line_number":120,"context_line":"                hba[\u0027port_state\u0027] \u003d\u003d \u0027Online\u0027):"},{"line_number":121,"context_line":"            wwpn \u003d hba[\u0027port_name\u0027].replace(\u00270x\u0027, \u0027\u0027)"},{"line_number":122,"context_line":"            wwnn \u003d hba[\u0027node_name\u0027].replace(\u00270x\u0027, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_b3cbf570","line":119,"in_reply_to":"da86d52c_27c35f8b","updated":"2015-02-18 12:08:04.000000000","message":"Done","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"030337c4930e43614afb68ccf1363d137949c5e7","unresolved":false,"context_lines":[{"line_number":117,"context_line":"    hbas_info \u003d []"},{"line_number":118,"context_line":"    for hba in hbas:"},{"line_number":119,"context_line":"        if (platform.machine() not in (arch.S390, arch.S390X)) or ("},{"line_number":120,"context_line":"                hba[\u0027port_state\u0027] \u003d\u003d \u0027Online\u0027):"},{"line_number":121,"context_line":"            wwpn \u003d hba[\u0027port_name\u0027].replace(\u00270x\u0027, \u0027\u0027)"},{"line_number":122,"context_line":"            wwnn \u003d hba[\u0027node_name\u0027].replace(\u00270x\u0027, \u0027\u0027)"},{"line_number":123,"context_line":"            device_path \u003d hba[\u0027ClassDevicepath\u0027]"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_a7bbcf73","line":120,"updated":"2015-02-17 16:41:03.000000000","message":"First, does the port_state need to be a case insensitive check?\n\nSecond, the logic here looks like a regression, unless I\u0027m missing something.  In the previous code, if the host platform is x86_64 and the port_state is \u0027Offline\u0027, this would still return that HBA info.  Now it would be filtered out because of the port_state check.\n\nWould it be easier to just do something like this?\n\nif (platform.machine() in (arch.S390, arch.S390X) and\n        hba[\u0027port_state\u0027].lower() !\u003d \u0027online\u0027):\n    continue","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":11433,"name":"Stefan Amann","email":"stefan.amann@de.ibm.com","username":"StefanAmann"},"change_message_id":"46a11f27a80bb30fb33535038d4e9a44be9985b3","unresolved":false,"context_lines":[{"line_number":117,"context_line":"    hbas_info \u003d []"},{"line_number":118,"context_line":"    for hba in hbas:"},{"line_number":119,"context_line":"        if (platform.machine() not in (arch.S390, arch.S390X)) or ("},{"line_number":120,"context_line":"                hba[\u0027port_state\u0027] \u003d\u003d \u0027Online\u0027):"},{"line_number":121,"context_line":"            wwpn \u003d hba[\u0027port_name\u0027].replace(\u00270x\u0027, \u0027\u0027)"},{"line_number":122,"context_line":"            wwnn \u003d hba[\u0027node_name\u0027].replace(\u00270x\u0027, \u0027\u0027)"},{"line_number":123,"context_line":"            device_path \u003d hba[\u0027ClassDevicepath\u0027]"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_d3730914","line":120,"in_reply_to":"da86d52c_a7bbcf73","updated":"2015-02-18 12:08:04.000000000","message":"I changed the port_state check to be case insensitive.\n\nI did not want to change the code path for other platforms. So the four case are:\n\nplatform    state   action\nother        offline  append\nother        online  append\ns390        offline  do not append\ns390        online  append\n\nI changed the if statement the way you proposed. It may be simpler to read.","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6631916578b2e421dcde051ed5ca0ba1146a1a80","unresolved":false,"context_lines":[{"line_number":588,"context_line":"    return re.match(r\"^[\\w\\-\\.:]+$\", hostname)"},{"line_number":589,"context_line":""},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"def perform_unit_add(device_number, target_wwn, lun):"},{"line_number":592,"context_line":"    \"\"\"Write the LUN to the port\u0027s unit_add attribute.\"\"\""},{"line_number":593,"context_line":"    # NOTE If LUN scanning is turned off on systems following the s390,"},{"line_number":594,"context_line":"    # or s390x architecture LUNs need to be added to the configuration"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_47769340","line":591,"updated":"2015-02-17 16:16:25.000000000","message":"You renamed the method but this is still an s390(x) specific method, right? And so is perform_unit_remove.  What I was looking for in the method rename was to put zfcp or s390 in the method name, something like that to really indicate it\u0027s specific to s390 or zfcp.","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"2e7d47fc458deb6a98724d9d5799f2d637b642cc","unresolved":false,"context_lines":[{"line_number":588,"context_line":"    return re.match(r\"^[\\w\\-\\.:]+$\", hostname)"},{"line_number":589,"context_line":""},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"def perform_unit_add(device_number, target_wwn, lun):"},{"line_number":592,"context_line":"    \"\"\"Write the LUN to the port\u0027s unit_add attribute.\"\"\""},{"line_number":593,"context_line":"    # NOTE If LUN scanning is turned off on systems following the s390,"},{"line_number":594,"context_line":"    # or s390x architecture LUNs need to be added to the configuration"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_bd6040a5","line":591,"in_reply_to":"da86d52c_47769340","updated":"2015-02-17 16:59:32.000000000","message":"+1","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":11433,"name":"Stefan Amann","email":"stefan.amann@de.ibm.com","username":"StefanAmann"},"change_message_id":"46a11f27a80bb30fb33535038d4e9a44be9985b3","unresolved":false,"context_lines":[{"line_number":588,"context_line":"    return re.match(r\"^[\\w\\-\\.:]+$\", hostname)"},{"line_number":589,"context_line":""},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"def perform_unit_add(device_number, target_wwn, lun):"},{"line_number":592,"context_line":"    \"\"\"Write the LUN to the port\u0027s unit_add attribute.\"\"\""},{"line_number":593,"context_line":"    # NOTE If LUN scanning is turned off on systems following the s390,"},{"line_number":594,"context_line":"    # or s390x architecture LUNs need to be added to the configuration"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_735c1d7e","line":591,"in_reply_to":"da86d52c_47769340","updated":"2015-02-18 12:08:04.000000000","message":"Done","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":11433,"name":"Stefan Amann","email":"stefan.amann@de.ibm.com","username":"StefanAmann"},"change_message_id":"46a11f27a80bb30fb33535038d4e9a44be9985b3","unresolved":false,"context_lines":[{"line_number":588,"context_line":"    return re.match(r\"^[\\w\\-\\.:]+$\", hostname)"},{"line_number":589,"context_line":""},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"def perform_unit_add(device_number, target_wwn, lun):"},{"line_number":592,"context_line":"    \"\"\"Write the LUN to the port\u0027s unit_add attribute.\"\"\""},{"line_number":593,"context_line":"    # NOTE If LUN scanning is turned off on systems following the s390,"},{"line_number":594,"context_line":"    # or s390x architecture LUNs need to be added to the configuration"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_d3edc9f1","line":591,"in_reply_to":"da86d52c_bd6040a5","updated":"2015-02-18 12:08:04.000000000","message":"Done","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6631916578b2e421dcde051ed5ca0ba1146a1a80","unresolved":false,"context_lines":[{"line_number":606,"context_line":"    try:"},{"line_number":607,"context_line":"        linuxscsi.echo_scsi_command(zfcp_device_command, lun)"},{"line_number":608,"context_line":"    except processutils.ProcessExecutionError as exc:"},{"line_number":609,"context_line":"            msg \u003d _(\"unit_add call failed exit (%(code)s), \""},{"line_number":610,"context_line":"                    \"stderr (%(stderr)s)\")"},{"line_number":611,"context_line":"            LOG.warn(msg, {\u0027code\u0027: exc.exit_code, \u0027stderr\u0027: exc.stderr})"},{"line_number":612,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_07e01bf9","line":609,"updated":"2015-02-17 16:16:25.000000000","message":"Should be _LW for the Message object.","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":11433,"name":"Stefan Amann","email":"stefan.amann@de.ibm.com","username":"StefanAmann"},"change_message_id":"46a11f27a80bb30fb33535038d4e9a44be9985b3","unresolved":false,"context_lines":[{"line_number":606,"context_line":"    try:"},{"line_number":607,"context_line":"        linuxscsi.echo_scsi_command(zfcp_device_command, lun)"},{"line_number":608,"context_line":"    except processutils.ProcessExecutionError as exc:"},{"line_number":609,"context_line":"            msg \u003d _(\"unit_add call failed exit (%(code)s), \""},{"line_number":610,"context_line":"                    \"stderr (%(stderr)s)\")"},{"line_number":611,"context_line":"            LOG.warn(msg, {\u0027code\u0027: exc.exit_code, \u0027stderr\u0027: exc.stderr})"},{"line_number":612,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_b3e4d50d","line":609,"in_reply_to":"da86d52c_07e01bf9","updated":"2015-02-18 12:08:04.000000000","message":"Done","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"2e7d47fc458deb6a98724d9d5799f2d637b642cc","unresolved":false,"context_lines":[{"line_number":608,"context_line":"    except processutils.ProcessExecutionError as exc:"},{"line_number":609,"context_line":"            msg \u003d _(\"unit_add call failed exit (%(code)s), \""},{"line_number":610,"context_line":"                    \"stderr (%(stderr)s)\")"},{"line_number":611,"context_line":"            LOG.warn(msg, {\u0027code\u0027: exc.exit_code, \u0027stderr\u0027: exc.stderr})"},{"line_number":612,"context_line":""},{"line_number":613,"context_line":""},{"line_number":614,"context_line":"def perform_unit_remove(device_number, target_wwn, lun):"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_bd0760c8","line":611,"updated":"2015-02-17 16:59:32.000000000","message":"Why are you building the message separately here?  Would make more sense to just to a LOG.warn(_LW(...))","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":11433,"name":"Stefan Amann","email":"stefan.amann@de.ibm.com","username":"StefanAmann"},"change_message_id":"46a11f27a80bb30fb33535038d4e9a44be9985b3","unresolved":false,"context_lines":[{"line_number":608,"context_line":"    except processutils.ProcessExecutionError as exc:"},{"line_number":609,"context_line":"            msg \u003d _(\"unit_add call failed exit (%(code)s), \""},{"line_number":610,"context_line":"                    \"stderr (%(stderr)s)\")"},{"line_number":611,"context_line":"            LOG.warn(msg, {\u0027code\u0027: exc.exit_code, \u0027stderr\u0027: exc.stderr})"},{"line_number":612,"context_line":""},{"line_number":613,"context_line":""},{"line_number":614,"context_line":"def perform_unit_remove(device_number, target_wwn, lun):"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_33d9c557","line":611,"in_reply_to":"da86d52c_bd0760c8","updated":"2015-02-18 12:08:04.000000000","message":"I did not do it for any specific reason. I changed the code.","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"2e7d47fc458deb6a98724d9d5799f2d637b642cc","unresolved":false,"context_lines":[{"line_number":616,"context_line":"    # If LUN scanning is turned off on systems following the s390, or s390x"},{"line_number":617,"context_line":"    # architecture LUNs need to be removed from the configuration using the"},{"line_number":618,"context_line":"    # unit_remove call. The unit_remove call may fail if the LUN is not"},{"line_number":619,"context_line":"    # part of the configuration anymore. This may be an expected situation,"},{"line_number":620,"context_line":"    # This method will thus only log a warning message in case the"},{"line_number":621,"context_line":"    # unit_remove call fails."},{"line_number":622,"context_line":"    LOG.debug(\"deconfigure device_num\u003d%s target_wwn\u003d%s target_lun\u003d%s\" %"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_3df370e8","line":619,"updated":"2015-02-17 16:59:32.000000000","message":"Looks like you copy pasted from above and lot some of the text here.  Is this supposed to note multipath again?","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6631916578b2e421dcde051ed5ca0ba1146a1a80","unresolved":false,"context_lines":[{"line_number":616,"context_line":"    # If LUN scanning is turned off on systems following the s390, or s390x"},{"line_number":617,"context_line":"    # architecture LUNs need to be removed from the configuration using the"},{"line_number":618,"context_line":"    # unit_remove call. The unit_remove call may fail if the LUN is not"},{"line_number":619,"context_line":"    # part of the configuration anymore. This may be an expected situation,"},{"line_number":620,"context_line":"    # This method will thus only log a warning message in case the"},{"line_number":621,"context_line":"    # unit_remove call fails."},{"line_number":622,"context_line":"    LOG.debug(\"deconfigure device_num\u003d%s target_wwn\u003d%s target_lun\u003d%s\" %"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_c72e0342","line":619,"updated":"2015-02-17 16:16:25.000000000","message":"s/situation,/situation./","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d3f2c8cb81658addf7b985b1f92201d26bd8eabb","unresolved":false,"context_lines":[{"line_number":616,"context_line":"    # If LUN scanning is turned off on systems following the s390, or s390x"},{"line_number":617,"context_line":"    # architecture LUNs need to be removed from the configuration using the"},{"line_number":618,"context_line":"    # unit_remove call. The unit_remove call may fail if the LUN is not"},{"line_number":619,"context_line":"    # part of the configuration anymore. This may be an expected situation,"},{"line_number":620,"context_line":"    # This method will thus only log a warning message in case the"},{"line_number":621,"context_line":"    # unit_remove call fails."},{"line_number":622,"context_line":"    LOG.debug(\"deconfigure device_num\u003d%s target_wwn\u003d%s target_lun\u003d%s\" %"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_6e36b0e8","line":619,"in_reply_to":"da86d52c_13ea010f","updated":"2015-02-19 15:23:25.000000000","message":"FWIW, we shouldn\u0027t go out of our way to support cases where the admin did something manually outside of nova.  The LUN scanning case is a better argument.","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":11433,"name":"Stefan Amann","email":"stefan.amann@de.ibm.com","username":"StefanAmann"},"change_message_id":"46a11f27a80bb30fb33535038d4e9a44be9985b3","unresolved":false,"context_lines":[{"line_number":616,"context_line":"    # If LUN scanning is turned off on systems following the s390, or s390x"},{"line_number":617,"context_line":"    # architecture LUNs need to be removed from the configuration using the"},{"line_number":618,"context_line":"    # unit_remove call. The unit_remove call may fail if the LUN is not"},{"line_number":619,"context_line":"    # part of the configuration anymore. This may be an expected situation,"},{"line_number":620,"context_line":"    # This method will thus only log a warning message in case the"},{"line_number":621,"context_line":"    # unit_remove call fails."},{"line_number":622,"context_line":"    LOG.debug(\"deconfigure device_num\u003d%s target_wwn\u003d%s target_lun\u003d%s\" %"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_13ea010f","line":619,"in_reply_to":"da86d52c_3df370e8","updated":"2015-02-18 12:08:04.000000000","message":"During unit_add not all of the host WWPNs/HBAs may provide a path to all target WWPNs. Usually, a group of host WWPNs and one or multiple target port WWPNs are in one SAN. Another group of host WWPNs and target port WWPNs are in a separate SAN. The unit_add is executed for all combinations of host port WWPNs and target port WWPNs. And will only work for those which are in the same SAN.\nThe unit_remove case is slightly different. It may fail because the unit_remove has been triggered by some other event before. For example, if an administrator manually performed it. Or because LUN scanning removed it.\nI slightly changed the text accordingly","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":11433,"name":"Stefan Amann","email":"stefan.amann@de.ibm.com","username":"StefanAmann"},"change_message_id":"46a11f27a80bb30fb33535038d4e9a44be9985b3","unresolved":false,"context_lines":[{"line_number":616,"context_line":"    # If LUN scanning is turned off on systems following the s390, or s390x"},{"line_number":617,"context_line":"    # architecture LUNs need to be removed from the configuration using the"},{"line_number":618,"context_line":"    # unit_remove call. The unit_remove call may fail if the LUN is not"},{"line_number":619,"context_line":"    # part of the configuration anymore. This may be an expected situation,"},{"line_number":620,"context_line":"    # This method will thus only log a warning message in case the"},{"line_number":621,"context_line":"    # unit_remove call fails."},{"line_number":622,"context_line":"    LOG.debug(\"deconfigure device_num\u003d%s target_wwn\u003d%s target_lun\u003d%s\" %"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_f389ed6f","line":619,"in_reply_to":"da86d52c_c72e0342","updated":"2015-02-18 12:08:04.000000000","message":"Done","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6631916578b2e421dcde051ed5ca0ba1146a1a80","unresolved":false,"context_lines":[{"line_number":628,"context_line":"    try:"},{"line_number":629,"context_line":"        linuxscsi.echo_scsi_command(zfcp_device_command, lun)"},{"line_number":630,"context_line":"    except processutils.ProcessExecutionError as exc:"},{"line_number":631,"context_line":"            msg \u003d _(\"unit_remove call failed exit (%(code)s), \""},{"line_number":632,"context_line":"                    \"stderr (%(stderr)s)\")"},{"line_number":633,"context_line":"            LOG.warn(msg, {\u0027code\u0027: exc.exit_code, \u0027stderr\u0027: exc.stderr})"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_6719d721","line":631,"updated":"2015-02-17 16:16:25.000000000","message":"Should be _LW for the Message object.","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":11433,"name":"Stefan Amann","email":"stefan.amann@de.ibm.com","username":"StefanAmann"},"change_message_id":"46a11f27a80bb30fb33535038d4e9a44be9985b3","unresolved":false,"context_lines":[{"line_number":628,"context_line":"    try:"},{"line_number":629,"context_line":"        linuxscsi.echo_scsi_command(zfcp_device_command, lun)"},{"line_number":630,"context_line":"    except processutils.ProcessExecutionError as exc:"},{"line_number":631,"context_line":"            msg \u003d _(\"unit_remove call failed exit (%(code)s), \""},{"line_number":632,"context_line":"                    \"stderr (%(stderr)s)\")"},{"line_number":633,"context_line":"            LOG.warn(msg, {\u0027code\u0027: exc.exit_code, \u0027stderr\u0027: exc.stderr})"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_b393f5a1","line":631,"in_reply_to":"da86d52c_6719d721","updated":"2015-02-18 12:08:04.000000000","message":"Done","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"ed85ee6c41263a8d3aaade253a30287d7ce404f2","unresolved":false,"context_lines":[{"line_number":599,"context_line":"    # This can be an expected situation in multipath configurations."},{"line_number":600,"context_line":"    # This method will thus only log a warning message in case the"},{"line_number":601,"context_line":"    # unit_add call fails."},{"line_number":602,"context_line":"    LOG.debug(\"configure device_num\u003d%s target_wwn\u003d%s target_lun\u003d%s\" %"},{"line_number":603,"context_line":"                (device_number,"},{"line_number":604,"context_line":"                target_wwn,"},{"line_number":605,"context_line":"                lun))"}],"source_content_type":"text/x-python","patch_set":17,"id":"da86d52c_f4fb61bb","line":602,"range":{"start_line":602,"start_character":68,"end_line":602,"end_character":69},"updated":"2015-02-19 10:12:01.000000000","message":"`%` -\u003e `,`","commit_id":"ff3b8869a52837a7115adb48373a97fb8a4f2490"},{"author":{"_account_id":11433,"name":"Stefan Amann","email":"stefan.amann@de.ibm.com","username":"StefanAmann"},"change_message_id":"42932af250cb6ec1873a30069b915a1708e733fa","unresolved":false,"context_lines":[{"line_number":599,"context_line":"    # This can be an expected situation in multipath configurations."},{"line_number":600,"context_line":"    # This method will thus only log a warning message in case the"},{"line_number":601,"context_line":"    # unit_add call fails."},{"line_number":602,"context_line":"    LOG.debug(\"configure device_num\u003d%s target_wwn\u003d%s target_lun\u003d%s\" %"},{"line_number":603,"context_line":"                (device_number,"},{"line_number":604,"context_line":"                target_wwn,"},{"line_number":605,"context_line":"                lun))"}],"source_content_type":"text/x-python","patch_set":17,"id":"da86d52c_af47d01b","line":602,"in_reply_to":"da86d52c_f4fb61bb","updated":"2015-02-19 10:40:15.000000000","message":"Done","commit_id":"ff3b8869a52837a7115adb48373a97fb8a4f2490"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"ed85ee6c41263a8d3aaade253a30287d7ce404f2","unresolved":false,"context_lines":[{"line_number":622,"context_line":"    # For exmple, if LUN scanning is turned on."},{"line_number":623,"context_line":"    # This method will thus only log a warning message in case the"},{"line_number":624,"context_line":"    # unit_remove call fails."},{"line_number":625,"context_line":"    LOG.debug(\"deconfigure device_num\u003d%s target_wwn\u003d%s target_lun\u003d%s\" %"},{"line_number":626,"context_line":"                (device_number,"},{"line_number":627,"context_line":"                target_wwn,"},{"line_number":628,"context_line":"                lun))"}],"source_content_type":"text/x-python","patch_set":17,"id":"da86d52c_74277163","line":625,"range":{"start_line":625,"start_character":70,"end_line":625,"end_character":71},"updated":"2015-02-19 10:12:01.000000000","message":"ditto","commit_id":"ff3b8869a52837a7115adb48373a97fb8a4f2490"},{"author":{"_account_id":11433,"name":"Stefan Amann","email":"stefan.amann@de.ibm.com","username":"StefanAmann"},"change_message_id":"42932af250cb6ec1873a30069b915a1708e733fa","unresolved":false,"context_lines":[{"line_number":622,"context_line":"    # For exmple, if LUN scanning is turned on."},{"line_number":623,"context_line":"    # This method will thus only log a warning message in case the"},{"line_number":624,"context_line":"    # unit_remove call fails."},{"line_number":625,"context_line":"    LOG.debug(\"deconfigure device_num\u003d%s target_wwn\u003d%s target_lun\u003d%s\" %"},{"line_number":626,"context_line":"                (device_number,"},{"line_number":627,"context_line":"                target_wwn,"},{"line_number":628,"context_line":"                lun))"}],"source_content_type":"text/x-python","patch_set":17,"id":"da86d52c_ef4d483c","line":625,"in_reply_to":"da86d52c_74277163","updated":"2015-02-19 10:40:15.000000000","message":"Done","commit_id":"ff3b8869a52837a7115adb48373a97fb8a4f2490"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"edcc3f6caa61f8236f3f8b5be94cd868dd31a836","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        if (platform.machine() in (arch.S390, arch.S390X) and"},{"line_number":120,"context_line":"                              hba[\u0027port_state\u0027].lower() !\u003d \u0027online\u0027):"},{"line_number":121,"context_line":"            continue"},{"line_number":122,"context_line":"        else:"},{"line_number":123,"context_line":"            wwpn \u003d hba[\u0027port_name\u0027].replace(\u00270x\u0027, \u0027\u0027)"},{"line_number":124,"context_line":"            wwnn \u003d hba[\u0027node_name\u0027].replace(\u00270x\u0027, \u0027\u0027)"},{"line_number":125,"context_line":"            device_path \u003d hba[\u0027ClassDevicepath\u0027]"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_aec0a84a","line":122,"updated":"2015-02-19 16:15:51.000000000","message":"Don\u0027t need the else since you have a continue in the if.","commit_id":"01c8d3cc21fcd91b370ac16c909f483a5a82b22d"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"9d6371ef42c5af989a3378c32cce9e40f14c01a6","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        if (platform.machine() in (arch.S390, arch.S390X) and"},{"line_number":120,"context_line":"                              hba[\u0027port_state\u0027].lower() !\u003d \u0027online\u0027):"},{"line_number":121,"context_line":"            continue"},{"line_number":122,"context_line":"        else:"},{"line_number":123,"context_line":"            wwpn \u003d hba[\u0027port_name\u0027].replace(\u00270x\u0027, \u0027\u0027)"},{"line_number":124,"context_line":"            wwnn \u003d hba[\u0027node_name\u0027].replace(\u00270x\u0027, \u0027\u0027)"},{"line_number":125,"context_line":"            device_path \u003d hba[\u0027ClassDevicepath\u0027]"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_c7bbffe2","line":122,"in_reply_to":"da86d52c_aec0a84a","updated":"2015-02-19 17:05:09.000000000","message":"Done","commit_id":"01c8d3cc21fcd91b370ac16c909f483a5a82b22d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"edcc3f6caa61f8236f3f8b5be94cd868dd31a836","unresolved":false,"context_lines":[{"line_number":602,"context_line":"    LOG.debug(\"perform unit_add for s390: device_number\u003d(%(device_num)s) \""},{"line_number":603,"context_line":"              \"target_wwn\u003d(%(target_wwn)s) target_lun\u003d(%(target_lun)s)\","},{"line_number":604,"context_line":"                {\u0027device_num\u0027: device_number,"},{"line_number":605,"context_line":"                \u0027target_wwn\u0027: target_wwn,"},{"line_number":606,"context_line":"                \u0027target_lun\u0027: lun})"},{"line_number":607,"context_line":"    zfcp_device_command \u003d (\"/sys/bus/ccw/drivers/zfcp/%s/%s/unit_add\" %"},{"line_number":608,"context_line":"                           (device_number, target_wwn))"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_ee8c6037","line":605,"updated":"2015-02-19 16:15:51.000000000","message":"nit: align with the \u0027device_num\u0027 string above.","commit_id":"01c8d3cc21fcd91b370ac16c909f483a5a82b22d"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"9d6371ef42c5af989a3378c32cce9e40f14c01a6","unresolved":false,"context_lines":[{"line_number":602,"context_line":"    LOG.debug(\"perform unit_add for s390: device_number\u003d(%(device_num)s) \""},{"line_number":603,"context_line":"              \"target_wwn\u003d(%(target_wwn)s) target_lun\u003d(%(target_lun)s)\","},{"line_number":604,"context_line":"                {\u0027device_num\u0027: device_number,"},{"line_number":605,"context_line":"                \u0027target_wwn\u0027: target_wwn,"},{"line_number":606,"context_line":"                \u0027target_lun\u0027: lun})"},{"line_number":607,"context_line":"    zfcp_device_command \u003d (\"/sys/bus/ccw/drivers/zfcp/%s/%s/unit_add\" %"},{"line_number":608,"context_line":"                           (device_number, target_wwn))"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_47cf0f7f","line":605,"in_reply_to":"da86d52c_ee8c6037","updated":"2015-02-19 17:05:09.000000000","message":"Done","commit_id":"01c8d3cc21fcd91b370ac16c909f483a5a82b22d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"edcc3f6caa61f8236f3f8b5be94cd868dd31a836","unresolved":false,"context_lines":[{"line_number":609,"context_line":"    try:"},{"line_number":610,"context_line":"        linuxscsi.echo_scsi_command(zfcp_device_command, lun)"},{"line_number":611,"context_line":"    except processutils.ProcessExecutionError as exc:"},{"line_number":612,"context_line":"            LOG.warn(_LW(\"unit_add call failed exit (%(code)s), \""},{"line_number":613,"context_line":"                         \"stderr (%(stderr)s)\"),"},{"line_number":614,"context_line":"                         {\u0027code\u0027: exc.exit_code, \u0027stderr\u0027: exc.stderr})"},{"line_number":615,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_6e78702b","line":612,"updated":"2015-02-19 16:15:51.000000000","message":"nit: s/failed exit/failed; exit code/","commit_id":"01c8d3cc21fcd91b370ac16c909f483a5a82b22d"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"9d6371ef42c5af989a3378c32cce9e40f14c01a6","unresolved":false,"context_lines":[{"line_number":609,"context_line":"    try:"},{"line_number":610,"context_line":"        linuxscsi.echo_scsi_command(zfcp_device_command, lun)"},{"line_number":611,"context_line":"    except processutils.ProcessExecutionError as exc:"},{"line_number":612,"context_line":"            LOG.warn(_LW(\"unit_add call failed exit (%(code)s), \""},{"line_number":613,"context_line":"                         \"stderr (%(stderr)s)\"),"},{"line_number":614,"context_line":"                         {\u0027code\u0027: exc.exit_code, \u0027stderr\u0027: exc.stderr})"},{"line_number":615,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_c7905f45","line":612,"in_reply_to":"da86d52c_6e78702b","updated":"2015-02-19 17:05:09.000000000","message":"Done","commit_id":"01c8d3cc21fcd91b370ac16c909f483a5a82b22d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"edcc3f6caa61f8236f3f8b5be94cd868dd31a836","unresolved":false,"context_lines":[{"line_number":626,"context_line":"    LOG.debug(\"perform unit_remove for s390: device_number\u003d(%(device_num)s) \""},{"line_number":627,"context_line":"              \"target_wwn\u003d(%(target_wwn)s) target_lun\u003d(%(target_lun)s)\","},{"line_number":628,"context_line":"                {\u0027device_num\u0027: device_number,"},{"line_number":629,"context_line":"                \u0027target_wwn\u0027: target_wwn,"},{"line_number":630,"context_line":"                \u0027target_lun\u0027: lun})"},{"line_number":631,"context_line":"    zfcp_device_command \u003d (\"/sys/bus/ccw/drivers/zfcp/%s/%s/unit_remove\" %"},{"line_number":632,"context_line":"                           (device_number, target_wwn))"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_ee93804c","line":629,"updated":"2015-02-19 16:15:51.000000000","message":"alignment","commit_id":"01c8d3cc21fcd91b370ac16c909f483a5a82b22d"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"9d6371ef42c5af989a3378c32cce9e40f14c01a6","unresolved":false,"context_lines":[{"line_number":626,"context_line":"    LOG.debug(\"perform unit_remove for s390: device_number\u003d(%(device_num)s) \""},{"line_number":627,"context_line":"              \"target_wwn\u003d(%(target_wwn)s) target_lun\u003d(%(target_lun)s)\","},{"line_number":628,"context_line":"                {\u0027device_num\u0027: device_number,"},{"line_number":629,"context_line":"                \u0027target_wwn\u0027: target_wwn,"},{"line_number":630,"context_line":"                \u0027target_lun\u0027: lun})"},{"line_number":631,"context_line":"    zfcp_device_command \u003d (\"/sys/bus/ccw/drivers/zfcp/%s/%s/unit_remove\" %"},{"line_number":632,"context_line":"                           (device_number, target_wwn))"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_87aae76e","line":629,"in_reply_to":"da86d52c_ee93804c","updated":"2015-02-19 17:05:09.000000000","message":"Done","commit_id":"01c8d3cc21fcd91b370ac16c909f483a5a82b22d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"edcc3f6caa61f8236f3f8b5be94cd868dd31a836","unresolved":false,"context_lines":[{"line_number":633,"context_line":"    try:"},{"line_number":634,"context_line":"        linuxscsi.echo_scsi_command(zfcp_device_command, lun)"},{"line_number":635,"context_line":"    except processutils.ProcessExecutionError as exc:"},{"line_number":636,"context_line":"            LOG.warn(_LW(\"unit_remove call failed exit (%(code)s), \""},{"line_number":637,"context_line":"                         \"stderr (%(stderr)s)\"),"},{"line_number":638,"context_line":"                         {\u0027code\u0027: exc.exit_code, \u0027stderr\u0027: exc.stderr})"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_4ea48ca5","line":636,"updated":"2015-02-19 16:15:51.000000000","message":"nit: s/failed exit/failed; exit code/","commit_id":"01c8d3cc21fcd91b370ac16c909f483a5a82b22d"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"9d6371ef42c5af989a3378c32cce9e40f14c01a6","unresolved":false,"context_lines":[{"line_number":633,"context_line":"    try:"},{"line_number":634,"context_line":"        linuxscsi.echo_scsi_command(zfcp_device_command, lun)"},{"line_number":635,"context_line":"    except processutils.ProcessExecutionError as exc:"},{"line_number":636,"context_line":"            LOG.warn(_LW(\"unit_remove call failed exit (%(code)s), \""},{"line_number":637,"context_line":"                         \"stderr (%(stderr)s)\"),"},{"line_number":638,"context_line":"                         {\u0027code\u0027: exc.exit_code, \u0027stderr\u0027: exc.stderr})"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_0797d73a","line":636,"in_reply_to":"da86d52c_4ea48ca5","updated":"2015-02-19 17:05:09.000000000","message":"Done","commit_id":"01c8d3cc21fcd91b370ac16c909f483a5a82b22d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ce7675466c0789b78224c76e7e39aa18297a46aa","unresolved":false,"context_lines":[{"line_number":608,"context_line":"                           (device_number, target_wwn))"},{"line_number":609,"context_line":"    try:"},{"line_number":610,"context_line":"        linuxscsi.echo_scsi_command(zfcp_device_command, lun)"},{"line_number":611,"context_line":"    except processutils.ProcessExecutionError as exc:"},{"line_number":612,"context_line":"            LOG.warn(_LW(\"unit_add call failed; exit code (%(code)s), \""},{"line_number":613,"context_line":"                         \"stderr (%(stderr)s)\"),"},{"line_number":614,"context_line":"                         {\u0027code\u0027: exc.exit_code, \u0027stderr\u0027: exc.stderr})"}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_0c40d3a3","line":611,"updated":"2015-02-19 19:07:07.000000000","message":"We don\u0027t have a unit test for this exception handling.","commit_id":"0468f8106203084ed0afb23f5ec1c97ec6d5c489"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ce7675466c0789b78224c76e7e39aa18297a46aa","unresolved":false,"context_lines":[{"line_number":632,"context_line":"                           (device_number, target_wwn))"},{"line_number":633,"context_line":"    try:"},{"line_number":634,"context_line":"        linuxscsi.echo_scsi_command(zfcp_device_command, lun)"},{"line_number":635,"context_line":"    except processutils.ProcessExecutionError as exc:"},{"line_number":636,"context_line":"            LOG.warn(_LW(\"unit_remove call failed; exit code (%(code)s), \""},{"line_number":637,"context_line":"                         \"stderr (%(stderr)s)\"),"},{"line_number":638,"context_line":"                         {\u0027code\u0027: exc.exit_code, \u0027stderr\u0027: exc.stderr})"}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_6c414fa5","line":635,"updated":"2015-02-19 19:07:07.000000000","message":"We don\u0027t have a unit test for this exception handling.","commit_id":"0468f8106203084ed0afb23f5ec1c97ec6d5c489"}],"nova/virt/libvirt/volume.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"d29e5076f4eb52fa39d33d8d29afd5f084150a8c","unresolved":false,"context_lines":[{"line_number":1080,"context_line":"                for wwn in wwns:"},{"line_number":1081,"context_line":"                    target_wwn \u003d \"0x%s\" % wwn.lower()"},{"line_number":1082,"context_line":"                    if platform.machine() in (arch.S390, arch.S390X):"},{"line_number":1083,"context_line":"                        target_lun \u003d \"0x00%02d000000000000\" % int("},{"line_number":1084,"context_line":"                            fc_properties.get(\u0027target_lun\u0027, 0))"},{"line_number":1085,"context_line":"                        host_device \u003d (\"/dev/disk/by-path/ccw-%s-zfcp-%s:%s\" %"},{"line_number":1086,"context_line":"                                      (pci_num,"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa81d914_094f5e93","line":1083,"updated":"2015-01-29 15:56:29.000000000","message":"question:\nis this fixed? will it lead to some storage limitation?\nI know there are some LUN which is not in this format","commit_id":"85cb5bf98e475d034efcbc10b1eb330b4c4d556d"},{"author":{"_account_id":11433,"name":"Stefan Amann","email":"stefan.amann@de.ibm.com","username":"StefanAmann"},"change_message_id":"247f7c5f5f2e2dbc32120333d9b72c0fe346ff09","unresolved":false,"context_lines":[{"line_number":1080,"context_line":"                for wwn in wwns:"},{"line_number":1081,"context_line":"                    target_wwn \u003d \"0x%s\" % wwn.lower()"},{"line_number":1082,"context_line":"                    if platform.machine() in (arch.S390, arch.S390X):"},{"line_number":1083,"context_line":"                        target_lun \u003d \"0x00%02d000000000000\" % int("},{"line_number":1084,"context_line":"                            fc_properties.get(\u0027target_lun\u0027, 0))"},{"line_number":1085,"context_line":"                        host_device \u003d (\"/dev/disk/by-path/ccw-%s-zfcp-%s:%s\" %"},{"line_number":1086,"context_line":"                                      (pci_num,"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_26047d7a","line":1083,"in_reply_to":"fa81d914_094f5e93","updated":"2015-02-13 10:37:19.000000000","message":"I fixed this","commit_id":"85cb5bf98e475d034efcbc10b1eb330b4c4d556d"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"d29e5076f4eb52fa39d33d8d29afd5f084150a8c","unresolved":false,"context_lines":[{"line_number":1193,"context_line":"            fc_properties \u003d connection_info[\u0027data\u0027]"},{"line_number":1194,"context_line":"            ports \u003d fc_properties[\u0027target_wwn\u0027]"},{"line_number":1195,"context_line":"            wwns \u003d []"},{"line_number":1196,"context_line":"            # we support a list of wwns or a single wwn"},{"line_number":1197,"context_line":"            if isinstance(ports, list):"},{"line_number":1198,"context_line":"                for wwn in ports:"},{"line_number":1199,"context_line":"                    wwns.append(str(wwn))"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa81d914_c447eb49","line":1196,"updated":"2015-01-29 15:56:29.000000000","message":"NPIV mode?","commit_id":"85cb5bf98e475d034efcbc10b1eb330b4c4d556d"},{"author":{"_account_id":11433,"name":"Stefan Amann","email":"stefan.amann@de.ibm.com","username":"StefanAmann"},"change_message_id":"247f7c5f5f2e2dbc32120333d9b72c0fe346ff09","unresolved":false,"context_lines":[{"line_number":1193,"context_line":"            fc_properties \u003d connection_info[\u0027data\u0027]"},{"line_number":1194,"context_line":"            ports \u003d fc_properties[\u0027target_wwn\u0027]"},{"line_number":1195,"context_line":"            wwns \u003d []"},{"line_number":1196,"context_line":"            # we support a list of wwns or a single wwn"},{"line_number":1197,"context_line":"            if isinstance(ports, list):"},{"line_number":1198,"context_line":"                for wwn in ports:"},{"line_number":1199,"context_line":"                    wwns.append(str(wwn))"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_a71a3415","line":1196,"in_reply_to":"fa81d914_c447eb49","updated":"2015-02-13 10:37:19.000000000","message":"This is either NPIV mode, or multiple physical HBAs / ports","commit_id":"85cb5bf98e475d034efcbc10b1eb330b4c4d556d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1f47d56cc4b7b154771391329789093f4f3c83c6","unresolved":false,"context_lines":[{"line_number":1079,"context_line":"            if pci_num is not None:"},{"line_number":1080,"context_line":"                for wwn in wwns:"},{"line_number":1081,"context_line":"                    target_wwn \u003d \"0x%s\" % wwn.lower()"},{"line_number":1082,"context_line":"                    if platform.machine() in (arch.S390, arch.S390X):"},{"line_number":1083,"context_line":"                        lun \u003d fc_properties.get(\u0027target_lun\u0027, 0)"},{"line_number":1084,"context_line":"                        target_lun \u003d 0"},{"line_number":1085,"context_line":"                        if lun \u003c 256:"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_dd600bd2","line":1082,"updated":"2015-02-06 18:41:30.000000000","message":"I\u0027d recommend moving this host_device calculation code into a separate private method, maybe something like _get_host_device_from_wwn.\n\nAlso, the s390x case could use some code comments/documentation in here to explain the difference and what it\u0027s doing and why.\n\n--\n\nAlso, where are the unit tests for this change?  Note that moving this code into it\u0027s own private method would make unit testing it easier.","commit_id":"422753a011caa555a83835a756f9965e08d8fed3"},{"author":{"_account_id":11433,"name":"Stefan Amann","email":"stefan.amann@de.ibm.com","username":"StefanAmann"},"change_message_id":"e519a556848a225daf5cf6d5c325aa1f70c554a5","unresolved":false,"context_lines":[{"line_number":1079,"context_line":"            if pci_num is not None:"},{"line_number":1080,"context_line":"                for wwn in wwns:"},{"line_number":1081,"context_line":"                    target_wwn \u003d \"0x%s\" % wwn.lower()"},{"line_number":1082,"context_line":"                    if platform.machine() in (arch.S390, arch.S390X):"},{"line_number":1083,"context_line":"                        lun \u003d fc_properties.get(\u0027target_lun\u0027, 0)"},{"line_number":1084,"context_line":"                        target_lun \u003d 0"},{"line_number":1085,"context_line":"                        if lun \u003c 256:"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_a298b975","line":1082,"in_reply_to":"da86d52c_dd600bd2","updated":"2015-02-12 16:37:38.000000000","message":"I made the changes you suggested, including additional unit tests","commit_id":"422753a011caa555a83835a756f9965e08d8fed3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1f47d56cc4b7b154771391329789093f4f3c83c6","unresolved":false,"context_lines":[{"line_number":1092,"context_line":"                                       target_lun))"},{"line_number":1093,"context_line":"                        libvirt_utils.configure_scsi_device("},{"line_number":1094,"context_line":"                            pci_num, target_wwn, target_lun)"},{"line_number":1095,"context_line":"                        host_devices.append(host_device)"},{"line_number":1096,"context_line":"                    else:"},{"line_number":1097,"context_line":"                        host_device \u003d ("},{"line_number":1098,"context_line":"                            \"/dev/disk/by-path/pci-%s-fc-%s-lun-%s\" %"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_7d247faf","line":1095,"updated":"2015-02-06 18:41:30.000000000","message":"This common line between the two condition blocks can be moved out (up) a level.","commit_id":"422753a011caa555a83835a756f9965e08d8fed3"},{"author":{"_account_id":11433,"name":"Stefan Amann","email":"stefan.amann@de.ibm.com","username":"StefanAmann"},"change_message_id":"e519a556848a225daf5cf6d5c325aa1f70c554a5","unresolved":false,"context_lines":[{"line_number":1092,"context_line":"                                       target_lun))"},{"line_number":1093,"context_line":"                        libvirt_utils.configure_scsi_device("},{"line_number":1094,"context_line":"                            pci_num, target_wwn, target_lun)"},{"line_number":1095,"context_line":"                        host_devices.append(host_device)"},{"line_number":1096,"context_line":"                    else:"},{"line_number":1097,"context_line":"                        host_device \u003d ("},{"line_number":1098,"context_line":"                            \"/dev/disk/by-path/pci-%s-fc-%s-lun-%s\" %"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_6279612e","line":1095,"in_reply_to":"da86d52c_7d247faf","updated":"2015-02-12 16:37:38.000000000","message":"makes sense. done","commit_id":"422753a011caa555a83835a756f9965e08d8fed3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1f47d56cc4b7b154771391329789093f4f3c83c6","unresolved":false,"context_lines":[{"line_number":1189,"context_line":"        # all of them"},{"line_number":1190,"context_line":"        for device in devices:"},{"line_number":1191,"context_line":"            linuxscsi.remove_device(device)"},{"line_number":1192,"context_line":"        if platform.machine() in (arch.S390, arch.S390X):"},{"line_number":1193,"context_line":"            fc_properties \u003d connection_info[\u0027data\u0027]"},{"line_number":1194,"context_line":"            ports \u003d fc_properties[\u0027target_wwn\u0027]"},{"line_number":1195,"context_line":"            wwns \u003d []"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_9dadb3ed","line":1192,"updated":"2015-02-06 18:41:30.000000000","message":"Suggest moving this into a private method and also document the s390x case.\n\n--\n\nAlso, where are the unit tests for this change?  Note that moving this code into it\u0027s own private method would make unit testing it easier.","commit_id":"422753a011caa555a83835a756f9965e08d8fed3"},{"author":{"_account_id":11433,"name":"Stefan Amann","email":"stefan.amann@de.ibm.com","username":"StefanAmann"},"change_message_id":"e519a556848a225daf5cf6d5c325aa1f70c554a5","unresolved":false,"context_lines":[{"line_number":1189,"context_line":"        # all of them"},{"line_number":1190,"context_line":"        for device in devices:"},{"line_number":1191,"context_line":"            linuxscsi.remove_device(device)"},{"line_number":1192,"context_line":"        if platform.machine() in (arch.S390, arch.S390X):"},{"line_number":1193,"context_line":"            fc_properties \u003d connection_info[\u0027data\u0027]"},{"line_number":1194,"context_line":"            ports \u003d fc_properties[\u0027target_wwn\u0027]"},{"line_number":1195,"context_line":"            wwns \u003d []"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_e2e2b1d3","line":1192,"in_reply_to":"da86d52c_9dadb3ed","updated":"2015-02-12 16:37:38.000000000","message":"done..","commit_id":"422753a011caa555a83835a756f9965e08d8fed3"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"2e7d47fc458deb6a98724d9d5799f2d637b642cc","unresolved":false,"context_lines":[{"line_number":1229,"context_line":"        # we support a list of wwns or a single wwn"},{"line_number":1230,"context_line":"        if isinstance(ports, list):"},{"line_number":1231,"context_line":"            for wwn in ports:"},{"line_number":1232,"context_line":"                wwns.append(str(wwn))"},{"line_number":1233,"context_line":"        elif isinstance(ports, basestring):"},{"line_number":1234,"context_line":"            wwns.append(str(ports))"},{"line_number":1235,"context_line":"        hbas \u003d libvirt_utils.get_fc_hbas_info()"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_3d8ff02f","line":1232,"updated":"2015-02-17 16:59:32.000000000","message":"Please don\u0027t use str().  This should be six.text_type.","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":11433,"name":"Stefan Amann","email":"stefan.amann@de.ibm.com","username":"StefanAmann"},"change_message_id":"46a11f27a80bb30fb33535038d4e9a44be9985b3","unresolved":false,"context_lines":[{"line_number":1229,"context_line":"        # we support a list of wwns or a single wwn"},{"line_number":1230,"context_line":"        if isinstance(ports, list):"},{"line_number":1231,"context_line":"            for wwn in ports:"},{"line_number":1232,"context_line":"                wwns.append(str(wwn))"},{"line_number":1233,"context_line":"        elif isinstance(ports, basestring):"},{"line_number":1234,"context_line":"            wwns.append(str(ports))"},{"line_number":1235,"context_line":"        hbas \u003d libvirt_utils.get_fc_hbas_info()"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_b33775e2","line":1232,"in_reply_to":"da86d52c_3d8ff02f","updated":"2015-02-18 12:08:04.000000000","message":"Done","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d3f2c8cb81658addf7b985b1f92201d26bd8eabb","unresolved":false,"context_lines":[{"line_number":1229,"context_line":"        # we support a list of wwns or a single wwn"},{"line_number":1230,"context_line":"        if isinstance(ports, list):"},{"line_number":1231,"context_line":"            for wwn in ports:"},{"line_number":1232,"context_line":"                wwns.append(str(wwn))"},{"line_number":1233,"context_line":"        elif isinstance(ports, basestring):"},{"line_number":1234,"context_line":"            wwns.append(str(ports))"},{"line_number":1235,"context_line":"        hbas \u003d libvirt_utils.get_fc_hbas_info()"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_aeb18845","line":1232,"in_reply_to":"da86d52c_b33775e2","updated":"2015-02-19 15:23:25.000000000","message":"I had noticed this in sdague\u0027s refactor change also and was going to say something but then noted it\u0027s what the existing code is doing, and this value is *probably* not going to be unicode anyway since it\u0027s coming from parsing command line output.","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"030337c4930e43614afb68ccf1363d137949c5e7","unresolved":false,"context_lines":[{"line_number":1230,"context_line":"        if isinstance(ports, list):"},{"line_number":1231,"context_line":"            for wwn in ports:"},{"line_number":1232,"context_line":"                wwns.append(str(wwn))"},{"line_number":1233,"context_line":"        elif isinstance(ports, basestring):"},{"line_number":1234,"context_line":"            wwns.append(str(ports))"},{"line_number":1235,"context_line":"        hbas \u003d libvirt_utils.get_fc_hbas_info()"},{"line_number":1236,"context_line":"        for hba in hbas:"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_fa5c7e7f","line":1233,"updated":"2015-02-17 16:41:03.000000000","message":"This isn\u0027t compatible with python 3, use six instead:\n\nelif isinstance(ports, six.string_types):","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"2e7d47fc458deb6a98724d9d5799f2d637b642cc","unresolved":false,"context_lines":[{"line_number":1230,"context_line":"        if isinstance(ports, list):"},{"line_number":1231,"context_line":"            for wwn in ports:"},{"line_number":1232,"context_line":"                wwns.append(str(wwn))"},{"line_number":1233,"context_line":"        elif isinstance(ports, basestring):"},{"line_number":1234,"context_line":"            wwns.append(str(ports))"},{"line_number":1235,"context_line":"        hbas \u003d libvirt_utils.get_fc_hbas_info()"},{"line_number":1236,"context_line":"        for hba in hbas:"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_9d87fc11","line":1233,"in_reply_to":"da86d52c_fa5c7e7f","updated":"2015-02-17 16:59:32.000000000","message":"+1","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":11433,"name":"Stefan Amann","email":"stefan.amann@de.ibm.com","username":"StefanAmann"},"change_message_id":"46a11f27a80bb30fb33535038d4e9a44be9985b3","unresolved":false,"context_lines":[{"line_number":1230,"context_line":"        if isinstance(ports, list):"},{"line_number":1231,"context_line":"            for wwn in ports:"},{"line_number":1232,"context_line":"                wwns.append(str(wwn))"},{"line_number":1233,"context_line":"        elif isinstance(ports, basestring):"},{"line_number":1234,"context_line":"            wwns.append(str(ports))"},{"line_number":1235,"context_line":"        hbas \u003d libvirt_utils.get_fc_hbas_info()"},{"line_number":1236,"context_line":"        for hba in hbas:"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_d3b5c932","line":1233,"in_reply_to":"da86d52c_fa5c7e7f","updated":"2015-02-18 12:08:04.000000000","message":"Done","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":11433,"name":"Stefan Amann","email":"stefan.amann@de.ibm.com","username":"StefanAmann"},"change_message_id":"46a11f27a80bb30fb33535038d4e9a44be9985b3","unresolved":false,"context_lines":[{"line_number":1230,"context_line":"        if isinstance(ports, list):"},{"line_number":1231,"context_line":"            for wwn in ports:"},{"line_number":1232,"context_line":"                wwns.append(str(wwn))"},{"line_number":1233,"context_line":"        elif isinstance(ports, basestring):"},{"line_number":1234,"context_line":"            wwns.append(str(ports))"},{"line_number":1235,"context_line":"        hbas \u003d libvirt_utils.get_fc_hbas_info()"},{"line_number":1236,"context_line":"        for hba in hbas:"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_f3472da1","line":1233,"in_reply_to":"da86d52c_fa5c7e7f","updated":"2015-02-18 12:08:04.000000000","message":"Done","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"2e7d47fc458deb6a98724d9d5799f2d637b642cc","unresolved":false,"context_lines":[{"line_number":1231,"context_line":"            for wwn in ports:"},{"line_number":1232,"context_line":"                wwns.append(str(wwn))"},{"line_number":1233,"context_line":"        elif isinstance(ports, basestring):"},{"line_number":1234,"context_line":"            wwns.append(str(ports))"},{"line_number":1235,"context_line":"        hbas \u003d libvirt_utils.get_fc_hbas_info()"},{"line_number":1236,"context_line":"        for hba in hbas:"},{"line_number":1237,"context_line":"            pci_num \u003d self._get_pci_num(hba)"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_fd84780c","line":1234,"updated":"2015-02-17 16:59:32.000000000","message":"six.text_type here as well please.","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":11433,"name":"Stefan Amann","email":"stefan.amann@de.ibm.com","username":"StefanAmann"},"change_message_id":"46a11f27a80bb30fb33535038d4e9a44be9985b3","unresolved":false,"context_lines":[{"line_number":1231,"context_line":"            for wwn in ports:"},{"line_number":1232,"context_line":"                wwns.append(str(wwn))"},{"line_number":1233,"context_line":"        elif isinstance(ports, basestring):"},{"line_number":1234,"context_line":"            wwns.append(str(ports))"},{"line_number":1235,"context_line":"        hbas \u003d libvirt_utils.get_fc_hbas_info()"},{"line_number":1236,"context_line":"        for hba in hbas:"},{"line_number":1237,"context_line":"            pci_num \u003d self._get_pci_num(hba)"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_73225da4","line":1234,"in_reply_to":"da86d52c_fd84780c","updated":"2015-02-18 12:08:04.000000000","message":"Done","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"030337c4930e43614afb68ccf1363d137949c5e7","unresolved":false,"context_lines":[{"line_number":1235,"context_line":"        hbas \u003d libvirt_utils.get_fc_hbas_info()"},{"line_number":1236,"context_line":"        for hba in hbas:"},{"line_number":1237,"context_line":"            pci_num \u003d self._get_pci_num(hba)"},{"line_number":1238,"context_line":"            LOG.debug(\"pci_num\u003d%s  \" % pci_num)"},{"line_number":1239,"context_line":"            if pci_num is not None:"},{"line_number":1240,"context_line":"                for wwn in wwns:"},{"line_number":1241,"context_line":"                    target_wwn \u003d \"0x%s\" % wwn.lower()"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_baf04667","line":1238,"updated":"2015-02-17 16:41:03.000000000","message":"This would be pretty useless to me in a log file I think without any context, would adding some info from the hba in this be better?","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":11433,"name":"Stefan Amann","email":"stefan.amann@de.ibm.com","username":"StefanAmann"},"change_message_id":"46a11f27a80bb30fb33535038d4e9a44be9985b3","unresolved":false,"context_lines":[{"line_number":1235,"context_line":"        hbas \u003d libvirt_utils.get_fc_hbas_info()"},{"line_number":1236,"context_line":"        for hba in hbas:"},{"line_number":1237,"context_line":"            pci_num \u003d self._get_pci_num(hba)"},{"line_number":1238,"context_line":"            LOG.debug(\"pci_num\u003d%s  \" % pci_num)"},{"line_number":1239,"context_line":"            if pci_num is not None:"},{"line_number":1240,"context_line":"                for wwn in wwns:"},{"line_number":1241,"context_line":"                    target_wwn \u003d \"0x%s\" % wwn.lower()"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_3037fb00","line":1238,"in_reply_to":"da86d52c_baf04667","updated":"2015-02-18 12:08:04.000000000","message":"I removed the trace since the data is logged in perform_unit_remove_for_s390","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"030337c4930e43614afb68ccf1363d137949c5e7","unresolved":false,"context_lines":[{"line_number":1269,"context_line":"                for wwn in wwns:"},{"line_number":1270,"context_line":"                    target_wwn \u003d \"0x%s\" % wwn.lower()"},{"line_number":1271,"context_line":"                    lun \u003d fc_properties.get(\u0027target_lun\u0027, 0)"},{"line_number":1272,"context_line":"                    target_lun \u003d self._get_lun_string(lun)"},{"line_number":1273,"context_line":"                    host_device \u003d self._get_device_file_path("},{"line_number":1274,"context_line":"                                        pci_num,"},{"line_number":1275,"context_line":"                                        target_wwn,"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_da7b3a79","line":1272,"updated":"2015-02-17 16:41:03.000000000","message":"Do we want to do this for non-z cases?  I\u0027m not familiar enough with this to know if this could cause a problem on non-z platforms and we don\u0027t have any FC volume driver integration testing.\n\nWould it be better/safer to pass fc_properties to get_lun_string, do this in there:\n\nlun \u003d fc_properties.get(\u0027target_lun\u0027, 0)\n\nAnd then do a platform check and if it\u0027s not s390(x) you just return the lun string as before, else do your conditional checks for the s390(x) case.","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":11433,"name":"Stefan Amann","email":"stefan.amann@de.ibm.com","username":"StefanAmann"},"change_message_id":"46a11f27a80bb30fb33535038d4e9a44be9985b3","unresolved":false,"context_lines":[{"line_number":1269,"context_line":"                for wwn in wwns:"},{"line_number":1270,"context_line":"                    target_wwn \u003d \"0x%s\" % wwn.lower()"},{"line_number":1271,"context_line":"                    lun \u003d fc_properties.get(\u0027target_lun\u0027, 0)"},{"line_number":1272,"context_line":"                    target_lun \u003d self._get_lun_string(lun)"},{"line_number":1273,"context_line":"                    host_device \u003d self._get_device_file_path("},{"line_number":1274,"context_line":"                                        pci_num,"},{"line_number":1275,"context_line":"                                        target_wwn,"}],"source_content_type":"text/x-python","patch_set":14,"id":"da86d52c_d054df23","line":1272,"in_reply_to":"da86d52c_da7b3a79","updated":"2015-02-18 12:08:04.000000000","message":"I made the changes as proposed by you. The non-z case now looks pretty much the same as in the original code flow","commit_id":"01d8d3a4a4415fedc6d646400990de563b664292"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"daa1a600485659fdf5a78f87e323a49eb59c6d57","unresolved":false,"context_lines":[{"line_number":1267,"context_line":"            if pci_num is not None:"},{"line_number":1268,"context_line":"                for wwn in wwns:"},{"line_number":1269,"context_line":"                    target_wwn \u003d \"0x%s\" % wwn.lower()"},{"line_number":1270,"context_line":"                    if platform.machine() in (arch.S390, arch.S390X):"},{"line_number":1271,"context_line":"                        target_lun \u003d self._get_lun_string("},{"line_number":1272,"context_line":"                                        fc_properties.get(\u0027target_lun\u0027, 0))"},{"line_number":1273,"context_line":"                        host_device \u003d self._get_device_file_path("}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_9e834d02","line":1270,"updated":"2015-02-18 13:25:52.000000000","message":"I really hate the density level here, I proposed a patch which unwinds this a bit at https://review.openstack.org/156986 which should make your patch a bit simpler. I\u0027d suggest rebasing on top of that.","commit_id":"bb5b1b33275a984ab757be0e69fb2984114198e2"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"22596e70399341a5e5614112481f7748770014de","unresolved":false,"context_lines":[{"line_number":1303,"context_line":"            for wwn in wwnports:"},{"line_number":1304,"context_line":"                wwns.append(str(wwn))"},{"line_number":1305,"context_line":"        elif isinstance(wwnports, six.string_types):"},{"line_number":1306,"context_line":"            wwns.append(str(wwnports))"},{"line_number":1307,"context_line":""},{"line_number":1308,"context_line":"        raw_devices \u003d []"},{"line_number":1309,"context_line":"        hbas \u003d libvirt_utils.get_fc_hbas_info()"}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_4ce11d9a","line":1306,"updated":"2015-02-18 18:50:55.000000000","message":"This didn\u0027t get changed to six.text_type.","commit_id":"8114c83ae0f72a569c9c0a320eadd0415c2ee225"},{"author":{"_account_id":11433,"name":"Stefan Amann","email":"stefan.amann@de.ibm.com","username":"StefanAmann"},"change_message_id":"05065ee51f75422d28bec8910461f052d662a1dd","unresolved":false,"context_lines":[{"line_number":1303,"context_line":"            for wwn in wwnports:"},{"line_number":1304,"context_line":"                wwns.append(str(wwn))"},{"line_number":1305,"context_line":"        elif isinstance(wwnports, six.string_types):"},{"line_number":1306,"context_line":"            wwns.append(str(wwnports))"},{"line_number":1307,"context_line":""},{"line_number":1308,"context_line":"        raw_devices \u003d []"},{"line_number":1309,"context_line":"        hbas \u003d libvirt_utils.get_fc_hbas_info()"}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_83e82de3","line":1306,"in_reply_to":"da86d52c_4ce11d9a","updated":"2015-02-19 08:38:56.000000000","message":"Done","commit_id":"8114c83ae0f72a569c9c0a320eadd0415c2ee225"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ef3268a1c1fa59bf7ecfb302f07d5e294c29c8ce","unresolved":false,"context_lines":[{"line_number":1303,"context_line":"            for wwn in wwnports:"},{"line_number":1304,"context_line":"                wwns.append(str(wwn))"},{"line_number":1305,"context_line":"        elif isinstance(wwnports, six.string_types):"},{"line_number":1306,"context_line":"            wwns.append(str(wwnports))"},{"line_number":1307,"context_line":""},{"line_number":1308,"context_line":"        raw_devices \u003d []"},{"line_number":1309,"context_line":"        hbas \u003d libvirt_utils.get_fc_hbas_info()"}],"source_content_type":"text/x-python","patch_set":16,"id":"da86d52c_ce387ca2","line":1306,"in_reply_to":"da86d52c_83e82de3","updated":"2015-02-19 15:25:28.000000000","message":"See comment in PS14, I don\u0027t think this will be unicode since it\u0027s coming from parsed command line output.","commit_id":"8114c83ae0f72a569c9c0a320eadd0415c2ee225"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"edcc3f6caa61f8236f3f8b5be94cd868dd31a836","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                    \u0027compute node\u0027),"},{"line_number":105,"context_line":"    cfg.StrOpt(\u0027quobyte_client_cfg\u0027,"},{"line_number":106,"context_line":"               help\u003d\u0027Path to a Quobyte Client configuration file.\u0027),"},{"line_number":107,"context_line":"    cfg.StrOpt(\u0027iscsi_iface\u0027,"},{"line_number":108,"context_line":"               deprecated_name\u003d\u0027iscsi_transport\u0027,"},{"line_number":109,"context_line":"               help\u003d\u0027The iSCSI transport iface to use to connect to target in \u0027"},{"line_number":110,"context_line":"                    \u0027case offload support is desired. Supported transports \u0027"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_ceb79cd6","line":107,"updated":"2015-02-19 16:15:51.000000000","message":"This shouldn\u0027t be here, I think you had a bad rebase/merge conflict issue.","commit_id":"01c8d3cc21fcd91b370ac16c909f483a5a82b22d"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"9d6371ef42c5af989a3378c32cce9e40f14c01a6","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                    \u0027compute node\u0027),"},{"line_number":105,"context_line":"    cfg.StrOpt(\u0027quobyte_client_cfg\u0027,"},{"line_number":106,"context_line":"               help\u003d\u0027Path to a Quobyte Client configuration file.\u0027),"},{"line_number":107,"context_line":"    cfg.StrOpt(\u0027iscsi_iface\u0027,"},{"line_number":108,"context_line":"               deprecated_name\u003d\u0027iscsi_transport\u0027,"},{"line_number":109,"context_line":"               help\u003d\u0027The iSCSI transport iface to use to connect to target in \u0027"},{"line_number":110,"context_line":"                    \u0027case offload support is desired. Supported transports \u0027"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_c7193f89","line":107,"in_reply_to":"da86d52c_ceb79cd6","updated":"2015-02-19 17:05:09.000000000","message":"I think this got introduced to master some hours ago with: https://git.openstack.org/cgit/openstack/nova/diff/nova/virt/libvirt/volume.py?id\u003d3b8a2cf781d43d0b6937ec66aff5f37657f625ed","commit_id":"01c8d3cc21fcd91b370ac16c909f483a5a82b22d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a03901bbb209b370a19468bfa0f737255d5569b5","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                    \u0027compute node\u0027),"},{"line_number":105,"context_line":"    cfg.StrOpt(\u0027quobyte_client_cfg\u0027,"},{"line_number":106,"context_line":"               help\u003d\u0027Path to a Quobyte Client configuration file.\u0027),"},{"line_number":107,"context_line":"    cfg.StrOpt(\u0027iscsi_iface\u0027,"},{"line_number":108,"context_line":"               deprecated_name\u003d\u0027iscsi_transport\u0027,"},{"line_number":109,"context_line":"               help\u003d\u0027The iSCSI transport iface to use to connect to target in \u0027"},{"line_number":110,"context_line":"                    \u0027case offload support is desired. Supported transports \u0027"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_829015ee","line":107,"in_reply_to":"da86d52c_ceb79cd6","updated":"2015-02-19 16:58:46.000000000","message":"Ignore, this was when I was diff\u0027ing against PS14.","commit_id":"01c8d3cc21fcd91b370ac16c909f483a5a82b22d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"edcc3f6caa61f8236f3f8b5be94cd868dd31a836","unresolved":false,"context_lines":[{"line_number":1227,"context_line":"        conf.source_path \u003d connection_info[\u0027data\u0027][\u0027device_path\u0027]"},{"line_number":1228,"context_line":"        return conf"},{"line_number":1229,"context_line":""},{"line_number":1230,"context_line":"    def _get_lun_string(self, lun):"},{"line_number":1231,"context_line":"        target_lun \u003d 0"},{"line_number":1232,"context_line":"        if lun \u003c 256:"},{"line_number":1233,"context_line":"            target_lun \u003d \"0x00%02x000000000000\" % lun"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_ae18a8cd","line":1230,"updated":"2015-02-19 16:15:51.000000000","message":"We might want to rename this to _get_lun_string_for_s390 given this is only used in the s390 case.\n\nElse we should do as I suggested in PS14 and pass fc_properties in here and have the arch check in this method, then we don\u0027t need to special-case in the calling side.  Since we\u0027re doing that in _get_device_file_path already I think that\u0027s the best option.","commit_id":"01c8d3cc21fcd91b370ac16c909f483a5a82b22d"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"9d6371ef42c5af989a3378c32cce9e40f14c01a6","unresolved":false,"context_lines":[{"line_number":1227,"context_line":"        conf.source_path \u003d connection_info[\u0027data\u0027][\u0027device_path\u0027]"},{"line_number":1228,"context_line":"        return conf"},{"line_number":1229,"context_line":""},{"line_number":1230,"context_line":"    def _get_lun_string(self, lun):"},{"line_number":1231,"context_line":"        target_lun \u003d 0"},{"line_number":1232,"context_line":"        if lun \u003c 256:"},{"line_number":1233,"context_line":"            target_lun \u003d \"0x00%02x000000000000\" % lun"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_c264cd23","line":1230,"in_reply_to":"da86d52c_ae18a8cd","updated":"2015-02-19 17:05:09.000000000","message":"First paragraph: Done\nThe second paragraph seems to be contradicted by the comments in line 1244.","commit_id":"01c8d3cc21fcd91b370ac16c909f483a5a82b22d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"edcc3f6caa61f8236f3f8b5be94cd868dd31a836","unresolved":false,"context_lines":[{"line_number":1241,"context_line":"        # architecture. Most architectures use a PCI based format."},{"line_number":1242,"context_line":"        # Systems following the S390, or S390x architecture use a format"},{"line_number":1243,"context_line":"        # which is based upon the inherent channel architecture (ccw)."},{"line_number":1244,"context_line":"        if platform.machine() in (arch.S390, arch.S390X):"},{"line_number":1245,"context_line":"            host_device \u003d (\"/dev/disk/by-path/ccw-%s-zfcp-%s:%s\" %"},{"line_number":1246,"context_line":"                            (pci_num,"},{"line_number":1247,"context_line":"                            target_wwn,"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_ec2f08f4","line":1244,"updated":"2015-02-19 16:15:51.000000000","message":"The calling code is already checking arch so we have unnecessary duplication here.  I think we should leave the arch check in here and remove the arch check in connect_volume, but then we have to move an arch check into _get_lun_string also.\n\nAhh, but we need libvirt_utils.perform_unit_add_for_s390 in connect_volume which requires the arch check in connect_volume, so maybe we just rename this to _get_device_file_path_s390 and remove the arch check in here, and rename _get_lun_string to _get_lun_string_s390.","commit_id":"01c8d3cc21fcd91b370ac16c909f483a5a82b22d"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"9d6371ef42c5af989a3378c32cce9e40f14c01a6","unresolved":false,"context_lines":[{"line_number":1241,"context_line":"        # architecture. Most architectures use a PCI based format."},{"line_number":1242,"context_line":"        # Systems following the S390, or S390x architecture use a format"},{"line_number":1243,"context_line":"        # which is based upon the inherent channel architecture (ccw)."},{"line_number":1244,"context_line":"        if platform.machine() in (arch.S390, arch.S390X):"},{"line_number":1245,"context_line":"            host_device \u003d (\"/dev/disk/by-path/ccw-%s-zfcp-%s:%s\" %"},{"line_number":1246,"context_line":"                            (pci_num,"},{"line_number":1247,"context_line":"                            target_wwn,"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_3d14ec42","line":1244,"in_reply_to":"da86d52c_ec2f08f4","updated":"2015-02-19 17:05:09.000000000","message":"Done (second paragraph)","commit_id":"01c8d3cc21fcd91b370ac16c909f483a5a82b22d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"edcc3f6caa61f8236f3f8b5be94cd868dd31a836","unresolved":false,"context_lines":[{"line_number":1264,"context_line":"        lun \u003d int(fc_properties.get(\u0027target_lun\u0027, 0))"},{"line_number":1265,"context_line":"        target_lun \u003d self._get_lun_string(lun)"},{"line_number":1266,"context_line":"        ports \u003d fc_properties[\u0027target_wwn\u0027]"},{"line_number":1267,"context_line":"        wwns \u003d []"},{"line_number":1268,"context_line":"        # we support a list of wwns or a single wwn"},{"line_number":1269,"context_line":"        if isinstance(ports, list):"},{"line_number":1270,"context_line":"            for wwn in ports:"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_8cf92c50","line":1267,"updated":"2015-02-19 16:15:51.000000000","message":"You should be calling _get_possible_devices in this method, that was the point of the refactor in sdague\u0027s change to split it out so it can be re-used w/o all of the copy paste code.","commit_id":"01c8d3cc21fcd91b370ac16c909f483a5a82b22d"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"9d6371ef42c5af989a3378c32cce9e40f14c01a6","unresolved":false,"context_lines":[{"line_number":1264,"context_line":"        lun \u003d int(fc_properties.get(\u0027target_lun\u0027, 0))"},{"line_number":1265,"context_line":"        target_lun \u003d self._get_lun_string(lun)"},{"line_number":1266,"context_line":"        ports \u003d fc_properties[\u0027target_wwn\u0027]"},{"line_number":1267,"context_line":"        wwns \u003d []"},{"line_number":1268,"context_line":"        # we support a list of wwns or a single wwn"},{"line_number":1269,"context_line":"        if isinstance(ports, list):"},{"line_number":1270,"context_line":"            for wwn in ports:"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_4240dda4","line":1267,"in_reply_to":"da86d52c_8cf92c50","updated":"2015-02-19 17:05:09.000000000","message":"Done","commit_id":"01c8d3cc21fcd91b370ac16c909f483a5a82b22d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"edcc3f6caa61f8236f3f8b5be94cd868dd31a836","unresolved":false,"context_lines":[{"line_number":1301,"context_line":"        wwns \u003d []"},{"line_number":1302,"context_line":"        if isinstance(wwnports, list):"},{"line_number":1303,"context_line":"            for wwn in wwnports:"},{"line_number":1304,"context_line":"                wwns.append(six.text_type(wwn))"},{"line_number":1305,"context_line":"        elif isinstance(wwnports, six.string_types):"},{"line_number":1306,"context_line":"            wwns.append(six.text_type(wwnports))"},{"line_number":1307,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_0efc5471","line":1304,"updated":"2015-02-19 16:15:51.000000000","message":"I don\u0027t think this really needed to change, these shouldn\u0027t be unicode.","commit_id":"01c8d3cc21fcd91b370ac16c909f483a5a82b22d"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"9d6371ef42c5af989a3378c32cce9e40f14c01a6","unresolved":false,"context_lines":[{"line_number":1301,"context_line":"        wwns \u003d []"},{"line_number":1302,"context_line":"        if isinstance(wwnports, list):"},{"line_number":1303,"context_line":"            for wwn in wwnports:"},{"line_number":1304,"context_line":"                wwns.append(six.text_type(wwn))"},{"line_number":1305,"context_line":"        elif isinstance(wwnports, six.string_types):"},{"line_number":1306,"context_line":"            wwns.append(six.text_type(wwnports))"},{"line_number":1307,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_c2bbede2","line":1304,"in_reply_to":"da86d52c_0efc5471","updated":"2015-02-19 17:05:09.000000000","message":"Done","commit_id":"01c8d3cc21fcd91b370ac16c909f483a5a82b22d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ce7675466c0789b78224c76e7e39aa18297a46aa","unresolved":false,"context_lines":[{"line_number":1235,"context_line":"            target_lun \u003d \"0x%08x00000000\" % lun"},{"line_number":1236,"context_line":"        return target_lun"},{"line_number":1237,"context_line":""},{"line_number":1238,"context_line":"    def _get_device_file_path_s390(self, pci_num, target_wwn, lun):"},{"line_number":1239,"context_line":"        \"\"\"Returns device file path\"\"\""},{"line_number":1240,"context_line":"        # NOTE the format of device file paths depends on the system"},{"line_number":1241,"context_line":"        # architecture. Most architectures use a PCI based format."}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_0cd293ff","line":1238,"updated":"2015-02-19 19:07:07.000000000","message":"This is only used in connect_volume now so it\u0027s kind of pointless to have it separated into it\u0027s own method, but I guess it\u0027s OK for isolation and keeping connect_volume uncluttered (plus it has this big comment about what it\u0027s doing and why it\u0027s different for s390).","commit_id":"0468f8106203084ed0afb23f5ec1c97ec6d5c489"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ce7675466c0789b78224c76e7e39aa18297a46aa","unresolved":false,"context_lines":[{"line_number":1258,"context_line":"        target_lun \u003d self._get_lun_string_for_s390(lun)"},{"line_number":1259,"context_line":"        ports \u003d fc_properties[\u0027target_wwn\u0027]"},{"line_number":1260,"context_line":""},{"line_number":1261,"context_line":"        for device_num, target_wwn in self._get_possible_devices(ports):"},{"line_number":1262,"context_line":"            libvirt_utils.perform_unit_remove_for_s390(device_num,"},{"line_number":1263,"context_line":"                                              target_wwn,"},{"line_number":1264,"context_line":"                                              target_lun)"}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_0c8a93be","line":1261,"updated":"2015-02-19 19:07:07.000000000","message":"nit: s/device_num/pci_num/ to be consistent with connect_volume, but it\u0027s not a big issue.","commit_id":"0468f8106203084ed0afb23f5ec1c97ec6d5c489"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ce7675466c0789b78224c76e7e39aa18297a46aa","unresolved":false,"context_lines":[{"line_number":1308,"context_line":"        host_devices \u003d []"},{"line_number":1309,"context_line":"        for device in possible_devs:"},{"line_number":1310,"context_line":"            pci_num, target_wwn \u003d device"},{"line_number":1311,"context_line":"            if platform.machine() in (arch.S390, arch.S390X):"},{"line_number":1312,"context_line":"                target_lun \u003d self._get_lun_string_for_s390("},{"line_number":1313,"context_line":"                                fc_properties.get(\u0027target_lun\u0027, 0))"},{"line_number":1314,"context_line":"                host_device \u003d self._get_device_file_path_s390("}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_0c037342","line":1311,"updated":"2015-02-19 19:07:07.000000000","message":"I don\u0027t see this block tested in test_volume.py.  There should be a connect_volume test that mocks out the call to platform.machine() which returns s390/s390x and then asserts the calls to the other helper methods here (which can be mocked out).\n\nI\u0027d suggest a variant of test_libvirt_fibrechan_driver which is already in test_volume.py and tests most of this already.","commit_id":"0468f8106203084ed0afb23f5ec1c97ec6d5c489"}]}
