)]}'
{"ironic_python_agent/hardware.py":[{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"9d05e40d0b2ffcd32b1ffb32f325fc2ab29f45e9","unresolved":false,"context_lines":[{"line_number":134,"context_line":"            by_path_mapping[devname] \u003d path"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    except OSError as e:"},{"line_number":137,"context_line":"        LOG.warning(\"Path %(path)s is inaccessible, skipping by-path\""},{"line_number":138,"context_line":"                    \"block devices reporting\""},{"line_number":139,"context_line":"                    \"Error: %(error)s\", {\u0027path\u0027: disk_by_path_dir, \u0027error\u0027: e})"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_6870c6dd","line":137,"updated":"2017-09-01 20:27:29.000000000","message":"Should add a space at end of these lines (e.g. \"... by-path \") otherwise output will be joined to word on next line.","commit_id":"7650098c910fadc2788bc9050ea65c762f076908"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"94b865371b5f737c6626771b70846780d461f237","unresolved":false,"context_lines":[{"line_number":134,"context_line":"            by_path_mapping[devname] \u003d path"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    except OSError as e:"},{"line_number":137,"context_line":"        LOG.warning(\"Path %(path)s is inaccessible, skipping by-path\""},{"line_number":138,"context_line":"                    \"block devices reporting\""},{"line_number":139,"context_line":"                    \"Error: %(error)s\", {\u0027path\u0027: disk_by_path_dir, \u0027error\u0027: e})"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_7d906e96","line":137,"in_reply_to":"7f287b81_237c11b4","updated":"2017-09-04 11:16:06.000000000","message":"Done","commit_id":"7650098c910fadc2788bc9050ea65c762f076908"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"c6577a4df1f6bcb0289a0526dc9c64027b3c2d1c","unresolved":false,"context_lines":[{"line_number":134,"context_line":"            by_path_mapping[devname] \u003d path"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    except OSError as e:"},{"line_number":137,"context_line":"        LOG.warning(\"Path %(path)s is inaccessible, skipping by-path\""},{"line_number":138,"context_line":"                    \"block devices reporting\""},{"line_number":139,"context_line":"                    \"Error: %(error)s\", {\u0027path\u0027: disk_by_path_dir, \u0027error\u0027: e})"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_237c11b4","line":137,"in_reply_to":"7f287b81_6870c6dd","updated":"2017-09-03 10:43:57.000000000","message":"+1","commit_id":"7650098c910fadc2788bc9050ea65c762f076908"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"94b865371b5f737c6626771b70846780d461f237","unresolved":false,"context_lines":[{"line_number":134,"context_line":"            by_path_mapping[devname] \u003d path"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    except OSError as e:"},{"line_number":137,"context_line":"        LOG.warning(\"Path %(path)s is inaccessible, skipping by-path\""},{"line_number":138,"context_line":"                    \"block devices reporting\""},{"line_number":139,"context_line":"                    \"Error: %(error)s\", {\u0027path\u0027: disk_by_path_dir, \u0027error\u0027: e})"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_9d931aa4","line":137,"in_reply_to":"7f287b81_6870c6dd","updated":"2017-09-04 11:16:06.000000000","message":"Done","commit_id":"7650098c910fadc2788bc9050ea65c762f076908"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"c6577a4df1f6bcb0289a0526dc9c64027b3c2d1c","unresolved":false,"context_lines":[{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    except OSError as e:"},{"line_number":137,"context_line":"        LOG.warning(\"Path %(path)s is inaccessible, skipping by-path\""},{"line_number":138,"context_line":"                    \"block devices reporting\""},{"line_number":139,"context_line":"                    \"Error: %(error)s\", {\u0027path\u0027: disk_by_path_dir, \u0027error\u0027: e})"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    devices \u003d []"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_034b5587","line":138,"range":{"start_line":138,"start_character":35,"end_line":138,"end_character":45},"updated":"2017-09-03 10:43:57.000000000","message":"ditto","commit_id":"7650098c910fadc2788bc9050ea65c762f076908"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"94b865371b5f737c6626771b70846780d461f237","unresolved":false,"context_lines":[{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    except OSError as e:"},{"line_number":137,"context_line":"        LOG.warning(\"Path %(path)s is inaccessible, skipping by-path\""},{"line_number":138,"context_line":"                    \"block devices reporting\""},{"line_number":139,"context_line":"                    \"Error: %(error)s\", {\u0027path\u0027: disk_by_path_dir, \u0027error\u0027: e})"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    devices \u003d []"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_5d8db279","line":138,"range":{"start_line":138,"start_character":35,"end_line":138,"end_character":45},"in_reply_to":"7f287b81_034b5587","updated":"2017-09-04 11:16:06.000000000","message":"Done","commit_id":"7650098c910fadc2788bc9050ea65c762f076908"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"c6577a4df1f6bcb0289a0526dc9c64027b3c2d1c","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                                   rotational\u003dbool(int(device[\u0027ROTA\u0027])),"},{"line_number":195,"context_line":"                                   vendor\u003d_get_device_info(device[\u0027KNAME\u0027],"},{"line_number":196,"context_line":"                                                           \u0027block\u0027, \u0027vendor\u0027),"},{"line_number":197,"context_line":"                                   by_path\u003dby_path_name,"},{"line_number":198,"context_line":"                                   **extra))"},{"line_number":199,"context_line":"    return devices"},{"line_number":200,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_3ed9ca21","line":197,"range":{"start_line":197,"start_character":35,"end_line":197,"end_character":56},"updated":"2017-09-03 10:43:57.000000000","message":"Need to add testcase wherein BlockDevice is created with \u0027by_path\u0027.","commit_id":"7650098c910fadc2788bc9050ea65c762f076908"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"94b865371b5f737c6626771b70846780d461f237","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                                   rotational\u003dbool(int(device[\u0027ROTA\u0027])),"},{"line_number":195,"context_line":"                                   vendor\u003d_get_device_info(device[\u0027KNAME\u0027],"},{"line_number":196,"context_line":"                                                           \u0027block\u0027, \u0027vendor\u0027),"},{"line_number":197,"context_line":"                                   by_path\u003dby_path_name,"},{"line_number":198,"context_line":"                                   **extra))"},{"line_number":199,"context_line":"    return devices"},{"line_number":200,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_1d8e0a2e","line":197,"range":{"start_line":197,"start_character":35,"end_line":197,"end_character":56},"in_reply_to":"7f287b81_3ed9ca21","updated":"2017-09-04 11:16:06.000000000","message":"Done","commit_id":"7650098c910fadc2788bc9050ea65c762f076908"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"8f1a2aa6209bcd05608ceae4c63058f72f9c1e3b","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        for path in paths:"},{"line_number":125,"context_line":"            path \u003d os.path.join(disk_by_path_dir, path)"},{"line_number":126,"context_line":"            devname \u003d os.path.basename(os.readlink(path))"},{"line_number":127,"context_line":"            by_path_mapping[devname] \u003d path"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    except OSError as e:"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f287b81_ed37e54c","line":126,"range":{"start_line":126,"start_character":39,"end_line":126,"end_character":56},"updated":"2017-09-05 19:04:55.000000000","message":"nit-ish: os.readlink for me returns a relative path:\n\n  ../../sr0\n\nso at line 188 the os.path.basename(name) operates on a different thing (\u0027/dev/sr0\u0027) than the path here (\u0027../../sr0\u0027)\n\nPlease, add an explaining note here if updating the patch","commit_id":"b53e7f031c4ae4726f3b904449dee203a841d732"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"1863bbee4ad2840a3904052af02d7127a53671f1","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        for path in paths:"},{"line_number":125,"context_line":"            path \u003d os.path.join(disk_by_path_dir, path)"},{"line_number":126,"context_line":"            devname \u003d os.path.basename(os.readlink(path))"},{"line_number":127,"context_line":"            by_path_mapping[devname] \u003d path"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    except OSError as e:"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f287b81_135a52f2","line":126,"range":{"start_line":126,"start_character":39,"end_line":126,"end_character":56},"in_reply_to":"7f287b81_ed37e54c","updated":"2017-09-05 20:24:07.000000000","message":"Great catch! Hardened to work with relative symlinks.","commit_id":"b53e7f031c4ae4726f3b904449dee203a841d732"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"8f1a2aa6209bcd05608ceae4c63058f72f9c1e3b","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            LOG.warning(\u0027Could not find the SCSI address (HCTL) for \u0027"},{"line_number":186,"context_line":"                        \u0027device %s. Skipping\u0027, name)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        by_path_name \u003d by_path_mapping.get(os.path.basename(name))"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        devices.append(BlockDevice(name\u003dname,"},{"line_number":191,"context_line":"                                   model\u003ddevice[\u0027MODEL\u0027],"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f287b81_0d8351ce","line":188,"range":{"start_line":188,"start_character":39,"end_line":188,"end_character":66},"updated":"2017-09-05 19:04:55.000000000","message":"nit-ish: if updating, please add a note here explaining that a KeyError would have happened in case /dev/disk/by-path wasn\u0027t supported (see line 129)","commit_id":"b53e7f031c4ae4726f3b904449dee203a841d732"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"1863bbee4ad2840a3904052af02d7127a53671f1","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            LOG.warning(\u0027Could not find the SCSI address (HCTL) for \u0027"},{"line_number":186,"context_line":"                        \u0027device %s. Skipping\u0027, name)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        by_path_name \u003d by_path_mapping.get(os.path.basename(name))"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        devices.append(BlockDevice(name\u003dname,"},{"line_number":191,"context_line":"                                   model\u003ddevice[\u0027MODEL\u0027],"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f287b81_f35c66ee","line":188,"range":{"start_line":188,"start_character":39,"end_line":188,"end_character":66},"in_reply_to":"7f287b81_0d8351ce","updated":"2017-09-05 20:24:07.000000000","message":"Done","commit_id":"b53e7f031c4ae4726f3b904449dee203a841d732"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"42a6d8517399e701137f3fce3eb07843c610091e","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        for path in paths:"},{"line_number":125,"context_line":"            path \u003d os.path.join(disk_by_path_dir, path)"},{"line_number":126,"context_line":"            # Turn possibly relative symbolic link into absolute"},{"line_number":127,"context_line":"            devname \u003d os.path.abspath(os.path.join(disk_by_path_dir, os.readlink(path)))"},{"line_number":128,"context_line":"            by_path_mapping[devname] \u003d path"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    except OSError as e:"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f287b81_9fe403ae","line":127,"range":{"start_line":127,"start_character":12,"end_line":127,"end_character":88},"updated":"2017-09-05 23:37:12.000000000","message":"line too long here","commit_id":"8e6f0d4d8b5d58e212a2f33ae597b1ccbe497598"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c0dd04b2d3addad65e1a5945c3e1de4288905167","unresolved":false,"context_lines":[{"line_number":125,"context_line":"            path \u003d os.path.join(disk_by_path_dir, path)"},{"line_number":126,"context_line":"            # Turn possibly relative symbolic link into absolute"},{"line_number":127,"context_line":"            devname \u003d os.path.join(disk_by_path_dir, os.readlink(path))"},{"line_number":128,"context_line":"            devname \u003d os.path.abspath(devname)"},{"line_number":129,"context_line":"            by_path_mapping[devname] \u003d path"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    except OSError as e:"}],"source_content_type":"text/x-python","patch_set":10,"id":"7f515b1d_951d1268","line":128,"updated":"2017-09-26 08:00:55.000000000","message":"this has assumption that everything in /dev/disk/by-path is a relative symlink. it\u0027s probably true..","commit_id":"d0a53149f82a3587515a4371f0f4cad8570dc715"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"065f267b3d636dc1c2f863e7dbe51251d33f8705","unresolved":false,"context_lines":[{"line_number":125,"context_line":"            path \u003d os.path.join(disk_by_path_dir, path)"},{"line_number":126,"context_line":"            # Turn possibly relative symbolic link into absolute"},{"line_number":127,"context_line":"            devname \u003d os.path.join(disk_by_path_dir, os.readlink(path))"},{"line_number":128,"context_line":"            devname \u003d os.path.abspath(devname)"},{"line_number":129,"context_line":"            by_path_mapping[devname] \u003d path"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    except OSError as e:"}],"source_content_type":"text/x-python","patch_set":10,"id":"7f515b1d_b6dfcd38","line":128,"in_reply_to":"7f515b1d_951d1268","updated":"2017-09-27 14:40:24.000000000","message":"This is being managed by udev. Everywhere I read on that, they mention symlinks being created rather than device nodes.\n\nI do not think it justifies the extra complexity to account for possible device nodes in the /dev/disk/by-path. We would have to match major/minor numbers here with the major/minor numbers of the nodes in /dev.","commit_id":"d0a53149f82a3587515a4371f0f4cad8570dc715"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"0e555a543814a2d983f15d5a0e16f58902867fcc","unresolved":false,"context_lines":[{"line_number":129,"context_line":"            by_path_mapping[devname] \u003d path"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    except OSError as e:"},{"line_number":132,"context_line":"        LOG.warning(\"Path %(path)s is inaccessible, skipping by-path \""},{"line_number":133,"context_line":"                    \"block devices reporting \""},{"line_number":134,"context_line":"                    \"Error: %(error)s\", {\u0027path\u0027: disk_by_path_dir, \u0027error\u0027: e})"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    columns \u003d [\u0027KNAME\u0027, \u0027MODEL\u0027, \u0027SIZE\u0027, \u0027ROTA\u0027, \u0027TYPE\u0027]"},{"line_number":137,"context_line":"    report \u003d utils.execute(\u0027lsblk\u0027, \u0027-Pbdi\u0027, \u0027-o{}\u0027.format(\u0027,\u0027.join(columns)),"}],"source_content_type":"text/x-python","patch_set":10,"id":"7f515b1d_dde03acf","line":134,"range":{"start_line":132,"start_character":0,"end_line":134,"end_character":38},"updated":"2017-09-26 20:38:58.000000000","message":"This string doesn\u0027t make sense to me. Maybe I am not parsing/interpreting it correctly. Is it one sentence?\n\nPath ... is inaccessible, skipping by-path block devices reporting Error: ...\u0027.","commit_id":"d0a53149f82a3587515a4371f0f4cad8570dc715"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"065f267b3d636dc1c2f863e7dbe51251d33f8705","unresolved":false,"context_lines":[{"line_number":129,"context_line":"            by_path_mapping[devname] \u003d path"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    except OSError as e:"},{"line_number":132,"context_line":"        LOG.warning(\"Path %(path)s is inaccessible, skipping by-path \""},{"line_number":133,"context_line":"                    \"block devices reporting \""},{"line_number":134,"context_line":"                    \"Error: %(error)s\", {\u0027path\u0027: disk_by_path_dir, \u0027error\u0027: e})"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    columns \u003d [\u0027KNAME\u0027, \u0027MODEL\u0027, \u0027SIZE\u0027, \u0027ROTA\u0027, \u0027TYPE\u0027]"},{"line_number":137,"context_line":"    report \u003d utils.execute(\u0027lsblk\u0027, \u0027-Pbdi\u0027, \u0027-o{}\u0027.format(\u0027,\u0027.join(columns)),"}],"source_content_type":"text/x-python","patch_set":10,"id":"7f515b1d_564d39c2","line":134,"range":{"start_line":132,"start_character":0,"end_line":134,"end_character":38},"in_reply_to":"7f515b1d_dde03acf","updated":"2017-09-27 14:40:24.000000000","message":"In the followup patch changed for:\n\n\"Path /dev/disk/by-path is inaccessible, stable block device names unavailable! Cause: Permission denied: /dev/disk/by-path\"\n\nDoes it make better sense?","commit_id":"d0a53149f82a3587515a4371f0f4cad8570dc715"}],"ironic_python_agent/tests/unit/test_hardware.py":[{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"9d05e40d0b2ffcd32b1ffb32f325fc2ab29f45e9","unresolved":false,"context_lines":[{"line_number":745,"context_line":"        for value in (True, \u0027true\u0027, \u0027on\u0027, \u0027y\u0027, \u0027yes\u0027):"},{"line_number":746,"context_line":"            self._get_os_install_device_root_device_hints("},{"line_number":747,"context_line":"                {\u0027rotational\u0027: value}, \u0027/dev/sdb\u0027)"},{"line_number":748,"context_line":""},{"line_number":749,"context_line":"    @mock.patch.object(hardware, \u0027list_all_block_devices\u0027, autospec\u003dTrue)"},{"line_number":750,"context_line":"    @mock.patch.object(hardware, \u0027get_cached_node\u0027, autospec\u003dTrue)"},{"line_number":751,"context_line":"    def test_get_os_install_device_root_device_hints_no_device_found("}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_955e6a43","line":748,"updated":"2017-09-01 20:27:29.000000000","message":"Wondering if could add a test here for root_device hints using by-path.","commit_id":"7650098c910fadc2788bc9050ea65c762f076908"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"94b865371b5f737c6626771b70846780d461f237","unresolved":false,"context_lines":[{"line_number":745,"context_line":"        for value in (True, \u0027true\u0027, \u0027on\u0027, \u0027y\u0027, \u0027yes\u0027):"},{"line_number":746,"context_line":"            self._get_os_install_device_root_device_hints("},{"line_number":747,"context_line":"                {\u0027rotational\u0027: value}, \u0027/dev/sdb\u0027)"},{"line_number":748,"context_line":""},{"line_number":749,"context_line":"    @mock.patch.object(hardware, \u0027list_all_block_devices\u0027, autospec\u003dTrue)"},{"line_number":750,"context_line":"    @mock.patch.object(hardware, \u0027get_cached_node\u0027, autospec\u003dTrue)"},{"line_number":751,"context_line":"    def test_get_os_install_device_root_device_hints_no_device_found("}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_f6123b62","line":748,"in_reply_to":"7f287b81_955e6a43","updated":"2017-09-04 11:16:06.000000000","message":"That\u0027s a great point! But it requires patching the ironic-lib for it to honour the `by-path` hint.\n\nI\u0027ve added a [disabled] test for now, need to work on the Ironic lib separately.","commit_id":"7650098c910fadc2788bc9050ea65c762f076908"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"d279ea2f14084e723792bfe83e022f46f463c8b6","unresolved":false,"context_lines":[{"line_number":745,"context_line":"        for value in (True, \u0027true\u0027, \u0027on\u0027, \u0027y\u0027, \u0027yes\u0027):"},{"line_number":746,"context_line":"            self._get_os_install_device_root_device_hints("},{"line_number":747,"context_line":"                {\u0027rotational\u0027: value}, \u0027/dev/sdb\u0027)"},{"line_number":748,"context_line":""},{"line_number":749,"context_line":"    @mock.patch.object(hardware, \u0027list_all_block_devices\u0027, autospec\u003dTrue)"},{"line_number":750,"context_line":"    @mock.patch.object(hardware, \u0027get_cached_node\u0027, autospec\u003dTrue)"},{"line_number":751,"context_line":"    def test_get_os_install_device_root_device_hints_no_device_found("}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_6cbe7a00","line":748,"in_reply_to":"7f287b81_f6123b62","updated":"2017-09-04 12:19:51.000000000","message":"There is a proposed patch to ironic-lib [1] on which this patch now depends.\n\n1. https://review.openstack.org/#/c/500524/","commit_id":"7650098c910fadc2788bc9050ea65c762f076908"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"a47537dbb59aed662e93311aff42a8d2753a6acf","unresolved":false,"context_lines":[{"line_number":747,"context_line":"            self._get_os_install_device_root_device_hints("},{"line_number":748,"context_line":"                {\u0027rotational\u0027: value}, \u0027/dev/sdb\u0027)"},{"line_number":749,"context_line":""},{"line_number":750,"context_line":"    def skip_test_get_os_install_device_root_device_hints_by_path(self):"},{"line_number":751,"context_line":"        self._get_os_install_device_root_device_hints("},{"line_number":752,"context_line":"            {\u0027by_path\u0027: \u0027/dev/disk/by-path/1:0:0:0\u0027}, \u0027/dev/sdb\u0027)"},{"line_number":753,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7f287b81_30d66429","line":750,"range":{"start_line":750,"start_character":8,"end_line":750,"end_character":65},"updated":"2017-09-05 19:39:45.000000000","message":"With the \"Depends-On\" added for the ironic-lib patch can this test be run now (i.e. remove \"skip_\")?","commit_id":"b53e7f031c4ae4726f3b904449dee203a841d732"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"1863bbee4ad2840a3904052af02d7127a53671f1","unresolved":false,"context_lines":[{"line_number":747,"context_line":"            self._get_os_install_device_root_device_hints("},{"line_number":748,"context_line":"                {\u0027rotational\u0027: value}, \u0027/dev/sdb\u0027)"},{"line_number":749,"context_line":""},{"line_number":750,"context_line":"    def skip_test_get_os_install_device_root_device_hints_by_path(self):"},{"line_number":751,"context_line":"        self._get_os_install_device_root_device_hints("},{"line_number":752,"context_line":"            {\u0027by_path\u0027: \u0027/dev/disk/by-path/1:0:0:0\u0027}, \u0027/dev/sdb\u0027)"},{"line_number":753,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7f287b81_73fd16b0","line":750,"range":{"start_line":750,"start_character":8,"end_line":750,"end_character":65},"in_reply_to":"7f287b81_30d66429","updated":"2017-09-05 20:24:07.000000000","message":"Apparently, Depends-On does not work for libraries as those get pulled directly from PyPI. :-(\n\nPerhaps we\u0027d need to uncomment this test once ironic-lib is released...","commit_id":"b53e7f031c4ae4726f3b904449dee203a841d732"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"8f1a2aa6209bcd05608ceae4c63058f72f9c1e3b","unresolved":false,"context_lines":[{"line_number":940,"context_line":"            \u0027/dev/disk/by-path/1:0:0:2\u0027: \u0027/dev/sdc\u0027,"},{"line_number":941,"context_line":"            \u0027/dev/disk/by-path/1:0:0:3\u0027: \u0027/dev/sdd\u0027,"},{"line_number":942,"context_line":"        }"},{"line_number":943,"context_line":"        mock_readlink.side_effect \u003d lambda x, m\u003dby_path_map: m[x]"},{"line_number":944,"context_line":"        mock_listdir.return_value \u003d [os.path.basename(x)"},{"line_number":945,"context_line":"                                     for x in sorted(by_path_map)]"},{"line_number":946,"context_line":"        mocked_execute.return_value \u003d (BLK_DEVICE_TEMPLATE, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f287b81_ca764fd9","line":943,"range":{"start_line":943,"start_character":36,"end_line":943,"end_character":65},"updated":"2017-09-05 19:04:55.000000000","message":"nit: could have been:\n\n  mock_readlink.side_effect \u003d by_path_map.get\n\nbut this is OK too","commit_id":"b53e7f031c4ae4726f3b904449dee203a841d732"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"169d8642912c0e03540e1583d56d5f514b1de287","unresolved":false,"context_lines":[{"line_number":640,"context_line":"        self.assertEqual(\u00270x1014\u0027, interfaces[0].product)"},{"line_number":641,"context_line":"        self.assertEqual(\u0027em0\u0027, interfaces[0].biosdevname)"},{"line_number":642,"context_line":""},{"line_number":643,"context_line":"    @mock.patch.object(os, \u0027readlink\u0027, autospec\u003dTrue)"},{"line_number":644,"context_line":"    @mock.patch.object(os, \u0027listdir\u0027, autospec\u003dTrue)"},{"line_number":645,"context_line":"    @mock.patch.object(hardware, \u0027get_cached_node\u0027, autospec\u003dTrue)"},{"line_number":646,"context_line":"    @mock.patch.object(utils, \u0027execute\u0027, autospec\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf57530f_abc0f851","line":643,"updated":"2017-09-20 16:42:56.000000000","message":"Do this and don\u0027t need to be passing the mock object in the argument call\n\n @mock.patch.object(os, \u0027readlink\u0027, autospec\u003dTrue, lambda path: \"/dev/sda\")","commit_id":"04719f46125939ea633f026414d24ee89aadce12"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"156ab10b87f61e3e9e28fb90bf9976a21909b094","unresolved":false,"context_lines":[{"line_number":640,"context_line":"        self.assertEqual(\u00270x1014\u0027, interfaces[0].product)"},{"line_number":641,"context_line":"        self.assertEqual(\u0027em0\u0027, interfaces[0].biosdevname)"},{"line_number":642,"context_line":""},{"line_number":643,"context_line":"    @mock.patch.object(os, \u0027readlink\u0027, autospec\u003dTrue)"},{"line_number":644,"context_line":"    @mock.patch.object(os, \u0027listdir\u0027, autospec\u003dTrue)"},{"line_number":645,"context_line":"    @mock.patch.object(hardware, \u0027get_cached_node\u0027, autospec\u003dTrue)"},{"line_number":646,"context_line":"    @mock.patch.object(utils, \u0027execute\u0027, autospec\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f515b1d_6bf64efc","line":643,"in_reply_to":"7f515b1d_426025a6","updated":"2017-09-25 16:50:58.000000000","message":"I guess I lean towards better/cleaner code over consistent code.\n\nIf we are only using the mocks to do a return value and not checking the mocks to see how they were called it seems cleaner to use lambdas, in my opinion. Others can have different opinions.\n\nI will not -1 the patch over it though.\n\nThanks.","commit_id":"04719f46125939ea633f026414d24ee89aadce12"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"4663f7664cc088976a7fbbfc0628f7ec276523a3","unresolved":false,"context_lines":[{"line_number":640,"context_line":"        self.assertEqual(\u00270x1014\u0027, interfaces[0].product)"},{"line_number":641,"context_line":"        self.assertEqual(\u0027em0\u0027, interfaces[0].biosdevname)"},{"line_number":642,"context_line":""},{"line_number":643,"context_line":"    @mock.patch.object(os, \u0027readlink\u0027, autospec\u003dTrue)"},{"line_number":644,"context_line":"    @mock.patch.object(os, \u0027listdir\u0027, autospec\u003dTrue)"},{"line_number":645,"context_line":"    @mock.patch.object(hardware, \u0027get_cached_node\u0027, autospec\u003dTrue)"},{"line_number":646,"context_line":"    @mock.patch.object(utils, \u0027execute\u0027, autospec\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f515b1d_426025a6","line":643,"in_reply_to":"bf57530f_abc0f851","updated":"2017-09-25 08:25:42.000000000","message":"While I have nothing against your suggestion (for as long as the keyword args follow the positionals), I\u0027d rather leave these mocks as-is for the code consistency reasons.\n\nI can see many `.return_value` assignments throughout the code base, if we start switching this for lambdas at some places - would that improve code quality? If lambdas are in any way better (more readable, concise, faster?), should we migrate all of the tests in IPA over the new style?\n\nOr may be I am just missing your point? How would we benefit from the change of the mock style you are proposing? \n\nPlease, advise!","commit_id":"04719f46125939ea633f026414d24ee89aadce12"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"169d8642912c0e03540e1583d56d5f514b1de287","unresolved":false,"context_lines":[{"line_number":641,"context_line":"        self.assertEqual(\u0027em0\u0027, interfaces[0].biosdevname)"},{"line_number":642,"context_line":""},{"line_number":643,"context_line":"    @mock.patch.object(os, \u0027readlink\u0027, autospec\u003dTrue)"},{"line_number":644,"context_line":"    @mock.patch.object(os, \u0027listdir\u0027, autospec\u003dTrue)"},{"line_number":645,"context_line":"    @mock.patch.object(hardware, \u0027get_cached_node\u0027, autospec\u003dTrue)"},{"line_number":646,"context_line":"    @mock.patch.object(utils, \u0027execute\u0027, autospec\u003dTrue)"},{"line_number":647,"context_line":"    def test_get_os_install_device(self, mocked_execute, mock_cached_node,"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf57530f_ebc5d05c","line":644,"updated":"2017-09-20 16:42:56.000000000","message":"ditto, something similar to line 643 comment","commit_id":"04719f46125939ea633f026414d24ee89aadce12"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"169d8642912c0e03540e1583d56d5f514b1de287","unresolved":false,"context_lines":[{"line_number":645,"context_line":"    @mock.patch.object(hardware, \u0027get_cached_node\u0027, autospec\u003dTrue)"},{"line_number":646,"context_line":"    @mock.patch.object(utils, \u0027execute\u0027, autospec\u003dTrue)"},{"line_number":647,"context_line":"    def test_get_os_install_device(self, mocked_execute, mock_cached_node,"},{"line_number":648,"context_line":"                                   mocked_listdir, mocked_readlink):"},{"line_number":649,"context_line":"        mocked_readlink.return_value \u003d \u0027/dev/sda\u0027"},{"line_number":650,"context_line":"        mocked_listdir.return_value \u003d [\u00271:0:0:0\u0027]"},{"line_number":651,"context_line":"        mock_cached_node.return_value \u003d None"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf57530f_0b9ee462","line":648,"updated":"2017-09-20 16:42:56.000000000","message":"The changes to these three lines won\u0027t be needed if do suggestions above.","commit_id":"04719f46125939ea633f026414d24ee89aadce12"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"169d8642912c0e03540e1583d56d5f514b1de287","unresolved":false,"context_lines":[{"line_number":656,"context_line":"            check_exit_code\u003d[0])"},{"line_number":657,"context_line":"        mock_cached_node.assert_called_once_with()"},{"line_number":658,"context_line":""},{"line_number":659,"context_line":"    @mock.patch.object(os, \u0027readlink\u0027, autospec\u003dTrue)"},{"line_number":660,"context_line":"    @mock.patch.object(os, \u0027listdir\u0027, autospec\u003dTrue)"},{"line_number":661,"context_line":"    @mock.patch.object(hardware, \u0027get_cached_node\u0027, autospec\u003dTrue)"},{"line_number":662,"context_line":"    @mock.patch.object(utils, \u0027execute\u0027, autospec\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf57530f_0b77043d","line":659,"updated":"2017-09-20 16:42:56.000000000","message":"See line 643 comment","commit_id":"04719f46125939ea633f026414d24ee89aadce12"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"169d8642912c0e03540e1583d56d5f514b1de287","unresolved":false,"context_lines":[{"line_number":657,"context_line":"        mock_cached_node.assert_called_once_with()"},{"line_number":658,"context_line":""},{"line_number":659,"context_line":"    @mock.patch.object(os, \u0027readlink\u0027, autospec\u003dTrue)"},{"line_number":660,"context_line":"    @mock.patch.object(os, \u0027listdir\u0027, autospec\u003dTrue)"},{"line_number":661,"context_line":"    @mock.patch.object(hardware, \u0027get_cached_node\u0027, autospec\u003dTrue)"},{"line_number":662,"context_line":"    @mock.patch.object(utils, \u0027execute\u0027, autospec\u003dTrue)"},{"line_number":663,"context_line":"    def test_get_os_install_device_fails(self, mocked_execute,"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf57530f_eb73904c","line":660,"updated":"2017-09-20 16:42:56.000000000","message":"ditto","commit_id":"04719f46125939ea633f026414d24ee89aadce12"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"169d8642912c0e03540e1583d56d5f514b1de287","unresolved":false,"context_lines":[{"line_number":661,"context_line":"    @mock.patch.object(hardware, \u0027get_cached_node\u0027, autospec\u003dTrue)"},{"line_number":662,"context_line":"    @mock.patch.object(utils, \u0027execute\u0027, autospec\u003dTrue)"},{"line_number":663,"context_line":"    def test_get_os_install_device_fails(self, mocked_execute,"},{"line_number":664,"context_line":"                                         mock_cached_node,"},{"line_number":665,"context_line":"                                         mocked_listdir, mocked_readlink):"},{"line_number":666,"context_line":"        \"\"\"Fail to find device \u003e\u003d4GB w/o root device hints\"\"\""},{"line_number":667,"context_line":"        mocked_readlink.return_value \u003d \u0027/dev/sda\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf57530f_ab93584f","line":664,"updated":"2017-09-20 16:42:56.000000000","message":"See above","commit_id":"04719f46125939ea633f026414d24ee89aadce12"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"169d8642912c0e03540e1583d56d5f514b1de287","unresolved":false,"context_lines":[{"line_number":747,"context_line":"            self._get_os_install_device_root_device_hints("},{"line_number":748,"context_line":"                {\u0027rotational\u0027: value}, \u0027/dev/sdb\u0027)"},{"line_number":749,"context_line":""},{"line_number":750,"context_line":"    def skip_test_get_os_install_device_root_device_hints_by_path(self):"},{"line_number":751,"context_line":"        self._get_os_install_device_root_device_hints("},{"line_number":752,"context_line":"            {\u0027by_path\u0027: \u0027/dev/disk/by-path/1:0:0:0\u0027}, \u0027/dev/sdb\u0027)"},{"line_number":753,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"bf57530f_ebd6f0f1","line":750,"updated":"2017-09-20 16:42:56.000000000","message":"What is this for? Unless it starts with \u0027test_\u0027 it is not a test.\n\n-1","commit_id":"04719f46125939ea633f026414d24ee89aadce12"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"4663f7664cc088976a7fbbfc0628f7ec276523a3","unresolved":false,"context_lines":[{"line_number":747,"context_line":"            self._get_os_install_device_root_device_hints("},{"line_number":748,"context_line":"                {\u0027rotational\u0027: value}, \u0027/dev/sdb\u0027)"},{"line_number":749,"context_line":""},{"line_number":750,"context_line":"    def skip_test_get_os_install_device_root_device_hints_by_path(self):"},{"line_number":751,"context_line":"        self._get_os_install_device_root_device_hints("},{"line_number":752,"context_line":"            {\u0027by_path\u0027: \u0027/dev/disk/by-path/1:0:0:0\u0027}, \u0027/dev/sdb\u0027)"},{"line_number":753,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7f515b1d_a29fd94e","line":750,"in_reply_to":"bf57530f_ebd6f0f1","updated":"2017-09-25 08:25:42.000000000","message":"So we have another patch [1] this patch depends on for tests to pass. Unfortunately, Gerrit/CI do not seem to support the \u0027Depends-On\u0027 linkage for libraries. That is why I have to temporarily disable this test to let the CI passing until [1] gets merged.\n\nThis dependency is critical only for the tests. Otherwise the functionality would gracefully disable on a mismatching library.\n\nAny suggestion on how to handle this better?\n\n1. https://review.openstack.org/#/c/500524/","commit_id":"04719f46125939ea633f026414d24ee89aadce12"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"169d8642912c0e03540e1583d56d5f514b1de287","unresolved":false,"context_lines":[{"line_number":993,"context_line":"                          for dev in range(4)]"},{"line_number":994,"context_line":"        mock_readlink.assert_has_calls(expected_calls)"},{"line_number":995,"context_line":""},{"line_number":996,"context_line":"    @mock.patch.object(os, \u0027readlink\u0027, autospec\u003dTrue)"},{"line_number":997,"context_line":"    @mock.patch.object(os, \u0027listdir\u0027, autospec\u003dTrue)"},{"line_number":998,"context_line":"    @mock.patch.object(hardware, \u0027_get_device_info\u0027, autospec\u003dTrue)"},{"line_number":999,"context_line":"    @mock.patch.object(pyudev.Device, \u0027from_device_file\u0027, autospec\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf57530f_4bcbbc52","line":996,"updated":"2017-09-20 16:42:56.000000000","message":"See line 643 comment","commit_id":"04719f46125939ea633f026414d24ee89aadce12"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"169d8642912c0e03540e1583d56d5f514b1de287","unresolved":false,"context_lines":[{"line_number":1024,"context_line":"        self.assertEqual(2, len(devices))"},{"line_number":1025,"context_line":"        expected_calls \u003d [mock.call(\u0027/sys/block/%s/device/scsi_device\u0027 % dev)"},{"line_number":1026,"context_line":"                          for dev in (\u0027sda\u0027, \u0027sdb\u0027)]"},{"line_number":1027,"context_line":"        mocked_listdir.assert_has_calls(expected_calls)"},{"line_number":1028,"context_line":""},{"line_number":1029,"context_line":"    @mock.patch.object(os, \u0027readlink\u0027, autospec\u003dTrue)"},{"line_number":1030,"context_line":"    @mock.patch.object(os, \u0027listdir\u0027, autospec\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf57530f_26943d8b","line":1027,"updated":"2017-09-20 16:42:56.000000000","message":"Please update/change this:\n\nAs mocked_listdir.call_args_list contains:\n\n [call(\u0027/dev/disk/by-path\u0027),\n     call(\u0027/sys/block/sda/device/scsi_device\u0027),\n     call(\u0027/sys/block/sdb/device/scsi_device\u0027)]\n\nMaybe:\n\n self.assertEqual(expected_calls, mocked_listdir.call_args_list)","commit_id":"04719f46125939ea633f026414d24ee89aadce12"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"4663f7664cc088976a7fbbfc0628f7ec276523a3","unresolved":false,"context_lines":[{"line_number":1024,"context_line":"        self.assertEqual(2, len(devices))"},{"line_number":1025,"context_line":"        expected_calls \u003d [mock.call(\u0027/sys/block/%s/device/scsi_device\u0027 % dev)"},{"line_number":1026,"context_line":"                          for dev in (\u0027sda\u0027, \u0027sdb\u0027)]"},{"line_number":1027,"context_line":"        mocked_listdir.assert_has_calls(expected_calls)"},{"line_number":1028,"context_line":""},{"line_number":1029,"context_line":"    @mock.patch.object(os, \u0027readlink\u0027, autospec\u003dTrue)"},{"line_number":1030,"context_line":"    @mock.patch.object(os, \u0027listdir\u0027, autospec\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f515b1d_c2dad5e7","line":1027,"in_reply_to":"bf57530f_26943d8b","updated":"2017-09-25 08:25:42.000000000","message":"Done","commit_id":"04719f46125939ea633f026414d24ee89aadce12"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"169d8642912c0e03540e1583d56d5f514b1de287","unresolved":false,"context_lines":[{"line_number":1026,"context_line":"                          for dev in (\u0027sda\u0027, \u0027sdb\u0027)]"},{"line_number":1027,"context_line":"        mocked_listdir.assert_has_calls(expected_calls)"},{"line_number":1028,"context_line":""},{"line_number":1029,"context_line":"    @mock.patch.object(os, \u0027readlink\u0027, autospec\u003dTrue)"},{"line_number":1030,"context_line":"    @mock.patch.object(os, \u0027listdir\u0027, autospec\u003dTrue)"},{"line_number":1031,"context_line":"    @mock.patch.object(hardware, \u0027_get_device_info\u0027, autospec\u003dTrue)"},{"line_number":1032,"context_line":"    @mock.patch.object(pyudev.Device, \u0027from_device_file\u0027, autospec\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf57530f_2bc88853","line":1029,"updated":"2017-09-20 16:42:56.000000000","message":"See line 643 comment","commit_id":"04719f46125939ea633f026414d24ee89aadce12"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"169d8642912c0e03540e1583d56d5f514b1de287","unresolved":false,"context_lines":[{"line_number":1799,"context_line":"@mock.patch.object(utils, \u0027execute\u0027, autospec\u003dTrue)"},{"line_number":1800,"context_line":"class TestModuleFunctions(base.IronicAgentTest):"},{"line_number":1801,"context_line":""},{"line_number":1802,"context_line":"    @mock.patch.object(os, \u0027readlink\u0027, autospec\u003dTrue)"},{"line_number":1803,"context_line":"    @mock.patch.object(hardware, \u0027_get_device_info\u0027,"},{"line_number":1804,"context_line":"                       lambda x, y, z: \u0027FooTastic\u0027)"},{"line_number":1805,"context_line":"    @mock.patch.object(hardware, \u0027_udev_settle\u0027, autospec\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf57530f_0bc5c43c","line":1802,"updated":"2017-09-20 16:42:56.000000000","message":"See line 643 comment","commit_id":"04719f46125939ea633f026414d24ee89aadce12"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c0dd04b2d3addad65e1a5945c3e1de4288905167","unresolved":false,"context_lines":[{"line_number":646,"context_line":"    @mock.patch.object(utils, \u0027execute\u0027, autospec\u003dTrue)"},{"line_number":647,"context_line":"    def test_get_os_install_device(self, mocked_execute, mock_cached_node,"},{"line_number":648,"context_line":"                                   mocked_listdir, mocked_readlink):"},{"line_number":649,"context_line":"        mocked_readlink.return_value \u003d \u0027/dev/sda\u0027"},{"line_number":650,"context_line":"        mocked_listdir.return_value \u003d [\u00271:0:0:0\u0027]"},{"line_number":651,"context_line":"        mock_cached_node.return_value \u003d None"},{"line_number":652,"context_line":"        mocked_execute.return_value \u003d (BLK_DEVICE_TEMPLATE, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7f515b1d_75185674","line":649,"updated":"2017-09-26 08:00:55.000000000","message":"a real test should use \u0027../../sda\u0027 (this is how it looks on my system, at least)","commit_id":"d0a53149f82a3587515a4371f0f4cad8570dc715"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"065f267b3d636dc1c2f863e7dbe51251d33f8705","unresolved":false,"context_lines":[{"line_number":646,"context_line":"    @mock.patch.object(utils, \u0027execute\u0027, autospec\u003dTrue)"},{"line_number":647,"context_line":"    def test_get_os_install_device(self, mocked_execute, mock_cached_node,"},{"line_number":648,"context_line":"                                   mocked_listdir, mocked_readlink):"},{"line_number":649,"context_line":"        mocked_readlink.return_value \u003d \u0027/dev/sda\u0027"},{"line_number":650,"context_line":"        mocked_listdir.return_value \u003d [\u00271:0:0:0\u0027]"},{"line_number":651,"context_line":"        mock_cached_node.return_value \u003d None"},{"line_number":652,"context_line":"        mocked_execute.return_value \u003d (BLK_DEVICE_TEMPLATE, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7f515b1d_6d4a9bac","line":649,"in_reply_to":"7f515b1d_75185674","updated":"2017-09-27 14:40:24.000000000","message":"Done","commit_id":"d0a53149f82a3587515a4371f0f4cad8570dc715"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"d8fd7cf8a3bb0d2bfa6c686f97aebe2a6de47729","unresolved":false,"context_lines":[{"line_number":747,"context_line":"            self._get_os_install_device_root_device_hints("},{"line_number":748,"context_line":"                {\u0027rotational\u0027: value}, \u0027/dev/sdb\u0027)"},{"line_number":749,"context_line":""},{"line_number":750,"context_line":"    # TODO(etingof): enable this test once the patch below is merged"},{"line_number":751,"context_line":"    # https://review.openstack.org/#/c/500524/"},{"line_number":752,"context_line":"    def skip_test_get_os_install_device_root_device_hints_by_path(self):"},{"line_number":753,"context_line":"        self._get_os_install_device_root_device_hints("}],"source_content_type":"text/x-python","patch_set":10,"id":"7f515b1d_cb60a2a8","line":750,"updated":"2017-09-25 16:58:28.000000000","message":"Thanks for adding the comment.","commit_id":"d0a53149f82a3587515a4371f0f4cad8570dc715"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"065f267b3d636dc1c2f863e7dbe51251d33f8705","unresolved":false,"context_lines":[{"line_number":747,"context_line":"            self._get_os_install_device_root_device_hints("},{"line_number":748,"context_line":"                {\u0027rotational\u0027: value}, \u0027/dev/sdb\u0027)"},{"line_number":749,"context_line":""},{"line_number":750,"context_line":"    # TODO(etingof): enable this test once the patch below is merged"},{"line_number":751,"context_line":"    # https://review.openstack.org/#/c/500524/"},{"line_number":752,"context_line":"    def skip_test_get_os_install_device_root_device_hints_by_path(self):"},{"line_number":753,"context_line":"        self._get_os_install_device_root_device_hints("}],"source_content_type":"text/x-python","patch_set":10,"id":"7f515b1d_2dcee32d","line":750,"in_reply_to":"7f515b1d_cb60a2a8","updated":"2017-09-27 14:40:24.000000000","message":"In the followup patch [1] I reworked this into a conditional test.\n\n1. https://review.openstack.org/#/c/507858/","commit_id":"d0a53149f82a3587515a4371f0f4cad8570dc715"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c0dd04b2d3addad65e1a5945c3e1de4288905167","unresolved":false,"context_lines":[{"line_number":940,"context_line":"            \u0027/dev/disk/by-path/1:0:0:0\u0027: \u0027/dev/sda\u0027,"},{"line_number":941,"context_line":"            \u0027/dev/disk/by-path/1:0:0:1\u0027: \u0027/dev/sdb\u0027,"},{"line_number":942,"context_line":"            \u0027/dev/disk/by-path/1:0:0:2\u0027: \u0027/dev/sdc\u0027,"},{"line_number":943,"context_line":"            \u0027/dev/disk/by-path/1:0:0:3\u0027: \u0027/dev/sdd\u0027,"},{"line_number":944,"context_line":"        }"},{"line_number":945,"context_line":"        mock_readlink.side_effect \u003d lambda x, m\u003dby_path_map: m[x]"},{"line_number":946,"context_line":"        mock_listdir.return_value \u003d [os.path.basename(x)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7f515b1d_5529da87","line":943,"updated":"2017-09-26 08:00:55.000000000","message":"I\u0027d see at least one negative test. e.g. remove one of these and make sure None is reported","commit_id":"d0a53149f82a3587515a4371f0f4cad8570dc715"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"065f267b3d636dc1c2f863e7dbe51251d33f8705","unresolved":false,"context_lines":[{"line_number":940,"context_line":"            \u0027/dev/disk/by-path/1:0:0:0\u0027: \u0027/dev/sda\u0027,"},{"line_number":941,"context_line":"            \u0027/dev/disk/by-path/1:0:0:1\u0027: \u0027/dev/sdb\u0027,"},{"line_number":942,"context_line":"            \u0027/dev/disk/by-path/1:0:0:2\u0027: \u0027/dev/sdc\u0027,"},{"line_number":943,"context_line":"            \u0027/dev/disk/by-path/1:0:0:3\u0027: \u0027/dev/sdd\u0027,"},{"line_number":944,"context_line":"        }"},{"line_number":945,"context_line":"        mock_readlink.side_effect \u003d lambda x, m\u003dby_path_map: m[x]"},{"line_number":946,"context_line":"        mock_listdir.return_value \u003d [os.path.basename(x)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7f515b1d_183ec78b","line":943,"in_reply_to":"7f515b1d_5529da87","updated":"2017-09-27 14:40:24.000000000","message":"Done","commit_id":"d0a53149f82a3587515a4371f0f4cad8570dc715"}],"releasenotes/notes/inspection-to-report-disk-by-path-e3fd4c331d200903.yaml":[{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"c59d9e97efb05b72a1c64a87ee1262060051fe9e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - The /dev/disk/by-path/XXX device name added to the storage"},{"line_number":4,"context_line":"    hardware inspection report."}],"source_content_type":"text/x-yaml","patch_set":1,"id":"7f287b81_f7cdd286","line":3,"range":{"start_line":3,"start_character":41,"end_line":3,"end_character":42},"updated":"2017-08-31 17:50:53.000000000","message":"nit: is added","commit_id":"7650098c910fadc2788bc9050ea65c762f076908"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"94b865371b5f737c6626771b70846780d461f237","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - The /dev/disk/by-path/XXX device name added to the storage"},{"line_number":4,"context_line":"    hardware inspection report."}],"source_content_type":"text/x-yaml","patch_set":1,"id":"7f287b81_bd6816ba","line":3,"range":{"start_line":3,"start_character":41,"end_line":3,"end_character":42},"in_reply_to":"7f287b81_f7cdd286","updated":"2017-09-04 11:16:06.000000000","message":"Done","commit_id":"7650098c910fadc2788bc9050ea65c762f076908"}]}
