)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"fa96ef6fa36cca0d9f3c623667f90b5ceb48b91c","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Conductor handles manual cleaning"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The conductor (manager) supports manual cleaning via:"},{"line_number":10,"context_line":"- do_manual_clean() entry point"},{"line_number":11,"context_line":"- modifying cleaning flow/methods to support both automated and manual"},{"line_number":12,"context_line":"  cleaning"},{"line_number":13,"context_line":"- validates the user-specified cleaning steps against the cleaning"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"ba8a016a_27f6b3f9","line":10,"updated":"2015-11-24 07:35:30.000000000","message":"nit: isn\u0027t do_node_clean() the entry point?","commit_id":"e9f40b50dd802f22f263faa90264c78bc713ac16"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"2f487fa35c0742ffb6d9660b321e89c9443405cc","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Conductor handles manual cleaning"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The conductor (manager) supports manual cleaning via:"},{"line_number":10,"context_line":"- do_manual_clean() entry point"},{"line_number":11,"context_line":"- modifying cleaning flow/methods to support both automated and manual"},{"line_number":12,"context_line":"  cleaning"},{"line_number":13,"context_line":"- validates the user-specified cleaning steps against the cleaning"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9a8ffd7b_8e6fee91","line":10,"in_reply_to":"ba8a016a_27f6b3f9","updated":"2015-11-24 13:59:46.000000000","message":"Oops, you\u0027re right!","commit_id":"e9f40b50dd802f22f263faa90264c78bc713ac16"}],"ironic/conductor/manager.py":[{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"fa96ef6fa36cca0d9f3c623667f90b5ceb48b91c","unresolved":false,"context_lines":[{"line_number":897,"context_line":"            node \u003d task.node"},{"line_number":898,"context_line":""},{"line_number":899,"context_line":"            try:"},{"line_number":900,"context_line":"                task.driver.power.validate(task)"},{"line_number":901,"context_line":"            except exception.InvalidParameterValue as e:"},{"line_number":902,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":903,"context_line":"                    msg \u003d (_(\u0027RPC do_node_clean failed to validate power info.\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_220f8189","line":900,"updated":"2015-11-24 07:35:30.000000000","message":"Q: In the method, `_do_node_clean()`, there is a check of similar power.validate. Are we considering a more synchronous and responsive throwing in case of failure to the operator by providing that in this method?","commit_id":"e9f40b50dd802f22f263faa90264c78bc713ac16"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"a6274ce7ba2464fbae1d416834916a3bd76b8833","unresolved":false,"context_lines":[{"line_number":897,"context_line":"            node \u003d task.node"},{"line_number":898,"context_line":""},{"line_number":899,"context_line":"            try:"},{"line_number":900,"context_line":"                task.driver.power.validate(task)"},{"line_number":901,"context_line":"            except exception.InvalidParameterValue as e:"},{"line_number":902,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":903,"context_line":"                    msg \u003d (_(\u0027RPC do_node_clean failed to validate power info.\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_5662f0d9","line":900,"in_reply_to":"9a8ffd7b_319f4361","updated":"2015-11-24 16:52:30.000000000","message":"perfect.. I second your thought about making the user aware of any error as fast as possible. Commenting this would be useful and transparent.","commit_id":"e9f40b50dd802f22f263faa90264c78bc713ac16"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"a55b681b0cf6b63f5af7d5ace3d886e1c87f7273","unresolved":false,"context_lines":[{"line_number":897,"context_line":"            node \u003d task.node"},{"line_number":898,"context_line":""},{"line_number":899,"context_line":"            try:"},{"line_number":900,"context_line":"                task.driver.power.validate(task)"},{"line_number":901,"context_line":"            except exception.InvalidParameterValue as e:"},{"line_number":902,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":903,"context_line":"                    msg \u003d (_(\u0027RPC do_node_clean failed to validate power info.\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_00441d72","line":900,"in_reply_to":"9a8ffd7b_5662f0d9","updated":"2015-11-24 17:43:26.000000000","message":"done :)","commit_id":"e9f40b50dd802f22f263faa90264c78bc713ac16"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"7eaf3a94f2af2edf600217609405219ce700f75a","unresolved":false,"context_lines":[{"line_number":897,"context_line":"            node \u003d task.node"},{"line_number":898,"context_line":""},{"line_number":899,"context_line":"            try:"},{"line_number":900,"context_line":"                task.driver.power.validate(task)"},{"line_number":901,"context_line":"            except exception.InvalidParameterValue as e:"},{"line_number":902,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":903,"context_line":"                    msg \u003d (_(\u0027RPC do_node_clean failed to validate power info.\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_319f4361","line":900,"in_reply_to":"9a8ffd7b_b1401309","updated":"2015-11-24 14:02:01.000000000","message":"let me know if you think it would be useful to put a comment here about this.","commit_id":"e9f40b50dd802f22f263faa90264c78bc713ac16"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"2f487fa35c0742ffb6d9660b321e89c9443405cc","unresolved":false,"context_lines":[{"line_number":897,"context_line":"            node \u003d task.node"},{"line_number":898,"context_line":""},{"line_number":899,"context_line":"            try:"},{"line_number":900,"context_line":"                task.driver.power.validate(task)"},{"line_number":901,"context_line":"            except exception.InvalidParameterValue as e:"},{"line_number":902,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":903,"context_line":"                    msg \u003d (_(\u0027RPC do_node_clean failed to validate power info.\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_b1401309","line":900,"in_reply_to":"ba8a016a_220f8189","updated":"2015-11-24 13:59:46.000000000","message":"I debated about this. We aren\u0027t consistent here. ConductorManager.do_node_deploy() and others validate, but eg do_provisioning_action() doesn\u0027t. Doing the validate here means that it is done twice but I decided to err on the side of the user -- I\u0027d like to return any errors to the user as fast as possible. I know it will do two validate\u0027s but cleaning is a long operation anyway and the validate\u0027s are meant to be quick so I decided to take the hit.\n\nWhat do you think?","commit_id":"e9f40b50dd802f22f263faa90264c78bc713ac16"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"7eba578a7fe90571672b68b6b228687380f0a256","unresolved":false,"context_lines":[{"line_number":903,"context_line":"                    msg \u003d (_(\u0027RPC do_node_clean failed to validate power info.\u0027"},{"line_number":904,"context_line":"                             \u0027 Cannot clean node %(node)s. Error: %(msg)s\u0027) %"},{"line_number":905,"context_line":"                           {\u0027node\u0027: node.uuid, \u0027msg\u0027: e})"},{"line_number":906,"context_line":"                    e.message \u003d msg"},{"line_number":907,"context_line":""},{"line_number":908,"context_line":"            node.clean_step \u003d {}"},{"line_number":909,"context_line":"            info \u003d node.driver_internal_info"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_a3b67b3b","line":906,"updated":"2015-11-24 18:33:25.000000000","message":"Hmm, this message attribute seems to be deprecated now. Maybe reraise newly constructed InvalidParameterValue with this message?","commit_id":"16bd109ed0d3afb2d69581c476d9a27c9be3bac8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"429c51c4aea42e186b9bd933833edbe0cf0cbc54","unresolved":false,"context_lines":[{"line_number":903,"context_line":"                    msg \u003d (_(\u0027RPC do_node_clean failed to validate power info.\u0027"},{"line_number":904,"context_line":"                             \u0027 Cannot clean node %(node)s. Error: %(msg)s\u0027) %"},{"line_number":905,"context_line":"                           {\u0027node\u0027: node.uuid, \u0027msg\u0027: e})"},{"line_number":906,"context_line":"                    e.message \u003d msg"},{"line_number":907,"context_line":""},{"line_number":908,"context_line":"            node.clean_step \u003d {}"},{"line_number":909,"context_line":"            info \u003d node.driver_internal_info"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_f120c44b","line":906,"in_reply_to":"9a8ffd7b_a3b67b3b","updated":"2015-11-24 21:27:53.000000000","message":"Oh yes. Good catch!","commit_id":"16bd109ed0d3afb2d69581c476d9a27c9be3bac8"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"7eba578a7fe90571672b68b6b228687380f0a256","unresolved":false,"context_lines":[{"line_number":2837,"context_line":"            continue"},{"line_number":2838,"context_line":""},{"line_number":2839,"context_line":"        # Check that the user-specified arguments are valid"},{"line_number":2840,"context_line":"        argsinfo \u003d driver_step.get(\u0027argsinfo\u0027) or {}"},{"line_number":2841,"context_line":"        user_args \u003d user_step.get(\u0027args\u0027, {})"},{"line_number":2842,"context_line":"        invalid \u003d []"},{"line_number":2843,"context_line":"        for user_arg in user_args:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_834ed7bf","line":2840,"updated":"2015-11-24 18:33:25.000000000","message":"nit - driver_step.get(\u0027argsinfo\u0027, {})","commit_id":"16bd109ed0d3afb2d69581c476d9a27c9be3bac8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"429c51c4aea42e186b9bd933833edbe0cf0cbc54","unresolved":false,"context_lines":[{"line_number":2837,"context_line":"            continue"},{"line_number":2838,"context_line":""},{"line_number":2839,"context_line":"        # Check that the user-specified arguments are valid"},{"line_number":2840,"context_line":"        argsinfo \u003d driver_step.get(\u0027argsinfo\u0027) or {}"},{"line_number":2841,"context_line":"        user_args \u003d user_step.get(\u0027args\u0027, {})"},{"line_number":2842,"context_line":"        invalid \u003d []"},{"line_number":2843,"context_line":"        for user_arg in user_args:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_11f788d4","line":2840,"in_reply_to":"9a8ffd7b_834ed7bf","updated":"2015-11-24 21:27:53.000000000","message":"No, because I don\u0027t want it to be None. Eg, if driver_step[\u0027argsinfo\u0027] \u003d None.\n\nBut it does mean that the following line is incorrect :-(","commit_id":"16bd109ed0d3afb2d69581c476d9a27c9be3bac8"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"7eba578a7fe90571672b68b6b228687380f0a256","unresolved":false,"context_lines":[{"line_number":2839,"context_line":"        # Check that the user-specified arguments are valid"},{"line_number":2840,"context_line":"        argsinfo \u003d driver_step.get(\u0027argsinfo\u0027) or {}"},{"line_number":2841,"context_line":"        user_args \u003d user_step.get(\u0027args\u0027, {})"},{"line_number":2842,"context_line":"        invalid \u003d []"},{"line_number":2843,"context_line":"        for user_arg in user_args:"},{"line_number":2844,"context_line":"            if user_arg not in argsinfo:"},{"line_number":2845,"context_line":"                invalid.append(user_arg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_83aa5718","line":2842,"updated":"2015-11-24 18:33:25.000000000","message":"nit - invalid \u003d set(user_args) - set(argsinfo)","commit_id":"16bd109ed0d3afb2d69581c476d9a27c9be3bac8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"429c51c4aea42e186b9bd933833edbe0cf0cbc54","unresolved":false,"context_lines":[{"line_number":2839,"context_line":"        # Check that the user-specified arguments are valid"},{"line_number":2840,"context_line":"        argsinfo \u003d driver_step.get(\u0027argsinfo\u0027) or {}"},{"line_number":2841,"context_line":"        user_args \u003d user_step.get(\u0027args\u0027, {})"},{"line_number":2842,"context_line":"        invalid \u003d []"},{"line_number":2843,"context_line":"        for user_arg in user_args:"},{"line_number":2844,"context_line":"            if user_arg not in argsinfo:"},{"line_number":2845,"context_line":"                invalid.append(user_arg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_25704672","line":2842,"in_reply_to":"9a8ffd7b_83aa5718","updated":"2015-11-24 21:27:53.000000000","message":"Nice!","commit_id":"16bd109ed0d3afb2d69581c476d9a27c9be3bac8"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"5c22c61aa3ecf0d572f43da3bc8402fea58aacc4","unresolved":false,"context_lines":[{"line_number":2818,"context_line":"    \"\"\""},{"line_number":2819,"context_line":""},{"line_number":2820,"context_line":"    def step_id(step):"},{"line_number":2821,"context_line":"        return \u0027.\u0027.join([step[\u0027step\u0027], step[\u0027interface\u0027]])"},{"line_number":2822,"context_line":""},{"line_number":2823,"context_line":"    errors \u003d []"},{"line_number":2824,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_f11d1267","line":2821,"updated":"2015-11-26 04:36:26.000000000","message":"nit: just curious.. any reason for making this reversed? e.g.::\n\n  upgrade_firmware.deploy\n\ninstead of:\n\n  deploy.upgrade_firmware","commit_id":"3932a3b88a83b5436e9f022a87e2e6e34fe9e6d1"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"23f80a7680c309a088a826acdfde39a9f31b3ed5","unresolved":false,"context_lines":[{"line_number":2818,"context_line":"    \"\"\""},{"line_number":2819,"context_line":""},{"line_number":2820,"context_line":"    def step_id(step):"},{"line_number":2821,"context_line":"        return \u0027.\u0027.join([step[\u0027step\u0027], step[\u0027interface\u0027]])"},{"line_number":2822,"context_line":""},{"line_number":2823,"context_line":"    errors \u003d []"},{"line_number":2824,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_242bf195","line":2821,"in_reply_to":"9a8ffd7b_f11d1267","updated":"2015-11-26 18:06:41.000000000","message":"Nope, I probably did it because the step strings will most likely be more unique than the interface names, so I added the interface names to ensure that they are unique. This is all internal and not meant to be looked at so it doesn\u0027t matter.\n\nit is interesting that you think it is \u0027reversed\u0027. There isn\u0027t any ordering unless you think of it as the method instead of a clean step descriptor :)","commit_id":"3932a3b88a83b5436e9f022a87e2e6e34fe9e6d1"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"5c22c61aa3ecf0d572f43da3bc8402fea58aacc4","unresolved":false,"context_lines":[{"line_number":2859,"context_line":"        # Check that all required arguments were specified by the user"},{"line_number":2860,"context_line":"        missing \u003d []"},{"line_number":2861,"context_line":"        for (arg_name, arg_info) in argsinfo.items():"},{"line_number":2862,"context_line":"            if arg_info[\u0027required\u0027] and arg_name not in user_args:"},{"line_number":2863,"context_line":"                msg \u003d arg_name"},{"line_number":2864,"context_line":"                if arg_info.get(\u0027description\u0027):"},{"line_number":2865,"context_line":"                    msg +\u003d \u0027 (%(desc)s)\u0027 % {\u0027desc\u0027: arg_info[\u0027description\u0027]}"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_8951bf10","line":2862,"updated":"2015-11-26 04:36:26.000000000","message":"if the \u0027required\u0027 key is not given (mistakenly) by the developer in the clean_step\u0027s argsinfo ,then will it not throw KeyError? any catch block to handle that?","commit_id":"3932a3b88a83b5436e9f022a87e2e6e34fe9e6d1"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"23f80a7680c309a088a826acdfde39a9f31b3ed5","unresolved":false,"context_lines":[{"line_number":2859,"context_line":"        # Check that all required arguments were specified by the user"},{"line_number":2860,"context_line":"        missing \u003d []"},{"line_number":2861,"context_line":"        for (arg_name, arg_info) in argsinfo.items():"},{"line_number":2862,"context_line":"            if arg_info[\u0027required\u0027] and arg_name not in user_args:"},{"line_number":2863,"context_line":"                msg \u003d arg_name"},{"line_number":2864,"context_line":"                if arg_info.get(\u0027description\u0027):"},{"line_number":2865,"context_line":"                    msg +\u003d \u0027 (%(desc)s)\u0027 % {\u0027desc\u0027: arg_info[\u0027description\u0027]}"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_7f074018","line":2862,"in_reply_to":"9a8ffd7b_8951bf10","updated":"2015-11-26 18:06:41.000000000","message":"Good point. I don\u0027t think I want to make the \u0027required\u0027 key a required key. Thx.","commit_id":"3932a3b88a83b5436e9f022a87e2e6e34fe9e6d1"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"e1b29679ae83763dee865bd0558ee6685de3fa02","unresolved":false,"context_lines":[{"line_number":698,"context_line":""},{"line_number":699,"context_line":"              { \u0027interface\u0027: deploy\u0027,"},{"line_number":700,"context_line":"                \u0027step\u0027: \u0027upgrade_firmware\u0027,"},{"line_number":701,"context_line":"                \u0027args\u0027: {\u0027force\u0027: True} }"},{"line_number":702,"context_line":"        :raises: InvalidParameterValue if power validation fails."},{"line_number":703,"context_line":"        :raises: InvalidStateRequested if the node is not in manageable state."},{"line_number":704,"context_line":"        :raises: NodeLocked if node is locked by another conductor."}],"source_content_type":"text/x-python","patch_set":11,"id":"7a740942_b6886cc6","line":701,"updated":"2015-12-08 01:09:58.000000000","message":"If you push another patchset we should make it clear these are arguments to the clean step. I spent a while trying to lookup what \"Force\" does :)","commit_id":"4fc488c7985fa0860021e2babc4a4bbb79ace346"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"07c1ebebf6ac6bac2d773b59a0f3a237009f0052","unresolved":false,"context_lines":[{"line_number":698,"context_line":""},{"line_number":699,"context_line":"              { \u0027interface\u0027: deploy\u0027,"},{"line_number":700,"context_line":"                \u0027step\u0027: \u0027upgrade_firmware\u0027,"},{"line_number":701,"context_line":"                \u0027args\u0027: {\u0027force\u0027: True} }"},{"line_number":702,"context_line":"        :raises: InvalidParameterValue if power validation fails."},{"line_number":703,"context_line":"        :raises: InvalidStateRequested if the node is not in manageable state."},{"line_number":704,"context_line":"        :raises: NodeLocked if node is locked by another conductor."}],"source_content_type":"text/x-python","patch_set":11,"id":"7a740942_82cde386","line":701,"in_reply_to":"7a740942_b6886cc6","updated":"2015-12-08 02:55:25.000000000","message":"Oh, sorry about that. I didn\u0027t think anyone would read this stuff and if they did, if they\u0027d actually think about it. :) [Actually, it was cuz I didn\u0027t think of it.]\n\nI added a comment; might as well since we have to wait for Jenkins...\n\nMay the Force be with you ;)","commit_id":"4fc488c7985fa0860021e2babc4a4bbb79ace346"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"69c5fb6fb819161be85f079ebbcbc96e377cd800","unresolved":false,"context_lines":[{"line_number":744,"context_line":"                    target_state\u003dstates.MANAGEABLE)"},{"line_number":745,"context_line":"            except exception.InvalidState:"},{"line_number":746,"context_line":"                info \u003d node.driver_internal_info"},{"line_number":747,"context_line":"                info.pop(\u0027clean_steps\u0027)"},{"line_number":748,"context_line":"                node.driver_internal_info \u003d info"},{"line_number":749,"context_line":"                node.save()"},{"line_number":750,"context_line":"                raise exception.InvalidStateRequested("}],"source_content_type":"text/x-python","patch_set":12,"id":"3a7e1126_8c9bb517","line":747,"updated":"2015-12-21 15:50:18.000000000","message":"Hmm, so what if the node is in a state where clean_steps is being used? We\u0027ve just overwritten, then removed the steps. Can we check the state earlier here? Or I guess even just keep track of the old clean steps and put them back if needed.\n\nMaybe the lock solves this, but I\u0027m thinking of a case where a node is in the middle of cleaning in \"clean wait\", where it isn\u0027t locked.","commit_id":"f6c95a671d5e0f4bced3fdd40ac75fbe264c6578"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e746954820e41cd518246487ea1e433ad6b47dc8","unresolved":false,"context_lines":[{"line_number":744,"context_line":"                    target_state\u003dstates.MANAGEABLE)"},{"line_number":745,"context_line":"            except exception.InvalidState:"},{"line_number":746,"context_line":"                info \u003d node.driver_internal_info"},{"line_number":747,"context_line":"                info.pop(\u0027clean_steps\u0027)"},{"line_number":748,"context_line":"                node.driver_internal_info \u003d info"},{"line_number":749,"context_line":"                node.save()"},{"line_number":750,"context_line":"                raise exception.InvalidStateRequested("}],"source_content_type":"text/x-python","patch_set":12,"id":"3a7e1126_d5985c7a","line":747,"in_reply_to":"3a7e1126_8c9bb517","updated":"2015-12-21 16:15:21.000000000","message":"I\u0027m not sure that could occur because the node must have been in \u0027manageable\u0027 recently (to get through our API security!), although I suppose a \u0027provide\u0027 (or \u0027clean\u0027) and this \u0027clean\u0027 could be issued around the same time.\n\nIt won\u0027t hurt to keep track of the old clean steps. I don\u0027t want to check the state earlier because that\u0027s what the task.process_event() is for (and the check at the API level) so adding a third check seems excessive.\n\nOh, probably the \u0027right\u0027 thing to do is just pass clean_steps as an argument to _do_node_clean() :)\n\nThis makes me wonder about all our other RPC methods and whether they ought to also stash the old settings (if any were modified) just-in-case.","commit_id":"f6c95a671d5e0f4bced3fdd40ac75fbe264c6578"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"70ca9546585095ebcbd911a6fbf4aad086a6ea01","unresolved":false,"context_lines":[{"line_number":767,"context_line":"            if node.target_provision_state \u003d\u003d states.MANAGEABLE:"},{"line_number":768,"context_line":"                target_state \u003d states.MANAGEABLE"},{"line_number":769,"context_line":"            else:"},{"line_number":770,"context_line":"                target_state \u003d None"},{"line_number":771,"context_line":""},{"line_number":772,"context_line":"            # TODO(lucasagomes): CLEANING here for backwards compat"},{"line_number":773,"context_line":"            # with previous code, otherwise nodes in CLEANING when this"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_c39d33bd","line":770,"updated":"2016-01-05 12:45:05.000000000","message":"suggestion:\n\ntarget_state \u003d (states.MANAGEABLE\n                if node.target_provision_state \u003d\u003d states.MANAGEABLE\n                else None)","commit_id":"16786b6abd4ac74699c29c3af92208f9660629e9"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"0ae88e0ba49d8bcd012e06e8f7d3b3bd63d33e5d","unresolved":false,"context_lines":[{"line_number":767,"context_line":"            if node.target_provision_state \u003d\u003d states.MANAGEABLE:"},{"line_number":768,"context_line":"                target_state \u003d states.MANAGEABLE"},{"line_number":769,"context_line":"            else:"},{"line_number":770,"context_line":"                target_state \u003d None"},{"line_number":771,"context_line":""},{"line_number":772,"context_line":"            # TODO(lucasagomes): CLEANING here for backwards compat"},{"line_number":773,"context_line":"            # with previous code, otherwise nodes in CLEANING when this"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_96d0d8f7","line":770,"in_reply_to":"fa69d971_c39d33bd","updated":"2016-01-05 14:16:57.000000000","message":"Sure. I\u0027ll do it if I submit another revision, or in a follow-up patch.","commit_id":"16786b6abd4ac74699c29c3af92208f9660629e9"}],"ironic/conductor/rpcapi.py":[{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"ace8167aad82aa4789da15cbf7f5c1a7d4e25680","unresolved":false,"context_lines":[{"line_number":609,"context_line":"                 async task."},{"line_number":610,"context_line":"        \"\"\""},{"line_number":611,"context_line":"        cctxt \u003d self.client.prepare(topic\u003dtopic or self.topic, version\u003d\u00271.32\u0027)"},{"line_number":612,"context_line":"        return cctxt.call(context, \u0027do_node_clean\u0027,"},{"line_number":613,"context_line":"                          node_id\u003dnode_id, clean_steps\u003dclean_steps)"},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"    def object_class_action_versions(self, context, objname, objmethod,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_a369348e","line":612,"updated":"2015-11-24 08:21:02.000000000","message":"This is an async action, cast is better? There is no response really return for API. Looks like only exceptions are useful.","commit_id":"e9f40b50dd802f22f263faa90264c78bc713ac16"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"2f487fa35c0742ffb6d9660b321e89c9443405cc","unresolved":false,"context_lines":[{"line_number":609,"context_line":"                 async task."},{"line_number":610,"context_line":"        \"\"\""},{"line_number":611,"context_line":"        cctxt \u003d self.client.prepare(topic\u003dtopic or self.topic, version\u003d\u00271.32\u0027)"},{"line_number":612,"context_line":"        return cctxt.call(context, \u0027do_node_clean\u0027,"},{"line_number":613,"context_line":"                          node_id\u003dnode_id, clean_steps\u003dclean_steps)"},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"    def object_class_action_versions(self, context, objname, objmethod,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_2ec4c23e","line":612,"in_reply_to":"ba8a016a_a369348e","updated":"2015-11-24 13:59:46.000000000","message":"If you look at the code, the only one that is a cast is continue_node_clean() -- which is actually called via ironic internally.\n\nThe rest are calls eg do_provisioning_action() because as you mention, there are exceptions that are useful to the user.","commit_id":"e9f40b50dd802f22f263faa90264c78bc713ac16"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"69c5fb6fb819161be85f079ebbcbc96e377cd800","unresolved":false,"context_lines":[{"line_number":603,"context_line":"        :param topic: RPC topic. Defaults to self.topic."},{"line_number":604,"context_line":"        :raises: InvalidParameterValue if validation of power driver interface"},{"line_number":605,"context_line":"        :raises: InvalidStateRequested if cleaning can not be performed."},{"line_number":606,"context_line":"                 failed."},{"line_number":607,"context_line":"        :raises: NodeInMaintenance if node is in maintenance mode."},{"line_number":608,"context_line":"        :raises: NodeLocked if node is locked by another conductor."},{"line_number":609,"context_line":"        :raises: NoFreeConductorWorker when there is no free worker to start"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a7e1126_ef702b0d","line":606,"updated":"2015-12-21 15:50:18.000000000","message":"Looks like this line is switched with the previous one.","commit_id":"f6c95a671d5e0f4bced3fdd40ac75fbe264c6578"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e746954820e41cd518246487ea1e433ad6b47dc8","unresolved":false,"context_lines":[{"line_number":603,"context_line":"        :param topic: RPC topic. Defaults to self.topic."},{"line_number":604,"context_line":"        :raises: InvalidParameterValue if validation of power driver interface"},{"line_number":605,"context_line":"        :raises: InvalidStateRequested if cleaning can not be performed."},{"line_number":606,"context_line":"                 failed."},{"line_number":607,"context_line":"        :raises: NodeInMaintenance if node is in maintenance mode."},{"line_number":608,"context_line":"        :raises: NodeLocked if node is locked by another conductor."},{"line_number":609,"context_line":"        :raises: NoFreeConductorWorker when there is no free worker to start"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a7e1126_ba7b3fbd","line":606,"in_reply_to":"3a7e1126_ef702b0d","updated":"2015-12-21 16:15:21.000000000","message":"Oops, good catch.","commit_id":"f6c95a671d5e0f4bced3fdd40ac75fbe264c6578"}],"ironic/conductor/utils.py":[{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"e5cbcb7c65a2c6e6e99f321bd99a3ba60db696b1","unresolved":false,"context_lines":[{"line_number":207,"context_line":"    # Reset clean step, msg should include current step"},{"line_number":208,"context_line":"    if task.node.provision_state in (states.CLEANING, states.CLEANWAIT):"},{"line_number":209,"context_line":"        task.node.clean_step \u003d {}"},{"line_number":210,"context_line":"    manual_clean \u003d task.node.target_provision_state \u003d\u003d states.MANAGEABLE"},{"line_number":211,"context_line":"    task.node.last_error \u003d msg"},{"line_number":212,"context_line":"    task.node.maintenance \u003d True"},{"line_number":213,"context_line":"    task.node.maintenance_reason \u003d msg"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a8ffd7b_3518afd2","line":210,"updated":"2015-11-30 04:34:49.000000000","message":"nit: better add a comment about why this is for manual_clean somewhere to increase readable.","commit_id":"c8e944025d91700bac3c2b383aa1f09bcd696144"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"76b9f700aca28714b147b9ea9e478d0ee2ffb277","unresolved":false,"context_lines":[{"line_number":207,"context_line":"    # Reset clean step, msg should include current step"},{"line_number":208,"context_line":"    if task.node.provision_state in (states.CLEANING, states.CLEANWAIT):"},{"line_number":209,"context_line":"        task.node.clean_step \u003d {}"},{"line_number":210,"context_line":"    manual_clean \u003d task.node.target_provision_state \u003d\u003d states.MANAGEABLE"},{"line_number":211,"context_line":"    task.node.last_error \u003d msg"},{"line_number":212,"context_line":"    task.node.maintenance \u003d True"},{"line_number":213,"context_line":"    task.node.maintenance_reason \u003d msg"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a8ffd7b_e48d802b","line":210,"in_reply_to":"9a8ffd7b_3518afd2","updated":"2015-11-30 14:57:36.000000000","message":"Where do you suggest I add the comment? In this method or elsewhere? That logic is also used in various places in  ironic/conductor/manager(). Should I put a comment in all the places?\n\nI did initially think of adding a node.driver_internal_info[\u0027manual_clean\u0027] to make it more explicit but I decided it was overkill and this would be \u0027obvious\u0027, but if it isn\u0027t, let me know which might be clearer - more comments or this internal flag.","commit_id":"c8e944025d91700bac3c2b383aa1f09bcd696144"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"e2f2d37cbba6485b78f6259114d55f9f00c56dc2","unresolved":false,"context_lines":[{"line_number":207,"context_line":"    # Reset clean step, msg should include current step"},{"line_number":208,"context_line":"    if task.node.provision_state in (states.CLEANING, states.CLEANWAIT):"},{"line_number":209,"context_line":"        task.node.clean_step \u003d {}"},{"line_number":210,"context_line":"    manual_clean \u003d task.node.target_provision_state \u003d\u003d states.MANAGEABLE"},{"line_number":211,"context_line":"    task.node.last_error \u003d msg"},{"line_number":212,"context_line":"    task.node.maintenance \u003d True"},{"line_number":213,"context_line":"    task.node.maintenance_reason \u003d msg"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a8ffd7b_db4b1258","line":210,"in_reply_to":"9a8ffd7b_e48d802b","updated":"2015-12-02 02:59:15.000000000","message":"hmmm, this is a dilemma. I see you use it many times. I would prefer to add more comments. But let\u0027s see others comments.","commit_id":"c8e944025d91700bac3c2b383aa1f09bcd696144"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"e5cbcb7c65a2c6e6e99f321bd99a3ba60db696b1","unresolved":false,"context_lines":[{"line_number":349,"context_line":"    #      \u0027abortable\u0027: Optional. \u003cBoolean\u003e."},{"line_number":350,"context_line":"    #      \u0027argsinfo\u0027: Optional. A dictionary of {\u003carg_name\u003e:\u003carg_info_dict\u003e}"},{"line_number":351,"context_line":"    #                  entries. \u003carg_info_dict\u003e is a dictionary with"},{"line_number":352,"context_line":"    #                  { \u0027description\u0027: \u003cdescription\u003e,"},{"line_number":353,"context_line":"    #                    \u0027required\u0027: \u003cBoolean\u003e }"},{"line_number":354,"context_line":"    #   }"},{"line_number":355,"context_line":"    driver_steps \u003d {}"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a8ffd7b_506461b7","line":352,"updated":"2015-11-30 04:34:49.000000000","message":"\u0027required\u0027 has a default value of \u0027False\u0027 and \u0027description\u0027 is optional, right?","commit_id":"c8e944025d91700bac3c2b383aa1f09bcd696144"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"76b9f700aca28714b147b9ea9e478d0ee2ffb277","unresolved":false,"context_lines":[{"line_number":349,"context_line":"    #      \u0027abortable\u0027: Optional. \u003cBoolean\u003e."},{"line_number":350,"context_line":"    #      \u0027argsinfo\u0027: Optional. A dictionary of {\u003carg_name\u003e:\u003carg_info_dict\u003e}"},{"line_number":351,"context_line":"    #                  entries. \u003carg_info_dict\u003e is a dictionary with"},{"line_number":352,"context_line":"    #                  { \u0027description\u0027: \u003cdescription\u003e,"},{"line_number":353,"context_line":"    #                    \u0027required\u0027: \u003cBoolean\u003e }"},{"line_number":354,"context_line":"    #   }"},{"line_number":355,"context_line":"    driver_steps \u003d {}"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a8ffd7b_44024c0d","line":352,"in_reply_to":"9a8ffd7b_506461b7","updated":"2015-11-30 14:57:36.000000000","message":"Yes. Although \u0027required\u0027 is also optional. I should figure out how to generate comments that have links to other comments and only comment it in one place.","commit_id":"c8e944025d91700bac3c2b383aa1f09bcd696144"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"e5cbcb7c65a2c6e6e99f321bd99a3ba60db696b1","unresolved":false,"context_lines":[{"line_number":353,"context_line":"    #                    \u0027required\u0027: \u003cBoolean\u003e }"},{"line_number":354,"context_line":"    #   }"},{"line_number":355,"context_line":"    driver_steps \u003d {}"},{"line_number":356,"context_line":"    for s in _get_cleaning_steps(task, enabled\u003dFalse, sort\u003dFalse):"},{"line_number":357,"context_line":"        driver_steps[step_id(s)] \u003d s"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"    for user_step in user_steps:"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a8ffd7b_f5130763","line":356,"updated":"2015-11-30 04:34:49.000000000","message":"what\u0027s the disadvantage of return a sort list and make you change _get_cleaning_steps? or just get ride of the unnecessary sort().","commit_id":"c8e944025d91700bac3c2b383aa1f09bcd696144"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"e2f2d37cbba6485b78f6259114d55f9f00c56dc2","unresolved":false,"context_lines":[{"line_number":353,"context_line":"    #                    \u0027required\u0027: \u003cBoolean\u003e }"},{"line_number":354,"context_line":"    #   }"},{"line_number":355,"context_line":"    driver_steps \u003d {}"},{"line_number":356,"context_line":"    for s in _get_cleaning_steps(task, enabled\u003dFalse, sort\u003dFalse):"},{"line_number":357,"context_line":"        driver_steps[step_id(s)] \u003d s"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"    for user_step in user_steps:"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a8ffd7b_db6232d8","line":356,"in_reply_to":"9a8ffd7b_64daf0eb","updated":"2015-12-02 02:59:15.000000000","message":"OK, got it. There is no problem for understand. :)","commit_id":"c8e944025d91700bac3c2b383aa1f09bcd696144"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"76b9f700aca28714b147b9ea9e478d0ee2ffb277","unresolved":false,"context_lines":[{"line_number":353,"context_line":"    #                    \u0027required\u0027: \u003cBoolean\u003e }"},{"line_number":354,"context_line":"    #   }"},{"line_number":355,"context_line":"    driver_steps \u003d {}"},{"line_number":356,"context_line":"    for s in _get_cleaning_steps(task, enabled\u003dFalse, sort\u003dFalse):"},{"line_number":357,"context_line":"        driver_steps[step_id(s)] \u003d s"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"    for user_step in user_steps:"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a8ffd7b_64daf0eb","line":356,"in_reply_to":"9a8ffd7b_f5130763","updated":"2015-11-30 14:57:36.000000000","message":"_get_cleaning_steps() is used for both automated and manual cleaning. Did you read the comments in _get_cleaning_steps()? (I\u0027m trying to figure out which part of it you missed/don\u0027t understand, so that I\u0027ll know whether/where to add a comment.)\n\nFor automated cleaning, the clean steps need to be sorted by priority. For this, I only need the clean steps so why waste time sorting them.","commit_id":"c8e944025d91700bac3c2b383aa1f09bcd696144"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"e5cbcb7c65a2c6e6e99f321bd99a3ba60db696b1","unresolved":false,"context_lines":[{"line_number":379,"context_line":"        # Check that all required arguments were specified by the user"},{"line_number":380,"context_line":"        missing \u003d []"},{"line_number":381,"context_line":"        for (arg_name, arg_info) in argsinfo.items():"},{"line_number":382,"context_line":"            if arg_info.get(\u0027required\u0027, False) and arg_name not in user_args:"},{"line_number":383,"context_line":"                msg \u003d arg_name"},{"line_number":384,"context_line":"                if arg_info.get(\u0027description\u0027):"},{"line_number":385,"context_line":"                    msg +\u003d \u0027 (%(desc)s)\u0027 % {\u0027desc\u0027: arg_info[\u0027description\u0027]}"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a8ffd7b_f01eb55d","line":382,"updated":"2015-11-30 04:34:49.000000000","message":"what if \u0027required\u0027 equal to any string, do we validate the input of clean step somewhere?","commit_id":"c8e944025d91700bac3c2b383aa1f09bcd696144"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"a62c43bd676eb129d0f6cf5e4d62b3bc53fa60c4","unresolved":false,"context_lines":[{"line_number":379,"context_line":"        # Check that all required arguments were specified by the user"},{"line_number":380,"context_line":"        missing \u003d []"},{"line_number":381,"context_line":"        for (arg_name, arg_info) in argsinfo.items():"},{"line_number":382,"context_line":"            if arg_info.get(\u0027required\u0027, False) and arg_name not in user_args:"},{"line_number":383,"context_line":"                msg \u003d arg_name"},{"line_number":384,"context_line":"                if arg_info.get(\u0027description\u0027):"},{"line_number":385,"context_line":"                    msg +\u003d \u0027 (%(desc)s)\u0027 % {\u0027desc\u0027: arg_info[\u0027description\u0027]}"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a8ffd7b_d4e32e32","line":382,"in_reply_to":"9a8ffd7b_a4421867","updated":"2015-12-01 01:08:57.000000000","message":"https://review.openstack.org/#/c/251602/ validates the arguments in clean_step decorator.","commit_id":"c8e944025d91700bac3c2b383aa1f09bcd696144"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"e2f2d37cbba6485b78f6259114d55f9f00c56dc2","unresolved":false,"context_lines":[{"line_number":379,"context_line":"        # Check that all required arguments were specified by the user"},{"line_number":380,"context_line":"        missing \u003d []"},{"line_number":381,"context_line":"        for (arg_name, arg_info) in argsinfo.items():"},{"line_number":382,"context_line":"            if arg_info.get(\u0027required\u0027, False) and arg_name not in user_args:"},{"line_number":383,"context_line":"                msg \u003d arg_name"},{"line_number":384,"context_line":"                if arg_info.get(\u0027description\u0027):"},{"line_number":385,"context_line":"                    msg +\u003d \u0027 (%(desc)s)\u0027 % {\u0027desc\u0027: arg_info[\u0027description\u0027]}"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a8ffd7b_5ba5e201","line":382,"in_reply_to":"9a8ffd7b_d4e32e32","updated":"2015-12-02 02:59:15.000000000","message":"Great.","commit_id":"c8e944025d91700bac3c2b383aa1f09bcd696144"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"76b9f700aca28714b147b9ea9e478d0ee2ffb277","unresolved":false,"context_lines":[{"line_number":379,"context_line":"        # Check that all required arguments were specified by the user"},{"line_number":380,"context_line":"        missing \u003d []"},{"line_number":381,"context_line":"        for (arg_name, arg_info) in argsinfo.items():"},{"line_number":382,"context_line":"            if arg_info.get(\u0027required\u0027, False) and arg_name not in user_args:"},{"line_number":383,"context_line":"                msg \u003d arg_name"},{"line_number":384,"context_line":"                if arg_info.get(\u0027description\u0027):"},{"line_number":385,"context_line":"                    msg +\u003d \u0027 (%(desc)s)\u0027 % {\u0027desc\u0027: arg_info[\u0027description\u0027]}"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a8ffd7b_a4421867","line":382,"in_reply_to":"9a8ffd7b_f01eb55d","updated":"2015-11-30 14:57:36.000000000","message":"Good question. No, there is no validation of any of the args to the clean_step decorator. That is on my list of things to-do still for this feature. So when the validation occurs, required will be a Boolean. As far as this patch is concerned, we can assume that it is Boolean.","commit_id":"c8e944025d91700bac3c2b383aa1f09bcd696144"}],"ironic/tests/unit/conductor/test_manager.py":[{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"84e6a80f705d19ccffe4df25e9b6f0c46ad64853","unresolved":false,"context_lines":[{"line_number":2396,"context_line":"            self.assertEqual({}, node.clean_step)"},{"line_number":2397,"context_line":""},{"line_number":2398,"context_line":"    @mock.patch(\u0027ironic.conductor.manager._validate_user_clean_steps\u0027)"},{"line_number":2399,"context_line":"    def test_set_node_cleaning_steps_manual(self, mock_steps):"},{"line_number":2400,"context_line":"        mock_steps.return_value \u003d self.clean_steps"},{"line_number":2401,"context_line":""},{"line_number":2402,"context_line":"        node \u003d obj_utils.create_test_node("}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_f8f17396","line":2399,"updated":"2015-11-22 11:05:05.000000000","message":"nit: could have better name instead of mock_steps","commit_id":"d8c992fdea6ccfeba1c059eea2a1f3e5182426de"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"97af02ce42370a994dac7c9d699b6b0d11bdeaff","unresolved":false,"context_lines":[{"line_number":2396,"context_line":"            self.assertEqual({}, node.clean_step)"},{"line_number":2397,"context_line":""},{"line_number":2398,"context_line":"    @mock.patch(\u0027ironic.conductor.manager._validate_user_clean_steps\u0027)"},{"line_number":2399,"context_line":"    def test_set_node_cleaning_steps_manual(self, mock_steps):"},{"line_number":2400,"context_line":"        mock_steps.return_value \u003d self.clean_steps"},{"line_number":2401,"context_line":""},{"line_number":2402,"context_line":"        node \u003d obj_utils.create_test_node("}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_e45c4d7f","line":2399,"in_reply_to":"ba8a016a_f8f17396","updated":"2015-11-23 15:09:50.000000000","message":"Whoops. I meant to mock both methods, _get_cleaning_steps() and _validate_user_clean_steps(). Thx for noticing that something was odd!","commit_id":"d8c992fdea6ccfeba1c059eea2a1f3e5182426de"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"84e6a80f705d19ccffe4df25e9b6f0c46ad64853","unresolved":false,"context_lines":[{"line_number":2397,"context_line":""},{"line_number":2398,"context_line":"    @mock.patch(\u0027ironic.conductor.manager._validate_user_clean_steps\u0027)"},{"line_number":2399,"context_line":"    def test_set_node_cleaning_steps_manual(self, mock_steps):"},{"line_number":2400,"context_line":"        mock_steps.return_value \u003d self.clean_steps"},{"line_number":2401,"context_line":""},{"line_number":2402,"context_line":"        node \u003d obj_utils.create_test_node("},{"line_number":2403,"context_line":"            self.context, driver\u003d\u0027fake\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_d8e10fd2","line":2400,"updated":"2015-11-22 11:05:05.000000000","message":"_validate_user_clean_steps does not return anything.","commit_id":"d8c992fdea6ccfeba1c059eea2a1f3e5182426de"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"84e6a80f705d19ccffe4df25e9b6f0c46ad64853","unresolved":false,"context_lines":[{"line_number":2413,"context_line":"            node.refresh()"},{"line_number":2414,"context_line":"            self.assertEqual([],"},{"line_number":2415,"context_line":"                             task.node.driver_internal_info[\u0027clean_steps\u0027])"},{"line_number":2416,"context_line":"            self.assertEqual({}, node.clean_step)"},{"line_number":2417,"context_line":""},{"line_number":2418,"context_line":"    def test__get_node_next_clean_steps(self):"},{"line_number":2419,"context_line":"        driver_internal_info \u003d {\u0027clean_steps\u0027: self.clean_steps}"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_58f51f81","line":2416,"updated":"2015-11-22 11:05:05.000000000","message":"add assert _validate_user_clean_steps being called.","commit_id":"d8c992fdea6ccfeba1c059eea2a1f3e5182426de"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"7eba578a7fe90571672b68b6b228687380f0a256","unresolved":false,"context_lines":[{"line_number":2020,"context_line":"    @mock.patch(\u0027ironic.conductor.manager.set_node_cleaning_steps\u0027)"},{"line_number":2021,"context_line":"    def __do_node_clean_steps_fail(self, mock_steps, manual\u003dFalse):"},{"line_number":2022,"context_line":"        self.config(clean_nodes\u003dTrue, group\u003d\u0027conductor\u0027)"},{"line_number":2023,"context_line":"        mock_steps.side_effect \u003d exception.InvalidParameterValue(\u0027invalid\u0027)"},{"line_number":2024,"context_line":"        tgt_prov_state \u003d states.MANAGEABLE if manual else states.AVAILABLE"},{"line_number":2025,"context_line":"        node \u003d obj_utils.create_test_node("},{"line_number":2026,"context_line":"            self.context, driver\u003d\u0027fake\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_999c046b","line":2023,"updated":"2015-11-24 18:33:25.000000000","message":"Should there be a test with NodeCleaningFailure side_effect too?","commit_id":"16bd109ed0d3afb2d69581c476d9a27c9be3bac8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"429c51c4aea42e186b9bd933833edbe0cf0cbc54","unresolved":false,"context_lines":[{"line_number":2020,"context_line":"    @mock.patch(\u0027ironic.conductor.manager.set_node_cleaning_steps\u0027)"},{"line_number":2021,"context_line":"    def __do_node_clean_steps_fail(self, mock_steps, manual\u003dFalse):"},{"line_number":2022,"context_line":"        self.config(clean_nodes\u003dTrue, group\u003d\u0027conductor\u0027)"},{"line_number":2023,"context_line":"        mock_steps.side_effect \u003d exception.InvalidParameterValue(\u0027invalid\u0027)"},{"line_number":2024,"context_line":"        tgt_prov_state \u003d states.MANAGEABLE if manual else states.AVAILABLE"},{"line_number":2025,"context_line":"        node \u003d obj_utils.create_test_node("},{"line_number":2026,"context_line":"            self.context, driver\u003d\u0027fake\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_dfe4a73c","line":2023,"in_reply_to":"9a8ffd7b_999c046b","updated":"2015-11-24 21:27:53.000000000","message":"I don\u0027t think so. That seems a bit excessive. ... But since you seem to want it, I\u0027ll put it in.","commit_id":"16bd109ed0d3afb2d69581c476d9a27c9be3bac8"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"7eba578a7fe90571672b68b6b228687380f0a256","unresolved":false,"context_lines":[{"line_number":2514,"context_line":"                      {\u0027step\u0027: \u0027build_raid\u0027, \u0027interface\u0027: \u0027deploy\u0027}]"},{"line_number":2515,"context_line":""},{"line_number":2516,"context_line":"        with task_manager.acquire(self.context, node.uuid) as task:"},{"line_number":2517,"context_line":"            self.assertRaisesRegexp(exception.InvalidParameterValue,"},{"line_number":2518,"context_line":"                                    \"build_raid.*missing.*arg1\","},{"line_number":2519,"context_line":"                                    manager._validate_user_clean_steps,"},{"line_number":2520,"context_line":"                                    task, user_steps)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_f98190fc","line":2517,"updated":"2015-11-24 18:33:25.000000000","message":"ditto about NodeCleaningFailure","commit_id":"16bd109ed0d3afb2d69581c476d9a27c9be3bac8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"429c51c4aea42e186b9bd933833edbe0cf0cbc54","unresolved":false,"context_lines":[{"line_number":2514,"context_line":"                      {\u0027step\u0027: \u0027build_raid\u0027, \u0027interface\u0027: \u0027deploy\u0027}]"},{"line_number":2515,"context_line":""},{"line_number":2516,"context_line":"        with task_manager.acquire(self.context, node.uuid) as task:"},{"line_number":2517,"context_line":"            self.assertRaisesRegexp(exception.InvalidParameterValue,"},{"line_number":2518,"context_line":"                                    \"build_raid.*missing.*arg1\","},{"line_number":2519,"context_line":"                                    manager._validate_user_clean_steps,"},{"line_number":2520,"context_line":"                                    task, user_steps)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_f402f23d","line":2517,"in_reply_to":"9a8ffd7b_f98190fc","updated":"2015-11-24 21:27:53.000000000","message":"ditto :)","commit_id":"16bd109ed0d3afb2d69581c476d9a27c9be3bac8"}]}
