)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"b8f783f87d165b9e772d3cb86c1e7c0a00daf338","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"1fb71c09_5ac53599","updated":"2024-04-08 01:02:16.000000000","message":"Removed [DNM] tag after discussion with Dmitry. We\u0027ll use this patch for testing and decide on further steps depending on the results.","commit_id":"b5529df5ca24fecc8844503b6e4ed48a91189fed"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"e03283eb10e9b5b6185d00c9cfa0adaec0e2ccdb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"9534a781_5f6f5e14","updated":"2024-04-17 13:07:02.000000000","message":"Thank you for your review Dmitry, pushing updated version.","commit_id":"24372dfff79cdda50015faabba17a1849c532f87"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"07237182dc1006bf2b85a244e77879a850703421","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"bcf6f9ff_8897a9a0","updated":"2024-04-17 14:27:41.000000000","message":"The logic looks good now, let\u0027s see if we can add some tests.","commit_id":"99ddfaac4936196bf0bdbebb68792d8dd5ceda7e"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"aa63ee3a161c1a2bb9f3bb35eeebc8e9184db62b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"cf080b1c_b30e6dd6","updated":"2024-04-22 11:27:36.000000000","message":"unit tests are a placeholder - don\u0027t do anything useful yet","commit_id":"2ac0f19059b5f842c121aab56a4faddb455667bb"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"ad394bddc14c0f6362990fcb7425dd50d8e2794c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"b348c356_32e9fad3","updated":"2024-04-23 13:07:25.000000000","message":"Thank you for your reviews and pointers Dmitry, pushed new version.","commit_id":"5e063db01a53e9a1fd13cedb62ea871b43a4faa8"}],"sushy_oem_idrac/resources/manager/manager.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"66b74911d2670b326c12d74211321fc45c8b48ad","unresolved":true,"context_lines":[{"line_number":271,"context_line":"                            rebooted \u003d True"},{"line_number":272,"context_line":"                            LOG.warning(\"Requested a reboot, waiting for\""},{"line_number":273,"context_line":"                                        \" %s seconds\", self.REBOOT_WAIT)"},{"line_number":274,"context_line":"                            time.sleep(self.REBOOT_WAIT)"},{"line_number":275,"context_line":"                            LOG.warning(\"Done waiting for reboot, continuing\")"},{"line_number":276,"context_line":"                            break"},{"line_number":277,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff0215c2_cde59e28","line":274,"updated":"2024-04-11 06:52:57.000000000","message":"I\u0027m not entirely convinced in the huge reboot. I think the initial logic was \"Try to reboot, then keep looping until done\". We have 35*15\u003d525 seconds of retrying, maybe that needs to be raised significantly instead?","commit_id":"b5529df5ca24fecc8844503b6e4ed48a91189fed"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"874799f0a3d23f2731325e9c3247421a16d7221b","unresolved":true,"context_lines":[{"line_number":271,"context_line":"                            rebooted \u003d True"},{"line_number":272,"context_line":"                            LOG.warning(\"Requested a reboot, waiting for\""},{"line_number":273,"context_line":"                                        \" %s seconds\", self.REBOOT_WAIT)"},{"line_number":274,"context_line":"                            time.sleep(self.REBOOT_WAIT)"},{"line_number":275,"context_line":"                            LOG.warning(\"Done waiting for reboot, continuing\")"},{"line_number":276,"context_line":"                            break"},{"line_number":277,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"6729a3a9_e45daff4","line":274,"in_reply_to":"1177a42f_f719992e","updated":"2024-04-12 11:00:39.000000000","message":"A fresh thought: what if the blocking job is not BIOS settings but something simpler? Won\u0027t we artificially inflate the time it takes to connect the virtual media device?","commit_id":"b5529df5ca24fecc8844503b6e4ed48a91189fed"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"295ce259e73b3bf0d7969962aaa678f405d23e69","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                            rebooted \u003d True"},{"line_number":272,"context_line":"                            LOG.warning(\"Requested a reboot, waiting for\""},{"line_number":273,"context_line":"                                        \" %s seconds\", self.REBOOT_WAIT)"},{"line_number":274,"context_line":"                            time.sleep(self.REBOOT_WAIT)"},{"line_number":275,"context_line":"                            LOG.warning(\"Done waiting for reboot, continuing\")"},{"line_number":276,"context_line":"                            break"},{"line_number":277,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1ca7f1e2_b5a24261","line":274,"in_reply_to":"6729a3a9_e45daff4","updated":"2024-04-22 11:57:38.000000000","message":"Done","commit_id":"b5529df5ca24fecc8844503b6e4ed48a91189fed"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1ebb9b46c2ba25cfd7a1861807f4ceef80b6bb0a","unresolved":true,"context_lines":[{"line_number":271,"context_line":"                            rebooted \u003d True"},{"line_number":272,"context_line":"                            LOG.warning(\"Requested a reboot, waiting for\""},{"line_number":273,"context_line":"                                        \" %s seconds\", self.REBOOT_WAIT)"},{"line_number":274,"context_line":"                            time.sleep(self.REBOOT_WAIT)"},{"line_number":275,"context_line":"                            LOG.warning(\"Done waiting for reboot, continuing\")"},{"line_number":276,"context_line":"                            break"},{"line_number":277,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1177a42f_f719992e","line":274,"in_reply_to":"d9d098a7_09e531aa","updated":"2024-04-11 12:43:17.000000000","message":"Ideally. I\u0027m a bit worried that an enormous sleep will make the logs much harder to read. If we cannot find a path forward, we can merge this.","commit_id":"b5529df5ca24fecc8844503b6e4ed48a91189fed"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"b6475ca4d2a1d8b93ea2690934ebb83550067034","unresolved":true,"context_lines":[{"line_number":271,"context_line":"                            rebooted \u003d True"},{"line_number":272,"context_line":"                            LOG.warning(\"Requested a reboot, waiting for\""},{"line_number":273,"context_line":"                                        \" %s seconds\", self.REBOOT_WAIT)"},{"line_number":274,"context_line":"                            time.sleep(self.REBOOT_WAIT)"},{"line_number":275,"context_line":"                            LOG.warning(\"Done waiting for reboot, continuing\")"},{"line_number":276,"context_line":"                            break"},{"line_number":277,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"d9d098a7_09e531aa","line":274,"in_reply_to":"ff0215c2_cde59e28","updated":"2024-04-11 06:57:25.000000000","message":"In my testing I\u0027ve never seen it do more than 10 retries before failing out (it would usually fail with ~25 retries remaining) hence trying a different approach to see if it worked (and it did).\nDo you find the proposed approach acceptable or would you like me to try track down why not all expected check attempts are made?","commit_id":"b5529df5ca24fecc8844503b6e4ed48a91189fed"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c4814dc91bca14af5d2eb520bae8a7511bddff58","unresolved":true,"context_lines":[{"line_number":238,"context_line":""},{"line_number":239,"context_line":"                return response"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"            except (sushy.exceptions.ServerSideError,"},{"line_number":242,"context_line":"                    sushy.exceptions.BadRequestError,"},{"line_number":243,"context_line":"                    sushy.exceptions.HTTPError) as exc:"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"                LOG.warning("}],"source_content_type":"text/x-python","patch_set":4,"id":"484a899c_8eda7af9","line":242,"range":{"start_line":241,"start_character":20,"end_line":242,"end_character":52},"updated":"2024-04-16 10:18:19.000000000","message":"These are most likely subclasses of HTTPError, so you no longer need them.","commit_id":"4beff3110ba1b29472ebe7578014314821cb9e34"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"e03283eb10e9b5b6185d00c9cfa0adaec0e2ccdb","unresolved":false,"context_lines":[{"line_number":238,"context_line":""},{"line_number":239,"context_line":"                return response"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"            except (sushy.exceptions.ServerSideError,"},{"line_number":242,"context_line":"                    sushy.exceptions.BadRequestError,"},{"line_number":243,"context_line":"                    sushy.exceptions.HTTPError) as exc:"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"                LOG.warning("}],"source_content_type":"text/x-python","patch_set":4,"id":"7b862e14_97105911","line":242,"range":{"start_line":241,"start_character":20,"end_line":242,"end_character":52},"in_reply_to":"484a899c_8eda7af9","updated":"2024-04-17 13:07:02.000000000","message":"Done","commit_id":"4beff3110ba1b29472ebe7578014314821cb9e34"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c4814dc91bca14af5d2eb520bae8a7511bddff58","unresolved":true,"context_lines":[{"line_number":268,"context_line":"                    elif constants.IDRAC_JOB_RUNNING in message_id:"},{"line_number":269,"context_line":"                        pass"},{"line_number":270,"context_line":"                    else:"},{"line_number":271,"context_line":"                        raise"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"                else:"},{"line_number":274,"context_line":"                    time.sleep(self.RETRY_DELAY)"}],"source_content_type":"text/x-python","patch_set":4,"id":"05a389b9_d26c3c56","line":271,"updated":"2024-04-16 10:18:19.000000000","message":"Do you expect to have several errors possibly? I\u0027m afraid of a situation where we start with a warning and go to \u0027raise\u0027 immediately. I believe we have to raise outside of the for loop when we never find what we\u0027re looking for.","commit_id":"4beff3110ba1b29472ebe7578014314821cb9e34"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"e03283eb10e9b5b6185d00c9cfa0adaec0e2ccdb","unresolved":false,"context_lines":[{"line_number":268,"context_line":"                    elif constants.IDRAC_JOB_RUNNING in message_id:"},{"line_number":269,"context_line":"                        pass"},{"line_number":270,"context_line":"                    else:"},{"line_number":271,"context_line":"                        raise"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"                else:"},{"line_number":274,"context_line":"                    time.sleep(self.RETRY_DELAY)"}],"source_content_type":"text/x-python","patch_set":4,"id":"41f803ce_b68815cc","line":271,"in_reply_to":"05a389b9_d26c3c56","updated":"2024-04-17 13:07:02.000000000","message":"Done","commit_id":"4beff3110ba1b29472ebe7578014314821cb9e34"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"295ce259e73b3bf0d7969962aaa678f405d23e69","unresolved":false,"context_lines":[{"line_number":268,"context_line":"                    elif constants.IDRAC_JOB_RUNNING in message_id:"},{"line_number":269,"context_line":"                        pass"},{"line_number":270,"context_line":"                    else:"},{"line_number":271,"context_line":"                        raise"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"                else:"},{"line_number":274,"context_line":"                    time.sleep(self.RETRY_DELAY)"}],"source_content_type":"text/x-python","patch_set":4,"id":"8ef33c98_e3090e7b","line":271,"in_reply_to":"41f803ce_b68815cc","updated":"2024-04-22 11:57:38.000000000","message":"I believe the current iteration addresses this now","commit_id":"4beff3110ba1b29472ebe7578014314821cb9e34"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8c8b12fd5798a16fa77def11c728f2bf54bb7311","unresolved":true,"context_lines":[{"line_number":238,"context_line":""},{"line_number":239,"context_line":"                return response"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"            except (sushy.exceptions.HTTPError) as exc:"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"                LOG.warning("},{"line_number":244,"context_line":"                    \u0027Dell OEM set boot device failed (attempts left \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"6b37f4fb_747c9e0a","line":241,"updated":"2024-04-17 10:43:21.000000000","message":"nit: redundant brackets","commit_id":"24372dfff79cdda50015faabba17a1849c532f87"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"e03283eb10e9b5b6185d00c9cfa0adaec0e2ccdb","unresolved":false,"context_lines":[{"line_number":238,"context_line":""},{"line_number":239,"context_line":"                return response"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"            except (sushy.exceptions.HTTPError) as exc:"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"                LOG.warning("},{"line_number":244,"context_line":"                    \u0027Dell OEM set boot device failed (attempts left \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"b6b658cf_68170749","line":241,"in_reply_to":"6b37f4fb_747c9e0a","updated":"2024-04-17 13:07:02.000000000","message":"Done","commit_id":"24372dfff79cdda50015faabba17a1849c532f87"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8c8b12fd5798a16fa77def11c728f2bf54bb7311","unresolved":true,"context_lines":[{"line_number":267,"context_line":"                        pass"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"                else:"},{"line_number":270,"context_line":"                    if (constants.IDRAC_CONFIG_PENDING not in message_id"},{"line_number":271,"context_line":"                       and constants.IDRAC_JOB_RUNNING not in message_id):"},{"line_number":272,"context_line":"                        raise"},{"line_number":273,"context_line":"                    else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"d7040d8f_2b01bfa2","line":270,"updated":"2024-04-17 10:43:21.000000000","message":"This still depends on the exact order of messages. I\u0027d rather go with a simpler solution and introduce a boolean variable \"found\" initially set to False and later set to True on PENDING and RUNNING branches.\n\nBtw are there unit tests for the function?","commit_id":"24372dfff79cdda50015faabba17a1849c532f87"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"e03283eb10e9b5b6185d00c9cfa0adaec0e2ccdb","unresolved":false,"context_lines":[{"line_number":267,"context_line":"                        pass"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"                else:"},{"line_number":270,"context_line":"                    if (constants.IDRAC_CONFIG_PENDING not in message_id"},{"line_number":271,"context_line":"                       and constants.IDRAC_JOB_RUNNING not in message_id):"},{"line_number":272,"context_line":"                        raise"},{"line_number":273,"context_line":"                    else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"f0e2d3a9_5604684c","line":270,"in_reply_to":"d7040d8f_2b01bfa2","updated":"2024-04-17 13:07:02.000000000","message":"Done","commit_id":"24372dfff79cdda50015faabba17a1849c532f87"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8c8b12fd5798a16fa77def11c728f2bf54bb7311","unresolved":true,"context_lines":[{"line_number":268,"context_line":""},{"line_number":269,"context_line":"                else:"},{"line_number":270,"context_line":"                    if (constants.IDRAC_CONFIG_PENDING not in message_id"},{"line_number":271,"context_line":"                       and constants.IDRAC_JOB_RUNNING not in message_id):"},{"line_number":272,"context_line":"                        raise"},{"line_number":273,"context_line":"                    else:"},{"line_number":274,"context_line":"                        time.sleep(self.RETRY_DELAY)"}],"source_content_type":"text/x-python","patch_set":5,"id":"f681a95a_181f44bd","line":271,"updated":"2024-04-17 10:43:21.000000000","message":"nit: seems misaligned, I wonder why pep8 does not complain","commit_id":"24372dfff79cdda50015faabba17a1849c532f87"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"e03283eb10e9b5b6185d00c9cfa0adaec0e2ccdb","unresolved":false,"context_lines":[{"line_number":268,"context_line":""},{"line_number":269,"context_line":"                else:"},{"line_number":270,"context_line":"                    if (constants.IDRAC_CONFIG_PENDING not in message_id"},{"line_number":271,"context_line":"                       and constants.IDRAC_JOB_RUNNING not in message_id):"},{"line_number":272,"context_line":"                        raise"},{"line_number":273,"context_line":"                    else:"},{"line_number":274,"context_line":"                        time.sleep(self.RETRY_DELAY)"}],"source_content_type":"text/x-python","patch_set":5,"id":"79dadf8a_f3391065","line":271,"in_reply_to":"f681a95a_181f44bd","updated":"2024-04-17 13:07:02.000000000","message":"Done","commit_id":"24372dfff79cdda50015faabba17a1849c532f87"}],"sushy_oem_idrac/tests/unit/resources/manager/test_manager.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"cade6192f333abb3a89a9b0c2f96fff43b7d3baa","unresolved":true,"context_lines":[{"line_number":95,"context_line":"                  \u0027#FirstBootDevice\"\u003eVCD-DVD\u003c/Attribute\u003e\u003c/Component\u003e\u0027"},{"line_number":96,"context_line":"                  \u0027\u003c/SystemConfiguration\u003e\u0027})"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    @mock.patch.object(requests, \u0027post\u0027, autospec\u003dTrue)"},{"line_number":99,"context_line":"    @mock.patch(\u0027sushy.resources.oem.common._global_extn_mgrs_by_resource\u0027, {})"},{"line_number":100,"context_line":"    def test_set_virtual_boot_device_cd_pending_exc(self, mock_post):"},{"line_number":101,"context_line":"        with open(\u0027sushy_oem_idrac/tests/unit/json_samples/\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"15de6dbd_b4f7e16d","line":98,"updated":"2024-04-22 12:05:32.000000000","message":"I don\u0027t think you need to mock this: self.conn is already a mock.","commit_id":"2ac0f19059b5f842c121aab56a4faddb455667bb"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"ad394bddc14c0f6362990fcb7425dd50d8e2794c","unresolved":false,"context_lines":[{"line_number":95,"context_line":"                  \u0027#FirstBootDevice\"\u003eVCD-DVD\u003c/Attribute\u003e\u003c/Component\u003e\u0027"},{"line_number":96,"context_line":"                  \u0027\u003c/SystemConfiguration\u003e\u0027})"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    @mock.patch.object(requests, \u0027post\u0027, autospec\u003dTrue)"},{"line_number":99,"context_line":"    @mock.patch(\u0027sushy.resources.oem.common._global_extn_mgrs_by_resource\u0027, {})"},{"line_number":100,"context_line":"    def test_set_virtual_boot_device_cd_pending_exc(self, mock_post):"},{"line_number":101,"context_line":"        with open(\u0027sushy_oem_idrac/tests/unit/json_samples/\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"34b04c1c_86b0056d","line":98,"in_reply_to":"15de6dbd_b4f7e16d","updated":"2024-04-23 13:07:25.000000000","message":"Done","commit_id":"2ac0f19059b5f842c121aab56a4faddb455667bb"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"cade6192f333abb3a89a9b0c2f96fff43b7d3baa","unresolved":true,"context_lines":[{"line_number":106,"context_line":"        response.code \u003d \"IDRAC.2.8.LC068\""},{"line_number":107,"context_line":"        response.body \u003d response_obj[\u0027error\u0027]"},{"line_number":108,"context_line":"        response.raise_for_status.side_effect \u003d requests.exceptions.HTTPError"},{"line_number":109,"context_line":"        mock_post.return_value \u003d response"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        oem \u003d self.manager.get_oem_extension(\u0027Dell\u0027)"},{"line_number":112,"context_line":"        oem.set_virtual_boot_device("}],"source_content_type":"text/x-python","patch_set":7,"id":"28114465_5886a5ab","line":109,"updated":"2024-04-22 12:05:32.000000000","message":"Should be self.conn.post (make sure you override changes in setUp)","commit_id":"2ac0f19059b5f842c121aab56a4faddb455667bb"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"ad394bddc14c0f6362990fcb7425dd50d8e2794c","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        response.code \u003d \"IDRAC.2.8.LC068\""},{"line_number":107,"context_line":"        response.body \u003d response_obj[\u0027error\u0027]"},{"line_number":108,"context_line":"        response.raise_for_status.side_effect \u003d requests.exceptions.HTTPError"},{"line_number":109,"context_line":"        mock_post.return_value \u003d response"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        oem \u003d self.manager.get_oem_extension(\u0027Dell\u0027)"},{"line_number":112,"context_line":"        oem.set_virtual_boot_device("}],"source_content_type":"text/x-python","patch_set":7,"id":"1385f57f_0b3ac104","line":109,"in_reply_to":"28114465_5886a5ab","updated":"2024-04-23 13:07:25.000000000","message":"Done","commit_id":"2ac0f19059b5f842c121aab56a4faddb455667bb"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"cade6192f333abb3a89a9b0c2f96fff43b7d3baa","unresolved":true,"context_lines":[{"line_number":112,"context_line":"        oem.set_virtual_boot_device("},{"line_number":113,"context_line":"            sushy.VIRTUAL_MEDIA_CD, manager\u003dself.manager)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        self.conn.post.assert_called_once_with("},{"line_number":116,"context_line":"            \u0027/redfish/v1/Managers/iDRAC.Embedded.1/Actions/Oem/EID_674_Manager\u0027"},{"line_number":117,"context_line":"            \u0027.ImportSystemConfiguration\u0027,"},{"line_number":118,"context_line":"            data\u003d{\u0027ShareParameters\u0027: {\u0027Target\u0027: \u0027ALL\u0027},"}],"source_content_type":"text/x-python","patch_set":7,"id":"396244f6_8032a891","line":115,"updated":"2024-04-22 12:05:32.000000000","message":"This feels wrong: it should not be called once. I think it\u0027s because of incorrect mocking (see above).","commit_id":"2ac0f19059b5f842c121aab56a4faddb455667bb"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"ad394bddc14c0f6362990fcb7425dd50d8e2794c","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        oem.set_virtual_boot_device("},{"line_number":113,"context_line":"            sushy.VIRTUAL_MEDIA_CD, manager\u003dself.manager)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        self.conn.post.assert_called_once_with("},{"line_number":116,"context_line":"            \u0027/redfish/v1/Managers/iDRAC.Embedded.1/Actions/Oem/EID_674_Manager\u0027"},{"line_number":117,"context_line":"            \u0027.ImportSystemConfiguration\u0027,"},{"line_number":118,"context_line":"            data\u003d{\u0027ShareParameters\u0027: {\u0027Target\u0027: \u0027ALL\u0027},"}],"source_content_type":"text/x-python","patch_set":7,"id":"4f547c02_15cefaea","line":115,"in_reply_to":"396244f6_8032a891","updated":"2024-04-23 13:07:25.000000000","message":"Done","commit_id":"2ac0f19059b5f842c121aab56a4faddb455667bb"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"cade6192f333abb3a89a9b0c2f96fff43b7d3baa","unresolved":true,"context_lines":[{"line_number":130,"context_line":"        # assertRaisesRegex"},{"line_number":131,"context_line":"        # self.conn.post.side_effect \u003d sushy.exceptions.MissingAttributeError"},{"line_number":132,"context_line":"        oem.set_virtual_boot_device("},{"line_number":133,"context_line":"            sushy.VIRTUAL_MEDIA_CD, manager\u003dself.manager)"},{"line_number":134,"context_line":"        # this call does nothing, with or without the assert"},{"line_number":135,"context_line":"        self.conn.post.side_effect \u003d sushy.exceptions.MissingAttributeError"},{"line_number":136,"context_line":"        self.assertRaisesRegex(sushy.exceptions.MissingAttributeError,"}],"source_content_type":"text/x-python","patch_set":7,"id":"0f8c9273_1117200a","line":133,"updated":"2024-04-22 12:05:32.000000000","message":"This is testing a positive scenario, so can be removed in favour of the next lines?","commit_id":"2ac0f19059b5f842c121aab56a4faddb455667bb"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"ad394bddc14c0f6362990fcb7425dd50d8e2794c","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        # assertRaisesRegex"},{"line_number":131,"context_line":"        # self.conn.post.side_effect \u003d sushy.exceptions.MissingAttributeError"},{"line_number":132,"context_line":"        oem.set_virtual_boot_device("},{"line_number":133,"context_line":"            sushy.VIRTUAL_MEDIA_CD, manager\u003dself.manager)"},{"line_number":134,"context_line":"        # this call does nothing, with or without the assert"},{"line_number":135,"context_line":"        self.conn.post.side_effect \u003d sushy.exceptions.MissingAttributeError"},{"line_number":136,"context_line":"        self.assertRaisesRegex(sushy.exceptions.MissingAttributeError,"}],"source_content_type":"text/x-python","patch_set":7,"id":"564ded84_b1b68ad6","line":133,"in_reply_to":"0f8c9273_1117200a","updated":"2024-04-23 13:07:25.000000000","message":"Done","commit_id":"2ac0f19059b5f842c121aab56a4faddb455667bb"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"123e36e9a90af225d99fa5c6a3535762e60979d8","unresolved":true,"context_lines":[{"line_number":98,"context_line":"                  \u0027\u003c/SystemConfiguration\u003e\u0027})"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    @mock.patch.object(system, \u0027System\u0027, autospec\u003dTrue)"},{"line_number":101,"context_line":"    @mock.patch(\u0027sushy.resources.oem.common._global_extn_mgrs_by_resource\u0027, {})"},{"line_number":102,"context_line":"    def test_set_virtual_boot_device_cd_pending_exc(self, mock_system):"},{"line_number":103,"context_line":"        oem \u003d self.manager.get_oem_extension(\u0027Dell\u0027)"},{"line_number":104,"context_line":"        mock_system.power_state \u003d sushy.POWER_STATE_OFF"}],"source_content_type":"text/x-python","patch_set":8,"id":"ee02dfb7_803ce207","line":101,"updated":"2024-04-23 11:19:00.000000000","message":"Mocking an implementation detail of a 3rd party library is a terrible idea, but since it existed before your patch, let\u0027s leave it like that for now.","commit_id":"5e23242d13da195f94f26fc7412827742f473073"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"ad394bddc14c0f6362990fcb7425dd50d8e2794c","unresolved":false,"context_lines":[{"line_number":98,"context_line":"                  \u0027\u003c/SystemConfiguration\u003e\u0027})"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    @mock.patch.object(system, \u0027System\u0027, autospec\u003dTrue)"},{"line_number":101,"context_line":"    @mock.patch(\u0027sushy.resources.oem.common._global_extn_mgrs_by_resource\u0027, {})"},{"line_number":102,"context_line":"    def test_set_virtual_boot_device_cd_pending_exc(self, mock_system):"},{"line_number":103,"context_line":"        oem \u003d self.manager.get_oem_extension(\u0027Dell\u0027)"},{"line_number":104,"context_line":"        mock_system.power_state \u003d sushy.POWER_STATE_OFF"}],"source_content_type":"text/x-python","patch_set":8,"id":"c8127c19_442db3a3","line":101,"in_reply_to":"ee02dfb7_803ce207","updated":"2024-04-23 13:07:25.000000000","message":"Done","commit_id":"5e23242d13da195f94f26fc7412827742f473073"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"123e36e9a90af225d99fa5c6a3535762e60979d8","unresolved":true,"context_lines":[{"line_number":101,"context_line":"    @mock.patch(\u0027sushy.resources.oem.common._global_extn_mgrs_by_resource\u0027, {})"},{"line_number":102,"context_line":"    def test_set_virtual_boot_device_cd_pending_exc(self, mock_system):"},{"line_number":103,"context_line":"        oem \u003d self.manager.get_oem_extension(\u0027Dell\u0027)"},{"line_number":104,"context_line":"        mock_system.power_state \u003d sushy.POWER_STATE_OFF"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        with open(\u0027sushy_oem_idrac/tests/unit/json_samples/\u0027"},{"line_number":107,"context_line":"                  \u0027error_pending_job.json\u0027) as f:"}],"source_content_type":"text/x-python","patch_set":8,"id":"cec280ae_994ea3b7","line":104,"updated":"2024-04-23 11:19:00.000000000","message":"Probably better to mock the whole reboot call instead.","commit_id":"5e23242d13da195f94f26fc7412827742f473073"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"ad394bddc14c0f6362990fcb7425dd50d8e2794c","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    @mock.patch(\u0027sushy.resources.oem.common._global_extn_mgrs_by_resource\u0027, {})"},{"line_number":102,"context_line":"    def test_set_virtual_boot_device_cd_pending_exc(self, mock_system):"},{"line_number":103,"context_line":"        oem \u003d self.manager.get_oem_extension(\u0027Dell\u0027)"},{"line_number":104,"context_line":"        mock_system.power_state \u003d sushy.POWER_STATE_OFF"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        with open(\u0027sushy_oem_idrac/tests/unit/json_samples/\u0027"},{"line_number":107,"context_line":"                  \u0027error_pending_job.json\u0027) as f:"}],"source_content_type":"text/x-python","patch_set":8,"id":"a1550460_8e844e29","line":104,"in_reply_to":"cec280ae_994ea3b7","updated":"2024-04-23 13:07:25.000000000","message":"Done","commit_id":"5e23242d13da195f94f26fc7412827742f473073"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"123e36e9a90af225d99fa5c6a3535762e60979d8","unresolved":true,"context_lines":[{"line_number":110,"context_line":"        response.status_code \u003d http_client.BAD_REQUEST"},{"line_number":111,"context_line":"        response.json.return_value \u003d response_obj"},{"line_number":112,"context_line":"        response.code \u003d \"IDRAC.2.8.LC068\""},{"line_number":113,"context_line":"        self.conn.post.return_value \u003d response"},{"line_number":114,"context_line":"        self.conn.post.side_effect \u003d sushy.exceptions.HTTPError("},{"line_number":115,"context_line":"            method\u003d\u0027POST\u0027, url\u003dself.manager.path, response\u003dresponse)"},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7704cd95_65b96b07","line":113,"updated":"2024-04-23 11:19:00.000000000","message":"Have both return_value and side_effect makes no sense: the latter always overrides the former.","commit_id":"5e23242d13da195f94f26fc7412827742f473073"},{"author":{"_account_id":32177,"name":"Jacob Anders","email":"jacob-anders-dev@proton.me","username":"janders"},"change_message_id":"ad394bddc14c0f6362990fcb7425dd50d8e2794c","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        response.status_code \u003d http_client.BAD_REQUEST"},{"line_number":111,"context_line":"        response.json.return_value \u003d response_obj"},{"line_number":112,"context_line":"        response.code \u003d \"IDRAC.2.8.LC068\""},{"line_number":113,"context_line":"        self.conn.post.return_value \u003d response"},{"line_number":114,"context_line":"        self.conn.post.side_effect \u003d sushy.exceptions.HTTPError("},{"line_number":115,"context_line":"            method\u003d\u0027POST\u0027, url\u003dself.manager.path, response\u003dresponse)"},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"240afa0e_76782f75","line":113,"in_reply_to":"7704cd95_65b96b07","updated":"2024-04-23 13:07:25.000000000","message":"Done","commit_id":"5e23242d13da195f94f26fc7412827742f473073"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ac051d391686886b007e3e883dccf032c7466a33","unresolved":true,"context_lines":[{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        oem.set_virtual_boot_device("},{"line_number":156,"context_line":"            sushy.VIRTUAL_MEDIA_CD, manager\u003dself.manager)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        self.conn.post.assert_called_with("},{"line_number":159,"context_line":"            \u0027/redfish/v1/Managers/iDRAC.Embedded.1/Actions/Oem/EID_674_Manager\u0027"},{"line_number":160,"context_line":"            \u0027.ImportSystemConfiguration\u0027,"}],"source_content_type":"text/x-python","patch_set":12,"id":"57cddeb9_ba45513b","line":157,"updated":"2024-04-23 13:35:53.000000000","message":"nit: check that mock_reboot has been called","commit_id":"0b6dd9362e481dc3624e430831f463f93d09a230"}]}
