)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"2103c28beb93673ad88c0698d4c6e65739f4a8cd","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Lucas Alvares Gomes \u003clucasagomes@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-05-28 16:55:51 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Remove conditional that prevent node delete based on power state"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch removes a conditional that was preventing a node from being"},{"line_number":10,"context_line":"deleted (from the DB) based on its power state. We should not care about"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5afe65bd_0b90c1eb","line":7,"updated":"2015-06-01 16:42:19.000000000","message":"This is a bit misleading. I thought it was only removing the conditional.\n\nMaybe something like \u0027node delete based on provision, not power, state\u0027 (is that \u003c 50 chars?)","commit_id":"6255994ee2c6b1b873bd9a3c856196a968560eb0"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"3e65c079cd5282fb5b92f0cb0511234a9f60f9b9","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Lucas Alvares Gomes \u003clucasagomes@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-05-28 16:55:51 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Remove conditional that prevent node delete based on power state"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch removes a conditional that was preventing a node from being"},{"line_number":10,"context_line":"deleted (from the DB) based on its power state. We should not care about"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5afe65bd_035c064a","line":7,"in_reply_to":"5afe65bd_0b90c1eb","updated":"2015-06-02 13:22:52.000000000","message":"Done","commit_id":"6255994ee2c6b1b873bd9a3c856196a968560eb0"},{"author":{"_account_id":13997,"name":"SHIGEMATSU Mitsuhiro","email":"shigematsu.mitsuhiro@lab.ntt.co.jp","username":"pshige"},"change_message_id":"ee7fe950ffc694b2bf7473d1e742418a469cf270","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch removes a conditional that was preventing a node from being"},{"line_number":10,"context_line":"deleted (from the DB) based on its power state. We should not care about"},{"line_number":11,"context_line":"what power state the node currently is before deleting it but instead we"},{"line_number":12,"context_line":"should care about deleting a node depending on it\u0027s provision state. Say"},{"line_number":13,"context_line":"a node is active or cleaning or zapping, etc... We don\u0027t want to delete"},{"line_number":14,"context_line":"the node on those states because there are some actions being made at"},{"line_number":15,"context_line":"those states."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7a016987_c5c1b1e5","line":12,"updated":"2015-05-31 12:59:33.000000000","message":"s/it\u0027s/its/","commit_id":"6255994ee2c6b1b873bd9a3c856196a968560eb0"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"3e65c079cd5282fb5b92f0cb0511234a9f60f9b9","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch removes a conditional that was preventing a node from being"},{"line_number":10,"context_line":"deleted (from the DB) based on its power state. We should not care about"},{"line_number":11,"context_line":"what power state the node currently is before deleting it but instead we"},{"line_number":12,"context_line":"should care about deleting a node depending on it\u0027s provision state. Say"},{"line_number":13,"context_line":"a node is active or cleaning or zapping, etc... We don\u0027t want to delete"},{"line_number":14,"context_line":"the node on those states because there are some actions being made at"},{"line_number":15,"context_line":"those states."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5afe65bd_c355ce1d","line":12,"in_reply_to":"7a016987_c5c1b1e5","updated":"2015-06-02 13:22:52.000000000","message":"Done","commit_id":"6255994ee2c6b1b873bd9a3c856196a968560eb0"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"2103c28beb93673ad88c0698d4c6e65739f4a8cd","unresolved":false,"context_lines":[{"line_number":13,"context_line":"a node is active or cleaning or zapping, etc... We don\u0027t want to delete"},{"line_number":14,"context_line":"the node on those states because there are some actions being made at"},{"line_number":15,"context_line":"those states."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I9778898477c8129e1e98be066695bd96f8f660b8"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5afe65bd_ab0e4de3","line":16,"updated":"2015-06-01 16:42:19.000000000","message":"Lucas, I really think this needs a bug opened to track it.","commit_id":"6255994ee2c6b1b873bd9a3c856196a968560eb0"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"3e65c079cd5282fb5b92f0cb0511234a9f60f9b9","unresolved":false,"context_lines":[{"line_number":13,"context_line":"a node is active or cleaning or zapping, etc... We don\u0027t want to delete"},{"line_number":14,"context_line":"the node on those states because there are some actions being made at"},{"line_number":15,"context_line":"those states."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I9778898477c8129e1e98be066695bd96f8f660b8"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5afe65bd_a331b20d","line":16,"in_reply_to":"5afe65bd_ab0e4de3","updated":"2015-06-02 13:22:52.000000000","message":"Done","commit_id":"6255994ee2c6b1b873bd9a3c856196a968560eb0"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b2c2d58f9a66d1468703df2316fdd62b5a2cf217","unresolved":false,"context_lines":[{"line_number":12,"context_line":"should care about deleting a node depending on its provision state. Say"},{"line_number":13,"context_line":"a node is active or cleaning or zapping, etc... We don\u0027t want to delete"},{"line_number":14,"context_line":"the node on those states because there are some actions being made at"},{"line_number":15,"context_line":"those states."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Closes-Bug: #1461115"},{"line_number":18,"context_line":"Change-Id: I9778898477c8129e1e98be066695bd96f8f660b8"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"5afe65bd_d71222b4","line":15,"updated":"2015-06-02 15:56:11.000000000","message":"If you do another change, I think it might be useful to be explicit here and say that this only allows deletes if the node is in AVAILABLE, NOSTATE, or MANAGEABLE state.","commit_id":"cbe06313accb746c31f3092a4dd76cf61f5b0536"}],"ironic/common/exception.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ec1fb9034b03f7439e10a3fc4eea55d7969de169","unresolved":false,"context_lines":[{"line_number":582,"context_line":"class NodeInWrongProvisionState(BadRequest):"},{"line_number":583,"context_line":"    message \u003d _(\u0027We can not \"%(action)s\" the node \"%(node)s\" while it \u0027"},{"line_number":584,"context_line":"                \u0027is in provision state \"%(state)s\". Valid provision states \u0027"},{"line_number":585,"context_line":"                \u0027to perform \"%(action)s\" are: \"%(valid_states)s\"\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_fbe7fe0f","line":585,"updated":"2015-05-28 14:35:31.000000000","message":"maybe reuse InvalidStateRequested?","commit_id":"f0dbdb6f08894a63c977ccab64dd4b4435374a8d"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9af1ff87954318137218bf825dbedb79b46aea23","unresolved":false,"context_lines":[{"line_number":582,"context_line":"class NodeInWrongProvisionState(BadRequest):"},{"line_number":583,"context_line":"    message \u003d _(\u0027We can not \"%(action)s\" the node \"%(node)s\" while it \u0027"},{"line_number":584,"context_line":"                \u0027is in provision state \"%(state)s\". Valid provision states \u0027"},{"line_number":585,"context_line":"                \u0027to perform \"%(action)s\" are: \"%(valid_states)s\"\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_562ca498","line":585,"in_reply_to":"7a016987_fbe7fe0f","updated":"2015-05-28 15:49:48.000000000","message":"+1 sounds good","commit_id":"f0dbdb6f08894a63c977ccab64dd4b4435374a8d"}],"ironic/conductor/manager.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ec1fb9034b03f7439e10a3fc4eea55d7969de169","unresolved":false,"context_lines":[{"line_number":1290,"context_line":"            # TODO(lucasagomes): We should add ENROLLED once it\u0027s part of our"},{"line_number":1291,"context_line":"            #                    state machine"},{"line_number":1292,"context_line":"            valid_states \u003d (states.AVAILABLE, states.NOSTATE,"},{"line_number":1293,"context_line":"                            states.MANAGEABLE)"},{"line_number":1294,"context_line":"            if node.provision_state not in valid_states:"},{"line_number":1295,"context_line":"                raise exception.NodeInWrongProvisionState("},{"line_number":1296,"context_line":"                    node\u003dnode.uuid, action\u003d_(\"delete\"),"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_dbe20201","line":1293,"updated":"2015-05-28 14:35:31.000000000","message":"I wonder if we need to add various FAILED states here, so that we don\u0027t lock a user in them","commit_id":"f0dbdb6f08894a63c977ccab64dd4b4435374a8d"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"5527eea83f30b2e496485c970629d5c7689ca294","unresolved":false,"context_lines":[{"line_number":1290,"context_line":"            # TODO(lucasagomes): We should add ENROLLED once it\u0027s part of our"},{"line_number":1291,"context_line":"            #                    state machine"},{"line_number":1292,"context_line":"            valid_states \u003d (states.AVAILABLE, states.NOSTATE,"},{"line_number":1293,"context_line":"                            states.MANAGEABLE)"},{"line_number":1294,"context_line":"            if node.provision_state not in valid_states:"},{"line_number":1295,"context_line":"                raise exception.NodeInWrongProvisionState("},{"line_number":1296,"context_line":"                    node\u003dnode.uuid, action\u003d_(\"delete\"),"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_44c97158","line":1293,"in_reply_to":"7a016987_d1778139","updated":"2015-05-29 07:44:14.000000000","message":"\u003e we need to add various FAILED states ...\n\n-1 because for example in DEPLOYFAIL conductor\u0027s filesystem may be in \"dirty\" state (some unneeded files should be deleted), user must do tear down.","commit_id":"f0dbdb6f08894a63c977ccab64dd4b4435374a8d"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9af1ff87954318137218bf825dbedb79b46aea23","unresolved":false,"context_lines":[{"line_number":1290,"context_line":"            # TODO(lucasagomes): We should add ENROLLED once it\u0027s part of our"},{"line_number":1291,"context_line":"            #                    state machine"},{"line_number":1292,"context_line":"            valid_states \u003d (states.AVAILABLE, states.NOSTATE,"},{"line_number":1293,"context_line":"                            states.MANAGEABLE)"},{"line_number":1294,"context_line":"            if node.provision_state not in valid_states:"},{"line_number":1295,"context_line":"                raise exception.NodeInWrongProvisionState("},{"line_number":1296,"context_line":"                    node\u003dnode.uuid, action\u003d_(\"delete\"),"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_2c3b1aed","line":1293,"in_reply_to":"7a016987_d1778139","updated":"2015-05-28 15:49:48.000000000","message":"So I thought about it for awhile, there are ways of getting out of *FAIL states already.\n\nCLEANFAIL -\u003e MANAGEABLE - https://github.com/openstack/ironic/blob/master/ironic/common/states.py#L266-L268\n\nINSPECTIONFAIL -\u003e MANAGEABLE - https://github.com/openstack/ironic/blob/master/ironic/common/states.py#L293-L295\n\nDEPLOYFAIL -\u003e DELETING - https://github.com/openstack/ironic/blob/master/ironic/common/states.py#L250-L252\n\nAnd in the future we probably are going to have ZAPFAIL -\u003e MANAGEABLE. So I don\u0027t think the user will actually get stuck on *FAIL states. By following the state machine they will have a better way to put a node in a whacky state to a known state before deleting it.\n\nWDYT?","commit_id":"f0dbdb6f08894a63c977ccab64dd4b4435374a8d"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"ac0c18a36ded4a3947284909536e91c56063eb25","unresolved":false,"context_lines":[{"line_number":1290,"context_line":"            # TODO(lucasagomes): We should add ENROLLED once it\u0027s part of our"},{"line_number":1291,"context_line":"            #                    state machine"},{"line_number":1292,"context_line":"            valid_states \u003d (states.AVAILABLE, states.NOSTATE,"},{"line_number":1293,"context_line":"                            states.MANAGEABLE)"},{"line_number":1294,"context_line":"            if node.provision_state not in valid_states:"},{"line_number":1295,"context_line":"                raise exception.NodeInWrongProvisionState("},{"line_number":1296,"context_line":"                    node\u003dnode.uuid, action\u003d_(\"delete\"),"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_d1778139","line":1293,"in_reply_to":"7a016987_dbe20201","updated":"2015-05-28 15:15:14.000000000","message":"+1","commit_id":"f0dbdb6f08894a63c977ccab64dd4b4435374a8d"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"4464c8229fa524fa6ec1b1723ae222e916ee6d4e","unresolved":false,"context_lines":[{"line_number":1289,"context_line":""},{"line_number":1290,"context_line":"            # TODO(lucasagomes): We should add ENROLLED once it\u0027s part of our"},{"line_number":1291,"context_line":"            #                    state machine"},{"line_number":1292,"context_line":"            valid_states \u003d (states.AVAILABLE, states.NOSTATE,"},{"line_number":1293,"context_line":"                            states.MANAGEABLE)"},{"line_number":1294,"context_line":"            if node.provision_state not in valid_states:"},{"line_number":1295,"context_line":"                msg \u003d (_(\u0027Can not delete node \"%(node)s\" while it  is in \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_194854b2","line":1292,"updated":"2015-06-01 02:08:17.000000000","message":"If the reasoning is to prevent deletion of the nodes that are being acted upon right now OR given to someone, should we add some of the *FAIL states here as well - DEPLOYFAIL, CLEANFAIL, INSPECTFAIL ?","commit_id":"6255994ee2c6b1b873bd9a3c856196a968560eb0"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b960a2c05d269c0405714d1e287a77e5c3ce371a","unresolved":false,"context_lines":[{"line_number":1289,"context_line":""},{"line_number":1290,"context_line":"            # TODO(lucasagomes): We should add ENROLLED once it\u0027s part of our"},{"line_number":1291,"context_line":"            #                    state machine"},{"line_number":1292,"context_line":"            valid_states \u003d (states.AVAILABLE, states.NOSTATE,"},{"line_number":1293,"context_line":"                            states.MANAGEABLE)"},{"line_number":1294,"context_line":"            if node.provision_state not in valid_states:"},{"line_number":1295,"context_line":"                msg \u003d (_(\u0027Can not delete node \"%(node)s\" while it  is in \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"5afe65bd_8baa486f","line":1292,"in_reply_to":"5afe65bd_3e81594b","updated":"2015-06-02 14:37:04.000000000","message":"Sorry, I thought I had looked at previous comments but missed that. Fair enough. Will see if users ask about deleting while in a *FAIL state (cuz we\u0027re making them do an extra request before invoking delete).\n\nIt would be nice to add comments about such stuff to the code, so others don\u0027t ask the same question later :-) At least one can go through the patches and look at the comments here.","commit_id":"6255994ee2c6b1b873bd9a3c856196a968560eb0"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"f726c50dfe93ec640bd2ee19a1d6431708afe49d","unresolved":false,"context_lines":[{"line_number":1289,"context_line":""},{"line_number":1290,"context_line":"            # TODO(lucasagomes): We should add ENROLLED once it\u0027s part of our"},{"line_number":1291,"context_line":"            #                    state machine"},{"line_number":1292,"context_line":"            valid_states \u003d (states.AVAILABLE, states.NOSTATE,"},{"line_number":1293,"context_line":"                            states.MANAGEABLE)"},{"line_number":1294,"context_line":"            if node.provision_state not in valid_states:"},{"line_number":1295,"context_line":"                msg \u003d (_(\u0027Can not delete node \"%(node)s\" while it  is in \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"5afe65bd_26814b4b","line":1292,"in_reply_to":"5afe65bd_8baa486f","updated":"2015-06-02 14:44:47.000000000","message":"Oh no worries, nothing to be sorry about.\n\n+1 for the comment, I will put one if I need to submit another patch-set for this change.\n\nAbout doing a extra step, it\u0027s important. Cause say we are at ZAPPING updating firmware, someone deletes the node and re-add it and power it off. It can be dangerous, although it\u0027s unlikely, we could potentially mess up things by deleting it in the wrong states.","commit_id":"6255994ee2c6b1b873bd9a3c856196a968560eb0"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"3e65c079cd5282fb5b92f0cb0511234a9f60f9b9","unresolved":false,"context_lines":[{"line_number":1289,"context_line":""},{"line_number":1290,"context_line":"            # TODO(lucasagomes): We should add ENROLLED once it\u0027s part of our"},{"line_number":1291,"context_line":"            #                    state machine"},{"line_number":1292,"context_line":"            valid_states \u003d (states.AVAILABLE, states.NOSTATE,"},{"line_number":1293,"context_line":"                            states.MANAGEABLE)"},{"line_number":1294,"context_line":"            if node.provision_state not in valid_states:"},{"line_number":1295,"context_line":"                msg \u003d (_(\u0027Can not delete node \"%(node)s\" while it  is in \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"5afe65bd_3e81594b","line":1292,"in_reply_to":"5afe65bd_ab0bed7c","updated":"2015-06-02 13:22:52.000000000","message":"This was discussed in the previous patch-set. For *FAIL states we have a clear way of getting out of them:\n\nCLEANFAIL -\u003e MANAGEABLE - https://github.com/openstack/ironic/blob/master/ironic/common/states.py#L266-L268\n\nINSPECTIONFAIL -\u003e MANAGEABLE - https://github.com/openstack/ironic/blob/master/ironic/common/states.py#L293-L295\n\nDEPLOYFAIL -\u003e DELETING - https://github.com/openstack/ironic/blob/master/ironic/common/states.py#L250-L252\n\nAnd in the future we probably are going to have ZAPFAIL -\u003e MANAGEABLE. \n\nDeleting when its DEPLOYFAIL for example can even cause data from the tenant to remain on the disk, I think it\u0027s desirable that the user goes to tear down prior to delete a machine in a whacky state.\n\n-----\n\nmaintenance is not a state in the state machine it\u0027s just a flag, so I don\u0027t want to rely on that to determine whether a machine is in a reasonable state to be deleted","commit_id":"6255994ee2c6b1b873bd9a3c856196a968560eb0"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"2103c28beb93673ad88c0698d4c6e65739f4a8cd","unresolved":false,"context_lines":[{"line_number":1289,"context_line":""},{"line_number":1290,"context_line":"            # TODO(lucasagomes): We should add ENROLLED once it\u0027s part of our"},{"line_number":1291,"context_line":"            #                    state machine"},{"line_number":1292,"context_line":"            valid_states \u003d (states.AVAILABLE, states.NOSTATE,"},{"line_number":1293,"context_line":"                            states.MANAGEABLE)"},{"line_number":1294,"context_line":"            if node.provision_state not in valid_states:"},{"line_number":1295,"context_line":"                msg \u003d (_(\u0027Can not delete node \"%(node)s\" while it  is in \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"5afe65bd_ab0bed7c","line":1292,"in_reply_to":"7a016987_194854b2","updated":"2015-06-01 16:42:19.000000000","message":"+1 for the FAILs too\n\nIf the node is in maintenance, not in any of the above states, would it be OK to delete?","commit_id":"6255994ee2c6b1b873bd9a3c856196a968560eb0"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"cd3b0daf7f24a16dd3503cd0b5982d857e57da4b","unresolved":false,"context_lines":[{"line_number":1292,"context_line":"            valid_states \u003d (states.AVAILABLE, states.NOSTATE,"},{"line_number":1293,"context_line":"                            states.MANAGEABLE)"},{"line_number":1294,"context_line":"            if node.provision_state not in valid_states:"},{"line_number":1295,"context_line":"                msg \u003d (_(\u0027Can not delete node \"%(node)s\" while it  is in \u0027"},{"line_number":1296,"context_line":"                         \u0027provision state \"%(state)s\". Valid provision states \u0027"},{"line_number":1297,"context_line":"                         \u0027to perform deletion are: \"%(valid_states)s\"\u0027) %"},{"line_number":1298,"context_line":"                       {\u0027node\u0027: node.uuid, \u0027state\u0027: node.provision_state,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_a4b38599","line":1295,"updated":"2015-05-29 07:57:17.000000000","message":"nit: extra space","commit_id":"6255994ee2c6b1b873bd9a3c856196a968560eb0"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"3e65c079cd5282fb5b92f0cb0511234a9f60f9b9","unresolved":false,"context_lines":[{"line_number":1292,"context_line":"            valid_states \u003d (states.AVAILABLE, states.NOSTATE,"},{"line_number":1293,"context_line":"                            states.MANAGEABLE)"},{"line_number":1294,"context_line":"            if node.provision_state not in valid_states:"},{"line_number":1295,"context_line":"                msg \u003d (_(\u0027Can not delete node \"%(node)s\" while it  is in \u0027"},{"line_number":1296,"context_line":"                         \u0027provision state \"%(state)s\". Valid provision states \u0027"},{"line_number":1297,"context_line":"                         \u0027to perform deletion are: \"%(valid_states)s\"\u0027) %"},{"line_number":1298,"context_line":"                       {\u0027node\u0027: node.uuid, \u0027state\u0027: node.provision_state,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5afe65bd_9e2ccd4b","line":1295,"in_reply_to":"7a016987_a4b38599","updated":"2015-06-02 13:22:52.000000000","message":"Done","commit_id":"6255994ee2c6b1b873bd9a3c856196a968560eb0"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"cd3b0daf7f24a16dd3503cd0b5982d857e57da4b","unresolved":false,"context_lines":[{"line_number":1297,"context_line":"                         \u0027to perform deletion are: \"%(valid_states)s\"\u0027) %"},{"line_number":1298,"context_line":"                       {\u0027node\u0027: node.uuid, \u0027state\u0027: node.provision_state,"},{"line_number":1299,"context_line":"                        \u0027valid_states\u0027: valid_states})"},{"line_number":1300,"context_line":"                raise exception.InvalidStateRequested(msg)"},{"line_number":1301,"context_line":"            if node.console_enabled:"},{"line_number":1302,"context_line":"                try:"},{"line_number":1303,"context_line":"                    task.driver.console.stop_console(task)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_a46a65eb","line":1300,"updated":"2015-05-29 07:57:17.000000000","message":"Is a custom message really needed?","commit_id":"6255994ee2c6b1b873bd9a3c856196a968560eb0"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"c5134f2ed55bffe964355ef4d83071426bcd22e9","unresolved":false,"context_lines":[{"line_number":1297,"context_line":"                         \u0027to perform deletion are: \"%(valid_states)s\"\u0027) %"},{"line_number":1298,"context_line":"                       {\u0027node\u0027: node.uuid, \u0027state\u0027: node.provision_state,"},{"line_number":1299,"context_line":"                        \u0027valid_states\u0027: valid_states})"},{"line_number":1300,"context_line":"                raise exception.InvalidStateRequested(msg)"},{"line_number":1301,"context_line":"            if node.console_enabled:"},{"line_number":1302,"context_line":"                try:"},{"line_number":1303,"context_line":"                    task.driver.console.stop_console(task)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_15c28534","line":1300,"in_reply_to":"7a016987_a46a65eb","updated":"2015-05-29 09:27:58.000000000","message":"I added a custom message because since it\u0027s an sync method I wanted to tell the user what are the states allowed in the same error message for him/her do the deletion. I think it just makes it more user friendly.","commit_id":"6255994ee2c6b1b873bd9a3c856196a968560eb0"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ac1a9fe4b104a00436d083f90de02167793e5471","unresolved":false,"context_lines":[{"line_number":1268,"context_line":"        :raises: NodeAssociated if the node contains an instance"},{"line_number":1269,"context_line":"            associated with it."},{"line_number":1270,"context_line":"        :raises: InvalidStateRequested if the node is in the wrong"},{"line_number":1271,"context_line":"            provision state to perform deletion."},{"line_number":1272,"context_line":""},{"line_number":1273,"context_line":"        \"\"\""},{"line_number":1274,"context_line":"        with task_manager.acquire(context, node_id) as task:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5afe65bd_66cce335","line":1271,"updated":"2015-06-02 14:52:00.000000000","message":"I was looking at the exceptions. It looks like this causes an HTTP 400, whereas the original caused an HTTP 409.\n\nAlso, the user is trying to delete a node, and didn\u0027t specify the state. (It may just be the naming of the exception, but no state was requested). Should we just raise InvalidState?","commit_id":"ade92d398764d139a6a2a2439fa71b91f883c0bc"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c8d20d88dc8b4009c8bbccb2aa5e0192c348276f","unresolved":false,"context_lines":[{"line_number":1268,"context_line":"        :raises: NodeAssociated if the node contains an instance"},{"line_number":1269,"context_line":"            associated with it."},{"line_number":1270,"context_line":"        :raises: InvalidStateRequested if the node is in the wrong"},{"line_number":1271,"context_line":"            provision state to perform deletion."},{"line_number":1272,"context_line":""},{"line_number":1273,"context_line":"        \"\"\""},{"line_number":1274,"context_line":"        with task_manager.acquire(context, node_id) as task:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5afe65bd_b7bb26c4","line":1271,"in_reply_to":"5afe65bd_66cce335","updated":"2015-06-02 15:53:52.000000000","message":"Lucas and I discussed this on IRC, and although it makes more sense to have it return HTTP 400, we\u0027d be changing the API, so are deferring that change to later. This bug [1] tracks that work.\n\n[1] https://bugs.launchpad.net/ironic/+bug/1461140","commit_id":"ade92d398764d139a6a2a2439fa71b91f883c0bc"}],"ironic/tests/conductor/test_manager.py":[{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"a5cb976beff786e8decacce4b2754a0412db8c2f","unresolved":false,"context_lines":[{"line_number":2266,"context_line":"        node.refresh()"},{"line_number":2267,"context_line":"        self.assertIsNone(node.reservation)"},{"line_number":2268,"context_line":""},{"line_number":2269,"context_line":"    def test_destroy_node_invalid_provision_state(self):"},{"line_number":2270,"context_line":"        self._start_service()"},{"line_number":2271,"context_line":"        node \u003d obj_utils.create_test_node(self.context,"},{"line_number":2272,"context_line":"                                          provision_state\u003dstates.ACTIVE)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_18fbb548","line":2269,"updated":"2015-05-31 04:32:02.000000000","message":"Better to add a testcase wherein the node in valid state (available, manageable) gets deleted successfully.","commit_id":"6255994ee2c6b1b873bd9a3c856196a968560eb0"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"3e65c079cd5282fb5b92f0cb0511234a9f60f9b9","unresolved":false,"context_lines":[{"line_number":2266,"context_line":"        node.refresh()"},{"line_number":2267,"context_line":"        self.assertIsNone(node.reservation)"},{"line_number":2268,"context_line":""},{"line_number":2269,"context_line":"    def test_destroy_node_invalid_provision_state(self):"},{"line_number":2270,"context_line":"        self._start_service()"},{"line_number":2271,"context_line":"        node \u003d obj_utils.create_test_node(self.context,"},{"line_number":2272,"context_line":"                                          provision_state\u003dstates.ACTIVE)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5afe65bd_def125cf","line":2269,"in_reply_to":"7a016987_18fbb548","updated":"2015-06-02 13:22:52.000000000","message":"Done","commit_id":"6255994ee2c6b1b873bd9a3c856196a968560eb0"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"a5cb976beff786e8decacce4b2754a0412db8c2f","unresolved":false,"context_lines":[{"line_number":2280,"context_line":"        node.refresh()"},{"line_number":2281,"context_line":"        self.assertIsNone(node.reservation)"},{"line_number":2282,"context_line":""},{"line_number":2283,"context_line":"    def test_destroy_node_power_off(self):"},{"line_number":2284,"context_line":"        self._start_service()"},{"line_number":2285,"context_line":"        node \u003d obj_utils.create_test_node(self.context,"},{"line_number":2286,"context_line":"                                          power_state\u003dstates.POWER_OFF)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_d8975dea","line":2283,"updated":"2015-05-31 04:32:02.000000000","message":"Is this testcase required?","commit_id":"6255994ee2c6b1b873bd9a3c856196a968560eb0"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"3e65c079cd5282fb5b92f0cb0511234a9f60f9b9","unresolved":false,"context_lines":[{"line_number":2280,"context_line":"        node.refresh()"},{"line_number":2281,"context_line":"        self.assertIsNone(node.reservation)"},{"line_number":2282,"context_line":""},{"line_number":2283,"context_line":"    def test_destroy_node_power_off(self):"},{"line_number":2284,"context_line":"        self._start_service()"},{"line_number":2285,"context_line":"        node \u003d obj_utils.create_test_node(self.context,"},{"line_number":2286,"context_line":"                                          power_state\u003dstates.POWER_OFF)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5afe65bd_1ee8dde1","line":2283,"in_reply_to":"7a016987_d8975dea","updated":"2015-06-02 13:22:52.000000000","message":"Yeah perhaps it\u0027s not needed any more. Will delete","commit_id":"6255994ee2c6b1b873bd9a3c856196a968560eb0"},{"author":{"_account_id":14810,"name":"Kan","email":"sofaopenstack@gmail.com","username":"Kan"},"change_message_id":"9d64868c788077b120c4258d29bbdad6b85234a4","unresolved":false,"context_lines":[{"line_number":2281,"context_line":"        node.refresh()"},{"line_number":2282,"context_line":"        self.assertIsNone(node.reservation)"},{"line_number":2283,"context_line":""},{"line_number":2284,"context_line":"    def test_destroy_node_power_off(self):"},{"line_number":2285,"context_line":"        self._start_service()"},{"line_number":2286,"context_line":"        node \u003d obj_utils.create_test_node(self.context,"},{"line_number":2287,"context_line":"                                          power_state\u003dstates.POWER_OFF)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5afe65bd_2c2fcef7","line":2284,"updated":"2015-06-03 05:27:52.000000000","message":"Just a nit: should this test case be removed for there is no check of power state when destroying a node?","commit_id":"cbe06313accb746c31f3092a4dd76cf61f5b0536"}]}
