)]}'
{"ironic/api/controllers/v1/node.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"8bd4d4d95fb1b075582b8992a5d986e9d1a164b2","unresolved":false,"context_lines":[{"line_number":968,"context_line":"                pecan.request.context, rpc_node.uuid, topic, min_priority)"},{"line_number":969,"context_line":"        except exception.NodeGetCleanStepsFailure:"},{"line_number":970,"context_line":"            # Clean steps are not available yet"},{"line_number":971,"context_line":"            pecan.response.retry_after \u003d -1"},{"line_number":972,"context_line":"            msg \u003d (_(\u0027Cleaning steps are not yet available for node %(node)s. \u0027"},{"line_number":973,"context_line":"                     \u0027Please try again later.\u0027) % {\u0027node\u0027: node_ident})"},{"line_number":974,"context_line":"            response_params \u003d {\u0027status_code\u0027: http_client.ACCEPTED}"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af94dfe_aea42c57","line":971,"updated":"2016-03-16 10:18:46.000000000","message":"Retry-AFter is used for 503 errors [0], I\u0027m not convinced that we should use it for 202 (Accepted)\n\n[0] https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html","commit_id":"2a6f188422eabe715cd67c158500751dcd2afec8"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"8bd4d4d95fb1b075582b8992a5d986e9d1a164b2","unresolved":false,"context_lines":[{"line_number":971,"context_line":"            pecan.response.retry_after \u003d -1"},{"line_number":972,"context_line":"            msg \u003d (_(\u0027Cleaning steps are not yet available for node %(node)s. \u0027"},{"line_number":973,"context_line":"                     \u0027Please try again later.\u0027) % {\u0027node\u0027: node_ident})"},{"line_number":974,"context_line":"            response_params \u003d {\u0027status_code\u0027: http_client.ACCEPTED}"},{"line_number":975,"context_line":"            return wsme.api.Response(msg, **response_params)"},{"line_number":976,"context_line":""},{"line_number":977,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1af94dfe_0eb1e08f","line":974,"updated":"2016-03-16 10:18:46.000000000","message":"Btw, following the comment at L971.\n\nWhy do we return 202 here if the clean steps are not available ? It sounds more like a 404 IMHO","commit_id":"2a6f188422eabe715cd67c158500751dcd2afec8"}],"ironic/conductor/utils.py":[{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"bb5c36483e1e533261fc51fc0eb9c2455976c4cc","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        interface \u003d getattr(task.driver, interface)"},{"line_number":277,"context_line":"        if interface:"},{"line_number":278,"context_line":"            interface_steps \u003d [x for x in interface.get_clean_steps(task)"},{"line_number":279,"context_line":"                               if x[\u0027priority\u0027] \u003e\u003d min_priority]"},{"line_number":280,"context_line":"            steps.extend(interface_steps)"},{"line_number":281,"context_line":"    if sort:"},{"line_number":282,"context_line":"        # Sort the steps from higher priority to lower priority"}],"source_content_type":"text/x-python","patch_set":1,"id":"dae33548_70cd99b6","line":279,"updated":"2016-02-17 08:02:33.000000000","message":"interesting, read from the doc, I thought the priority can be None to skip the step but in this case, the step will not be list as before.","commit_id":"d262011db0ea721c1d546c00e09f17801281b292"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"117c5578ce416da33690c234a3e9203417737b7a","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        interface \u003d getattr(task.driver, interface)"},{"line_number":277,"context_line":"        if interface:"},{"line_number":278,"context_line":"            interface_steps \u003d [x for x in interface.get_clean_steps(task)"},{"line_number":279,"context_line":"                               if x[\u0027priority\u0027] \u003e\u003d min_priority]"},{"line_number":280,"context_line":"            steps.extend(interface_steps)"},{"line_number":281,"context_line":"    if sort:"},{"line_number":282,"context_line":"        # Sort the steps from higher priority to lower priority"}],"source_content_type":"text/x-python","patch_set":1,"id":"df3967d1_5a4fdb91","line":279,"in_reply_to":"dae33548_70cd99b6","updated":"2017-08-01 14:43:05.000000000","message":"A priority of zero will also skip that step. I took a quick look and even though I saw some mention of None in the docs, I didn\u0027t see use of None in the code. A priority of None would be similar to zero so I guess I\u0027m not sure what this comment is really getting at. For this method, enabled\u003dFalse translates to min priority of zero.","commit_id":"d262011db0ea721c1d546c00e09f17801281b292"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"57281e9fc50335e3996feb837f0144172487742e","unresolved":false,"context_lines":[{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    if not manual_clean:"},{"line_number":320,"context_line":"        # Get the prioritized steps for automated cleaning"},{"line_number":321,"context_line":"        driver_internal_info \u003d node.driver_internal_info"},{"line_number":322,"context_line":"        driver_internal_info[\u0027clean_steps\u0027] \u003d get_cleaning_steps("},{"line_number":323,"context_line":"            task, min_priority\u003d1)"},{"line_number":324,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af94dfe_ee2b0232","line":321,"range":{"start_line":321,"start_character":8,"end_line":321,"end_character":56},"updated":"2016-03-15 15:19:26.000000000","message":"this is duplicate with L313.","commit_id":"2a6f188422eabe715cd67c158500751dcd2afec8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"30ef5b9fd230cc1a6a609aa9235e7f66bf29a130","unresolved":false,"context_lines":[{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    if not manual_clean:"},{"line_number":320,"context_line":"        # Get the prioritized steps for automated cleaning"},{"line_number":321,"context_line":"        driver_internal_info \u003d node.driver_internal_info"},{"line_number":322,"context_line":"        driver_internal_info[\u0027clean_steps\u0027] \u003d get_cleaning_steps("},{"line_number":323,"context_line":"            task, min_priority\u003d1)"},{"line_number":324,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_da1f4b6e","line":321,"range":{"start_line":321,"start_character":8,"end_line":321,"end_character":56},"in_reply_to":"1af94dfe_2d5defe9","updated":"2017-08-01 15:58:56.000000000","message":"Done","commit_id":"2a6f188422eabe715cd67c158500751dcd2afec8"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"51fdb086dc125da0790b9db7c8b083e597bb88c7","unresolved":false,"context_lines":[{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    if not manual_clean:"},{"line_number":320,"context_line":"        # Get the prioritized steps for automated cleaning"},{"line_number":321,"context_line":"        driver_internal_info \u003d node.driver_internal_info"},{"line_number":322,"context_line":"        driver_internal_info[\u0027clean_steps\u0027] \u003d get_cleaning_steps("},{"line_number":323,"context_line":"            task, min_priority\u003d1)"},{"line_number":324,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af94dfe_2d5defe9","line":321,"range":{"start_line":321,"start_character":8,"end_line":321,"end_character":56},"in_reply_to":"1af94dfe_ee2b0232","updated":"2016-03-15 15:38:49.000000000","message":"nit: ++","commit_id":"2a6f188422eabe715cd67c158500751dcd2afec8"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"51fdb086dc125da0790b9db7c8b083e597bb88c7","unresolved":false,"context_lines":[{"line_number":326,"context_line":"        # user and already saved in node.driver_internal_info[\u0027clean_steps\u0027]."},{"line_number":327,"context_line":"        # Now that we know what the driver\u0027s available clean steps are, we can"},{"line_number":328,"context_line":"        # do further checks to validate the user\u0027s clean steps."},{"line_number":329,"context_line":"        steps \u003d node.driver_internal_info[\u0027clean_steps\u0027]"},{"line_number":330,"context_line":"        _validate_user_clean_steps(task, steps)"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    node.clean_step \u003d {}"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af94dfe_0da113aa","line":329,"range":{"start_line":329,"start_character":8,"end_line":329,"end_character":56},"updated":"2016-03-15 15:38:49.000000000","message":"nit: can be substituted by the variable driver_internal_info\n\nsteps \u003d driver_internal_info[\u0027clean_steps\u0027]","commit_id":"2a6f188422eabe715cd67c158500751dcd2afec8"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"281abd98fd6e0ec7eaa2d8f59c453923505d2dcf","unresolved":false,"context_lines":[{"line_number":326,"context_line":"        # user and already saved in node.driver_internal_info[\u0027clean_steps\u0027]."},{"line_number":327,"context_line":"        # Now that we know what the driver\u0027s available clean steps are, we can"},{"line_number":328,"context_line":"        # do further checks to validate the user\u0027s clean steps."},{"line_number":329,"context_line":"        steps \u003d node.driver_internal_info[\u0027clean_steps\u0027]"},{"line_number":330,"context_line":"        _validate_user_clean_steps(task, steps)"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    node.clean_step \u003d {}"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af94dfe_92f3610a","line":329,"range":{"start_line":329,"start_character":8,"end_line":329,"end_character":56},"in_reply_to":"1af94dfe_0da113aa","updated":"2016-03-16 03:38:15.000000000","message":"+1","commit_id":"2a6f188422eabe715cd67c158500751dcd2afec8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"30ef5b9fd230cc1a6a609aa9235e7f66bf29a130","unresolved":false,"context_lines":[{"line_number":326,"context_line":"        # user and already saved in node.driver_internal_info[\u0027clean_steps\u0027]."},{"line_number":327,"context_line":"        # Now that we know what the driver\u0027s available clean steps are, we can"},{"line_number":328,"context_line":"        # do further checks to validate the user\u0027s clean steps."},{"line_number":329,"context_line":"        steps \u003d node.driver_internal_info[\u0027clean_steps\u0027]"},{"line_number":330,"context_line":"        _validate_user_clean_steps(task, steps)"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    node.clean_step \u003d {}"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_fa0d6f3e","line":329,"range":{"start_line":329,"start_character":8,"end_line":329,"end_character":56},"in_reply_to":"1af94dfe_0da113aa","updated":"2017-08-01 15:58:56.000000000","message":"Done","commit_id":"2a6f188422eabe715cd67c158500751dcd2afec8"}],"ironic/tests/unit/api/v1/test_nodes.py":[{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"281abd98fd6e0ec7eaa2d8f59c453923505d2dcf","unresolved":false,"context_lines":[{"line_number":925,"context_line":""},{"line_number":926,"context_line":"    def test_get_clean_steps_iface_not_supported(self):"},{"line_number":927,"context_line":"        node \u003d obj_utils.create_test_node(self.context)"},{"line_number":928,"context_line":"        ret \u003d self.get_json(\u0027/nodes/%s/cleaning/steps\u0027 % node.uuid,"},{"line_number":929,"context_line":"                            expect_errors\u003dTrue)"},{"line_number":930,"context_line":"        self.assertEqual(http_client.NOT_ACCEPTABLE, ret.status_code)"},{"line_number":931,"context_line":"        self.assertTrue(ret.json[\u0027error_message\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af94dfe_ed0008ad","line":928,"updated":"2016-03-16 03:38:15.000000000","message":"better to explicitly use an old version like 1.16.","commit_id":"2a6f188422eabe715cd67c158500751dcd2afec8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"30ef5b9fd230cc1a6a609aa9235e7f66bf29a130","unresolved":false,"context_lines":[{"line_number":925,"context_line":""},{"line_number":926,"context_line":"    def test_get_clean_steps_iface_not_supported(self):"},{"line_number":927,"context_line":"        node \u003d obj_utils.create_test_node(self.context)"},{"line_number":928,"context_line":"        ret \u003d self.get_json(\u0027/nodes/%s/cleaning/steps\u0027 % node.uuid,"},{"line_number":929,"context_line":"                            expect_errors\u003dTrue)"},{"line_number":930,"context_line":"        self.assertEqual(http_client.NOT_ACCEPTABLE, ret.status_code)"},{"line_number":931,"context_line":"        self.assertTrue(ret.json[\u0027error_message\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_5d87d562","line":928,"in_reply_to":"1af94dfe_ed0008ad","updated":"2017-08-01 15:58:56.000000000","message":"Done","commit_id":"2a6f188422eabe715cd67c158500751dcd2afec8"}],"ironic/tests/unit/conductor/test_manager.py":[{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"281abd98fd6e0ec7eaa2d8f59c453923505d2dcf","unresolved":false,"context_lines":[{"line_number":2165,"context_line":"    def test_get_clean_steps_raises_exc_for_failed_steps_fetch("},{"line_number":2166,"context_line":"            self, get_cleaning_steps_mock):"},{"line_number":2167,"context_line":"        node \u003d obj_utils.create_test_node(self.context, driver\u003d\u0027fake\u0027)"},{"line_number":2168,"context_line":"        get_cleaning_steps_mock.side_effect \u003d (exception."},{"line_number":2169,"context_line":"                                               NodeCleaningFailure(\u0027failure\u0027))"},{"line_number":2170,"context_line":"        exc \u003d self.assertRaises(messaging.rpc.ExpectedException,"},{"line_number":2171,"context_line":"                                self.service.get_clean_steps,"},{"line_number":2172,"context_line":"                                self.context,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af94dfe_6db998e9","line":2169,"range":{"start_line":2168,"start_character":47,"end_line":2169,"end_character":77},"updated":"2016-03-16 03:38:15.000000000","message":"what about this:\nget_cleaning_steps_mock.side_effect \u003d (\n    exception.NodeCleaningFailure(\u0027failure\u0027))","commit_id":"2a6f188422eabe715cd67c158500751dcd2afec8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"30ef5b9fd230cc1a6a609aa9235e7f66bf29a130","unresolved":false,"context_lines":[{"line_number":2165,"context_line":"    def test_get_clean_steps_raises_exc_for_failed_steps_fetch("},{"line_number":2166,"context_line":"            self, get_cleaning_steps_mock):"},{"line_number":2167,"context_line":"        node \u003d obj_utils.create_test_node(self.context, driver\u003d\u0027fake\u0027)"},{"line_number":2168,"context_line":"        get_cleaning_steps_mock.side_effect \u003d (exception."},{"line_number":2169,"context_line":"                                               NodeCleaningFailure(\u0027failure\u0027))"},{"line_number":2170,"context_line":"        exc \u003d self.assertRaises(messaging.rpc.ExpectedException,"},{"line_number":2171,"context_line":"                                self.service.get_clean_steps,"},{"line_number":2172,"context_line":"                                self.context,"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_bde6c143","line":2169,"range":{"start_line":2168,"start_character":47,"end_line":2169,"end_character":77},"in_reply_to":"1af94dfe_6db998e9","updated":"2017-08-01 15:58:56.000000000","message":"Done","commit_id":"2a6f188422eabe715cd67c158500751dcd2afec8"}]}
