)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"b702b42f6297d386ae8ebdb452f449ad9f1774fa","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Mario Villaplana \u003cmario.villaplana@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-06-10 17:04:33 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add power state change notifications"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I82702e7f959d666bb02b59d1fc53ab50b519cb74"},{"line_number":10,"context_line":"Fixes-Bug: 1526408"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7aa08908_4348fd8a","line":7,"updated":"2016-06-15 22:25:54.000000000","message":"Please add an explanation about what this does and why it is useful. Basically not a fan of a subject line only git message.","commit_id":"88f52ff22766d1b4dd54b852cb227fe8b0c0f42b"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d6912634c324ba8578fb327d838108aedeae7ab7","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Mario Villaplana \u003cmario.villaplana@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-06-10 17:04:33 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add power state change notifications"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I82702e7f959d666bb02b59d1fc53ab50b519cb74"},{"line_number":10,"context_line":"Fixes-Bug: 1526408"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5a9d85d2_ee3c6931","line":7,"in_reply_to":"7aa08908_4348fd8a","updated":"2016-06-20 19:35:20.000000000","message":"Done; I added a couple potential use cases too. WDYT?","commit_id":"88f52ff22766d1b4dd54b852cb227fe8b0c0f42b"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ef288848479b2885996b1adb3863441e000069dc","unresolved":false,"context_lines":[{"line_number":15,"context_line":"time or automatically responding to anomalous power states."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I82702e7f959d666bb02b59d1fc53ab50b519cb74"},{"line_number":18,"context_line":"Fixes-Bug: 1526408"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":23,"id":"fa7ab95a_95ad3d9d","line":18,"updated":"2016-08-30 13:25:30.000000000","message":"might be \u0027Closes-Bug\u0027 ?\n\n(When this patch is merged, the bug is done, right?)","commit_id":"d444f74e848ae814e45aca356dcc28a78be90059"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"2914b5ebc8939f7bf0ec650494b1266a9ccb58c5","unresolved":false,"context_lines":[{"line_number":15,"context_line":"time or automatically responding to anomalous power states."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I82702e7f959d666bb02b59d1fc53ab50b519cb74"},{"line_number":18,"context_line":"Fixes-Bug: 1526408"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":23,"id":"fa7ab95a_52de55dd","line":18,"in_reply_to":"fa7ab95a_95ad3d9d","updated":"2016-08-30 17:45:29.000000000","message":"Done","commit_id":"d444f74e848ae814e45aca356dcc28a78be90059"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9d63de254cbc6a9d4149e39c8c3eac718e12bcd2","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"These notifications can be consumed by any external service listening to the"},{"line_number":14,"context_line":"message bus to perform functions like tracking node power state changes over"},{"line_number":15,"context_line":"time or automatically responding to anomalous power states."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I82702e7f959d666bb02b59d1fc53ab50b519cb74"},{"line_number":18,"context_line":"Closes-Bug: 1526408"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":25,"id":"fa7ab95a_7e9c660e","line":15,"updated":"2016-09-01 22:20:35.000000000","message":"It would be helpful (for me anyway) if the event type was here. And maybe payload.","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"c7ee6536691a192bb79c51102b54a005d301339f","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"These notifications can be consumed by any external service listening to the"},{"line_number":14,"context_line":"message bus to perform functions like tracking node power state changes over"},{"line_number":15,"context_line":"time or automatically responding to anomalous power states."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I82702e7f959d666bb02b59d1fc53ab50b519cb74"},{"line_number":18,"context_line":"Closes-Bug: 1526408"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":25,"id":"9a89bdaa_9871db0e","line":15,"in_reply_to":"fa7ab95a_7e9c660e","updated":"2016-09-08 17:35:51.000000000","message":"Done.\n\nThe payload would make the commit message somewhat large. It\u0027s in the documentation in patch set 26. I\u0027ll add this here in the next revision if you don\u0027t think it\u0027s too big.","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"930f37ff97887c683fe8b6c8c330c7bae7e6c889","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"* baremetal.node.power_set.{start,end,error}"},{"line_number":19,"context_line":"* baremetal.node.power_state_corrected.success"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: I82702e7f959d666bb02b59d1fc53ab50b519cb74"},{"line_number":22,"context_line":"Closes-Bug: 1526408"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":40,"id":"fa6399be_0bbf09fc","line":20,"updated":"2016-10-11 14:22:20.000000000","message":"nit: this also adds base class for node\u0027s notifications.","commit_id":"c0821c056f759733c87dbd92b508c1e6dad5b4a9"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"bbad87b7c18f4aaa14f616857c0ad123f095a841","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"* baremetal.node.power_set.{start,end,error}"},{"line_number":19,"context_line":"* baremetal.node.power_state_corrected.success"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: I82702e7f959d666bb02b59d1fc53ab50b519cb74"},{"line_number":22,"context_line":"Closes-Bug: 1526408"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":40,"id":"fa6399be_cb2511c3","line":20,"in_reply_to":"fa6399be_0bbf09fc","updated":"2016-10-11 14:41:28.000000000","message":"Done","commit_id":"c0821c056f759733c87dbd92b508c1e6dad5b4a9"}],"doc/source/dev/notifications.rst":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9d63de254cbc6a9d4149e39c8c3eac718e12bcd2","unresolved":false,"context_lines":[{"line_number":181,"context_line":"       \"publisher_id\":\"conductor.cond-hostname01\""},{"line_number":182,"context_line":"    }"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"Existing notifications"},{"line_number":185,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"Descriptions of notifications emitted by ironic will be documented here when"}],"source_content_type":"text/x-rst","patch_set":25,"id":"fa7ab95a_e03b70cf","line":184,"updated":"2016-09-01 22:20:35.000000000","message":"maybe \u0027Ironic notifications\u0027 or \u0027Available notifications\u0027\n\nIf the intent is for the notifications to be used by operators, I think we\u0027ll need two docs; one for developers and one for admin, and this part would be in the admin page. [Maybe that reorg should be done in a separate patch.]","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"e8378effc3ddec99cd490ee09c6cd3e76b86f5c2","unresolved":false,"context_lines":[{"line_number":181,"context_line":"       \"publisher_id\":\"conductor.cond-hostname01\""},{"line_number":182,"context_line":"    }"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"Existing notifications"},{"line_number":185,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"Descriptions of notifications emitted by ironic will be documented here when"}],"source_content_type":"text/x-rst","patch_set":25,"id":"9a89bdaa_55806cf7","line":184,"in_reply_to":"fa7ab95a_94f6585b","updated":"2016-09-06 22:51:50.000000000","message":"I like \"Available notifications\", since that indicates that these won\u0027t necessarily be enabled by default.\n\nI\u0027m fine with reorganizing this in a separate patch. Let me know if you\u0027d like this to be done in this patch set instead.","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"81bf35a11ef548fad097f42c595471dd14e5a1c6","unresolved":false,"context_lines":[{"line_number":181,"context_line":"       \"publisher_id\":\"conductor.cond-hostname01\""},{"line_number":182,"context_line":"    }"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"Existing notifications"},{"line_number":185,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"Descriptions of notifications emitted by ironic will be documented here when"}],"source_content_type":"text/x-rst","patch_set":25,"id":"fa7ab95a_94f6585b","line":184,"in_reply_to":"fa7ab95a_e03b70cf","updated":"2016-09-02 09:11:47.000000000","message":"I do agree with it. I think this new bits should be under doc/source/deploy","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9d63de254cbc6a9d4149e39c8c3eac718e12bcd2","unresolved":false,"context_lines":[{"line_number":185,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"Descriptions of notifications emitted by ironic will be documented here when"},{"line_number":188,"context_line":"they are added. They are listed here by event_type."},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"baremetal.node.power_set"},{"line_number":191,"context_line":"------------------------"}],"source_content_type":"text/x-rst","patch_set":25,"id":"fa7ab95a_c0590c37","line":188,"updated":"2016-09-01 22:20:35.000000000","message":"How about\n\nThe notifications that ironic emits are described here. The are listed (alphabetically) by event_type.","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"e8378effc3ddec99cd490ee09c6cd3e76b86f5c2","unresolved":false,"context_lines":[{"line_number":185,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"Descriptions of notifications emitted by ironic will be documented here when"},{"line_number":188,"context_line":"they are added. They are listed here by event_type."},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"baremetal.node.power_set"},{"line_number":191,"context_line":"------------------------"}],"source_content_type":"text/x-rst","patch_set":25,"id":"9a89bdaa_d5ab9c73","line":188,"in_reply_to":"fa7ab95a_c0590c37","updated":"2016-09-06 22:51:50.000000000","message":"Done","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9d63de254cbc6a9d4149e39c8c3eac718e12bcd2","unresolved":false,"context_lines":[{"line_number":190,"context_line":"baremetal.node.power_set"},{"line_number":191,"context_line":"------------------------"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"* ``baremetal.node.power_set.start`` is emitted by a conductor when it begins a"},{"line_number":194,"context_line":"  power state change task. It has notification level INFO."},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"* ``baremetal.node.power_set.end`` is emitted when the conductor successfully"}],"source_content_type":"text/x-rst","patch_set":25,"id":"fa7ab95a_807aa486","line":193,"updated":"2016-09-01 22:20:35.000000000","message":"s/conductor/the ironic-conductor service/ [I\u0027m preparing for when this goes in the admin guide]","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"e8378effc3ddec99cd490ee09c6cd3e76b86f5c2","unresolved":false,"context_lines":[{"line_number":190,"context_line":"baremetal.node.power_set"},{"line_number":191,"context_line":"------------------------"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"* ``baremetal.node.power_set.start`` is emitted by a conductor when it begins a"},{"line_number":194,"context_line":"  power state change task. It has notification level INFO."},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"* ``baremetal.node.power_set.end`` is emitted when the conductor successfully"}],"source_content_type":"text/x-rst","patch_set":25,"id":"9a89bdaa_35bda8b7","line":193,"in_reply_to":"fa7ab95a_807aa486","updated":"2016-09-06 22:51:50.000000000","message":"Done","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9d63de254cbc6a9d4149e39c8c3eac718e12bcd2","unresolved":false,"context_lines":[{"line_number":191,"context_line":"------------------------"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"* ``baremetal.node.power_set.start`` is emitted by a conductor when it begins a"},{"line_number":194,"context_line":"  power state change task. It has notification level INFO."},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"* ``baremetal.node.power_set.end`` is emitted when the conductor successfully"},{"line_number":197,"context_line":"  completes a power state change task. It has notification level DEBUG if no"}],"source_content_type":"text/x-rst","patch_set":25,"id":"fa7ab95a_60ea0011","line":194,"updated":"2016-09-01 22:20:35.000000000","message":"I\u0027m not sure we should/need to mention \u0027task\u0027; that seems more related to our coding.","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"e8378effc3ddec99cd490ee09c6cd3e76b86f5c2","unresolved":false,"context_lines":[{"line_number":191,"context_line":"------------------------"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"* ``baremetal.node.power_set.start`` is emitted by a conductor when it begins a"},{"line_number":194,"context_line":"  power state change task. It has notification level INFO."},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"* ``baremetal.node.power_set.end`` is emitted when the conductor successfully"},{"line_number":197,"context_line":"  completes a power state change task. It has notification level DEBUG if no"}],"source_content_type":"text/x-rst","patch_set":25,"id":"9a89bdaa_75b3b0e9","line":194,"in_reply_to":"fa7ab95a_60ea0011","updated":"2016-09-06 22:51:50.000000000","message":"Done","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9d63de254cbc6a9d4149e39c8c3eac718e12bcd2","unresolved":false,"context_lines":[{"line_number":202,"context_line":"  change a node\u0027s power state during a power state change task. It has"},{"line_number":203,"context_line":"  notification level ERROR. This can occur when ironic fails to retrieve the"},{"line_number":204,"context_line":"  power state to check if any change is necessary or fails during the call to"},{"line_number":205,"context_line":"  the driver to set the power state."},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"baremetal.node.power_sync"},{"line_number":208,"context_line":"-------------------------"}],"source_content_type":"text/x-rst","patch_set":25,"id":"fa7ab95a_80d6244d","line":205,"updated":"2016-09-01 22:20:35.000000000","message":"not sure how useful that is, \u0027the call to the driver\u0027. the driver code is part of the ironic-conductor service. I guess it is fine for now.","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"e8378effc3ddec99cd490ee09c6cd3e76b86f5c2","unresolved":false,"context_lines":[{"line_number":202,"context_line":"  change a node\u0027s power state during a power state change task. It has"},{"line_number":203,"context_line":"  notification level ERROR. This can occur when ironic fails to retrieve the"},{"line_number":204,"context_line":"  power state to check if any change is necessary or fails during the call to"},{"line_number":205,"context_line":"  the driver to set the power state."},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"baremetal.node.power_sync"},{"line_number":208,"context_line":"-------------------------"}],"source_content_type":"text/x-rst","patch_set":25,"id":"9a89bdaa_55fcec71","line":205,"in_reply_to":"fa7ab95a_80d6244d","updated":"2016-09-06 22:51:50.000000000","message":"Yeah, that\u0027s more internal to how the code works. I was trying to indicate that there are 2 failure scenarios here, one for retrieving the power state before setting it and one for actually setting it. I updated the wording a bit, what do you think?","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9d63de254cbc6a9d4149e39c8c3eac718e12bcd2","unresolved":false,"context_lines":[{"line_number":203,"context_line":"  notification level ERROR. This can occur when ironic fails to retrieve the"},{"line_number":204,"context_line":"  power state to check if any change is necessary or fails during the call to"},{"line_number":205,"context_line":"  the driver to set the power state."},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"baremetal.node.power_sync"},{"line_number":208,"context_line":"-------------------------"},{"line_number":209,"context_line":""}],"source_content_type":"text/x-rst","patch_set":25,"id":"fa7ab95a_20bc7805","line":206,"updated":"2016-09-01 22:20:35.000000000","message":"It would be useful to describe the payload too.","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"e8378effc3ddec99cd490ee09c6cd3e76b86f5c2","unresolved":false,"context_lines":[{"line_number":203,"context_line":"  notification level ERROR. This can occur when ironic fails to retrieve the"},{"line_number":204,"context_line":"  power state to check if any change is necessary or fails during the call to"},{"line_number":205,"context_line":"  the driver to set the power state."},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"baremetal.node.power_sync"},{"line_number":208,"context_line":"-------------------------"},{"line_number":209,"context_line":""}],"source_content_type":"text/x-rst","patch_set":25,"id":"9a89bdaa_1801b905","line":206,"in_reply_to":"fa7ab95a_20bc7805","updated":"2016-09-06 22:51:50.000000000","message":"Done here and below","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9d63de254cbc6a9d4149e39c8c3eac718e12bcd2","unresolved":false,"context_lines":[{"line_number":208,"context_line":"-------------------------"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"* ``baremetal.node.power_sync.success`` is emitted by a conductor when a node\u0027s"},{"line_number":211,"context_line":"  power state was detected as changed during ironic\u0027s periodic power sync. It"},{"line_number":212,"context_line":"  has notification level INFO when ironic previously didn\u0027t have any"},{"line_number":213,"context_line":"  information about the node\u0027s power state and level WARNING if ironic had the"},{"line_number":214,"context_line":"  wrong power state and updated the state in the database."}],"source_content_type":"text/x-rst","patch_set":25,"id":"fa7ab95a_80d9c459","line":211,"updated":"2016-09-01 22:20:35.000000000","message":"by \u0027node\u0027 you mean the actual hw node?","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"e8378effc3ddec99cd490ee09c6cd3e76b86f5c2","unresolved":false,"context_lines":[{"line_number":208,"context_line":"-------------------------"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"* ``baremetal.node.power_sync.success`` is emitted by a conductor when a node\u0027s"},{"line_number":211,"context_line":"  power state was detected as changed during ironic\u0027s periodic power sync. It"},{"line_number":212,"context_line":"  has notification level INFO when ironic previously didn\u0027t have any"},{"line_number":213,"context_line":"  information about the node\u0027s power state and level WARNING if ironic had the"},{"line_number":214,"context_line":"  wrong power state and updated the state in the database."}],"source_content_type":"text/x-rst","patch_set":25,"id":"9a89bdaa_9815c941","line":211,"in_reply_to":"fa7ab95a_80d9c459","updated":"2016-09-06 22:51:50.000000000","message":"Yes. Does the update clarify it?","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9d63de254cbc6a9d4149e39c8c3eac718e12bcd2","unresolved":false,"context_lines":[{"line_number":214,"context_line":"  wrong power state and updated the state in the database."},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"* ``baremetal.node.power_sync.fail`` is emitted when ironic fails to retrieve"},{"line_number":217,"context_line":"  a node\u0027s power state during its periodic power sync. The notification level"},{"line_number":218,"context_line":"  is ERROR."},{"line_number":219,"context_line":""},{"line_number":220,"context_line":".. [1] http://docs.openstack.org/developer/oslo.messaging/notifier.html"}],"source_content_type":"text/x-rst","patch_set":25,"id":"fa7ab95a_00f854c2","line":217,"updated":"2016-09-01 22:20:35.000000000","message":"by this, you mean it couldn\u0027t get the power state from the actual baremetal node?","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"e8378effc3ddec99cd490ee09c6cd3e76b86f5c2","unresolved":false,"context_lines":[{"line_number":214,"context_line":"  wrong power state and updated the state in the database."},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"* ``baremetal.node.power_sync.fail`` is emitted when ironic fails to retrieve"},{"line_number":217,"context_line":"  a node\u0027s power state during its periodic power sync. The notification level"},{"line_number":218,"context_line":"  is ERROR."},{"line_number":219,"context_line":""},{"line_number":220,"context_line":".. [1] http://docs.openstack.org/developer/oslo.messaging/notifier.html"}],"source_content_type":"text/x-rst","patch_set":25,"id":"9a89bdaa_b8ae0de4","line":217,"in_reply_to":"fa7ab95a_00f854c2","updated":"2016-09-06 22:51:50.000000000","message":"Yes","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"7506620145b937f0cf1442f5542a848150eb3d9b","unresolved":false,"context_lines":[{"line_number":181,"context_line":"       \"publisher_id\":\"conductor.cond-hostname01\""},{"line_number":182,"context_line":"    }"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"Available notifications"},{"line_number":185,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"The notifications that ironic emits are described here. The are listed"}],"source_content_type":"text/x-rst","patch_set":28,"id":"9a89bdaa_24048e16","line":184,"updated":"2016-09-13 02:19:51.000000000","message":"Oh, I think you modelled this page after nova\u0027s: http://docs.openstack.org/developer/nova/notifications.html#existing-versioned-notifications\n\nI wonder why they put the notifications in a dev doc. Maybe because their install stuff is outside the nova tree...\n\nIf you have a chance and want to, I\u0027d like them to be in the deploy. But i f not, maybe add a TODO to move this part later.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1b80d021f245f0df976f3086482c4319a1fbcc71","unresolved":false,"context_lines":[{"line_number":181,"context_line":"       \"publisher_id\":\"conductor.cond-hostname01\""},{"line_number":182,"context_line":"    }"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"Available notifications"},{"line_number":185,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"The notifications that ironic emits are described here. The are listed"}],"source_content_type":"text/x-rst","patch_set":28,"id":"9a89bdaa_68ef2eb1","line":184,"in_reply_to":"9a89bdaa_24048e16","updated":"2016-09-13 09:22:31.000000000","message":"In nova it is in the devref as it was easier to add there first. I think as the versioned notification transformation progresses in nova this part of the doc will be moved to the deployer documentation.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dc67c0f7419ea63333fb37fc030485b2871283b4","unresolved":false,"context_lines":[{"line_number":181,"context_line":"       \"publisher_id\":\"conductor.cond-hostname01\""},{"line_number":182,"context_line":"    }"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"Available notifications"},{"line_number":185,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"The notifications that ironic emits are described here. The are listed"}],"source_content_type":"text/x-rst","patch_set":28,"id":"7a8ec9b2_66857b58","line":184,"in_reply_to":"9a89bdaa_68ef2eb1","updated":"2016-09-16 23:04:08.000000000","message":"Yes, it\u0027s easier to just have it here first.\n\nAdded TODO for this. I owe a separate follow up doc patch to put information about statuses in the dev docs, so I\u0027ll push those both up in the same follow up patch.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"7506620145b937f0cf1442f5542a848150eb3d9b","unresolved":false,"context_lines":[{"line_number":184,"context_line":"Available notifications"},{"line_number":185,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"The notifications that ironic emits are described here. The are listed"},{"line_number":188,"context_line":"(alphabetically) by event_type."},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"baremetal.node.power_set"}],"source_content_type":"text/x-rst","patch_set":28,"id":"9a89bdaa_840aba88","line":187,"updated":"2016-09-13 02:19:51.000000000","message":"s/The are/They are/","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dc67c0f7419ea63333fb37fc030485b2871283b4","unresolved":false,"context_lines":[{"line_number":184,"context_line":"Available notifications"},{"line_number":185,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"The notifications that ironic emits are described here. The are listed"},{"line_number":188,"context_line":"(alphabetically) by event_type."},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"baremetal.node.power_set"}],"source_content_type":"text/x-rst","patch_set":28,"id":"7a8ec9b2_c67e4f69","line":187,"in_reply_to":"9a89bdaa_840aba88","updated":"2016-09-16 23:04:08.000000000","message":"Done","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"7506620145b937f0cf1442f5542a848150eb3d9b","unresolved":false,"context_lines":[{"line_number":185,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"The notifications that ironic emits are described here. The are listed"},{"line_number":188,"context_line":"(alphabetically) by event_type."},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"baremetal.node.power_set"},{"line_number":191,"context_line":"------------------------"}],"source_content_type":"text/x-rst","patch_set":28,"id":"9a89bdaa_c40e828b","line":188,"updated":"2016-09-13 02:19:51.000000000","message":"We probably want to list them by service first, then event type. Or have subsections, one for eg \u0027ironic-api\u0027, \u0027ironic-conductor\u0027, \u0027ironic-python-agent\u0027?, \u0027inspector\u0027, etc. Oh wait, I\u0027m jumping the gun, we just have api \u0026 conductor for now :)","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dc67c0f7419ea63333fb37fc030485b2871283b4","unresolved":false,"context_lines":[{"line_number":185,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"The notifications that ironic emits are described here. The are listed"},{"line_number":188,"context_line":"(alphabetically) by event_type."},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"baremetal.node.power_set"},{"line_number":191,"context_line":"------------------------"}],"source_content_type":"text/x-rst","patch_set":28,"id":"7a8ec9b2_a6f22304","line":188,"in_reply_to":"9a89bdaa_c40e828b","updated":"2016-09-16 23:04:08.000000000","message":"Agreed. These are all conductor. Done.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"7506620145b937f0cf1442f5542a848150eb3d9b","unresolved":false,"context_lines":[{"line_number":196,"context_line":"* ``baremetal.node.power_set.end`` is emitted when the conductor successfully"},{"line_number":197,"context_line":"  completes a power state change task. It has notification level DEBUG if no"},{"line_number":198,"context_line":"  change was necessary (if the desired power state was the current power state)"},{"line_number":199,"context_line":"  and level INFO if the driver performed the power state change."},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"* ``baremetal.node.power_set.error`` is emitted by a conductor when it fails to"},{"line_number":202,"context_line":"  set a node\u0027s power state. It has notification level ERROR. This can occur"}],"source_content_type":"text/x-rst","patch_set":28,"id":"9a89bdaa_a7e500a5","line":199,"updated":"2016-09-13 02:19:51.000000000","message":"It seems to me that we should keep it at INFO, if the .start was INFO. Something that is interested in these notifications might be looking for a matching .end or .error.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1b80d021f245f0df976f3086482c4319a1fbcc71","unresolved":false,"context_lines":[{"line_number":196,"context_line":"* ``baremetal.node.power_set.end`` is emitted when the conductor successfully"},{"line_number":197,"context_line":"  completes a power state change task. It has notification level DEBUG if no"},{"line_number":198,"context_line":"  change was necessary (if the desired power state was the current power state)"},{"line_number":199,"context_line":"  and level INFO if the driver performed the power state change."},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"* ``baremetal.node.power_set.error`` is emitted by a conductor when it fails to"},{"line_number":202,"context_line":"  set a node\u0027s power state. It has notification level ERROR. This can occur"}],"source_content_type":"text/x-rst","patch_set":28,"id":"9a89bdaa_a87936fe","line":199,"in_reply_to":"9a89bdaa_a7e500a5","updated":"2016-09-13 09:22:31.000000000","message":"I agree with Ruby the matching pair of notifications can be important to the consumer.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dc67c0f7419ea63333fb37fc030485b2871283b4","unresolved":false,"context_lines":[{"line_number":196,"context_line":"* ``baremetal.node.power_set.end`` is emitted when the conductor successfully"},{"line_number":197,"context_line":"  completes a power state change task. It has notification level DEBUG if no"},{"line_number":198,"context_line":"  change was necessary (if the desired power state was the current power state)"},{"line_number":199,"context_line":"  and level INFO if the driver performed the power state change."},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"* ``baremetal.node.power_set.error`` is emitted by a conductor when it fails to"},{"line_number":202,"context_line":"  set a node\u0027s power state. It has notification level ERROR. This can occur"}],"source_content_type":"text/x-rst","patch_set":28,"id":"7a8ec9b2_46e23f30","line":199,"in_reply_to":"9a89bdaa_a87936fe","updated":"2016-09-16 23:04:08.000000000","message":"Done","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1b80d021f245f0df976f3086482c4319a1fbcc71","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        \"ironic_object.name\":\"NodeSetPowerStatePayload\","},{"line_number":213,"context_line":"        \"ironic_object.version\":\"1.0\","},{"line_number":214,"context_line":"        \"ironic_object.data\":{"},{"line_number":215,"context_line":"             \"uuid\": \"33649091-85dc-4539-9ec6-7d90e1c2b7c6\","},{"line_number":216,"context_line":"             \"power_state\": \"off\","},{"line_number":217,"context_line":"             \"target_power_state\": \"on\""},{"line_number":218,"context_line":"        }"}],"source_content_type":"text/x-rst","patch_set":28,"id":"9a89bdaa_28dc46e3","line":215,"updated":"2016-09-13 09:22:31.000000000","message":"Is it the uuid of the Node?","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dc67c0f7419ea63333fb37fc030485b2871283b4","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        \"ironic_object.name\":\"NodeSetPowerStatePayload\","},{"line_number":213,"context_line":"        \"ironic_object.version\":\"1.0\","},{"line_number":214,"context_line":"        \"ironic_object.data\":{"},{"line_number":215,"context_line":"             \"uuid\": \"33649091-85dc-4539-9ec6-7d90e1c2b7c6\","},{"line_number":216,"context_line":"             \"power_state\": \"off\","},{"line_number":217,"context_line":"             \"target_power_state\": \"on\""},{"line_number":218,"context_line":"        }"}],"source_content_type":"text/x-rst","patch_set":28,"id":"7a8ec9b2_c643af11","line":215,"in_reply_to":"9a89bdaa_28dc46e3","updated":"2016-09-16 23:04:08.000000000","message":"Yes.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"7506620145b937f0cf1442f5542a848150eb3d9b","unresolved":false,"context_lines":[{"line_number":218,"context_line":"        }"},{"line_number":219,"context_line":"    },"},{"line_number":220,"context_line":"    \"event_type\":\"baremetal.node.power_set.start\","},{"line_number":221,"context_line":"    \"publisher_id\":\"conductor.cond-hostname01\""},{"line_number":222,"context_line":"   }"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":""}],"source_content_type":"text/x-rst","patch_set":28,"id":"9a89bdaa_27a81020","line":221,"updated":"2016-09-13 02:19:51.000000000","message":"we aren\u0027t using \u0027ironic-conductor\u0027? We tend to call it \u0027ironic-conductor service\u0027.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dc67c0f7419ea63333fb37fc030485b2871283b4","unresolved":false,"context_lines":[{"line_number":218,"context_line":"        }"},{"line_number":219,"context_line":"    },"},{"line_number":220,"context_line":"    \"event_type\":\"baremetal.node.power_set.start\","},{"line_number":221,"context_line":"    \"publisher_id\":\"conductor.cond-hostname01\""},{"line_number":222,"context_line":"   }"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":""}],"source_content_type":"text/x-rst","patch_set":28,"id":"7a8ec9b2_46507fd4","line":221,"in_reply_to":"9a89bdaa_27a81020","updated":"2016-09-16 23:04:08.000000000","message":"Changed","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1b80d021f245f0df976f3086482c4319a1fbcc71","unresolved":false,"context_lines":[{"line_number":227,"context_line":""},{"line_number":228,"context_line":"* ``baremetal.node.power_sync.success`` is emitted by a conductor when a node\u0027s"},{"line_number":229,"context_line":"  actual power state was detected as changed during ironic\u0027s periodic power"},{"line_number":230,"context_line":"  sync. It has notification level INFO when ironic previously didn\u0027t have any"},{"line_number":231,"context_line":"  information about the node\u0027s power state and level WARNING if ironic had the"},{"line_number":232,"context_line":"  wrong power state and updated the state in the database."},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"* ``baremetal.node.power_sync.error`` is emitted when ironic fails to retrieve"},{"line_number":235,"context_line":"  a node\u0027s actual power state during its periodic power sync. The notification"}],"source_content_type":"text/x-rst","patch_set":28,"id":"9a89bdaa_e8697ef9","line":232,"range":{"start_line":230,"start_character":7,"end_line":232,"end_character":58},"updated":"2016-09-13 09:22:31.000000000","message":"Coding this information into the severity seems to confusing to me. Can we simply but explicitly put some field to the notification to indicate the the sync updated the known power state of the node?","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dc67c0f7419ea63333fb37fc030485b2871283b4","unresolved":false,"context_lines":[{"line_number":227,"context_line":""},{"line_number":228,"context_line":"* ``baremetal.node.power_sync.success`` is emitted by a conductor when a node\u0027s"},{"line_number":229,"context_line":"  actual power state was detected as changed during ironic\u0027s periodic power"},{"line_number":230,"context_line":"  sync. It has notification level INFO when ironic previously didn\u0027t have any"},{"line_number":231,"context_line":"  information about the node\u0027s power state and level WARNING if ironic had the"},{"line_number":232,"context_line":"  wrong power state and updated the state in the database."},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"* ``baremetal.node.power_sync.error`` is emitted when ironic fails to retrieve"},{"line_number":235,"context_line":"  a node\u0027s actual power state during its periodic power sync. The notification"}],"source_content_type":"text/x-rst","patch_set":28,"id":"7a8ec9b2_c6ad6f9c","line":232,"range":{"start_line":230,"start_character":7,"end_line":232,"end_character":58},"in_reply_to":"9a89bdaa_e8697ef9","updated":"2016-09-16 23:04:08.000000000","message":"Done.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"7506620145b937f0cf1442f5542a848150eb3d9b","unresolved":false,"context_lines":[{"line_number":241,"context_line":"    \"priority\": \"info\","},{"line_number":242,"context_line":"    \"payload\":{"},{"line_number":243,"context_line":"        \"ironic_object.namespace\":\"ironic\","},{"line_number":244,"context_line":"        \"ironic_object.name\":\"NodeSetPowerStatePayload\","},{"line_number":245,"context_line":"        \"ironic_object.version\":\"1.0\","},{"line_number":246,"context_line":"        \"ironic_object.data\":{"},{"line_number":247,"context_line":"             \"uuid\": \"33649091-85dc-4539-9ec6-7d90e1c2b7c6\","}],"source_content_type":"text/x-rst","patch_set":28,"id":"9a89bdaa_2a3295f2","line":244,"updated":"2016-09-13 02:19:51.000000000","message":"can the object name be the same as the one for power_set (above), but the .data be different?","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dc67c0f7419ea63333fb37fc030485b2871283b4","unresolved":false,"context_lines":[{"line_number":241,"context_line":"    \"priority\": \"info\","},{"line_number":242,"context_line":"    \"payload\":{"},{"line_number":243,"context_line":"        \"ironic_object.namespace\":\"ironic\","},{"line_number":244,"context_line":"        \"ironic_object.name\":\"NodeSetPowerStatePayload\","},{"line_number":245,"context_line":"        \"ironic_object.version\":\"1.0\","},{"line_number":246,"context_line":"        \"ironic_object.data\":{"},{"line_number":247,"context_line":"             \"uuid\": \"33649091-85dc-4539-9ec6-7d90e1c2b7c6\","}],"source_content_type":"text/x-rst","patch_set":28,"id":"7a8ec9b2_0694b740","line":244,"in_reply_to":"9a89bdaa_2a3295f2","updated":"2016-09-16 23:04:08.000000000","message":"Sorry, this is a typo. It should be NodeSyncPowerStatePayload. That\u0027s only possible if some of the fields are optional.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"0babb8d5ddee47cc53bb3f55f3dfcf73001604ec","unresolved":false,"context_lines":[{"line_number":193,"context_line":"The notifications that ironic emits are described here. They are listed"},{"line_number":194,"context_line":"(alphabetically) by service first, then by event_type."},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"ironic-conductor notifications"},{"line_number":197,"context_line":"------------------------------"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"baremetal.node.power_set"}],"source_content_type":"text/x-rst","patch_set":30,"id":"7a8ec9b2_5ca85277","line":196,"updated":"2016-09-16 23:05:21.000000000","message":"Not too sure about whether this will format correctly, will check in a bit","commit_id":"a4504a79fe83df705e51d86073723f6139d34744"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d332b91aa2aa04b21394e4488df67bb41870c4ee","unresolved":false,"context_lines":[{"line_number":236,"context_line":"* ``baremetal.node.power_sync.success`` is emitted by ironic-conductor when a"},{"line_number":237,"context_line":"  node\u0027s actual power state was detected as changed during ironic\u0027s periodic"},{"line_number":238,"context_line":"  power sync. It has notification level INFO"},{"line_number":239,"context_line":"  any information about the node\u0027s power state and level WARNING if ironic had"},{"line_number":240,"context_line":"  the wrong power state and updated the state in the database."},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"* ``baremetal.node.power_sync.error`` is emitted when ironic fails to retrieve"}],"source_content_type":"text/x-rst","patch_set":30,"id":"7a8ec9b2_33860966","line":239,"updated":"2016-09-19 19:17:32.000000000","message":"there\u0027s something missing between the previous line and this one.\n\nLooking at the code, it seems like you changed it so that INFO warning is used for both cases.","commit_id":"a4504a79fe83df705e51d86073723f6139d34744"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"1968b8016ffcf1eac73e2ded6967cb62d17eadb0","unresolved":false,"context_lines":[{"line_number":236,"context_line":"* ``baremetal.node.power_sync.success`` is emitted by ironic-conductor when a"},{"line_number":237,"context_line":"  node\u0027s actual power state was detected as changed during ironic\u0027s periodic"},{"line_number":238,"context_line":"  power sync. It has notification level INFO"},{"line_number":239,"context_line":"  any information about the node\u0027s power state and level WARNING if ironic had"},{"line_number":240,"context_line":"  the wrong power state and updated the state in the database."},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"* ``baremetal.node.power_sync.error`` is emitted when ironic fails to retrieve"}],"source_content_type":"text/x-rst","patch_set":30,"id":"7a8ec9b2_edd003cc","line":239,"in_reply_to":"7a8ec9b2_33860966","updated":"2016-09-21 17:09:46.000000000","message":"You\u0027re right, I forgot to update the doc, thanks for catching.","commit_id":"a4504a79fe83df705e51d86073723f6139d34744"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d332b91aa2aa04b21394e4488df67bb41870c4ee","unresolved":false,"context_lines":[{"line_number":237,"context_line":"  node\u0027s actual power state was detected as changed during ironic\u0027s periodic"},{"line_number":238,"context_line":"  power sync. It has notification level INFO"},{"line_number":239,"context_line":"  any information about the node\u0027s power state and level WARNING if ironic had"},{"line_number":240,"context_line":"  the wrong power state and updated the state in the database."},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"* ``baremetal.node.power_sync.error`` is emitted when ironic fails to retrieve"},{"line_number":243,"context_line":"  a node\u0027s actual power state during its periodic power sync. The notification"}],"source_content_type":"text/x-rst","patch_set":30,"id":"7a8ec9b2_f35101da","line":240,"updated":"2016-09-19 19:17:32.000000000","message":"I think Balazs meant that the notification level should be the same, INFO, in both cases, but that a field (\u0027power_updated\u0027?) could be used to indicate the diff between these two cases.","commit_id":"a4504a79fe83df705e51d86073723f6139d34744"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"1968b8016ffcf1eac73e2ded6967cb62d17eadb0","unresolved":false,"context_lines":[{"line_number":237,"context_line":"  node\u0027s actual power state was detected as changed during ironic\u0027s periodic"},{"line_number":238,"context_line":"  power sync. It has notification level INFO"},{"line_number":239,"context_line":"  any information about the node\u0027s power state and level WARNING if ironic had"},{"line_number":240,"context_line":"  the wrong power state and updated the state in the database."},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"* ``baremetal.node.power_sync.error`` is emitted when ironic fails to retrieve"},{"line_number":243,"context_line":"  a node\u0027s actual power state during its periodic power sync. The notification"}],"source_content_type":"text/x-rst","patch_set":30,"id":"7a8ec9b2_8d013f09","line":240,"in_reply_to":"7a8ec9b2_f35101da","updated":"2016-09-21 17:09:46.000000000","message":"OK, now \"power_updated\" is redundant based on the change (see L247)","commit_id":"a4504a79fe83df705e51d86073723f6139d34744"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d332b91aa2aa04b21394e4488df67bb41870c4ee","unresolved":false,"context_lines":[{"line_number":244,"context_line":"  level is ERROR."},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"``power_updated`` in the payload indicates whether ironic updated the power"},{"line_number":247,"context_line":"state information about the node after retrieving the actual power state."},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"Example payload for a notification with this event_type::"},{"line_number":250,"context_line":""}],"source_content_type":"text/x-rst","patch_set":30,"id":"7a8ec9b2_931fdd08","line":247,"updated":"2016-09-19 19:17:32.000000000","message":"This would be true/false?\n\nthis whole sync thing is actually hard to describe in words. let me think about it, i\u0027m not sure i like \u0027power_updated\u0027.","commit_id":"a4504a79fe83df705e51d86073723f6139d34744"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"1968b8016ffcf1eac73e2ded6967cb62d17eadb0","unresolved":false,"context_lines":[{"line_number":244,"context_line":"  level is ERROR."},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"``power_updated`` in the payload indicates whether ironic updated the power"},{"line_number":247,"context_line":"state information about the node after retrieving the actual power state."},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"Example payload for a notification with this event_type::"},{"line_number":250,"context_line":""}],"source_content_type":"text/x-rst","patch_set":30,"id":"7a8ec9b2_5c4b2f87","line":247,"in_reply_to":"7a8ec9b2_931fdd08","updated":"2016-09-21 17:09:46.000000000","message":"So as discussed in IRC, we\u0027ll only be sending this notification when ironic updates the node after detecting that the actual power state on the baremetal hardware changed, instead of also notifying when this fails. This field is thus now unnecessary since the real power state will have always changed from the ironic node when this is sent.","commit_id":"a4504a79fe83df705e51d86073723f6139d34744"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"804579258d719da2d26390fe78d087b9847a2390","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"Adding a new notification to ironic"},{"line_number":55,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":56,"context_line":"To add a new notification to ironic, new versioned notification classes should"},{"line_number":57,"context_line":"be created by subclassing the NotificationBase class to define the notification"},{"line_number":58,"context_line":"itself and the NotificationPayloadBase class to define which fields the new"},{"line_number":59,"context_line":"notification will contain inside its payload. You may also define a schema to"}],"source_content_type":"text/x-rst","patch_set":32,"id":"5a8bc5a2_340ad479","line":56,"updated":"2016-09-26 19:50:04.000000000","message":"s/classes/class/","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"8704ff646aa569ab78935623a939ba4b8c0cfa97","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"Adding a new notification to ironic"},{"line_number":55,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":56,"context_line":"To add a new notification to ironic, new versioned notification classes should"},{"line_number":57,"context_line":"be created by subclassing the NotificationBase class to define the notification"},{"line_number":58,"context_line":"itself and the NotificationPayloadBase class to define which fields the new"},{"line_number":59,"context_line":"notification will contain inside its payload. You may also define a schema to"}],"source_content_type":"text/x-rst","patch_set":32,"id":"5a8bc5a2_4badbfe7","line":56,"in_reply_to":"5a8bc5a2_340ad479","updated":"2016-09-27 16:29:03.000000000","message":"Done","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"804579258d719da2d26390fe78d087b9847a2390","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"The ``\u003cpayload_field_name\u003e`` is the name where the data will be stored in the"},{"line_number":112,"context_line":"payload object; this field has to be defined as a field of the payload."},{"line_number":113,"context_line":"The ``\u003cdata_source_name\u003e`` shall refer to name of the parameter passed as"},{"line_number":114,"context_line":"kwarg to the payload\u0027s ``populate_schema()`` call and this object will be"},{"line_number":115,"context_line":"used as the source of the data. The ``\u003cfield_of_the_data_source\u003e`` shall be"},{"line_number":116,"context_line":"a valid field of the passed argument."}],"source_content_type":"text/x-rst","patch_set":32,"id":"5a8bc5a2_280d14e8","line":113,"updated":"2016-09-26 19:50:04.000000000","message":"It\u0027s not clear to me from this why data_source_name is required. Can you not just take an arbitrary object and check it for field_of_the_data_source?","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"8704ff646aa569ab78935623a939ba4b8c0cfa97","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"The ``\u003cpayload_field_name\u003e`` is the name where the data will be stored in the"},{"line_number":112,"context_line":"payload object; this field has to be defined as a field of the payload."},{"line_number":113,"context_line":"The ``\u003cdata_source_name\u003e`` shall refer to name of the parameter passed as"},{"line_number":114,"context_line":"kwarg to the payload\u0027s ``populate_schema()`` call and this object will be"},{"line_number":115,"context_line":"used as the source of the data. The ``\u003cfield_of_the_data_source\u003e`` shall be"},{"line_number":116,"context_line":"a valid field of the passed argument."}],"source_content_type":"text/x-rst","patch_set":32,"id":"5a8bc5a2_2b231357","line":113,"in_reply_to":"5a8bc5a2_280d14e8","updated":"2016-09-27 16:29:03.000000000","message":"This is necessary in case you want to populate the schema from multiple objects. So, let\u0027s say you want some fields from a node object, and some fields from a port object. You can automatically fill in the notification by doing this:\n\npopulate_schema(node\u003dnode, port\u003dport)\n\ninstead of having to fill in every field you want in the notification, in every part of the code you send it.\n\nSee populate_schema in ironic/objects/notification.py to see how this works.\n\nI\u0027d rather we modify any base notification code in a separate patch to limit the scope of this change, too.","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"d567b56011ffed09f8362009278baac37bcd5c9b","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"The ``\u003cpayload_field_name\u003e`` is the name where the data will be stored in the"},{"line_number":112,"context_line":"payload object; this field has to be defined as a field of the payload."},{"line_number":113,"context_line":"The ``\u003cdata_source_name\u003e`` shall refer to name of the parameter passed as"},{"line_number":114,"context_line":"kwarg to the payload\u0027s ``populate_schema()`` call and this object will be"},{"line_number":115,"context_line":"used as the source of the data. The ``\u003cfield_of_the_data_source\u003e`` shall be"},{"line_number":116,"context_line":"a valid field of the passed argument."}],"source_content_type":"text/x-rst","patch_set":32,"id":"5a8bc5a2_4ac77063","line":113,"in_reply_to":"5a8bc5a2_2b231357","updated":"2016-09-27 17:14:42.000000000","message":"Yeah totes. I don\u0027t think this conversation is in scope for this PR. It seemed like a reasonable place to discuss briefly though. It still seems a bit odd to me we name the object instead of just a list of objects that we iterate over and pull out relevant pieces based on schema, but I mean it\u0027s probably fine (or even good?) it\u0027s done this way. It just seems a bit maintenance heavy and leaky with the name mappings.","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"804579258d719da2d26390fe78d087b9847a2390","unresolved":false,"context_lines":[{"line_number":146,"context_line":"in the ironic notification base classes) and emit it::"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    notify \u003d ExampleNotification("},{"line_number":149,"context_line":"        event_type\u003dnotification.EventType(object\u003d\u0027example_obj\u0027,"},{"line_number":150,"context_line":"            action\u003d\u0027do_something\u0027, status\u003dfields.NotificationStatus.START),"},{"line_number":151,"context_line":"        publisher\u003dnotification.NotificationPublisher("},{"line_number":152,"context_line":"            service\u003d\u0027ironic-conductor\u0027,"}],"source_content_type":"text/x-rst","patch_set":32,"id":"5a8bc5a2_28c34b58","line":149,"updated":"2016-09-26 19:50:04.000000000","message":"Is the name \u0027example_obj\u0027 being overloaded here (i.e. same name is a named parameter in populate_schema)? It\u0027s not clear to me what this is needed for. Is it just used to construct the following string: baremetal.\u003cobject\u003e.\u003caction\u003e.\u003cstatus\u003e?","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"8704ff646aa569ab78935623a939ba4b8c0cfa97","unresolved":false,"context_lines":[{"line_number":146,"context_line":"in the ironic notification base classes) and emit it::"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    notify \u003d ExampleNotification("},{"line_number":149,"context_line":"        event_type\u003dnotification.EventType(object\u003d\u0027example_obj\u0027,"},{"line_number":150,"context_line":"            action\u003d\u0027do_something\u0027, status\u003dfields.NotificationStatus.START),"},{"line_number":151,"context_line":"        publisher\u003dnotification.NotificationPublisher("},{"line_number":152,"context_line":"            service\u003d\u0027ironic-conductor\u0027,"}],"source_content_type":"text/x-rst","patch_set":32,"id":"5a8bc5a2_6b2efba5","line":149,"in_reply_to":"5a8bc5a2_28c34b58","updated":"2016-09-27 16:29:03.000000000","message":"Theoretically I think you could do \u003cobject\u003e in the event type string and have the parameter in populate_schema be named something separately, but I think it\u0027s clearer to keep them the same. Maybe this will make more sense based on the comment I left on L113?\n\nBut yes, in the case of EventType, it\u0027s use to construct the baremetal.\u003cobject\u003e.\u003caction\u003e.\u003cstatus\u003e event type string.","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"804579258d719da2d26390fe78d087b9847a2390","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    notify \u003d ExampleNotification("},{"line_number":149,"context_line":"        event_type\u003dnotification.EventType(object\u003d\u0027example_obj\u0027,"},{"line_number":150,"context_line":"            action\u003d\u0027do_something\u0027, status\u003dfields.NotificationStatus.START),"},{"line_number":151,"context_line":"        publisher\u003dnotification.NotificationPublisher("},{"line_number":152,"context_line":"            service\u003d\u0027ironic-conductor\u0027,"},{"line_number":153,"context_line":"            host\u003d\u0027cond-hostname01\u0027),"}],"source_content_type":"text/x-rst","patch_set":32,"id":"5a8bc5a2_0b93e9fa","line":150,"updated":"2016-09-26 19:50:04.000000000","message":"All the comments / docs refer to \"start\", \"end\", \"error\", and \"success\" yet \"START\" is being used here.","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"8704ff646aa569ab78935623a939ba4b8c0cfa97","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    notify \u003d ExampleNotification("},{"line_number":149,"context_line":"        event_type\u003dnotification.EventType(object\u003d\u0027example_obj\u0027,"},{"line_number":150,"context_line":"            action\u003d\u0027do_something\u0027, status\u003dfields.NotificationStatus.START),"},{"line_number":151,"context_line":"        publisher\u003dnotification.NotificationPublisher("},{"line_number":152,"context_line":"            service\u003d\u0027ironic-conductor\u0027,"},{"line_number":153,"context_line":"            host\u003d\u0027cond-hostname01\u0027),"}],"source_content_type":"text/x-rst","patch_set":32,"id":"5a8bc5a2_8bd507e6","line":150,"in_reply_to":"5a8bc5a2_0b93e9fa","updated":"2016-09-27 16:29:03.000000000","message":"Yeah, I was asked to make this an Enum class in a separate patch set. The class is used in the code, but on the wire (when the notification is sent to the message bus) it appears as a lowercase string, so I think it\u0027s OK?\n\nPlease point out any specific parts you find unclear; maybe we can update the base classes and already existing docs in a separate patch set if so.","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"d567b56011ffed09f8362009278baac37bcd5c9b","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    notify \u003d ExampleNotification("},{"line_number":149,"context_line":"        event_type\u003dnotification.EventType(object\u003d\u0027example_obj\u0027,"},{"line_number":150,"context_line":"            action\u003d\u0027do_something\u0027, status\u003dfields.NotificationStatus.START),"},{"line_number":151,"context_line":"        publisher\u003dnotification.NotificationPublisher("},{"line_number":152,"context_line":"            service\u003d\u0027ironic-conductor\u0027,"},{"line_number":153,"context_line":"            host\u003d\u0027cond-hostname01\u0027),"}],"source_content_type":"text/x-rst","patch_set":32,"id":"5a8bc5a2_aa30f456","line":150,"in_reply_to":"5a8bc5a2_8bd507e6","updated":"2016-09-27 17:14:42.000000000","message":"I guess I find it confusing we document a string then use a enum. Seems unnecessary, but it\u0027s fine.","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"804579258d719da2d26390fe78d087b9847a2390","unresolved":false,"context_lines":[{"line_number":152,"context_line":"            service\u003d\u0027ironic-conductor\u0027,"},{"line_number":153,"context_line":"            host\u003d\u0027cond-hostname01\u0027),"},{"line_number":154,"context_line":"        level\u003dfields.NotificationLevel.DEBUG,"},{"line_number":155,"context_line":"        payload\u003dmy_notify_payload)"},{"line_number":156,"context_line":"    notify.emit(context)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"When specifying the event_type, ``object`` will specify the object being acted"}],"source_content_type":"text/x-rst","patch_set":32,"id":"5a8bc5a2_0b4e89c0","line":155,"updated":"2016-09-26 19:50:04.000000000","message":"This code seems very structured around the notification format. Is that required? Would it be easier to grok and more maintainable if the structured data was passed around with minimal object modeling and named parameters appled? I suspect it\u0027s much too late for this sort of input, so just food for thought.","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"8704ff646aa569ab78935623a939ba4b8c0cfa97","unresolved":false,"context_lines":[{"line_number":152,"context_line":"            service\u003d\u0027ironic-conductor\u0027,"},{"line_number":153,"context_line":"            host\u003d\u0027cond-hostname01\u0027),"},{"line_number":154,"context_line":"        level\u003dfields.NotificationLevel.DEBUG,"},{"line_number":155,"context_line":"        payload\u003dmy_notify_payload)"},{"line_number":156,"context_line":"    notify.emit(context)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"When specifying the event_type, ``object`` will specify the object being acted"}],"source_content_type":"text/x-rst","patch_set":32,"id":"5a8bc5a2_263d0ac4","line":155,"in_reply_to":"5a8bc5a2_0b4e89c0","updated":"2016-09-27 16:29:03.000000000","message":"I\u0027m open to something that makes this simpler in a separate patch set. I agree it\u0027s a little complex.\n\nThe reasoning behind the versioned object model was to force developers to bump versions if they change notification formats/payloads, to keep this structured and predictable for operators running services that consume notifications. Unversioned notifications in Nova became a nightmare to maintain, so they ended up switching their notification model to something very similar to this.","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"d567b56011ffed09f8362009278baac37bcd5c9b","unresolved":false,"context_lines":[{"line_number":152,"context_line":"            service\u003d\u0027ironic-conductor\u0027,"},{"line_number":153,"context_line":"            host\u003d\u0027cond-hostname01\u0027),"},{"line_number":154,"context_line":"        level\u003dfields.NotificationLevel.DEBUG,"},{"line_number":155,"context_line":"        payload\u003dmy_notify_payload)"},{"line_number":156,"context_line":"    notify.emit(context)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"When specifying the event_type, ``object`` will specify the object being acted"}],"source_content_type":"text/x-rst","patch_set":32,"id":"5a8bc5a2_ca58e08c","line":155,"in_reply_to":"5a8bc5a2_263d0ac4","updated":"2016-09-27 17:14:42.000000000","message":"Yeah, +1 to versioning. I think it\u0027s that the versioning affects the code and not just the schema / structured data. The mappings in the code feel a bit heavy and confusing, but I think it\u0027s probably fine.","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"804579258d719da2d26390fe78d087b9847a2390","unresolved":false,"context_lines":[{"line_number":209,"context_line":""},{"line_number":210,"context_line":"* ``baremetal.node.power_set.error`` is emitted by ironic-conductor when it"},{"line_number":211,"context_line":"  fails to set a node\u0027s power state. It has notification level ERROR. This can"},{"line_number":212,"context_line":"  occur when ironic fails to retrieve the power state to check if any change is"},{"line_number":213,"context_line":"  necessary or fails when setting the power state if a change is needed."},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"Example payload for a notification with this event_type::"}],"source_content_type":"text/x-rst","patch_set":32,"id":"5a8bc5a2_6e7abb89","line":212,"updated":"2016-09-26 19:50:04.000000000","message":"The structure of this sentence could use some work. My brain can only grok the first part: \"This can occur when ironic fails to retrieve the power state\".","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"d567b56011ffed09f8362009278baac37bcd5c9b","unresolved":false,"context_lines":[{"line_number":209,"context_line":""},{"line_number":210,"context_line":"* ``baremetal.node.power_set.error`` is emitted by ironic-conductor when it"},{"line_number":211,"context_line":"  fails to set a node\u0027s power state. It has notification level ERROR. This can"},{"line_number":212,"context_line":"  occur when ironic fails to retrieve the power state to check if any change is"},{"line_number":213,"context_line":"  necessary or fails when setting the power state if a change is needed."},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"Example payload for a notification with this event_type::"}],"source_content_type":"text/x-rst","patch_set":32,"id":"5a8bc5a2_0ade48dc","line":212,"in_reply_to":"5a8bc5a2_06e9eeb6","updated":"2016-09-27 17:14:42.000000000","message":"+1","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"8704ff646aa569ab78935623a939ba4b8c0cfa97","unresolved":false,"context_lines":[{"line_number":209,"context_line":""},{"line_number":210,"context_line":"* ``baremetal.node.power_set.error`` is emitted by ironic-conductor when it"},{"line_number":211,"context_line":"  fails to set a node\u0027s power state. It has notification level ERROR. This can"},{"line_number":212,"context_line":"  occur when ironic fails to retrieve the power state to check if any change is"},{"line_number":213,"context_line":"  necessary or fails when setting the power state if a change is needed."},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"Example payload for a notification with this event_type::"}],"source_content_type":"text/x-rst","patch_set":32,"id":"5a8bc5a2_06e9eeb6","line":212,"in_reply_to":"5a8bc5a2_6e7abb89","updated":"2016-09-27 16:29:03.000000000","message":"Updated, how\u0027s this?\n\nFor some context, ironic does this when setting the power state:\n\n1. retrieve current_power_state of node via driver (e.g. ipmitool ... power status)\n2. if power_state_to_set \u003d\u003d current_power_state, do nothing\n3. if power_state_to_set !\u003d current_power_state, set it (e.g. ipmitool ... power on)\n\nThe .error notification can be sent in steps 1 or 3.","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"804579258d719da2d26390fe78d087b9847a2390","unresolved":false,"context_lines":[{"line_number":273,"context_line":""},{"line_number":274,"context_line":"* ``baremetal.node.power_sync.success`` is emitted by ironic-conductor when the"},{"line_number":275,"context_line":"  power state on the baremetal hardware has changed from what ironic thought"},{"line_number":276,"context_line":"  was on the node. It has notification level INFO."},{"line_number":277,"context_line":""},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"Example payload for a notification with this event_type::"}],"source_content_type":"text/x-rst","patch_set":32,"id":"5a8bc5a2_8e40e708","line":276,"updated":"2016-09-26 19:50:04.000000000","message":"\"on the node\" ? Do you mean from what the previous known power state was?","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"8704ff646aa569ab78935623a939ba4b8c0cfa97","unresolved":false,"context_lines":[{"line_number":273,"context_line":""},{"line_number":274,"context_line":"* ``baremetal.node.power_sync.success`` is emitted by ironic-conductor when the"},{"line_number":275,"context_line":"  power state on the baremetal hardware has changed from what ironic thought"},{"line_number":276,"context_line":"  was on the node. It has notification level INFO."},{"line_number":277,"context_line":""},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"Example payload for a notification with this event_type::"}],"source_content_type":"text/x-rst","patch_set":32,"id":"5a8bc5a2_26298ae6","line":276,"in_reply_to":"5a8bc5a2_8e40e708","updated":"2016-09-27 16:29:03.000000000","message":"Yes, exactly. I\u0027ll change it, that\u0027s better wording.","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e18dd3535f166ae87c2b3ca034416189a3b2a97f","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        \"ironic_object.version\":\"1.0\","},{"line_number":224,"context_line":"        \"ironic_object.data\":{"},{"line_number":225,"context_line":"            # Indicates power state conductor is attempting to change the node"},{"line_number":226,"context_line":"            # to"},{"line_number":227,"context_line":"            \"clean_step\": None,"},{"line_number":228,"context_line":"            \"console_enabled\": False,"},{"line_number":229,"context_line":"            \"created_at\": \"2016-01-26T20:41:03+00:00\","}],"source_content_type":"text/x-rst","patch_set":33,"id":"5a8bc5a2_4625a308","line":226,"updated":"2016-09-27 21:17:30.000000000","message":"not sure what happened, but I think the above two lines pertain to L254, \u0027to_power\u0027.\n\nAnd now that I think of it -- maybe just mention above, at L216, that \u0027to_power\u0027 is the power state to which the conductor is attempting to set the node.","commit_id":"9542d0475007d1fd5ff138b87b7141b08c52141e"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"91d0e458e95ebcf7a166d75d0714da396d665aac","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        \"ironic_object.version\":\"1.0\","},{"line_number":224,"context_line":"        \"ironic_object.data\":{"},{"line_number":225,"context_line":"            # Indicates power state conductor is attempting to change the node"},{"line_number":226,"context_line":"            # to"},{"line_number":227,"context_line":"            \"clean_step\": None,"},{"line_number":228,"context_line":"            \"console_enabled\": False,"},{"line_number":229,"context_line":"            \"created_at\": \"2016-01-26T20:41:03+00:00\","}],"source_content_type":"text/x-rst","patch_set":33,"id":"3a98d1f4_a85549c7","line":226,"in_reply_to":"5a8bc5a2_4625a308","updated":"2016-09-29 15:47:10.000000000","message":"Done","commit_id":"9542d0475007d1fd5ff138b87b7141b08c52141e"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e18dd3535f166ae87c2b3ca034416189a3b2a97f","unresolved":false,"context_lines":[{"line_number":282,"context_line":"            \"created_at\": \"2016-01-26T20:41:03+00:00\","},{"line_number":283,"context_line":"            \"driver\": \"fake\","},{"line_number":284,"context_line":"            \"extra\": {},"},{"line_number":285,"context_line":"            # Indicates the previous power state on the node prior to the sync"},{"line_number":286,"context_line":"            \"inspection_finished_at\": None,"},{"line_number":287,"context_line":"            \"inspection_started_at\": None,"},{"line_number":288,"context_line":"            \"instance_uuid\": \"d6ea00c1-1f94-4e95-90b3-3462d7031678\","}],"source_content_type":"text/x-rst","patch_set":33,"id":"5a8bc5a2_a602e709","line":285,"updated":"2016-09-27 21:17:30.000000000","message":"this is in the wrong place too, it should be in reference to \u0027from_power\u0027. Maybe just mention this in line 271.","commit_id":"9542d0475007d1fd5ff138b87b7141b08c52141e"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"91d0e458e95ebcf7a166d75d0714da396d665aac","unresolved":false,"context_lines":[{"line_number":282,"context_line":"            \"created_at\": \"2016-01-26T20:41:03+00:00\","},{"line_number":283,"context_line":"            \"driver\": \"fake\","},{"line_number":284,"context_line":"            \"extra\": {},"},{"line_number":285,"context_line":"            # Indicates the previous power state on the node prior to the sync"},{"line_number":286,"context_line":"            \"inspection_finished_at\": None,"},{"line_number":287,"context_line":"            \"inspection_started_at\": None,"},{"line_number":288,"context_line":"            \"instance_uuid\": \"d6ea00c1-1f94-4e95-90b3-3462d7031678\","}],"source_content_type":"text/x-rst","patch_set":33,"id":"3a98d1f4_c85295dd","line":285,"in_reply_to":"5a8bc5a2_a602e709","updated":"2016-09-29 15:47:10.000000000","message":"Done","commit_id":"9542d0475007d1fd5ff138b87b7141b08c52141e"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"6fdd14888504f1f53f69300c7e93b330683d7520","unresolved":false,"context_lines":[{"line_number":214,"context_line":"  needed."},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"The \"to_power\" payload field indicates the power state ironic-conductor is"},{"line_number":217,"context_line":"attempting to change the node to.Example payload for a notification with this"},{"line_number":218,"context_line":"event_type::"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"   {"}],"source_content_type":"text/x-rst","patch_set":34,"id":"3a98d1f4_ecd557b9","line":217,"updated":"2016-09-29 21:55:01.000000000","message":"It makes more sense to swap the order of these two sentences.\n\neg\n\nHere is an example payload for a notification with this event type. The \"to_power\" payload field indicates the power state to which the ironic-conductor is attempting to change the node.","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d7929f25e07c42eded36c0a48a41b2fec3768144","unresolved":false,"context_lines":[{"line_number":214,"context_line":"  needed."},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"The \"to_power\" payload field indicates the power state ironic-conductor is"},{"line_number":217,"context_line":"attempting to change the node to.Example payload for a notification with this"},{"line_number":218,"context_line":"event_type::"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"   {"}],"source_content_type":"text/x-rst","patch_set":34,"id":"3a98d1f4_d93e62d9","line":217,"in_reply_to":"3a98d1f4_ecd557b9","updated":"2016-09-30 18:53:54.000000000","message":"Done","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"6fdd14888504f1f53f69300c7e93b330683d7520","unresolved":false,"context_lines":[{"line_number":237,"context_line":"            \"maintenance_reason\": None,"},{"line_number":238,"context_line":"            \"network_interface\": \"flat\","},{"line_number":239,"context_line":"            \"node_name\": None,"},{"line_number":240,"context_line":"            \"node_uuid\": \"1be26c0b-03f2-4d2e-ae87-c02d7f33c123\","},{"line_number":241,"context_line":"            \"power_state\": \"power off\","},{"line_number":242,"context_line":"            \"properties\": {"},{"line_number":243,"context_line":"                \"memory_mb\":  \"4096\","}],"source_content_type":"text/x-rst","patch_set":34,"id":"3a98d1f4_ecec7791","line":240,"updated":"2016-09-29 21:55:01.000000000","message":"I think you were going to change the above two to name \u0026 uuid respectively.","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d7929f25e07c42eded36c0a48a41b2fec3768144","unresolved":false,"context_lines":[{"line_number":237,"context_line":"            \"maintenance_reason\": None,"},{"line_number":238,"context_line":"            \"network_interface\": \"flat\","},{"line_number":239,"context_line":"            \"node_name\": None,"},{"line_number":240,"context_line":"            \"node_uuid\": \"1be26c0b-03f2-4d2e-ae87-c02d7f33c123\","},{"line_number":241,"context_line":"            \"power_state\": \"power off\","},{"line_number":242,"context_line":"            \"properties\": {"},{"line_number":243,"context_line":"                \"memory_mb\":  \"4096\","}],"source_content_type":"text/x-rst","patch_set":34,"id":"3a98d1f4_392e66a5","line":240,"in_reply_to":"3a98d1f4_ecec7791","updated":"2016-09-30 18:53:54.000000000","message":"Done","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"6fdd14888504f1f53f69300c7e93b330683d7520","unresolved":false,"context_lines":[{"line_number":263,"context_line":"------------------------------------"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"* ``baremetal.node.power_state_corrected.success`` is emitted by"},{"line_number":266,"context_line":"  ironic-conductor when the power state on the baremetal hardware has changed"},{"line_number":267,"context_line":"  from the previous known power state of the node and the database has been"},{"line_number":268,"context_line":"  updated with the new power state. It has notification level INFO."},{"line_number":269,"context_line":""}],"source_content_type":"text/x-rst","patch_set":34,"id":"3a98d1f4_ac4eef93","line":266,"updated":"2016-09-29 21:55:01.000000000","message":"maybe s/has changed/is different/\n\nEg, When we first enroll a node, we don\u0027t know what its power state is, so node.power_state\u003dNone until the first get-power-state() call is made. In this case, the power state of the hw didn\u0027t change; it\u0027s just different :)","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d7929f25e07c42eded36c0a48a41b2fec3768144","unresolved":false,"context_lines":[{"line_number":263,"context_line":"------------------------------------"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"* ``baremetal.node.power_state_corrected.success`` is emitted by"},{"line_number":266,"context_line":"  ironic-conductor when the power state on the baremetal hardware has changed"},{"line_number":267,"context_line":"  from the previous known power state of the node and the database has been"},{"line_number":268,"context_line":"  updated with the new power state. It has notification level INFO."},{"line_number":269,"context_line":""}],"source_content_type":"text/x-rst","patch_set":34,"id":"3a98d1f4_d42387a5","line":266,"in_reply_to":"3a98d1f4_ac4eef93","updated":"2016-09-30 18:53:54.000000000","message":"Done","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"6fdd14888504f1f53f69300c7e93b330683d7520","unresolved":false,"context_lines":[{"line_number":265,"context_line":"* ``baremetal.node.power_state_corrected.success`` is emitted by"},{"line_number":266,"context_line":"  ironic-conductor when the power state on the baremetal hardware has changed"},{"line_number":267,"context_line":"  from the previous known power state of the node and the database has been"},{"line_number":268,"context_line":"  updated with the new power state. It has notification level INFO."},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"The \"from_power\" payload field indicates the previous power state on the node,"},{"line_number":271,"context_line":"prior to the sync. Example payload for a notification with this event_type::"}],"source_content_type":"text/x-rst","patch_set":34,"id":"3a98d1f4_4c5acb50","line":268,"updated":"2016-09-29 21:55:01.000000000","message":"To throw in the \u0027corrected\u0027 word, how about s/has been updated with the/is corrected to reflect this new/","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d7929f25e07c42eded36c0a48a41b2fec3768144","unresolved":false,"context_lines":[{"line_number":265,"context_line":"* ``baremetal.node.power_state_corrected.success`` is emitted by"},{"line_number":266,"context_line":"  ironic-conductor when the power state on the baremetal hardware has changed"},{"line_number":267,"context_line":"  from the previous known power state of the node and the database has been"},{"line_number":268,"context_line":"  updated with the new power state. It has notification level INFO."},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"The \"from_power\" payload field indicates the previous power state on the node,"},{"line_number":271,"context_line":"prior to the sync. Example payload for a notification with this event_type::"}],"source_content_type":"text/x-rst","patch_set":34,"id":"3a98d1f4_d45aa729","line":268,"in_reply_to":"3a98d1f4_4c5acb50","updated":"2016-09-30 18:53:54.000000000","message":"Done","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"6fdd14888504f1f53f69300c7e93b330683d7520","unresolved":false,"context_lines":[{"line_number":268,"context_line":"  updated with the new power state. It has notification level INFO."},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"The \"from_power\" payload field indicates the previous power state on the node,"},{"line_number":271,"context_line":"prior to the sync. Example payload for a notification with this event_type::"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"   {"},{"line_number":274,"context_line":"    \"priority\": \"info\","}],"source_content_type":"text/x-rst","patch_set":34,"id":"3a98d1f4_8c32130f","line":271,"updated":"2016-09-29 21:55:01.000000000","message":"s/sync/correction/\n\nditto about swapping the order of the sentences.","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d7929f25e07c42eded36c0a48a41b2fec3768144","unresolved":false,"context_lines":[{"line_number":268,"context_line":"  updated with the new power state. It has notification level INFO."},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"The \"from_power\" payload field indicates the previous power state on the node,"},{"line_number":271,"context_line":"prior to the sync. Example payload for a notification with this event_type::"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"   {"},{"line_number":274,"context_line":"    \"priority\": \"info\","}],"source_content_type":"text/x-rst","patch_set":34,"id":"3a98d1f4_b4a99b92","line":271,"in_reply_to":"3a98d1f4_8c32130f","updated":"2016-09-30 18:53:54.000000000","message":"Done","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d7929f25e07c42eded36c0a48a41b2fec3768144","unresolved":false,"context_lines":[{"line_number":274,"context_line":"    \"priority\": \"info\","},{"line_number":275,"context_line":"    \"payload\":{"},{"line_number":276,"context_line":"        \"ironic_object.namespace\":\"ironic\","},{"line_number":277,"context_line":"        \"ironic_object.name\":\"NodeSyncPowerStatePayload\","},{"line_number":278,"context_line":"        \"ironic_object.version\":\"1.0\","},{"line_number":279,"context_line":"        \"ironic_object.data\":{"},{"line_number":280,"context_line":"            \"clean_step\": None,"}],"source_content_type":"text/x-rst","patch_set":34,"id":"3a98d1f4_1495ef3d","line":277,"range":{"start_line":277,"start_character":30,"end_line":277,"end_character":56},"updated":"2016-09-30 18:53:54.000000000","message":"missed this, corrected in next patch set","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d7929f25e07c42eded36c0a48a41b2fec3768144","unresolved":false,"context_lines":[{"line_number":306,"context_line":"            \"from_power\": \"power on\""},{"line_number":307,"context_line":"        }"},{"line_number":308,"context_line":"    },"},{"line_number":309,"context_line":"    \"event_type\":\"baremetal.node.power_sync.success\","},{"line_number":310,"context_line":"    \"publisher_id\":\"ironic-conductor.cond-hostname02\""},{"line_number":311,"context_line":"   }"},{"line_number":312,"context_line":""}],"source_content_type":"text/x-rst","patch_set":34,"id":"3a98d1f4_948f3f29","line":309,"range":{"start_line":309,"start_character":18,"end_line":309,"end_character":51},"updated":"2016-09-30 18:53:54.000000000","message":"missed this, corrected (ha) in next patch set","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":211,"context_line":"  fails to set a node\u0027s power state. It has notification level ERROR. This can"},{"line_number":212,"context_line":"  occur when ironic fails to retrieve the old power state prior to setting the"},{"line_number":213,"context_line":"  new one on the node, or when it fails to set the power state if a change is"},{"line_number":214,"context_line":"  needed."},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"Here is an example payload for a notification with this event type. The"},{"line_number":217,"context_line":"\"to_power\" payload field indicates the power state to which the"}],"source_content_type":"text/x-rst","patch_set":35,"id":"3a98d1f4_5743b212","line":214,"updated":"2016-10-03 21:08:10.000000000","message":"nit s/needed/requested/","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":211,"context_line":"  fails to set a node\u0027s power state. It has notification level ERROR. This can"},{"line_number":212,"context_line":"  occur when ironic fails to retrieve the old power state prior to setting the"},{"line_number":213,"context_line":"  new one on the node, or when it fails to set the power state if a change is"},{"line_number":214,"context_line":"  needed."},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"Here is an example payload for a notification with this event type. The"},{"line_number":217,"context_line":"\"to_power\" payload field indicates the power state to which the"}],"source_content_type":"text/x-rst","patch_set":35,"id":"3a98d1f4_83579d25","line":214,"in_reply_to":"3a98d1f4_5743b212","updated":"2016-10-04 20:43:15.000000000","message":"Done","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":254,"context_line":"        }"},{"line_number":255,"context_line":"    },"},{"line_number":256,"context_line":"    \"event_type\":\"baremetal.node.power_set.start\","},{"line_number":257,"context_line":"    \"publisher_id\":\"ironic-conductor.cond-hostname01\""},{"line_number":258,"context_line":"   }"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":""}],"source_content_type":"text/x-rst","patch_set":35,"id":"3a98d1f4_bce69d41","line":257,"updated":"2016-10-03 21:08:10.000000000","message":"just a nit/question. cond-hostname01 is the hostname for that ironic-conductor, right? is the \u0027cond\u0027 part there to indicate the conductor? Cuz it has \u0027ironic-conductor\u0027 already so if that is the only reason, it isn\u0027t needed, and might be a bit confusing. (I was wondering what \u0027cond\u0027 stood for...)\n\nI see that this was originally there (L152), so is outside the scope of this patch, but thought I\u0027d comment about it before I forgot.","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":254,"context_line":"        }"},{"line_number":255,"context_line":"    },"},{"line_number":256,"context_line":"    \"event_type\":\"baremetal.node.power_set.start\","},{"line_number":257,"context_line":"    \"publisher_id\":\"ironic-conductor.cond-hostname01\""},{"line_number":258,"context_line":"   }"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":""}],"source_content_type":"text/x-rst","patch_set":35,"id":"3a98d1f4_6308d12e","line":257,"in_reply_to":"3a98d1f4_bce69d41","updated":"2016-10-04 20:43:15.000000000","message":"It does stand for \"conductor\". I\u0027ll change it to hostname01.","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"}],"ironic/conductor/manager.py":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"a21ec9701b16292a5271cdc704798573c003e68c","unresolved":false,"context_lines":[{"line_number":170,"context_line":""},{"line_number":171,"context_line":"        with task_manager.acquire(context, node_id, shared\u003dFalse,"},{"line_number":172,"context_line":"                                  purpose\u003d\u0027changing node power state\u0027) as task:"},{"line_number":173,"context_line":"            utils.emit_set_power_notification("},{"line_number":174,"context_line":"                context, task.node, new_state,"},{"line_number":175,"context_line":"                fields.NotificationPriority.INFO, \u0027start\u0027)"},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"dada55a8_7df6c38f","line":173,"updated":"2016-07-21 15:51:53.000000000","message":"If validate l177 fails and raises exception fail notifications will not be sent. This should be moved to utils.node_power_action().","commit_id":"299d2a37b7fd33fa8666e292a148041c69bb2030"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"53f828bb6c1fc461014b8133c2fb7f778fded353","unresolved":false,"context_lines":[{"line_number":170,"context_line":""},{"line_number":171,"context_line":"        with task_manager.acquire(context, node_id, shared\u003dFalse,"},{"line_number":172,"context_line":"                                  purpose\u003d\u0027changing node power state\u0027) as task:"},{"line_number":173,"context_line":"            utils.emit_set_power_notification("},{"line_number":174,"context_line":"                context, task.node, new_state,"},{"line_number":175,"context_line":"                fields.NotificationPriority.INFO, \u0027start\u0027)"},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"dada55a8_c49ab413","line":173,"in_reply_to":"dada55a8_3f25f1c1","updated":"2016-07-26 22:48:33.000000000","message":"Removed in next patch set","commit_id":"299d2a37b7fd33fa8666e292a148041c69bb2030"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"fe4e6600fe9f011bad236b5e0f06e6f63b153d6b","unresolved":false,"context_lines":[{"line_number":170,"context_line":""},{"line_number":171,"context_line":"        with task_manager.acquire(context, node_id, shared\u003dFalse,"},{"line_number":172,"context_line":"                                  purpose\u003d\u0027changing node power state\u0027) as task:"},{"line_number":173,"context_line":"            utils.emit_set_power_notification("},{"line_number":174,"context_line":"                context, task.node, new_state,"},{"line_number":175,"context_line":"                fields.NotificationPriority.INFO, \u0027start\u0027)"},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"dada55a8_3f25f1c1","line":173,"in_reply_to":"dada55a8_4b9495e7","updated":"2016-07-25 08:44:54.000000000","message":"Validate and spawn error return via API synchronously, power transition is not started yet, so I think OK to remove spawn error notification.","commit_id":"299d2a37b7fd33fa8666e292a148041c69bb2030"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"11835157cd9e5ab2c446016acfd59c490823f754","unresolved":false,"context_lines":[{"line_number":170,"context_line":""},{"line_number":171,"context_line":"        with task_manager.acquire(context, node_id, shared\u003dFalse,"},{"line_number":172,"context_line":"                                  purpose\u003d\u0027changing node power state\u0027) as task:"},{"line_number":173,"context_line":"            utils.emit_set_power_notification("},{"line_number":174,"context_line":"                context, task.node, new_state,"},{"line_number":175,"context_line":"                fields.NotificationPriority.INFO, \u0027start\u0027)"},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"dada55a8_4b9495e7","line":173,"in_reply_to":"dada55a8_7df6c38f","updated":"2016-07-22 18:15:14.000000000","message":"Done. At the moment, a .fail notification is still being sent when spawning a worker to execute utils.node_power_action fails.\n\nWhat would you think about doing a try/except here and sending a .fail notification if validate fails, so that this is more consistent? I think that should be added or the spawn failure notification should be removed.","commit_id":"299d2a37b7fd33fa8666e292a148041c69bb2030"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"a21ec9701b16292a5271cdc704798573c003e68c","unresolved":false,"context_lines":[{"line_number":2488,"context_line":"        try:"},{"line_number":2489,"context_line":"            # node_power_action will update the node record"},{"line_number":2490,"context_line":"            # so don\u0027t do that again here."},{"line_number":2491,"context_line":"            utils.emit_set_power_notification("},{"line_number":2492,"context_line":"                task.context, node, node.power_state,"},{"line_number":2493,"context_line":"                fields.NotificationPriority.INFO, \u0027start\u0027)"},{"line_number":2494,"context_line":"            utils.node_power_action(task, node.power_state)"}],"source_content_type":"text/x-python","patch_set":11,"id":"dada55a8_bdeb1bdb","line":2491,"updated":"2016-07-21 15:51:53.000000000","message":"This should be moved to utils.node_power_action() because also drivers uses this function during deploy.","commit_id":"299d2a37b7fd33fa8666e292a148041c69bb2030"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"11835157cd9e5ab2c446016acfd59c490823f754","unresolved":false,"context_lines":[{"line_number":2488,"context_line":"        try:"},{"line_number":2489,"context_line":"            # node_power_action will update the node record"},{"line_number":2490,"context_line":"            # so don\u0027t do that again here."},{"line_number":2491,"context_line":"            utils.emit_set_power_notification("},{"line_number":2492,"context_line":"                task.context, node, node.power_state,"},{"line_number":2493,"context_line":"                fields.NotificationPriority.INFO, \u0027start\u0027)"},{"line_number":2494,"context_line":"            utils.node_power_action(task, node.power_state)"}],"source_content_type":"text/x-python","patch_set":11,"id":"dada55a8_8bb5ed7f","line":2491,"in_reply_to":"dada55a8_bdeb1bdb","updated":"2016-07-22 18:15:14.000000000","message":"Good point, done","commit_id":"299d2a37b7fd33fa8666e292a148041c69bb2030"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9d63de254cbc6a9d4149e39c8c3eac718e12bcd2","unresolved":false,"context_lines":[{"line_number":2505,"context_line":"                  \"while trying to sync power state.\"))"},{"line_number":2506,"context_line":"    except Exception as e:"},{"line_number":2507,"context_line":"        # Stop if any exception is raised when getting the power state. We"},{"line_number":2508,"context_line":"        # notify about the power state sync in the max retries handler to avoid"},{"line_number":2509,"context_line":"        # spamming notifications if the sync eventually succeeds."},{"line_number":2510,"context_line":"        if count \u003e max_retries:"},{"line_number":2511,"context_line":"            task.upgrade_lock()"}],"source_content_type":"text/x-python","patch_set":25,"id":"fa7ab95a_40bfbca9","line":2508,"updated":"2016-09-01 22:20:35.000000000","message":"s/handler/handler (rather than here)/ ?","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"e8378effc3ddec99cd490ee09c6cd3e76b86f5c2","unresolved":false,"context_lines":[{"line_number":2505,"context_line":"                  \"while trying to sync power state.\"))"},{"line_number":2506,"context_line":"    except Exception as e:"},{"line_number":2507,"context_line":"        # Stop if any exception is raised when getting the power state. We"},{"line_number":2508,"context_line":"        # notify about the power state sync in the max retries handler to avoid"},{"line_number":2509,"context_line":"        # spamming notifications if the sync eventually succeeds."},{"line_number":2510,"context_line":"        if count \u003e max_retries:"},{"line_number":2511,"context_line":"            task.upgrade_lock()"}],"source_content_type":"text/x-python","patch_set":25,"id":"9a89bdaa_989869c2","line":2508,"in_reply_to":"fa7ab95a_40bfbca9","updated":"2016-09-06 22:51:50.000000000","message":"Done","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"09c6117da45b00111c1aef21e6204b4710172f1a","unresolved":false,"context_lines":[{"line_number":967,"context_line":"                         {\u0027node\u0027: node.uuid, \u0027msg\u0027: e})"},{"line_number":968,"context_line":""},{"line_number":969,"context_line":"        if error is None:"},{"line_number":970,"context_line":"            node.power_state \u003d power_state"},{"line_number":971,"context_line":"            task.process_event(\u0027done\u0027)"},{"line_number":972,"context_line":"        else:"},{"line_number":973,"context_line":"            LOG.error(error)"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_93dde016","line":970,"updated":"2016-09-14 22:57:19.000000000","message":"This is sort of like the power_sync, right? JayF wanted to know when the node\u0027s power_state changed.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dc67c0f7419ea63333fb37fc030485b2871283b4","unresolved":false,"context_lines":[{"line_number":967,"context_line":"                         {\u0027node\u0027: node.uuid, \u0027msg\u0027: e})"},{"line_number":968,"context_line":""},{"line_number":969,"context_line":"        if error is None:"},{"line_number":970,"context_line":"            node.power_state \u003d power_state"},{"line_number":971,"context_line":"            task.process_event(\u0027done\u0027)"},{"line_number":972,"context_line":"        else:"},{"line_number":973,"context_line":"            LOG.error(error)"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_06a2f798","line":970,"in_reply_to":"7a8ec9b2_93dde016","updated":"2016-09-16 23:04:08.000000000","message":"Yes. Perhaps I should re-use the node sync notification here? Or we can rename that so it fits both cases.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1b80d021f245f0df976f3086482c4319a1fbcc71","unresolved":false,"context_lines":[{"line_number":2465,"context_line":"    node.save()"},{"line_number":2466,"context_line":"    notify_utils.emit_power_sync_notification(task,"},{"line_number":2467,"context_line":"                                              fields.NotificationLevel.ERROR,"},{"line_number":2468,"context_line":"                                              \u0027error\u0027)"},{"line_number":2469,"context_line":"    LOG.error(msg)"},{"line_number":2470,"context_line":""},{"line_number":2471,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"9a89bdaa_633111ed","line":2468,"range":{"start_line":2468,"start_character":47,"end_line":2468,"end_character":52},"updated":"2016-09-13 09:22:31.000000000","message":"I think you can model the status values as an enum too.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d20bde35067af2ebd84a6a3494bc0c24a2ded5d0","unresolved":false,"context_lines":[{"line_number":2465,"context_line":"    node.save()"},{"line_number":2466,"context_line":"    notify_utils.emit_power_sync_notification(task,"},{"line_number":2467,"context_line":"                                              fields.NotificationLevel.ERROR,"},{"line_number":2468,"context_line":"                                              \u0027error\u0027)"},{"line_number":2469,"context_line":"    LOG.error(msg)"},{"line_number":2470,"context_line":""},{"line_number":2471,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_5682a3c9","line":2468,"range":{"start_line":2468,"start_character":47,"end_line":2468,"end_character":52},"in_reply_to":"7a8ec9b2_86bc47bc","updated":"2016-09-19 19:17:40.000000000","message":"yes, I think that\u0027s what Balazs meant.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dc67c0f7419ea63333fb37fc030485b2871283b4","unresolved":false,"context_lines":[{"line_number":2465,"context_line":"    node.save()"},{"line_number":2466,"context_line":"    notify_utils.emit_power_sync_notification(task,"},{"line_number":2467,"context_line":"                                              fields.NotificationLevel.ERROR,"},{"line_number":2468,"context_line":"                                              \u0027error\u0027)"},{"line_number":2469,"context_line":"    LOG.error(msg)"},{"line_number":2470,"context_line":""},{"line_number":2471,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_86bc47bc","line":2468,"range":{"start_line":2468,"start_character":47,"end_line":2468,"end_character":52},"in_reply_to":"9a89bdaa_633111ed","updated":"2016-09-16 23:04:08.000000000","message":"By creating a new class for it, like fields.NotificationLevel?","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d332b91aa2aa04b21394e4488df67bb41870c4ee","unresolved":false,"context_lines":[{"line_number":2564,"context_line":"        try:"},{"line_number":2565,"context_line":"            # node_power_action will update the node record"},{"line_number":2566,"context_line":"            # so don\u0027t do that again here."},{"line_number":2567,"context_line":"            utils.node_power_action(task, node.power_state)"},{"line_number":2568,"context_line":"        except Exception as e:"},{"line_number":2569,"context_line":"            LOG.error(_LE("},{"line_number":2570,"context_line":"                \"Failed to change power state of node %(node)s \""}],"source_content_type":"text/x-python","patch_set":30,"id":"7a8ec9b2_4c085229","line":2567,"updated":"2016-09-19 19:17:32.000000000","message":"this call will set the hardware node\u0027s power state (which had been \u0027power_state\u0027) to \u0027node.power_state\u0027.\n\nThis seems like it is sync\u0027ing the baremetal node with the ironic node. Shouldn\u0027t we emit a notification for this?\n\nThis is the *only* case where we actually modify the power state of the baremetal node.","commit_id":"a4504a79fe83df705e51d86073723f6139d34744"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"1968b8016ffcf1eac73e2ded6967cb62d17eadb0","unresolved":false,"context_lines":[{"line_number":2564,"context_line":"        try:"},{"line_number":2565,"context_line":"            # node_power_action will update the node record"},{"line_number":2566,"context_line":"            # so don\u0027t do that again here."},{"line_number":2567,"context_line":"            utils.node_power_action(task, node.power_state)"},{"line_number":2568,"context_line":"        except Exception as e:"},{"line_number":2569,"context_line":"            LOG.error(_LE("},{"line_number":2570,"context_line":"                \"Failed to change power state of node %(node)s \""}],"source_content_type":"text/x-python","patch_set":30,"id":"7a8ec9b2_7d2590c0","line":2567,"in_reply_to":"7a8ec9b2_4c085229","updated":"2016-09-21 17:09:46.000000000","message":"Yup, attempting to force the baremetal node into the ironic node\u0027s power state is the intention behind the force_power_state_during_sync option.\n\nbaremetal.node.power_set notifications will be emitted for this, in the node_power_action method.\n\nI think this is one reason it was a good suggestion to put the notifications in the scope of the helper function instead of here in manager.py","commit_id":"a4504a79fe83df705e51d86073723f6139d34744"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"6f3540d823239ff45e5b609dbddbca6baa6804a6","unresolved":false,"context_lines":[{"line_number":970,"context_line":"                node.power_state \u003d power_state"},{"line_number":971,"context_line":"                notify_utils.emit_power_sync_notification("},{"line_number":972,"context_line":"                    task, old_power_state)"},{"line_number":973,"context_line":"                task.process_event(\u0027done\u0027)"},{"line_number":974,"context_line":"        else:"},{"line_number":975,"context_line":"            LOG.error(error)"},{"line_number":976,"context_line":"            node.last_error \u003d error"}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_8bb37909","line":973,"updated":"2016-09-26 19:42:00.000000000","message":"task.process_event has to be called, regardless of if power_state \u003d\u003d node.power_state.\n\n(I\u0027d be curious to know if that\u0027s why the gate tests failed, but not curious enough to actually look!)","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"8704ff646aa569ab78935623a939ba4b8c0cfa97","unresolved":false,"context_lines":[{"line_number":970,"context_line":"                node.power_state \u003d power_state"},{"line_number":971,"context_line":"                notify_utils.emit_power_sync_notification("},{"line_number":972,"context_line":"                    task, old_power_state)"},{"line_number":973,"context_line":"                task.process_event(\u0027done\u0027)"},{"line_number":974,"context_line":"        else:"},{"line_number":975,"context_line":"            LOG.error(error)"},{"line_number":976,"context_line":"            node.last_error \u003d error"}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_fadbbb4c","line":973,"in_reply_to":"5a8bc5a2_8bb37909","updated":"2016-09-27 16:29:03.000000000","message":"I\u0027d be surprised if this wasn\u0027t the reason. \n\nI was pretty confused about why they were failing and didn\u0027t have enough speed to download the huge log files at the time. Thanks for the catch!\n\nI have faster internet now, so I\u0027ll look into this if they continue to fail.","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"6f3540d823239ff45e5b609dbddbca6baa6804a6","unresolved":false,"context_lines":[{"line_number":2464,"context_line":"    node.last_error \u003d msg"},{"line_number":2465,"context_line":"    node.maintenance \u003d True"},{"line_number":2466,"context_line":"    node.maintenance_reason \u003d msg"},{"line_number":2467,"context_line":"    node.save()"},{"line_number":2468,"context_line":"    LOG.error(msg)"},{"line_number":2469,"context_line":""},{"line_number":2470,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_ab283534","line":2467,"updated":"2016-09-26 19:42:00.000000000","message":"We\u0027re actually sync\u0027ing here. Why did you decide to not emit a notification here?","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"8704ff646aa569ab78935623a939ba4b8c0cfa97","unresolved":false,"context_lines":[{"line_number":2464,"context_line":"    node.last_error \u003d msg"},{"line_number":2465,"context_line":"    node.maintenance \u003d True"},{"line_number":2466,"context_line":"    node.maintenance_reason \u003d msg"},{"line_number":2467,"context_line":"    node.save()"},{"line_number":2468,"context_line":"    LOG.error(msg)"},{"line_number":2469,"context_line":""},{"line_number":2470,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_9db3914c","line":2467,"in_reply_to":"5a8bc5a2_ab283534","updated":"2016-09-27 16:29:03.000000000","message":"Just missed this, no other reason.\n\nPutting baremetal.node.power_sync.success for now since we discussed removing .error in previous patch sets, but I\u0027m open to switching this to .error if we want something in event type to indicate that a failure occurred here.","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e18dd3535f166ae87c2b3ca034416189a3b2a97f","unresolved":false,"context_lines":[{"line_number":2444,"context_line":"    node power state and place the node in maintenance."},{"line_number":2445,"context_line":""},{"line_number":2446,"context_line":"    :param task: a TaskManager instance with an exclusive lock"},{"line_number":2447,"context_line":"    :param old_power_state; the previous power state of the node"},{"line_number":2448,"context_line":"    :param actual_power_state: the actual power state of the node; a power"},{"line_number":2449,"context_line":"           state from ironic.common.states"},{"line_number":2450,"context_line":"    :param exception: the exception object that caused the sync power state"}],"source_content_type":"text/x-python","patch_set":33,"id":"5a8bc5a2_c99f0464","line":2447,"updated":"2016-09-27 21:17:30.000000000","message":"this isn\u0027t needed. it is the same as node.power_state.","commit_id":"9542d0475007d1fd5ff138b87b7141b08c52141e"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"27980cf2a31912a0948dcafd931d1c3ecc24d8aa","unresolved":false,"context_lines":[{"line_number":2444,"context_line":"    node power state and place the node in maintenance."},{"line_number":2445,"context_line":""},{"line_number":2446,"context_line":"    :param task: a TaskManager instance with an exclusive lock"},{"line_number":2447,"context_line":"    :param old_power_state; the previous power state of the node"},{"line_number":2448,"context_line":"    :param actual_power_state: the actual power state of the node; a power"},{"line_number":2449,"context_line":"           state from ironic.common.states"},{"line_number":2450,"context_line":"    :param exception: the exception object that caused the sync power state"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a98d1f4_276598e0","line":2447,"in_reply_to":"3a98d1f4_a876293c","updated":"2016-09-29 21:55:09.000000000","message":"I\u0027m not sure we\u0027re talking about the same thing. LIne 2465 has \u0027node.power_state \u003d actual_power_state\u0027. this \u0027old_power_state\u0027 is the same as node.power_state BEFORE line 2465 is executed, which is why I mentioned that there is no need to pass \u0027old_power_state to this method.","commit_id":"9542d0475007d1fd5ff138b87b7141b08c52141e"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"91d0e458e95ebcf7a166d75d0714da396d665aac","unresolved":false,"context_lines":[{"line_number":2444,"context_line":"    node power state and place the node in maintenance."},{"line_number":2445,"context_line":""},{"line_number":2446,"context_line":"    :param task: a TaskManager instance with an exclusive lock"},{"line_number":2447,"context_line":"    :param old_power_state; the previous power state of the node"},{"line_number":2448,"context_line":"    :param actual_power_state: the actual power state of the node; a power"},{"line_number":2449,"context_line":"           state from ironic.common.states"},{"line_number":2450,"context_line":"    :param exception: the exception object that caused the sync power state"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a98d1f4_a876293c","line":2447,"in_reply_to":"5a8bc5a2_c99f0464","updated":"2016-09-29 15:47:10.000000000","message":"Not necessarily, I think?\n\nIf you look right below this, a new power state is assigned to the node. I\u0027m not sure why that code would be there if it\u0027s not possible for the power state to have changed.\n\nMaybe that\u0027s an error as well?\n\nFor now, I\u0027ll add an if statement to check and make sure the power state actually changed, since that\u0027s needed to match the semantics of the notification","commit_id":"9542d0475007d1fd5ff138b87b7141b08c52141e"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e18dd3535f166ae87c2b3ca034416189a3b2a97f","unresolved":false,"context_lines":[{"line_number":2467,"context_line":"    node.maintenance \u003d True"},{"line_number":2468,"context_line":"    node.maintenance_reason \u003d msg"},{"line_number":2469,"context_line":"    node.save()"},{"line_number":2470,"context_line":"    notify_utils.emit_power_sync_notification(task, old_power_state)"},{"line_number":2471,"context_line":"    LOG.error(msg)"},{"line_number":2472,"context_line":""},{"line_number":2473,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"5a8bc5a2_295ce8ec","line":2470,"updated":"2016-09-27 21:17:30.000000000","message":"we probably need to make sure we clearly document what this power-sync notification means, so people don\u0027t think it is the same thing as the power-sync that we do in code. Cuz even though there was an error, the conductor \"succeeded in setting the node\u0027s power state to that of the actual hardware\u0027s power state\".\n\nIs that really what people want to know though? Or do they want to know that the hw had power_hw, the node had power_node, and that it failed to set the hw to power_node...","commit_id":"9542d0475007d1fd5ff138b87b7141b08c52141e"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"91d0e458e95ebcf7a166d75d0714da396d665aac","unresolved":false,"context_lines":[{"line_number":2467,"context_line":"    node.maintenance \u003d True"},{"line_number":2468,"context_line":"    node.maintenance_reason \u003d msg"},{"line_number":2469,"context_line":"    node.save()"},{"line_number":2470,"context_line":"    notify_utils.emit_power_sync_notification(task, old_power_state)"},{"line_number":2471,"context_line":"    LOG.error(msg)"},{"line_number":2472,"context_line":""},{"line_number":2473,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"3a98d1f4_83f5ce84","line":2470,"in_reply_to":"3a98d1f4_02a46e55","updated":"2016-09-29 15:47:10.000000000","message":"from IRC discussion, we\u0027re going with \"baremetal.node.power_state_corrected.success\" for this: http://eavesdrop.openstack.org/irclogs/%23openstack-ironic/%23openstack-ironic.2016-09-28.log.html#t2016-09-28T17:25:54\n\nBecause the error is not about the actual operation of updating the state of the node in the DB to the actual power state on the baremetal hardware, we think it should stay as .success. The notification indicates that ironic was successful in updating the power state in the database to match the power state of the baremetal hardware.","commit_id":"9542d0475007d1fd5ff138b87b7141b08c52141e"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"c98c686d581eed8ead39e9673554270285eb418b","unresolved":false,"context_lines":[{"line_number":2467,"context_line":"    node.maintenance \u003d True"},{"line_number":2468,"context_line":"    node.maintenance_reason \u003d msg"},{"line_number":2469,"context_line":"    node.save()"},{"line_number":2470,"context_line":"    notify_utils.emit_power_sync_notification(task, old_power_state)"},{"line_number":2471,"context_line":"    LOG.error(msg)"},{"line_number":2472,"context_line":""},{"line_number":2473,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"3a98d1f4_02a46e55","line":2470,"in_reply_to":"5a8bc5a2_295ce8ec","updated":"2016-09-28 13:34:46.000000000","message":"+1 it\u0027s error","commit_id":"9542d0475007d1fd5ff138b87b7141b08c52141e"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"b8627cbc1a3323f8b64d5341bc698d1bb83afcfd","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    # NOTE(rloo): This must be in sync with rpcapi.ConductorAPI\u0027s."},{"line_number":84,"context_line":"    RPC_API_VERSION \u003d \u00271.34\u0027"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    target \u003d messaging.Target(version\u003dRPC_API_VERSION)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def __init__(self, host, topic):"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_e44ee739","side":"PARENT","line":85,"updated":"2016-10-03 11:29:25.000000000","message":"nit: not related change","commit_id":"87327803772ef7c80f7981d32851b90253d5c655"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    # NOTE(rloo): This must be in sync with rpcapi.ConductorAPI\u0027s."},{"line_number":84,"context_line":"    RPC_API_VERSION \u003d \u00271.34\u0027"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    target \u003d messaging.Target(version\u003dRPC_API_VERSION)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def __init__(self, host, topic):"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_a65e6710","side":"PARENT","line":85,"in_reply_to":"3a98d1f4_e44ee739","updated":"2016-10-04 20:43:15.000000000","message":"Removed change","commit_id":"87327803772ef7c80f7981d32851b90253d5c655"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"b8627cbc1a3323f8b64d5341bc698d1bb83afcfd","unresolved":false,"context_lines":[{"line_number":968,"context_line":"            if power_state !\u003d node.power_state:"},{"line_number":969,"context_line":"                old_power_state \u003d node.power_state"},{"line_number":970,"context_line":"                node.power_state \u003d power_state"},{"line_number":971,"context_line":"                notify_utils.emit_power_state_corrected_notification("},{"line_number":972,"context_line":"                    task, old_power_state)"},{"line_number":973,"context_line":"            task.process_event(\u0027done\u0027)"},{"line_number":974,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_e498a77a","line":971,"updated":"2016-10-03 11:29:25.000000000","message":"Better move emit_power_state_corrected_notification() after task.process_event(), node saved there.","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":968,"context_line":"            if power_state !\u003d node.power_state:"},{"line_number":969,"context_line":"                old_power_state \u003d node.power_state"},{"line_number":970,"context_line":"                node.power_state \u003d power_state"},{"line_number":971,"context_line":"                notify_utils.emit_power_state_corrected_notification("},{"line_number":972,"context_line":"                    task, old_power_state)"},{"line_number":973,"context_line":"            task.process_event(\u0027done\u0027)"},{"line_number":974,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_86e6cb42","line":971,"in_reply_to":"3a98d1f4_17c04a4f","updated":"2016-10-04 20:43:15.000000000","message":"Done","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":968,"context_line":"            if power_state !\u003d node.power_state:"},{"line_number":969,"context_line":"                old_power_state \u003d node.power_state"},{"line_number":970,"context_line":"                node.power_state \u003d power_state"},{"line_number":971,"context_line":"                notify_utils.emit_power_state_corrected_notification("},{"line_number":972,"context_line":"                    task, old_power_state)"},{"line_number":973,"context_line":"            task.process_event(\u0027done\u0027)"},{"line_number":974,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_66d9bf83","line":971,"in_reply_to":"3a98d1f4_e498a77a","updated":"2016-10-04 20:43:15.000000000","message":"Done","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":968,"context_line":"            if power_state !\u003d node.power_state:"},{"line_number":969,"context_line":"                old_power_state \u003d node.power_state"},{"line_number":970,"context_line":"                node.power_state \u003d power_state"},{"line_number":971,"context_line":"                notify_utils.emit_power_state_corrected_notification("},{"line_number":972,"context_line":"                    task, old_power_state)"},{"line_number":973,"context_line":"            task.process_event(\u0027done\u0027)"},{"line_number":974,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_17c04a4f","line":971,"in_reply_to":"3a98d1f4_e498a77a","updated":"2016-10-03 21:08:10.000000000","message":"Yes, that makes sense, since we do describe it as being emitted *after* the DB was updated.","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":2444,"context_line":"    node power state and place the node in maintenance."},{"line_number":2445,"context_line":""},{"line_number":2446,"context_line":"    :param task: a TaskManager instance with an exclusive lock"},{"line_number":2447,"context_line":"    :param old_power_state; the previous power state of the node"},{"line_number":2448,"context_line":"    :param actual_power_state: the actual power state of the node; a power"},{"line_number":2449,"context_line":"           state from ironic.common.states"},{"line_number":2450,"context_line":"    :param exception: the exception object that caused the sync power state"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_d799827a","line":2447,"updated":"2016-10-03 21:08:10.000000000","message":"did we resolve this? I don\u0027t think you need to pass this into the method. This value is the same as the value of node.power_state before the change at line 2465.","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":2444,"context_line":"    node power state and place the node in maintenance."},{"line_number":2445,"context_line":""},{"line_number":2446,"context_line":"    :param task: a TaskManager instance with an exclusive lock"},{"line_number":2447,"context_line":"    :param old_power_state; the previous power state of the node"},{"line_number":2448,"context_line":"    :param actual_power_state: the actual power state of the node; a power"},{"line_number":2449,"context_line":"           state from ironic.common.states"},{"line_number":2450,"context_line":"    :param exception: the exception object that caused the sync power state"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_86196b25","line":2447,"in_reply_to":"3a98d1f4_d799827a","updated":"2016-10-04 20:43:15.000000000","message":"Oh, you\u0027re completely correct. I commented about this in response to yours before but didn\u0027t notice that the power state hadn\u0027t changed before this function call. Thanks for pointing out the specific line number.","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":2512,"context_line":"                  \"while trying to sync power state.\"))"},{"line_number":2513,"context_line":"    except Exception as e:"},{"line_number":2514,"context_line":"        # Stop if any exception is raised when getting the power state. We"},{"line_number":2515,"context_line":"        # notify about the power state sync in the max retries handler rather"},{"line_number":2516,"context_line":"        # than here to avoid spamming notifications if the sync eventually"},{"line_number":2517,"context_line":"        # succeeds."},{"line_number":2518,"context_line":"        if count \u003e max_retries:"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_1795aa31","line":2515,"updated":"2016-10-03 21:08:10.000000000","message":"s/sync/correction/","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":2512,"context_line":"                  \"while trying to sync power state.\"))"},{"line_number":2513,"context_line":"    except Exception as e:"},{"line_number":2514,"context_line":"        # Stop if any exception is raised when getting the power state. We"},{"line_number":2515,"context_line":"        # notify about the power state sync in the max retries handler rather"},{"line_number":2516,"context_line":"        # than here to avoid spamming notifications if the sync eventually"},{"line_number":2517,"context_line":"        # succeeds."},{"line_number":2518,"context_line":"        if count \u003e max_retries:"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a95cdbc_9b4c6b78","line":2515,"in_reply_to":"3a98d1f4_1795aa31","updated":"2016-10-04 20:43:15.000000000","message":"Removed extra parts of comment, see below","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":2514,"context_line":"        # Stop if any exception is raised when getting the power state. We"},{"line_number":2515,"context_line":"        # notify about the power state sync in the max retries handler rather"},{"line_number":2516,"context_line":"        # than here to avoid spamming notifications if the sync eventually"},{"line_number":2517,"context_line":"        # succeeds."},{"line_number":2518,"context_line":"        if count \u003e max_retries:"},{"line_number":2519,"context_line":"            task.upgrade_lock()"},{"line_number":2520,"context_line":"            handle_sync_power_state_max_retries_exceeded(task, old_power_state,"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_97245a0d","line":2517,"updated":"2016-10-03 21:08:10.000000000","message":"Hmm. Do we need this comment any more? I think this might have been when you (or I thought you were) trying to indicate that the power sync failed? But we aren\u0027t doing a sync any more, only if the DB is updated...\n\nThere is no change to the node\u0027s power state in this except so notification would be emitted anyway. So that comment is confusing now?","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":2514,"context_line":"        # Stop if any exception is raised when getting the power state. We"},{"line_number":2515,"context_line":"        # notify about the power state sync in the max retries handler rather"},{"line_number":2516,"context_line":"        # than here to avoid spamming notifications if the sync eventually"},{"line_number":2517,"context_line":"        # succeeds."},{"line_number":2518,"context_line":"        if count \u003e max_retries:"},{"line_number":2519,"context_line":"            task.upgrade_lock()"},{"line_number":2520,"context_line":"            handle_sync_power_state_max_retries_exceeded(task, old_power_state,"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a95cdbc_6f9fd95f","line":2517,"in_reply_to":"3a98d1f4_97245a0d","updated":"2016-10-04 20:43:15.000000000","message":"Agreed, reverted to what was here before","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":19901,"name":"Xu Ao","email":"xuao@awcloud.com","username":"xuao"},"change_message_id":"2ade522182287a0378958c4f12684dd37092cab0","unresolved":false,"context_lines":[{"line_number":967,"context_line":""},{"line_number":968,"context_line":"        if error is None:"},{"line_number":969,"context_line":"            power_state_changed \u003d (power_state !\u003d node.power_state)"},{"line_number":970,"context_line":"            if power_state_changed:"},{"line_number":971,"context_line":"                old_power_state \u003d node.power_state"},{"line_number":972,"context_line":"                node.power_state \u003d power_state"},{"line_number":973,"context_line":"            task.process_event(\u0027done\u0027)"},{"line_number":974,"context_line":"            if power_state_changed:"},{"line_number":975,"context_line":"                notify_utils.emit_power_state_corrected_notification("},{"line_number":976,"context_line":"                    task, old_power_state)"},{"line_number":977,"context_line":"        else:"},{"line_number":978,"context_line":"            LOG.error(error)"},{"line_number":979,"context_line":"            node.last_error \u003d error"}],"source_content_type":"text/x-python","patch_set":39,"id":"1a95cdbc_9e565e28","line":976,"range":{"start_line":970,"start_character":12,"end_line":976,"end_character":42},"updated":"2016-10-08 03:13:30.000000000","message":"I\u0027m not sure if it\u0027s better like this:\n \n        if power_state_changed:\n                old_power_state \u003d node.power_state\n                node.power_state \u003d power_state\n                task.process_event(\u0027done\u0027)\n                notify_utils.emit_power_state_corrected_notification(\n                    task, old_power_state)\n        else:\n                task.process_event(\u0027done\u0027)","commit_id":"00fc5a601c6cba42b4cbf042d76252f6b8ce8265"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"86aeb17870ff1d0075ee5a2c1c52f1d6b1f80ed1","unresolved":false,"context_lines":[{"line_number":967,"context_line":""},{"line_number":968,"context_line":"        if error is None:"},{"line_number":969,"context_line":"            power_state_changed \u003d (power_state !\u003d node.power_state)"},{"line_number":970,"context_line":"            if power_state_changed:"},{"line_number":971,"context_line":"                old_power_state \u003d node.power_state"},{"line_number":972,"context_line":"                node.power_state \u003d power_state"},{"line_number":973,"context_line":"            task.process_event(\u0027done\u0027)"},{"line_number":974,"context_line":"            if power_state_changed:"},{"line_number":975,"context_line":"                notify_utils.emit_power_state_corrected_notification("},{"line_number":976,"context_line":"                    task, old_power_state)"},{"line_number":977,"context_line":"        else:"},{"line_number":978,"context_line":"            LOG.error(error)"},{"line_number":979,"context_line":"            node.last_error \u003d error"}],"source_content_type":"text/x-python","patch_set":39,"id":"fa6399be_2a184b1d","line":976,"range":{"start_line":970,"start_character":12,"end_line":976,"end_character":42},"in_reply_to":"1a95cdbc_9e565e28","updated":"2016-10-11 13:41:50.000000000","message":"agreed, I think this is better.","commit_id":"00fc5a601c6cba42b4cbf042d76252f6b8ce8265"}],"ironic/conductor/notification_utils.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"7506620145b937f0cf1442f5542a848150eb3d9b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# coding\u003dutf-8"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a89bdaa_396028cf","line":1,"updated":"2016-09-13 02:19:51.000000000","message":"please remove this unless there actually is utf-8 in this file.\n\nI know that we have some files with this, but we decided awhile ago (and didn\u0027t document it) that we shouldn\u0027t have this.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dc67c0f7419ea63333fb37fc030485b2871283b4","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# coding\u003dutf-8"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_26c4533e","line":1,"in_reply_to":"9a89bdaa_396028cf","updated":"2016-09-16 23:04:08.000000000","message":"Done","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"7506620145b937f0cf1442f5542a848150eb3d9b","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"def emit_power_set_notification(task, target_power_state, level,"},{"line_number":30,"context_line":"                                status):"},{"line_number":31,"context_line":"    \"\"\"Helper for conductor sending a set power state notification."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    :param task: a TaskManager instance."},{"line_number":34,"context_line":"    :param target_power_state: Power state being set."}],"source_content_type":"text/x-python","patch_set":28,"id":"9a89bdaa_2f329af2","line":31,"updated":"2016-09-13 02:19:51.000000000","message":"I am not sure i understand this. My interpretation of this method is: emit a notification that the node\u0027s power state is being set to target_power_state; it is in this status.\n\nSo when a node\u0027s power is being set to \u0027on\u0027, I\u0027d think this would be called with (task, POWER_ON, INFO, start) to indicate that the conductor is starting to power on the node.\n\nWhen the node has been powered on, I\u0027d think this would be called with (task, POWER_ON, INFO, end) to indicate that the conductor has ended powering on the node.  However, what I see is this .end being called with (task, NO_STATE, INFO, end). Which doesn\u0027t make sense to me.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dc67c0f7419ea63333fb37fc030485b2871283b4","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"def emit_power_set_notification(task, target_power_state, level,"},{"line_number":30,"context_line":"                                status):"},{"line_number":31,"context_line":"    \"\"\"Helper for conductor sending a set power state notification."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    :param task: a TaskManager instance."},{"line_number":34,"context_line":"    :param target_power_state: Power state being set."}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_860a8788","line":31,"in_reply_to":"9a89bdaa_2f329af2","updated":"2016-09-16 23:04:08.000000000","message":"After the transition is finished, there\u0027s no *target* power state, so .end will reflect that.\n\nThe *current* power state is automatically filled in during the call to payload.populate_schema (L41)","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"7506620145b937f0cf1442f5542a848150eb3d9b","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    :param task: a TaskManager instance."},{"line_number":34,"context_line":"    :param target_power_state: Power state being set."},{"line_number":35,"context_line":"    :param level: One of :class:`fields.NotificationLevel`."},{"line_number":36,"context_line":"    :param status: \"start\", \"end\", or \"error\""},{"line_number":37,"context_line":"    \"\"\""},{"line_number":38,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a89bdaa_7989d025","line":35,"updated":"2016-09-13 02:19:51.000000000","message":"s/fields/ironic.objects.fields/","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dc67c0f7419ea63333fb37fc030485b2871283b4","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    :param task: a TaskManager instance."},{"line_number":34,"context_line":"    :param target_power_state: Power state being set."},{"line_number":35,"context_line":"    :param level: One of :class:`fields.NotificationLevel`."},{"line_number":36,"context_line":"    :param status: \"start\", \"end\", or \"error\""},{"line_number":37,"context_line":"    \"\"\""},{"line_number":38,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_a6fdc36f","line":35,"in_reply_to":"9a89bdaa_7989d025","updated":"2016-09-16 23:04:08.000000000","message":"Done","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"7506620145b937f0cf1442f5542a848150eb3d9b","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        LOG.exception(_LE(\"Failed to send baremetal.power_sync notification.\"))"},{"line_number":87,"context_line":"    except Exception:"},{"line_number":88,"context_line":"        LOG.exception(_LE(\"Unknown error when trying to send \""},{"line_number":89,"context_line":"                          \"baremetal.node.power_sync notification.\"))"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a89bdaa_19cd2485","line":89,"updated":"2016-09-13 02:19:51.000000000","message":"maybe it is a bit premature (or overkill?), but I feel like there could be two helper functions:\n\n1. to _get_publisher(), so we don\u0027t hardcode service\u003d\u0027conductor\u0027 everywhere. (OR maybe this isn\u0027t needed if we do #2).\n\n2. to _emit_notification(payload_method, notification_method, node, action, status, level) (or something like that), so that the try/except stuff only needs to be in one method.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dc67c0f7419ea63333fb37fc030485b2871283b4","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        LOG.exception(_LE(\"Failed to send baremetal.power_sync notification.\"))"},{"line_number":87,"context_line":"    except Exception:"},{"line_number":88,"context_line":"        LOG.exception(_LE(\"Unknown error when trying to send \""},{"line_number":89,"context_line":"                          \"baremetal.node.power_sync notification.\"))"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_467cffb4","line":89,"in_reply_to":"9a89bdaa_19cd2485","updated":"2016-09-16 23:04:08.000000000","message":"Did #2. The function signature is slightly different, but I think you\u0027ll like it.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d332b91aa2aa04b21394e4488df67bb41870c4ee","unresolved":false,"context_lines":[{"line_number":24,"context_line":"CONF \u003d cfg.CONF"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def _emit_conductor_node_notification(task, notification_method,"},{"line_number":28,"context_line":"                                      payload_method, action,"},{"line_number":29,"context_line":"                                      level, status, **kwargs):"},{"line_number":30,"context_line":"    \"\"\"Helper for emitting a conductor notification about a node."}],"source_content_type":"text/x-python","patch_set":30,"id":"7a8ec9b2_89dc0c76","line":27,"updated":"2016-09-19 19:17:32.000000000","message":"Much better! :D","commit_id":"a4504a79fe83df705e51d86073723f6139d34744"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"1968b8016ffcf1eac73e2ded6967cb62d17eadb0","unresolved":false,"context_lines":[{"line_number":24,"context_line":"CONF \u003d cfg.CONF"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def _emit_conductor_node_notification(task, notification_method,"},{"line_number":28,"context_line":"                                      payload_method, action,"},{"line_number":29,"context_line":"                                      level, status, **kwargs):"},{"line_number":30,"context_line":"    \"\"\"Helper for emitting a conductor notification about a node."}],"source_content_type":"text/x-python","patch_set":30,"id":"7a8ec9b2_9df33c9f","line":27,"in_reply_to":"7a8ec9b2_89dc0c76","updated":"2016-09-21 17:09:46.000000000","message":"\\o/","commit_id":"a4504a79fe83df705e51d86073723f6139d34744"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d332b91aa2aa04b21394e4488df67bb41870c4ee","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"def emit_power_set_notification(task, target_power_state, level,"},{"line_number":63,"context_line":"                                status):"},{"line_number":64,"context_line":"    _emit_conductor_node_notification("},{"line_number":65,"context_line":"        task,"},{"line_number":66,"context_line":"        node_objects.NodeSetPowerStateNotification,"}],"source_content_type":"text/x-python","patch_set":30,"id":"7a8ec9b2_8995ec89","line":63,"updated":"2016-09-19 19:17:32.000000000","message":"should probably add some docstrings here, to describe this function.","commit_id":"a4504a79fe83df705e51d86073723f6139d34744"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"1968b8016ffcf1eac73e2ded6967cb62d17eadb0","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"def emit_power_set_notification(task, target_power_state, level,"},{"line_number":63,"context_line":"                                status):"},{"line_number":64,"context_line":"    _emit_conductor_node_notification("},{"line_number":65,"context_line":"        task,"},{"line_number":66,"context_line":"        node_objects.NodeSetPowerStateNotification,"}],"source_content_type":"text/x-python","patch_set":30,"id":"7a8ec9b2_5d01b469","line":63,"in_reply_to":"7a8ec9b2_8995ec89","updated":"2016-09-21 17:09:46.000000000","message":"Done","commit_id":"a4504a79fe83df705e51d86073723f6139d34744"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"6f3540d823239ff45e5b609dbddbca6baa6804a6","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    :param action: Action to go in the EventType."},{"line_number":38,"context_line":"    :param level: Notification level."},{"line_number":39,"context_line":"    :param status: Status to go in the EventType."},{"line_number":40,"context_line":"    :param **kwargs: kwargs to use when creating the notification payload."},{"line_number":41,"context_line":"    \"\"\""},{"line_number":42,"context_line":"    try:"},{"line_number":43,"context_line":"        payload \u003d payload_method(task.node, **kwargs)"}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_eb6b1d1c","line":40,"updated":"2016-09-26 19:42:00.000000000","message":"maybe, add \u0027Passed to the payload_method.\u0027","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"8704ff646aa569ab78935623a939ba4b8c0cfa97","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    :param action: Action to go in the EventType."},{"line_number":38,"context_line":"    :param level: Notification level."},{"line_number":39,"context_line":"    :param status: Status to go in the EventType."},{"line_number":40,"context_line":"    :param **kwargs: kwargs to use when creating the notification payload."},{"line_number":41,"context_line":"    \"\"\""},{"line_number":42,"context_line":"    try:"},{"line_number":43,"context_line":"        payload \u003d payload_method(task.node, **kwargs)"}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_1d9b0167","line":40,"in_reply_to":"5a8bc5a2_eb6b1d1c","updated":"2016-09-27 16:29:03.000000000","message":"Done","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"6f3540d823239ff45e5b609dbddbca6baa6804a6","unresolved":false,"context_lines":[{"line_number":63,"context_line":"def emit_power_set_notification(task, level, status, to_power):"},{"line_number":64,"context_line":"    \"\"\"Helper for conductor sending a set power state notification."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    :param task: a TaskManager instance."},{"line_number":67,"context_line":"    :param status: \"success\" or \"error\". \"error\" indicates that we couldn\u0027t"},{"line_number":68,"context_line":"                   retrieve power state for this node."},{"line_number":69,"context_line":"    :param to_power: the power state the conductor is"}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_6b69cdf8","line":66,"updated":"2016-09-26 19:42:00.000000000","message":"for completeness, \"param level: ...\u0027","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"8704ff646aa569ab78935623a939ba4b8c0cfa97","unresolved":false,"context_lines":[{"line_number":63,"context_line":"def emit_power_set_notification(task, level, status, to_power):"},{"line_number":64,"context_line":"    \"\"\"Helper for conductor sending a set power state notification."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    :param task: a TaskManager instance."},{"line_number":67,"context_line":"    :param status: \"success\" or \"error\". \"error\" indicates that we couldn\u0027t"},{"line_number":68,"context_line":"                   retrieve power state for this node."},{"line_number":69,"context_line":"    :param to_power: the power state the conductor is"}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_bdb84dc9","line":66,"in_reply_to":"5a8bc5a2_6b69cdf8","updated":"2016-09-27 16:29:03.000000000","message":"Done","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"3320e9dd29bab0bb5c461f16d1c07271d40cb6e1","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            payload\u003dpayload).emit(task.context)"},{"line_number":52,"context_line":"    except (exception.NotificationSchemaObjectError,"},{"line_number":53,"context_line":"            exception.NotificationSchemaKeyError,"},{"line_number":54,"context_line":"            exception.NotificationEventTypeError,"},{"line_number":55,"context_line":"            exception.NotificationPayloadError, MessageDeliveryFailure,"},{"line_number":56,"context_line":"            VersionedObjectsException):"},{"line_number":57,"context_line":"        LOG.exception(_LE(\"Failed to send baremetal.node.power_set \""}],"source_content_type":"text/x-python","patch_set":34,"id":"3a98d1f4_56c311ed","line":54,"updated":"2016-09-30 12:59:00.000000000","message":"This exception is not present in the \"exception\" module.","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d7929f25e07c42eded36c0a48a41b2fec3768144","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            payload\u003dpayload).emit(task.context)"},{"line_number":52,"context_line":"    except (exception.NotificationSchemaObjectError,"},{"line_number":53,"context_line":"            exception.NotificationSchemaKeyError,"},{"line_number":54,"context_line":"            exception.NotificationEventTypeError,"},{"line_number":55,"context_line":"            exception.NotificationPayloadError, MessageDeliveryFailure,"},{"line_number":56,"context_line":"            VersionedObjectsException):"},{"line_number":57,"context_line":"        LOG.exception(_LE(\"Failed to send baremetal.node.power_set \""}],"source_content_type":"text/x-python","patch_set":34,"id":"3a98d1f4_14a32f9e","line":54,"in_reply_to":"3a98d1f4_56c311ed","updated":"2016-09-30 18:53:54.000000000","message":"That was from a previous patch set. Removed.","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"6fdd14888504f1f53f69300c7e93b330683d7520","unresolved":false,"context_lines":[{"line_number":89,"context_line":"def emit_power_state_corrected_notification(task, from_power):"},{"line_number":90,"context_line":"    \"\"\"Helper for conductor sending a node power state corrected notification."},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    This is emitted when ironic detects that the actual power on a baremetal"},{"line_number":93,"context_line":"    hardware has changed from the power state on an ironic node, after ironic"},{"line_number":94,"context_line":"    updates the database to reflect the change."},{"line_number":95,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"3a98d1f4_8783cc55","line":92,"updated":"2016-09-29 21:55:01.000000000","message":"s/power/power state/","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d7929f25e07c42eded36c0a48a41b2fec3768144","unresolved":false,"context_lines":[{"line_number":89,"context_line":"def emit_power_state_corrected_notification(task, from_power):"},{"line_number":90,"context_line":"    \"\"\"Helper for conductor sending a node power state corrected notification."},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    This is emitted when ironic detects that the actual power on a baremetal"},{"line_number":93,"context_line":"    hardware has changed from the power state on an ironic node, after ironic"},{"line_number":94,"context_line":"    updates the database to reflect the change."},{"line_number":95,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"3a98d1f4_94bd7fb9","line":92,"in_reply_to":"3a98d1f4_8783cc55","updated":"2016-09-30 18:53:54.000000000","message":"Changed to below paragraph","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"6fdd14888504f1f53f69300c7e93b330683d7520","unresolved":false,"context_lines":[{"line_number":90,"context_line":"    \"\"\"Helper for conductor sending a node power state corrected notification."},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    This is emitted when ironic detects that the actual power on a baremetal"},{"line_number":93,"context_line":"    hardware has changed from the power state on an ironic node, after ironic"},{"line_number":94,"context_line":"    updates the database to reflect the change."},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    :param task: a TaskManager instance."}],"source_content_type":"text/x-python","patch_set":34,"id":"3a98d1f4_a73b689b","line":93,"updated":"2016-09-29 21:55:01.000000000","message":"s/has changed/is different/\n\nHow about this:\nWhen ironic detects that the actual power state on a bare metal hardware is different from the power state on an ironic node (DB), the ironic node\u0027s power state is corrected to be that of the bare metal hardware. A notification is emitted about this after the database is updated to reflect this correction.\n\nI got \u0027correct\u0027 in there twice :)","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d7929f25e07c42eded36c0a48a41b2fec3768144","unresolved":false,"context_lines":[{"line_number":90,"context_line":"    \"\"\"Helper for conductor sending a node power state corrected notification."},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    This is emitted when ironic detects that the actual power on a baremetal"},{"line_number":93,"context_line":"    hardware has changed from the power state on an ironic node, after ironic"},{"line_number":94,"context_line":"    updates the database to reflect the change."},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    :param task: a TaskManager instance."}],"source_content_type":"text/x-python","patch_set":34,"id":"3a98d1f4_b4aefb7e","line":93,"in_reply_to":"3a98d1f4_a73b689b","updated":"2016-09-30 18:53:54.000000000","message":"Done","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":24,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":25,"context_line":"CONF \u003d cfg.CONF"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"def _emit_conductor_node_notification(task, notification_method,"},{"line_number":29,"context_line":"                                      payload_method, action,"},{"line_number":30,"context_line":"                                      level, status, **kwargs):"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_2f7ece69","line":27,"updated":"2016-10-03 21:08:10.000000000","message":"I didn\u0027t see any tests for this code.","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":24,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":25,"context_line":"CONF \u003d cfg.CONF"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"def _emit_conductor_node_notification(task, notification_method,"},{"line_number":29,"context_line":"                                      payload_method, action,"},{"line_number":30,"context_line":"                                      level, status, **kwargs):"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a95cdbc_3b3ef7b8","line":27,"in_reply_to":"3a98d1f4_2f7ece69","updated":"2016-10-04 20:43:15.000000000","message":"Tested implicitly in the manager tests (where we assert that .emit was called), but I\u0027ll write explicit tests for it","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    :param notification_method: Constructor for the notification itself."},{"line_number":35,"context_line":"    :param payload_method: Constructor for the notification payload. Node"},{"line_number":36,"context_line":"                           should be first argument of the method."},{"line_number":37,"context_line":"    :param action: Action to go in the EventType."},{"line_number":38,"context_line":"    :param level: Notification level."},{"line_number":39,"context_line":"    :param status: Status to go in the EventType."},{"line_number":40,"context_line":"    :param **kwargs: kwargs to use when creating the notification payload."}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_976b7a1d","line":37,"updated":"2016-10-03 21:08:10.000000000","message":"this is a string, right?","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    :param notification_method: Constructor for the notification itself."},{"line_number":35,"context_line":"    :param payload_method: Constructor for the notification payload. Node"},{"line_number":36,"context_line":"                           should be first argument of the method."},{"line_number":37,"context_line":"    :param action: Action to go in the EventType."},{"line_number":38,"context_line":"    :param level: Notification level."},{"line_number":39,"context_line":"    :param status: Status to go in the EventType."},{"line_number":40,"context_line":"    :param **kwargs: kwargs to use when creating the notification payload."}],"source_content_type":"text/x-python","patch_set":35,"id":"1a95cdbc_cf30eda1","line":37,"in_reply_to":"3a98d1f4_976b7a1d","updated":"2016-10-04 20:43:15.000000000","message":"Yes, updated docstring","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    :param payload_method: Constructor for the notification payload. Node"},{"line_number":36,"context_line":"                           should be first argument of the method."},{"line_number":37,"context_line":"    :param action: Action to go in the EventType."},{"line_number":38,"context_line":"    :param level: Notification level."},{"line_number":39,"context_line":"    :param status: Status to go in the EventType."},{"line_number":40,"context_line":"    :param **kwargs: kwargs to use when creating the notification payload."},{"line_number":41,"context_line":"                     Passed to the payload_method."}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_37d0e6c8","line":38,"updated":"2016-10-03 21:08:10.000000000","message":"Maybe add something like: one of `ironic.objects.fields.NotificationLevel.ALL`","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    :param payload_method: Constructor for the notification payload. Node"},{"line_number":36,"context_line":"                           should be first argument of the method."},{"line_number":37,"context_line":"    :param action: Action to go in the EventType."},{"line_number":38,"context_line":"    :param level: Notification level."},{"line_number":39,"context_line":"    :param status: Status to go in the EventType."},{"line_number":40,"context_line":"    :param **kwargs: kwargs to use when creating the notification payload."},{"line_number":41,"context_line":"                     Passed to the payload_method."}],"source_content_type":"text/x-python","patch_set":35,"id":"1a95cdbc_5be74340","line":38,"in_reply_to":"3a98d1f4_37d0e6c8","updated":"2016-10-04 20:43:15.000000000","message":"Done","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":36,"context_line":"                           should be first argument of the method."},{"line_number":37,"context_line":"    :param action: Action to go in the EventType."},{"line_number":38,"context_line":"    :param level: Notification level."},{"line_number":39,"context_line":"    :param status: Status to go in the EventType."},{"line_number":40,"context_line":"    :param **kwargs: kwargs to use when creating the notification payload."},{"line_number":41,"context_line":"                     Passed to the payload_method."},{"line_number":42,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_d78a6263","line":39,"updated":"2016-10-03 21:08:10.000000000","message":"Maybe add something like: one of `ironic.objects.fields.NotificationStatus.ALL`","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":36,"context_line":"                           should be first argument of the method."},{"line_number":37,"context_line":"    :param action: Action to go in the EventType."},{"line_number":38,"context_line":"    :param level: Notification level."},{"line_number":39,"context_line":"    :param status: Status to go in the EventType."},{"line_number":40,"context_line":"    :param **kwargs: kwargs to use when creating the notification payload."},{"line_number":41,"context_line":"                     Passed to the payload_method."},{"line_number":42,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":35,"id":"1a95cdbc_1bddbb70","line":39,"in_reply_to":"3a98d1f4_d78a6263","updated":"2016-10-04 20:43:15.000000000","message":"Done","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            exception.NotificationPayloadError, MessageDeliveryFailure,"},{"line_number":55,"context_line":"            VersionedObjectsException):"},{"line_number":56,"context_line":"        LOG.exception(_LE(\"Failed to send baremetal.node.power_set \""},{"line_number":57,"context_line":"                          \"notification.\"))"},{"line_number":58,"context_line":"    except Exception:"},{"line_number":59,"context_line":"        LOG.exception(_LE(\"Unknown error when trying to send \""},{"line_number":60,"context_line":"                          \"baremetal.node.power_set notification\"))"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_d7f6e25b","line":57,"updated":"2016-10-03 21:08:10.000000000","message":"oh, we need to change this. See line 59 too.","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            exception.NotificationPayloadError, MessageDeliveryFailure,"},{"line_number":55,"context_line":"            VersionedObjectsException):"},{"line_number":56,"context_line":"        LOG.exception(_LE(\"Failed to send baremetal.node.power_set \""},{"line_number":57,"context_line":"                          \"notification.\"))"},{"line_number":58,"context_line":"    except Exception:"},{"line_number":59,"context_line":"        LOG.exception(_LE(\"Unknown error when trying to send \""},{"line_number":60,"context_line":"                          \"baremetal.node.power_set notification\"))"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a95cdbc_8f5fc50d","line":57,"in_reply_to":"3a98d1f4_d7f6e25b","updated":"2016-10-04 20:43:15.000000000","message":"Done","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                          \"notification.\"))"},{"line_number":58,"context_line":"    except Exception:"},{"line_number":59,"context_line":"        LOG.exception(_LE(\"Unknown error when trying to send \""},{"line_number":60,"context_line":"                          \"baremetal.node.power_set notification\"))"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"def emit_power_set_notification(task, level, status, to_power):"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_d7526234","line":60,"updated":"2016-10-03 21:08:10.000000000","message":"the event type isn\u0027t necessarily baremetal.node.power_set.\n\nHow about something like\n\u0027Unknown error when trying to send a notification about node %(node)s, : baremetal.node.%(action)s.%(status)s, with level %(level)s, notification_method: %(notification_method)s, payload method: %(payload_method) \u0027","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                          \"notification.\"))"},{"line_number":58,"context_line":"    except Exception:"},{"line_number":59,"context_line":"        LOG.exception(_LE(\"Unknown error when trying to send \""},{"line_number":60,"context_line":"                          \"baremetal.node.power_set notification\"))"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"def emit_power_set_notification(task, level, status, to_power):"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a95cdbc_af9ac1c3","line":60,"in_reply_to":"3a98d1f4_d7526234","updated":"2016-10-04 20:43:15.000000000","message":"Done","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    \"\"\"Helper for conductor sending a set power state notification."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    :param task: a TaskManager instance."},{"line_number":67,"context_line":"    :param level: Notification level."},{"line_number":68,"context_line":"    :param status: \"success\" or \"error\". \"error\" indicates that we couldn\u0027t"},{"line_number":69,"context_line":"                   retrieve power state for this node."},{"line_number":70,"context_line":"    :param to_power: the power state the conductor is"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_3711c65d","line":67,"updated":"2016-10-03 21:08:10.000000000","message":"one of `ironic.objects.fields.NotificationLevel.ALL`","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    \"\"\"Helper for conductor sending a set power state notification."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    :param task: a TaskManager instance."},{"line_number":67,"context_line":"    :param level: Notification level."},{"line_number":68,"context_line":"    :param status: \"success\" or \"error\". \"error\" indicates that we couldn\u0027t"},{"line_number":69,"context_line":"                   retrieve power state for this node."},{"line_number":70,"context_line":"    :param to_power: the power state the conductor is"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a95cdbc_6f90b996","line":67,"in_reply_to":"3a98d1f4_3711c65d","updated":"2016-10-04 20:43:15.000000000","message":"Done","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    :param task: a TaskManager instance."},{"line_number":67,"context_line":"    :param level: Notification level."},{"line_number":68,"context_line":"    :param status: \"success\" or \"error\". \"error\" indicates that we couldn\u0027t"},{"line_number":69,"context_line":"                   retrieve power state for this node."},{"line_number":70,"context_line":"    :param to_power: the power state the conductor is"},{"line_number":71,"context_line":"                     attempting to set on the node. This is used"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_b705d614","line":68,"updated":"2016-10-03 21:08:10.000000000","message":"instead of \u0027success\u0027 or \u0027error\u0027. One of `ironic.objects.fields.NotificationStatus.SUCCESS` or ERROR.","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    :param task: a TaskManager instance."},{"line_number":67,"context_line":"    :param level: Notification level."},{"line_number":68,"context_line":"    :param status: \"success\" or \"error\". \"error\" indicates that we couldn\u0027t"},{"line_number":69,"context_line":"                   retrieve power state for this node."},{"line_number":70,"context_line":"    :param to_power: the power state the conductor is"},{"line_number":71,"context_line":"                     attempting to set on the node. This is used"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a95cdbc_4f93fda3","line":68,"in_reply_to":"3a98d1f4_b705d614","updated":"2016-10-04 20:43:15.000000000","message":"Done","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    :param task: a TaskManager instance."},{"line_number":67,"context_line":"    :param level: Notification level."},{"line_number":68,"context_line":"    :param status: \"success\" or \"error\". \"error\" indicates that we couldn\u0027t"},{"line_number":69,"context_line":"                   retrieve power state for this node."},{"line_number":70,"context_line":"    :param to_power: the power state the conductor is"},{"line_number":71,"context_line":"                     attempting to set on the node. This is used"},{"line_number":72,"context_line":"                     instead of the node\u0027s target_power_state"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_22050610","line":69,"updated":"2016-10-03 21:08:10.000000000","message":"or couldn\u0027t set the power state, right?","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    :param task: a TaskManager instance."},{"line_number":67,"context_line":"    :param level: Notification level."},{"line_number":68,"context_line":"    :param status: \"success\" or \"error\". \"error\" indicates that we couldn\u0027t"},{"line_number":69,"context_line":"                   retrieve power state for this node."},{"line_number":70,"context_line":"    :param to_power: the power state the conductor is"},{"line_number":71,"context_line":"                     attempting to set on the node. This is used"},{"line_number":72,"context_line":"                     instead of the node\u0027s target_power_state"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a95cdbc_0fcf35b1","line":69,"in_reply_to":"3a98d1f4_22050610","updated":"2016-10-04 20:43:15.000000000","message":"Yes, added","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"b8627cbc1a3323f8b64d5341bc698d1bb83afcfd","unresolved":false,"context_lines":[{"line_number":95,"context_line":"       reflect this correction."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    :param task: a TaskManager instance."},{"line_number":98,"context_line":"    :param level: One of :class:`fields.NotificationLevel`."},{"line_number":99,"context_line":"    :param from_power: the power state of the node before this change was"},{"line_number":100,"context_line":"                       detected"},{"line_number":101,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_c4b80b78","line":98,"updated":"2016-10-03 11:29:25.000000000","message":"This param is not present.","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":95,"context_line":"       reflect this correction."},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    :param task: a TaskManager instance."},{"line_number":98,"context_line":"    :param level: One of :class:`fields.NotificationLevel`."},{"line_number":99,"context_line":"    :param from_power: the power state of the node before this change was"},{"line_number":100,"context_line":"                       detected"},{"line_number":101,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":35,"id":"1a95cdbc_cf3b8d9b","line":98,"in_reply_to":"3a98d1f4_c4b80b78","updated":"2016-10-04 20:43:15.000000000","message":"Removed","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"06d5c9a4cfdd4c87145ddc3018aae81c981e4a26","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                       \"action\": action,"},{"line_number":64,"context_line":"                       \"status\": status,"},{"line_number":65,"context_line":"                       \"notification_method\": notification_method,"},{"line_number":66,"context_line":"                       \"payload_method\": payload_method})"},{"line_number":67,"context_line":"    except Exception:"},{"line_number":68,"context_line":"        LOG.exception(_LE(\"Unknown error when trying to send a notification \""},{"line_number":69,"context_line":"                          \"about node %(node)s :  baremetal.node.%(action)s.\""}],"source_content_type":"text/x-python","patch_set":36,"id":"1a95cdbc_99d1bcfe","line":66,"updated":"2016-10-04 22:39:40.000000000","message":"level is missing","commit_id":"b378618476c345ba046853a4c0636316e1265be6"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"c129ee1bc25a305149d612014e3a02e139fc56a5","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                       \"action\": action,"},{"line_number":64,"context_line":"                       \"status\": status,"},{"line_number":65,"context_line":"                       \"notification_method\": notification_method,"},{"line_number":66,"context_line":"                       \"payload_method\": payload_method})"},{"line_number":67,"context_line":"    except Exception:"},{"line_number":68,"context_line":"        LOG.exception(_LE(\"Unknown error when trying to send a notification \""},{"line_number":69,"context_line":"                          \"about node %(node)s :  baremetal.node.%(action)s.\""}],"source_content_type":"text/x-python","patch_set":36,"id":"1a95cdbc_6b495b5f","line":66,"in_reply_to":"1a95cdbc_99d1bcfe","updated":"2016-10-05 14:07:54.000000000","message":"Added","commit_id":"b378618476c345ba046853a4c0636316e1265be6"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"06d5c9a4cfdd4c87145ddc3018aae81c981e4a26","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                       \"action\": action,"},{"line_number":75,"context_line":"                       \"status\": status,"},{"line_number":76,"context_line":"                       \"notification_method\": notification_method,"},{"line_number":77,"context_line":"                       \"payload_method\": payload_method})"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"def emit_power_set_notification(task, level, status, to_power):"}],"source_content_type":"text/x-python","patch_set":36,"id":"1a95cdbc_b9c75844","line":77,"updated":"2016-10-04 22:39:40.000000000","message":"level is missing\n\ni think we should write this so that we don\u0027t have duplicate lines of code in both these exceptions.","commit_id":"b378618476c345ba046853a4c0636316e1265be6"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"c129ee1bc25a305149d612014e3a02e139fc56a5","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                       \"action\": action,"},{"line_number":75,"context_line":"                       \"status\": status,"},{"line_number":76,"context_line":"                       \"notification_method\": notification_method,"},{"line_number":77,"context_line":"                       \"payload_method\": payload_method})"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"def emit_power_set_notification(task, level, status, to_power):"}],"source_content_type":"text/x-python","patch_set":36,"id":"1a95cdbc_8b74e79c","line":77,"in_reply_to":"1a95cdbc_b9c75844","updated":"2016-10-05 14:07:54.000000000","message":"Done","commit_id":"b378618476c345ba046853a4c0636316e1265be6"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3eda04824669e706ed9a6ef69b0d4793efbea9cc","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            VersionedObjectsException, Exception) as e:"},{"line_number":58,"context_line":"        # If the exception isn\u0027t a known one, log this fact."},{"line_number":59,"context_line":"        unknown_str \u003d \"\""},{"line_number":60,"context_line":"        if isinstance(e, Exception):"},{"line_number":61,"context_line":"            unknown_str \u003d \"Unknown error. \""},{"line_number":62,"context_line":"        exception_values \u003d {\"unknown\": unknown_str,"},{"line_number":63,"context_line":"                            \"node\": task.node.uuid,"}],"source_content_type":"text/x-python","patch_set":38,"id":"1a95cdbc_6c2f79f6","line":60,"updated":"2016-10-06 14:54:49.000000000","message":"I didn\u0027t test this out but I don\u0027t think this will work because all of ironic\u0027s exceptions are subclassed from Exception.\n\nDo we need to explicitly mention \u0027Unknown error\u0027 if it is a non-ironic-expected Exception? Maybe we should just spit out the exception string regardless. That would make the code simpler.\n\nWhich makes me wonder why we want to have two different excepts. If it is one of the Notification* exceptions, is LOG.error() sufficient?\n\nThinking about this a bit more. Are we going to spam the log file with each notification if there is a fundamental problem with notifications? :-(\n\nAre some of these exceptions programming errors (eg VersionedObjectsException or NotificationSchemaKeyError, ...)? Whereas MessageDeliveryFailure seems more ominous?","commit_id":"01d6ff498edfbc93f97d54c6032f49b0a64b8e3e"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"f2da83b4a0a9f3568ed46255869e9db54bfd0a73","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            VersionedObjectsException, Exception) as e:"},{"line_number":58,"context_line":"        # If the exception isn\u0027t a known one, log this fact."},{"line_number":59,"context_line":"        unknown_str \u003d \"\""},{"line_number":60,"context_line":"        if isinstance(e, Exception):"},{"line_number":61,"context_line":"            unknown_str \u003d \"Unknown error. \""},{"line_number":62,"context_line":"        exception_values \u003d {\"unknown\": unknown_str,"},{"line_number":63,"context_line":"                            \"node\": task.node.uuid,"}],"source_content_type":"text/x-python","patch_set":38,"id":"1a95cdbc_58c0b3e0","line":60,"in_reply_to":"1a95cdbc_6c2f79f6","updated":"2016-10-07 15:23:13.000000000","message":"Based on IRC conversation, we will:\n\n1. remove the isinstance check, and log the same thing regardless of whether the exception was known or not\n2. add a comment indicating that you shouldn\u0027t remove the specific checks for exceptions, even though except Exception will catch it, so that we can know what exceptions are expected when debugging","commit_id":"01d6ff498edfbc93f97d54c6032f49b0a64b8e3e"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"70790e552fc836d15c8e03b264a45d3de50f0ff6","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from oslo_config import cfg"},{"line_number":14,"context_line":"from oslo_log import log"},{"line_number":15,"context_line":"from oslo_messaging.exceptions import MessageDeliveryFailure"},{"line_number":16,"context_line":"from oslo_versionedobjects.exception import VersionedObjectsException"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from ironic.common import exception"},{"line_number":19,"context_line":"from ironic.common.i18n import _LE"}],"source_content_type":"text/x-python","patch_set":39,"id":"fa6399be_d0f940ca","line":16,"range":{"start_line":15,"start_character":0,"end_line":16,"end_character":69},"updated":"2016-10-11 14:24:21.000000000","message":"It is a bad style to import objects, could you please mention the namespace they are in?","commit_id":"00fc5a601c6cba42b4cbf042d76252f6b8ce8265"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"804804b172b920ec52cd5c1d9bbcc05a3a36350a","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from oslo_config import cfg"},{"line_number":14,"context_line":"from oslo_log import log"},{"line_number":15,"context_line":"from oslo_messaging.exceptions import MessageDeliveryFailure"},{"line_number":16,"context_line":"from oslo_versionedobjects.exception import VersionedObjectsException"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from ironic.common import exception"},{"line_number":19,"context_line":"from ironic.common.i18n import _LE"}],"source_content_type":"text/x-python","patch_set":39,"id":"fa6399be_eb51f563","line":16,"range":{"start_line":15,"start_character":0,"end_line":16,"end_character":69},"in_reply_to":"fa6399be_d0f940ca","updated":"2016-10-11 14:41:16.000000000","message":"Done","commit_id":"00fc5a601c6cba42b4cbf042d76252f6b8ce8265"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"008a7e30051b5f64ea8fcdf9c5291f31b359cc4c","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                object\u003d\u0027node\u0027, action\u003daction, status\u003dstatus),"},{"line_number":52,"context_line":"            level\u003dlevel,"},{"line_number":53,"context_line":"            payload\u003dpayload).emit(task.context)"},{"line_number":54,"context_line":"    except (exception.NotificationSchemaObjectError,"},{"line_number":55,"context_line":"            exception.NotificationSchemaKeyError,"},{"line_number":56,"context_line":"            exception.NotificationPayloadError, MessageDeliveryFailure,"},{"line_number":57,"context_line":"            VersionedObjectsException, Exception):"},{"line_number":58,"context_line":"        # Do not remove the above checks for specific exceptions. These are"},{"line_number":59,"context_line":"        # here to indicate which exceptions may be expected to make debugging"},{"line_number":60,"context_line":"        # easier."}],"source_content_type":"text/x-python","patch_set":39,"id":"fa6399be_5631b0a1","line":57,"range":{"start_line":54,"start_character":12,"end_line":57,"end_character":38},"updated":"2016-10-11 12:16:42.000000000","message":"All these are subclasses of Exception and can be removed.","commit_id":"00fc5a601c6cba42b4cbf042d76252f6b8ce8265"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"70790e552fc836d15c8e03b264a45d3de50f0ff6","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                object\u003d\u0027node\u0027, action\u003daction, status\u003dstatus),"},{"line_number":52,"context_line":"            level\u003dlevel,"},{"line_number":53,"context_line":"            payload\u003dpayload).emit(task.context)"},{"line_number":54,"context_line":"    except (exception.NotificationSchemaObjectError,"},{"line_number":55,"context_line":"            exception.NotificationSchemaKeyError,"},{"line_number":56,"context_line":"            exception.NotificationPayloadError, MessageDeliveryFailure,"},{"line_number":57,"context_line":"            VersionedObjectsException, Exception):"},{"line_number":58,"context_line":"        # Do not remove the above checks for specific exceptions. These are"},{"line_number":59,"context_line":"        # here to indicate which exceptions may be expected to make debugging"},{"line_number":60,"context_line":"        # easier."}],"source_content_type":"text/x-python","patch_set":39,"id":"fa6399be_b0ecccc8","line":57,"range":{"start_line":54,"start_character":12,"end_line":57,"end_character":38},"in_reply_to":"fa6399be_30327cf2","updated":"2016-10-11 14:24:21.000000000","message":"I don\u0027t think it is a good idea, it just makes the code harder to understand. People could think that Exception is something that needs to be handled separately. If you want to catch everything - just leave Exception here, people can see which ones can be raised from docstrings in the notification objects. If only the ones listed here are possible, let\u0027s just leave only them and remove Exception.","commit_id":"00fc5a601c6cba42b4cbf042d76252f6b8ce8265"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"2d0902228c4b69455e84b5ba273b8411b6702803","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                object\u003d\u0027node\u0027, action\u003daction, status\u003dstatus),"},{"line_number":52,"context_line":"            level\u003dlevel,"},{"line_number":53,"context_line":"            payload\u003dpayload).emit(task.context)"},{"line_number":54,"context_line":"    except (exception.NotificationSchemaObjectError,"},{"line_number":55,"context_line":"            exception.NotificationSchemaKeyError,"},{"line_number":56,"context_line":"            exception.NotificationPayloadError, MessageDeliveryFailure,"},{"line_number":57,"context_line":"            VersionedObjectsException, Exception):"},{"line_number":58,"context_line":"        # Do not remove the above checks for specific exceptions. These are"},{"line_number":59,"context_line":"        # here to indicate which exceptions may be expected to make debugging"},{"line_number":60,"context_line":"        # easier."}],"source_content_type":"text/x-python","patch_set":39,"id":"fa6399be_10e658b4","line":57,"range":{"start_line":54,"start_character":12,"end_line":57,"end_character":38},"in_reply_to":"fa6399be_30327cf2","updated":"2016-10-11 14:21:48.000000000","message":"Yes, it is only for information purposes, expected exceptions vs unknown Exceptions. Maybe the comment below could be clearer? Would it help if you put the last \u0027Exception\u0027 on a line by itself, to indicate a \u0027last but not least, capture other exceptions\u0027 ? And or interleave the comments here, instead of adding the comment afterwards like you did in line 58?\n\nYuriy, what would work for you?","commit_id":"00fc5a601c6cba42b4cbf042d76252f6b8ce8265"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"d1a7fe94e69ad79cdd83561b30d8d74a3c1d69a6","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                object\u003d\u0027node\u0027, action\u003daction, status\u003dstatus),"},{"line_number":52,"context_line":"            level\u003dlevel,"},{"line_number":53,"context_line":"            payload\u003dpayload).emit(task.context)"},{"line_number":54,"context_line":"    except (exception.NotificationSchemaObjectError,"},{"line_number":55,"context_line":"            exception.NotificationSchemaKeyError,"},{"line_number":56,"context_line":"            exception.NotificationPayloadError, MessageDeliveryFailure,"},{"line_number":57,"context_line":"            VersionedObjectsException, Exception):"},{"line_number":58,"context_line":"        # Do not remove the above checks for specific exceptions. These are"},{"line_number":59,"context_line":"        # here to indicate which exceptions may be expected to make debugging"},{"line_number":60,"context_line":"        # easier."}],"source_content_type":"text/x-python","patch_set":39,"id":"fa6399be_30327cf2","line":57,"range":{"start_line":54,"start_character":12,"end_line":57,"end_character":38},"in_reply_to":"fa6399be_4a057fc0","updated":"2016-10-11 14:04:36.000000000","message":"OK, but this will be only for information.","commit_id":"00fc5a601c6cba42b4cbf042d76252f6b8ce8265"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"86aeb17870ff1d0075ee5a2c1c52f1d6b1f80ed1","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                object\u003d\u0027node\u0027, action\u003daction, status\u003dstatus),"},{"line_number":52,"context_line":"            level\u003dlevel,"},{"line_number":53,"context_line":"            payload\u003dpayload).emit(task.context)"},{"line_number":54,"context_line":"    except (exception.NotificationSchemaObjectError,"},{"line_number":55,"context_line":"            exception.NotificationSchemaKeyError,"},{"line_number":56,"context_line":"            exception.NotificationPayloadError, MessageDeliveryFailure,"},{"line_number":57,"context_line":"            VersionedObjectsException, Exception):"},{"line_number":58,"context_line":"        # Do not remove the above checks for specific exceptions. These are"},{"line_number":59,"context_line":"        # here to indicate which exceptions may be expected to make debugging"},{"line_number":60,"context_line":"        # easier."}],"source_content_type":"text/x-python","patch_set":39,"id":"fa6399be_4a057fc0","line":57,"range":{"start_line":54,"start_character":12,"end_line":57,"end_character":38},"in_reply_to":"fa6399be_5631b0a1","updated":"2016-10-11 13:41:50.000000000","message":"Yuriy, Ruby and I had an IRC discussion about this point.\n\nShe recommended that we leave the expected errors in the except clause, and I tend to agree. This will allow anyone debugging this section of code when adding a new conductor-related node notification to see which exceptions are expected.\n\nOne alternative could be to just write test cases for each one of these known exceptions. @Ruby what would you think of that?","commit_id":"00fc5a601c6cba42b4cbf042d76252f6b8ce8265"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"804804b172b920ec52cd5c1d9bbcc05a3a36350a","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                object\u003d\u0027node\u0027, action\u003daction, status\u003dstatus),"},{"line_number":52,"context_line":"            level\u003dlevel,"},{"line_number":53,"context_line":"            payload\u003dpayload).emit(task.context)"},{"line_number":54,"context_line":"    except (exception.NotificationSchemaObjectError,"},{"line_number":55,"context_line":"            exception.NotificationSchemaKeyError,"},{"line_number":56,"context_line":"            exception.NotificationPayloadError, MessageDeliveryFailure,"},{"line_number":57,"context_line":"            VersionedObjectsException, Exception):"},{"line_number":58,"context_line":"        # Do not remove the above checks for specific exceptions. These are"},{"line_number":59,"context_line":"        # here to indicate which exceptions may be expected to make debugging"},{"line_number":60,"context_line":"        # easier."}],"source_content_type":"text/x-python","patch_set":39,"id":"fa6399be_ab49bd8d","line":57,"range":{"start_line":54,"start_character":12,"end_line":57,"end_character":38},"in_reply_to":"fa6399be_b0ecccc8","updated":"2016-10-11 14:41:16.000000000","message":"I interleaved the comment for now, ongoing irc discussion about this","commit_id":"00fc5a601c6cba42b4cbf042d76252f6b8ce8265"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"2d0902228c4b69455e84b5ba273b8411b6702803","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            VersionedObjectsException, Exception):"},{"line_number":58,"context_line":"        # Do not remove the above checks for specific exceptions. These are"},{"line_number":59,"context_line":"        # here to indicate which exceptions may be expected to make debugging"},{"line_number":60,"context_line":"        # easier."},{"line_number":61,"context_line":"        exception_values \u003d {\"node\": task.node.uuid,"},{"line_number":62,"context_line":"                            \"action\": action,"},{"line_number":63,"context_line":"                            \"status\": status,"}],"source_content_type":"text/x-python","patch_set":39,"id":"fa6399be_abf8dde6","line":60,"updated":"2016-10-11 14:21:48.000000000","message":"Maybe if you could interleave the comments with the code above, you could have something like this between the expected exceptions and \u0027Exception\u0027:\n\n# NOTE(mariojv): The above are the expected exceptions; we also want to handle (below) unexpected exceptions too.","commit_id":"00fc5a601c6cba42b4cbf042d76252f6b8ce8265"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"804804b172b920ec52cd5c1d9bbcc05a3a36350a","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            VersionedObjectsException, Exception):"},{"line_number":58,"context_line":"        # Do not remove the above checks for specific exceptions. These are"},{"line_number":59,"context_line":"        # here to indicate which exceptions may be expected to make debugging"},{"line_number":60,"context_line":"        # easier."},{"line_number":61,"context_line":"        exception_values \u003d {\"node\": task.node.uuid,"},{"line_number":62,"context_line":"                            \"action\": action,"},{"line_number":63,"context_line":"                            \"status\": status,"}],"source_content_type":"text/x-python","patch_set":39,"id":"fa6399be_6bf32574","line":60,"in_reply_to":"fa6399be_abf8dde6","updated":"2016-10-11 14:41:16.000000000","message":"Done","commit_id":"00fc5a601c6cba42b4cbf042d76252f6b8ce8265"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"ca3721decc17854ab56eff043541821ceff04822","unresolved":false,"context_lines":[{"line_number":59,"context_line":"            # NOTE(mariojv) The above are expected exceptions; we also want to"},{"line_number":60,"context_line":"            # handle (below) unexpected exceptions, too."},{"line_number":61,"context_line":"            Exception):"},{"line_number":62,"context_line":"        exception_values \u003d {\"node\": task.node.uuid,"},{"line_number":63,"context_line":"                            \"action\": action,"},{"line_number":64,"context_line":"                            \"status\": status,"},{"line_number":65,"context_line":"                            \"level\": level,"}],"source_content_type":"text/x-python","patch_set":41,"id":"fa6399be_aded20f1","line":62,"updated":"2016-10-12 14:41:18.000000000","message":"\"node\" is not used for formatting","commit_id":"390769cf53240d6d320d629877d279e235e2f299"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"3e4253aa82d3df1de5194549eba1dca03fe47878","unresolved":false,"context_lines":[{"line_number":59,"context_line":"            # NOTE(mariojv) The above are expected exceptions; we also want to"},{"line_number":60,"context_line":"            # handle (below) unexpected exceptions, too."},{"line_number":61,"context_line":"            Exception):"},{"line_number":62,"context_line":"        exception_values \u003d {\"node\": task.node.uuid,"},{"line_number":63,"context_line":"                            \"action\": action,"},{"line_number":64,"context_line":"                            \"status\": status,"},{"line_number":65,"context_line":"                            \"level\": level,"}],"source_content_type":"text/x-python","patch_set":41,"id":"fa6399be_526ed895","line":62,"in_reply_to":"fa6399be_0627c964","updated":"2016-10-12 17:50:17.000000000","message":"Will do.","commit_id":"390769cf53240d6d320d629877d279e235e2f299"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"0d137fb4b8e49cbf988b4024598b297a397475ae","unresolved":false,"context_lines":[{"line_number":59,"context_line":"            # NOTE(mariojv) The above are expected exceptions; we also want to"},{"line_number":60,"context_line":"            # handle (below) unexpected exceptions, too."},{"line_number":61,"context_line":"            Exception):"},{"line_number":62,"context_line":"        exception_values \u003d {\"node\": task.node.uuid,"},{"line_number":63,"context_line":"                            \"action\": action,"},{"line_number":64,"context_line":"                            \"status\": status,"},{"line_number":65,"context_line":"                            \"level\": level,"}],"source_content_type":"text/x-python","patch_set":41,"id":"fa6399be_0627c964","line":62,"in_reply_to":"fa6399be_aded20f1","updated":"2016-10-12 15:16:03.000000000","message":"Oh. It probably should be used.","commit_id":"390769cf53240d6d320d629877d279e235e2f299"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"ca3721decc17854ab56eff043541821ceff04822","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                            \"action\": action,"},{"line_number":64,"context_line":"                            \"status\": status,"},{"line_number":65,"context_line":"                            \"level\": level,"},{"line_number":66,"context_line":"                            \"notification_method\": notification_method,"},{"line_number":67,"context_line":"                            \"payload_method\": payload_method}"},{"line_number":68,"context_line":"        LOG.exception(_LE(\"Failed to send baremetal.node.\""},{"line_number":69,"context_line":"                          \"%(action)s.%(status)s notification with level \""}],"source_content_type":"text/x-python","patch_set":41,"id":"fa6399be_904cf371","line":66,"updated":"2016-10-12 14:41:18.000000000","message":"This parameter is a class. \"\u003cclass \u0027ironic.objects.node.NodeSetPowerStateNotification\u0027\u003e\" will be added to the log.","commit_id":"390769cf53240d6d320d629877d279e235e2f299"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"0d137fb4b8e49cbf988b4024598b297a397475ae","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                            \"action\": action,"},{"line_number":64,"context_line":"                            \"status\": status,"},{"line_number":65,"context_line":"                            \"level\": level,"},{"line_number":66,"context_line":"                            \"notification_method\": notification_method,"},{"line_number":67,"context_line":"                            \"payload_method\": payload_method}"},{"line_number":68,"context_line":"        LOG.exception(_LE(\"Failed to send baremetal.node.\""},{"line_number":69,"context_line":"                          \"%(action)s.%(status)s notification with level \""}],"source_content_type":"text/x-python","patch_set":41,"id":"fa6399be_e6d65526","line":66,"in_reply_to":"fa6399be_904cf371","updated":"2016-10-12 15:16:03.000000000","message":"Right. You don\u0027t think it is necessary? I thought it\u0027d be useful for debugging, to know which methods were being used.","commit_id":"390769cf53240d6d320d629877d279e235e2f299"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"3e4253aa82d3df1de5194549eba1dca03fe47878","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                            \"action\": action,"},{"line_number":64,"context_line":"                            \"status\": status,"},{"line_number":65,"context_line":"                            \"level\": level,"},{"line_number":66,"context_line":"                            \"notification_method\": notification_method,"},{"line_number":67,"context_line":"                            \"payload_method\": payload_method}"},{"line_number":68,"context_line":"        LOG.exception(_LE(\"Failed to send baremetal.node.\""},{"line_number":69,"context_line":"                          \"%(action)s.%(status)s notification with level \""}],"source_content_type":"text/x-python","patch_set":41,"id":"fa6399be_f2136c0b","line":66,"in_reply_to":"fa6399be_e6d65526","updated":"2016-10-12 17:50:17.000000000","message":"I think it\u0027s fine that way. Willing to adjust if needed though.","commit_id":"390769cf53240d6d320d629877d279e235e2f299"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"ca3721decc17854ab56eff043541821ceff04822","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                            \"status\": status,"},{"line_number":65,"context_line":"                            \"level\": level,"},{"line_number":66,"context_line":"                            \"notification_method\": notification_method,"},{"line_number":67,"context_line":"                            \"payload_method\": payload_method}"},{"line_number":68,"context_line":"        LOG.exception(_LE(\"Failed to send baremetal.node.\""},{"line_number":69,"context_line":"                          \"%(action)s.%(status)s notification with level \""},{"line_number":70,"context_line":"                          \"%(level)s, notification_method \""}],"source_content_type":"text/x-python","patch_set":41,"id":"fa6399be_b05e5710","line":67,"updated":"2016-10-12 14:41:18.000000000","message":"ditto","commit_id":"390769cf53240d6d320d629877d279e235e2f299"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"0d137fb4b8e49cbf988b4024598b297a397475ae","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                          \"%(action)s.%(status)s notification with level \""},{"line_number":70,"context_line":"                          \"%(level)s, notification_method \""},{"line_number":71,"context_line":"                          \"%(notification_method)s, payload_method \""},{"line_number":72,"context_line":"                          \"%(payload_method)s\") % exception_values)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"def emit_power_set_notification(task, level, status, to_power):"}],"source_content_type":"text/x-python","patch_set":41,"id":"fa6399be_86e83912","line":72,"updated":"2016-10-12 15:16:03.000000000","message":"so this just came up in IRC, where Dmitry prefers that for expected exceptions, there may not be a need to LOG.exception (LOG.error may be sufficient), but for unknown exceptions, you want to LOG.exception to give more info about those. Mario -- thoughts on whether we need to LOG.exception for all these exceptions?","commit_id":"390769cf53240d6d320d629877d279e235e2f299"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"3e4253aa82d3df1de5194549eba1dca03fe47878","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                          \"%(action)s.%(status)s notification with level \""},{"line_number":70,"context_line":"                          \"%(level)s, notification_method \""},{"line_number":71,"context_line":"                          \"%(notification_method)s, payload_method \""},{"line_number":72,"context_line":"                          \"%(payload_method)s\") % exception_values)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"def emit_power_set_notification(task, level, status, to_power):"}],"source_content_type":"text/x-python","patch_set":41,"id":"fa6399be_52ddf80c","line":72,"in_reply_to":"fa6399be_86775939","updated":"2016-10-12 17:50:17.000000000","message":"I think it\u0027s useful to LOG.exception for everything except maybe MessageDeliveryFailure, since the other exceptions will generally occur when developing a new notification that uses these helper methods, so a full traceback may be useful. Open to changing it though.\n\nI\u0027ll wait until there\u0027s consensus before changing this.","commit_id":"390769cf53240d6d320d629877d279e235e2f299"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c5a1bd25496318566dbd23a4e32b789658249e94","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                          \"%(action)s.%(status)s notification with level \""},{"line_number":70,"context_line":"                          \"%(level)s, notification_method \""},{"line_number":71,"context_line":"                          \"%(notification_method)s, payload_method \""},{"line_number":72,"context_line":"                          \"%(payload_method)s\") % exception_values)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"def emit_power_set_notification(task, level, status, to_power):"}],"source_content_type":"text/x-python","patch_set":41,"id":"fa6399be_86775939","line":72,"in_reply_to":"fa6399be_86e83912","updated":"2016-10-12 15:17:25.000000000","message":"for eg, this is a change that Dmitry is making: https://review.openstack.org/#/c/385510/1/ironic/conductor/manager.py","commit_id":"390769cf53240d6d320d629877d279e235e2f299"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8153e90ccf5a95d28c6cf5f90d5880819b6b7386","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                object\u003d\u0027node\u0027, action\u003daction, status\u003dstatus),"},{"line_number":52,"context_line":"            level\u003dlevel,"},{"line_number":53,"context_line":"            payload\u003dpayload).emit(task.context)"},{"line_number":54,"context_line":"    except Exception as e:"},{"line_number":55,"context_line":"        exception_values \u003d {\"node\": task.node.uuid,"},{"line_number":56,"context_line":"                            \"action\": action,"},{"line_number":57,"context_line":"                            \"status\": status,"}],"source_content_type":"text/x-python","patch_set":43,"id":"fa6399be_93907245","line":54,"updated":"2016-10-12 18:55:06.000000000","message":"I have to say that I find this pattern a bit odd and not consistent with the normal if .. except .. except...\n\nSee what others think.","commit_id":"ddd6db98463a55caeedabc4a7f1b79949ad445f6"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b8b5d116b4674784bf349de6f16f609452c4970d","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                object\u003d\u0027node\u0027, action\u003daction, status\u003dstatus),"},{"line_number":52,"context_line":"            level\u003dlevel,"},{"line_number":53,"context_line":"            payload\u003dpayload).emit(task.context)"},{"line_number":54,"context_line":"    except Exception as e:"},{"line_number":55,"context_line":"        exception_values \u003d {\"node\": task.node.uuid,"},{"line_number":56,"context_line":"                            \"action\": action,"},{"line_number":57,"context_line":"                            \"status\": status,"}],"source_content_type":"text/x-python","patch_set":43,"id":"fa6399be_c8af9492","line":54,"in_reply_to":"fa6399be_689cc8c0","updated":"2016-10-12 19:57:24.000000000","message":"Yes, I didn\u0027t want duplication of code. You could do the exception_values/message assignments before line 45 too. I\u0027m not saying to do it, I\u0027m just commenting. My preference is to be consistent, but if others don\u0027t care, then I don\u0027t mind.","commit_id":"ddd6db98463a55caeedabc4a7f1b79949ad445f6"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"43a51fa74366b50c31b5f0e2e2c214f724fe61c4","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                object\u003d\u0027node\u0027, action\u003daction, status\u003dstatus),"},{"line_number":52,"context_line":"            level\u003dlevel,"},{"line_number":53,"context_line":"            payload\u003dpayload).emit(task.context)"},{"line_number":54,"context_line":"    except Exception as e:"},{"line_number":55,"context_line":"        exception_values \u003d {\"node\": task.node.uuid,"},{"line_number":56,"context_line":"                            \"action\": action,"},{"line_number":57,"context_line":"                            \"status\": status,"}],"source_content_type":"text/x-python","patch_set":43,"id":"fa6399be_689cc8c0","line":54,"in_reply_to":"fa6399be_93907245","updated":"2016-10-12 19:50:29.000000000","message":"This was here to avoid code duplication, since we\u0027d essentially be logging the same message in both cases. I was asked to merge the two cases by someone, I forget who. I can split it back up again if needed.","commit_id":"ddd6db98463a55caeedabc4a7f1b79949ad445f6"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8153e90ccf5a95d28c6cf5f90d5880819b6b7386","unresolved":false,"context_lines":[{"line_number":58,"context_line":"                            \"level\": level,"},{"line_number":59,"context_line":"                            \"notification_method\": notification_method,"},{"line_number":60,"context_line":"                            \"payload_method\": payload_method}"},{"line_number":61,"context_line":"        exception_message \u003d (_(\"Failed to send baremetal.node.\""},{"line_number":62,"context_line":"                               \"%(action)s.%(status)s notification for node \""},{"line_number":63,"context_line":"                               \"%(node)s with level %(level)s, \""},{"line_number":64,"context_line":"                               \"notification_method %(notification_method)s, \""}],"source_content_type":"text/x-python","patch_set":43,"id":"fa6399be_73691e8b","line":61,"updated":"2016-10-12 18:55:06.000000000","message":"I\u0027d prefer if you left this as a string, Ie, no \u0027_()\u0027. And where it is being used, you do _LW(msg % values) or _LE()","commit_id":"ddd6db98463a55caeedabc4a7f1b79949ad445f6"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"43a51fa74366b50c31b5f0e2e2c214f724fe61c4","unresolved":false,"context_lines":[{"line_number":58,"context_line":"                            \"level\": level,"},{"line_number":59,"context_line":"                            \"notification_method\": notification_method,"},{"line_number":60,"context_line":"                            \"payload_method\": payload_method}"},{"line_number":61,"context_line":"        exception_message \u003d (_(\"Failed to send baremetal.node.\""},{"line_number":62,"context_line":"                               \"%(action)s.%(status)s notification for node \""},{"line_number":63,"context_line":"                               \"%(node)s with level %(level)s, \""},{"line_number":64,"context_line":"                               \"notification_method %(notification_method)s, \""}],"source_content_type":"text/x-python","patch_set":43,"id":"fa6399be_286e5095","line":61,"in_reply_to":"fa6399be_73691e8b","updated":"2016-10-12 19:50:29.000000000","message":"This results in a PEP8 issue that would fail CI. I actually tried to do it that way before.\n\n./ironic/conductor/notification_utils.py:72:29: H701  Empty localization string\n\nSeems like a bug, but I\u0027m not sure.","commit_id":"ddd6db98463a55caeedabc4a7f1b79949ad445f6"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8153e90ccf5a95d28c6cf5f90d5880819b6b7386","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                               \"%(action)s.%(status)s notification for node \""},{"line_number":63,"context_line":"                               \"%(node)s with level %(level)s, \""},{"line_number":64,"context_line":"                               \"notification_method %(notification_method)s, \""},{"line_number":65,"context_line":"                               \"payload_method %(payload_method)s\")"},{"line_number":66,"context_line":"                             % exception_values)"},{"line_number":67,"context_line":"        if isinstance(e,"},{"line_number":68,"context_line":"                      (exception.NotificationSchemaObjectError,"}],"source_content_type":"text/x-python","patch_set":43,"id":"fa6399be_13df026a","line":65,"updated":"2016-10-12 18:55:06.000000000","message":"what happened. Did you never actually log the exception? Seems like that would be useful. (And goes to show, after reviewing so many times, I am not as sharp any more.)","commit_id":"ddd6db98463a55caeedabc4a7f1b79949ad445f6"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"43a51fa74366b50c31b5f0e2e2c214f724fe61c4","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                               \"%(action)s.%(status)s notification for node \""},{"line_number":63,"context_line":"                               \"%(node)s with level %(level)s, \""},{"line_number":64,"context_line":"                               \"notification_method %(notification_method)s, \""},{"line_number":65,"context_line":"                               \"payload_method %(payload_method)s\")"},{"line_number":66,"context_line":"                             % exception_values)"},{"line_number":67,"context_line":"        if isinstance(e,"},{"line_number":68,"context_line":"                      (exception.NotificationSchemaObjectError,"}],"source_content_type":"text/x-python","patch_set":43,"id":"fa6399be_a87d0070","line":65,"in_reply_to":"fa6399be_13df026a","updated":"2016-10-12 19:50:29.000000000","message":"It\u0027s done below (see LOG.exception, L77 here)","commit_id":"ddd6db98463a55caeedabc4a7f1b79949ad445f6"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"982762475920a765c65e84a7154fd9800c59d1c7","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                               \"%(action)s.%(status)s notification for node \""},{"line_number":63,"context_line":"                               \"%(node)s with level %(level)s, \""},{"line_number":64,"context_line":"                               \"notification_method %(notification_method)s, \""},{"line_number":65,"context_line":"                               \"payload_method %(payload_method)s\")"},{"line_number":66,"context_line":"                             % exception_values)"},{"line_number":67,"context_line":"        if isinstance(e,"},{"line_number":68,"context_line":"                      (exception.NotificationSchemaObjectError,"}],"source_content_type":"text/x-python","patch_set":43,"id":"fa6399be_be861a11","line":65,"in_reply_to":"fa6399be_4873844d","updated":"2016-10-12 20:55:22.000000000","message":"Ah, sorry, I thought you were talking about printing the traceback, which LOG.exception should automatically do. I\u0027ll add the error to the log message, too.","commit_id":"ddd6db98463a55caeedabc4a7f1b79949ad445f6"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b8b5d116b4674784bf349de6f16f609452c4970d","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                               \"%(action)s.%(status)s notification for node \""},{"line_number":63,"context_line":"                               \"%(node)s with level %(level)s, \""},{"line_number":64,"context_line":"                               \"notification_method %(notification_method)s, \""},{"line_number":65,"context_line":"                               \"payload_method %(payload_method)s\")"},{"line_number":66,"context_line":"                             % exception_values)"},{"line_number":67,"context_line":"        if isinstance(e,"},{"line_number":68,"context_line":"                      (exception.NotificationSchemaObjectError,"}],"source_content_type":"text/x-python","patch_set":43,"id":"fa6399be_4873844d","line":65,"in_reply_to":"fa6399be_a87d0070","updated":"2016-10-12 19:57:24.000000000","message":"I don\u0027t see where e is output?","commit_id":"ddd6db98463a55caeedabc4a7f1b79949ad445f6"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8153e90ccf5a95d28c6cf5f90d5880819b6b7386","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                       oslo_msg_exc.MessageDeliveryFailure,"},{"line_number":72,"context_line":"                       oslo_vo_exc.VersionedObjectsException)):"},{"line_number":73,"context_line":"            # NOTE(mariojv) The above are expected exceptions; we also want to"},{"line_number":74,"context_line":"            # handle (below) unexpected exceptions, too."},{"line_number":75,"context_line":"            LOG.warning(exception_message)"},{"line_number":76,"context_line":"        else:"},{"line_number":77,"context_line":"            LOG.exception(exception_message)"}],"source_content_type":"text/x-python","patch_set":43,"id":"fa6399be_d39aea62","line":74,"updated":"2016-10-12 18:55:06.000000000","message":"Now that you\u0027ve split it up, I don\u0027t think this is needed.\n\nIt might be useful to add a comment after L76 though. Something like, \u0027For unknown exceptions, we want to get the traceback too.\u0027","commit_id":"ddd6db98463a55caeedabc4a7f1b79949ad445f6"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"43a51fa74366b50c31b5f0e2e2c214f724fe61c4","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                       oslo_msg_exc.MessageDeliveryFailure,"},{"line_number":72,"context_line":"                       oslo_vo_exc.VersionedObjectsException)):"},{"line_number":73,"context_line":"            # NOTE(mariojv) The above are expected exceptions; we also want to"},{"line_number":74,"context_line":"            # handle (below) unexpected exceptions, too."},{"line_number":75,"context_line":"            LOG.warning(exception_message)"},{"line_number":76,"context_line":"        else:"},{"line_number":77,"context_line":"            LOG.exception(exception_message)"}],"source_content_type":"text/x-python","patch_set":43,"id":"fa6399be_683848a1","line":74,"in_reply_to":"fa6399be_d39aea62","updated":"2016-10-12 19:50:29.000000000","message":"Done","commit_id":"ddd6db98463a55caeedabc4a7f1b79949ad445f6"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"f6b673b359250a40079e713275354851e6baa779","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                               \"payload_method %(payload_method)s, error \""},{"line_number":67,"context_line":"                               \"%(error)s\")"},{"line_number":68,"context_line":"                             % exception_values)"},{"line_number":69,"context_line":"        if isinstance(e,"},{"line_number":70,"context_line":"                      (exception.NotificationSchemaObjectError,"},{"line_number":71,"context_line":"                       exception.NotificationSchemaKeyError,"},{"line_number":72,"context_line":"                       exception.NotificationPayloadError,"}],"source_content_type":"text/x-python","patch_set":45,"id":"fa6399be_2cef3288","line":69,"updated":"2016-10-13 07:34:41.000000000","message":"I personally prefer try... except ... except... here.","commit_id":"c0bfb316807b575254e4c763c5514029e333ea95"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4cc4d5db0d53b18df8f2c4da0442184a0f338055","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                               \"payload_method %(payload_method)s, error \""},{"line_number":67,"context_line":"                               \"%(error)s\")"},{"line_number":68,"context_line":"                             % exception_values)"},{"line_number":69,"context_line":"        if isinstance(e,"},{"line_number":70,"context_line":"                      (exception.NotificationSchemaObjectError,"},{"line_number":71,"context_line":"                       exception.NotificationSchemaKeyError,"},{"line_number":72,"context_line":"                       exception.NotificationPayloadError,"}],"source_content_type":"text/x-python","patch_set":45,"id":"fa6399be_8c7f13df","line":69,"in_reply_to":"fa6399be_2cef3288","updated":"2016-10-14 15:15:38.000000000","message":"Done. I think the next patch set both avoids code duplication, logs with the correct levels discussed earlier, and does the except...except pattern suggested, but I\u0027m open if there\u0027s a better way to do it.","commit_id":"c0bfb316807b575254e4c763c5514029e333ea95"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"95a53dfb2a09234420053bd82461b5e85b94fb23","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                            \"action\": action,"},{"line_number":49,"context_line":"                            \"status\": status,"},{"line_number":50,"context_line":"                            \"level\": level,"},{"line_number":51,"context_line":"                            \"notification_method\": notification_method,"},{"line_number":52,"context_line":"                            \"payload_method\": payload_method}"},{"line_number":53,"context_line":"        exception_message \u003d (_(\"Failed to send baremetal.node.\""},{"line_number":54,"context_line":"                               \"%(action)s.%(status)s notification for node \""}],"source_content_type":"text/x-python","patch_set":46,"id":"fa6399be_bd70720c","line":51,"updated":"2016-10-15 04:52:36.000000000","message":"Because nod-debug log messages should be more readable for operator IMO better to use notification_method.__name__ here.","commit_id":"43c48a161af8836b8d638221fd61531c0722ac3e"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"df6b3994b4ea46e1cbd4acbbcd4f0d7cc8f88a89","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                            \"action\": action,"},{"line_number":49,"context_line":"                            \"status\": status,"},{"line_number":50,"context_line":"                            \"level\": level,"},{"line_number":51,"context_line":"                            \"notification_method\": notification_method,"},{"line_number":52,"context_line":"                            \"payload_method\": payload_method}"},{"line_number":53,"context_line":"        exception_message \u003d (_(\"Failed to send baremetal.node.\""},{"line_number":54,"context_line":"                               \"%(action)s.%(status)s notification for node \""}],"source_content_type":"text/x-python","patch_set":46,"id":"fa6399be_89eee5b2","line":51,"in_reply_to":"fa6399be_bd70720c","updated":"2016-10-17 15:39:27.000000000","message":"Done.\n\nThis made unit testing more complex, since for every notification_method and payload_method that was mocked, we passed an instance of the Mock class, which doesn\u0027t have a __name__ attribute (classes have this in python, but not instances of classes).\n\nLet\u0027s keep it if it\u0027s worth it for operators. I\u0027m open to a better method of doing this, too.","commit_id":"43c48a161af8836b8d638221fd61531c0722ac3e"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"95a53dfb2a09234420053bd82461b5e85b94fb23","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                            \"status\": status,"},{"line_number":50,"context_line":"                            \"level\": level,"},{"line_number":51,"context_line":"                            \"notification_method\": notification_method,"},{"line_number":52,"context_line":"                            \"payload_method\": payload_method}"},{"line_number":53,"context_line":"        exception_message \u003d (_(\"Failed to send baremetal.node.\""},{"line_number":54,"context_line":"                               \"%(action)s.%(status)s notification for node \""},{"line_number":55,"context_line":"                               \"%(node)s with level %(level)s, \""}],"source_content_type":"text/x-python","patch_set":46,"id":"fa6399be_dd6b661c","line":52,"updated":"2016-10-15 04:52:36.000000000","message":"ditto","commit_id":"43c48a161af8836b8d638221fd61531c0722ac3e"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"df6b3994b4ea46e1cbd4acbbcd4f0d7cc8f88a89","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                            \"status\": status,"},{"line_number":50,"context_line":"                            \"level\": level,"},{"line_number":51,"context_line":"                            \"notification_method\": notification_method,"},{"line_number":52,"context_line":"                            \"payload_method\": payload_method}"},{"line_number":53,"context_line":"        exception_message \u003d (_(\"Failed to send baremetal.node.\""},{"line_number":54,"context_line":"                               \"%(action)s.%(status)s notification for node \""},{"line_number":55,"context_line":"                               \"%(node)s with level %(level)s, \""}],"source_content_type":"text/x-python","patch_set":46,"id":"fa6399be_a929e9f4","line":52,"in_reply_to":"fa6399be_dd6b661c","updated":"2016-10-17 15:39:27.000000000","message":"Done","commit_id":"43c48a161af8836b8d638221fd61531c0722ac3e"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"95a53dfb2a09234420053bd82461b5e85b94fb23","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            oslo_vo_exc.VersionedObjectsException) as e:"},{"line_number":72,"context_line":"        exception_values[\u0027error\u0027] \u003d e"},{"line_number":73,"context_line":"        exception_message \u003d exception_message % exception_values"},{"line_number":74,"context_line":"        LOG.warning(exception_message)"},{"line_number":75,"context_line":"    except Exception as e:"},{"line_number":76,"context_line":"        # NOTE(mariojv) For unknown exceptions, also log the traceback."},{"line_number":77,"context_line":"        exception_values[\u0027error\u0027] \u003d e"}],"source_content_type":"text/x-python","patch_set":46,"id":"fa6399be_3d15429b","line":74,"updated":"2016-10-15 04:52:36.000000000","message":"LOG.warning(exception_message, exception_values)","commit_id":"43c48a161af8836b8d638221fd61531c0722ac3e"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"df6b3994b4ea46e1cbd4acbbcd4f0d7cc8f88a89","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            oslo_vo_exc.VersionedObjectsException) as e:"},{"line_number":72,"context_line":"        exception_values[\u0027error\u0027] \u003d e"},{"line_number":73,"context_line":"        exception_message \u003d exception_message % exception_values"},{"line_number":74,"context_line":"        LOG.warning(exception_message)"},{"line_number":75,"context_line":"    except Exception as e:"},{"line_number":76,"context_line":"        # NOTE(mariojv) For unknown exceptions, also log the traceback."},{"line_number":77,"context_line":"        exception_values[\u0027error\u0027] \u003d e"}],"source_content_type":"text/x-python","patch_set":46,"id":"fa6399be_e933e160","line":74,"in_reply_to":"fa6399be_3d15429b","updated":"2016-10-17 15:39:27.000000000","message":"Done","commit_id":"43c48a161af8836b8d638221fd61531c0722ac3e"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"95a53dfb2a09234420053bd82461b5e85b94fb23","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        # NOTE(mariojv) For unknown exceptions, also log the traceback."},{"line_number":77,"context_line":"        exception_values[\u0027error\u0027] \u003d e"},{"line_number":78,"context_line":"        exception_message \u003d exception_message % exception_values"},{"line_number":79,"context_line":"        LOG.exception(exception_message)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"def emit_power_set_notification(task, level, status, to_power):"}],"source_content_type":"text/x-python","patch_set":46,"id":"fa6399be_5d1836d3","line":79,"updated":"2016-10-15 04:52:36.000000000","message":"ditto","commit_id":"43c48a161af8836b8d638221fd61531c0722ac3e"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"df6b3994b4ea46e1cbd4acbbcd4f0d7cc8f88a89","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        # NOTE(mariojv) For unknown exceptions, also log the traceback."},{"line_number":77,"context_line":"        exception_values[\u0027error\u0027] \u003d e"},{"line_number":78,"context_line":"        exception_message \u003d exception_message % exception_values"},{"line_number":79,"context_line":"        LOG.exception(exception_message)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"def emit_power_set_notification(task, level, status, to_power):"}],"source_content_type":"text/x-python","patch_set":46,"id":"fa6399be_0939f541","line":79,"in_reply_to":"fa6399be_5d1836d3","updated":"2016-10-17 15:39:27.000000000","message":"Done","commit_id":"43c48a161af8836b8d638221fd61531c0722ac3e"}],"ironic/conductor/utils.py":[{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"b702b42f6297d386ae8ebdb452f449ad9f1774fa","unresolved":false,"context_lines":[{"line_number":42,"context_line":"}"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"def emit_set_power_notif(context, node, target_power_state, host, priority,"},{"line_number":46,"context_line":"                         phase):"},{"line_number":47,"context_line":"    \"\"\"Helper for conductor sending a set power state notification."},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7aa08908_23669129","line":45,"updated":"2016-06-15 22:25:54.000000000","message":"Why not:\n emit_set_power_notify\n emit_set_power_notification\n\n?\n\nI guess I\u0027m unclear why it is \u0027notif\u0027.  Is that a defined word?","commit_id":"88f52ff22766d1b4dd54b852cb227fe8b0c0f42b"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d6912634c324ba8578fb327d838108aedeae7ab7","unresolved":false,"context_lines":[{"line_number":42,"context_line":"}"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"def emit_set_power_notif(context, node, target_power_state, host, priority,"},{"line_number":46,"context_line":"                         phase):"},{"line_number":47,"context_line":"    \"\"\"Helper for conductor sending a set power state notification."},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a9d85d2_28030944","line":45,"in_reply_to":"7aa08908_23669129","updated":"2016-06-20 19:35:20.000000000","message":"Changed to \"emit_set_power_notification\" and similar on L68. I meant \"notif\" to be short for \"notification.\"","commit_id":"88f52ff22766d1b4dd54b852cb227fe8b0c0f42b"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d6912634c324ba8578fb327d838108aedeae7ab7","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    payload.populate_schema(node\u003dnode)"},{"line_number":59,"context_line":"    node_objects.NodeSetPowerStateNotification("},{"line_number":60,"context_line":"        publisher\u003dnotification.NotificationPublisher("},{"line_number":61,"context_line":"            service\u003d\u0027conductor\u0027, host\u003dhost),"},{"line_number":62,"context_line":"        event_type\u003dnotification.EventType("},{"line_number":63,"context_line":"            object\u003d\u0027node\u0027, action\u003d\u0027set_power_state\u0027, phase\u003dphase),"},{"line_number":64,"context_line":"        priority\u003dpriority,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a9d85d2_8eba05e0","line":61,"updated":"2016-06-20 19:35:20.000000000","message":"I noticed a small inconsistency here where emit_sync_power_notif below was using CONF.host, but I was using the ConductorManager\u0027s host attribute here. I made it so that this uses CONF.host as well.\n\nI think both values should always be the same (https://github.com/openstack/ironic/blob/d5f675d635207147fb3a46d7ebf9cf9d832d5fa9/ironic/cmd/conductor.py#L37), but this will guarantee consistency between the 2 notification types on the same host.","commit_id":"88f52ff22766d1b4dd54b852cb227fe8b0c0f42b"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"b702b42f6297d386ae8ebdb452f449ad9f1774fa","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        payload\u003dpayload).emit(context)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"def emit_sync_power_notif(context, node, priority, phase\u003dNone):"},{"line_number":69,"context_line":"    \"\"\"Helper for conductor sending a sync power state notification."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    :param context: Request context."}],"source_content_type":"text/x-python","patch_set":3,"id":"7aa08908_c3750dcd","line":68,"updated":"2016-06-15 22:25:54.000000000","message":"Similar to L45","commit_id":"88f52ff22766d1b4dd54b852cb227fe8b0c0f42b"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d6912634c324ba8578fb327d838108aedeae7ab7","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        payload\u003dpayload).emit(context)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"def emit_sync_power_notif(context, node, priority, phase\u003dNone):"},{"line_number":69,"context_line":"    \"\"\"Helper for conductor sending a sync power state notification."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    :param context: Request context."}],"source_content_type":"text/x-python","patch_set":3,"id":"5a9d85d2_68fd113a","line":68,"in_reply_to":"7aa08908_c3750dcd","updated":"2016-06-20 19:35:20.000000000","message":"Done","commit_id":"88f52ff22766d1b4dd54b852cb227fe8b0c0f42b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"5ab7bc602466d737da030600430bdb4e5cd7e353","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    payload.populate_schema(node\u003dnode)"},{"line_number":58,"context_line":"    node_objects.NodeSetPowerStateNotification("},{"line_number":59,"context_line":"        publisher\u003dnotification.NotificationPublisher("},{"line_number":60,"context_line":"            service\u003d\u0027conductor\u0027, host\u003dCONF.host),"},{"line_number":61,"context_line":"        event_type\u003dnotification.EventType("},{"line_number":62,"context_line":"            object\u003d\u0027node\u0027, action\u003d\u0027set_power_state\u0027, phase\u003dphase),"},{"line_number":63,"context_line":"        priority\u003dpriority,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3aaa91ec_3a0833d9","line":60,"updated":"2016-06-29 07:10:34.000000000","message":"should we maybe pre-create this object on startup?","commit_id":"733c0a3a6bb18831520295905f9689e311b0d4e5"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dff42acabec04fc8535ea02a1017d937d6949a67","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    payload.populate_schema(node\u003dnode)"},{"line_number":58,"context_line":"    node_objects.NodeSetPowerStateNotification("},{"line_number":59,"context_line":"        publisher\u003dnotification.NotificationPublisher("},{"line_number":60,"context_line":"            service\u003d\u0027conductor\u0027, host\u003dCONF.host),"},{"line_number":61,"context_line":"        event_type\u003dnotification.EventType("},{"line_number":62,"context_line":"            object\u003d\u0027node\u0027, action\u003d\u0027set_power_state\u0027, phase\u003dphase),"},{"line_number":63,"context_line":"        priority\u003dpriority,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3aaa91ec_c355a6c2","line":60,"in_reply_to":"3aaa91ec_3a0833d9","updated":"2016-06-29 18:42:10.000000000","message":"In conductor\u0027s BaseManager.__init__ or regular ConductorManager.__init__?\n\nWe could. That may obfuscate some of this code but I\u0027d be willing to do it. Is the overhead that large for creating it here?","commit_id":"733c0a3a6bb18831520295905f9689e311b0d4e5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"5ab7bc602466d737da030600430bdb4e5cd7e353","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            node.save()"},{"line_number":165,"context_line":"            emit_set_power_notification(task.context, task.node,"},{"line_number":166,"context_line":"                                        states.NOSTATE,"},{"line_number":167,"context_line":"                                        fields.NotificationPriority.WARNING,"},{"line_number":168,"context_line":"                                        \u0027end\u0027)"},{"line_number":169,"context_line":"            LOG.warning(_LW(\"Not going to change node %(node)s power state \""},{"line_number":170,"context_line":"                            \"because current state \u003d requested state \u003d \""}],"source_content_type":"text/x-python","patch_set":6,"id":"3aaa91ec_9a0fa7e0","line":167,"updated":"2016-06-29 07:10:34.000000000","message":"I think it should be DEBUG. While we log it as \"warning\" here, this message happens pretty often and in my experience means nothing.","commit_id":"733c0a3a6bb18831520295905f9689e311b0d4e5"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dff42acabec04fc8535ea02a1017d937d6949a67","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            node.save()"},{"line_number":165,"context_line":"            emit_set_power_notification(task.context, task.node,"},{"line_number":166,"context_line":"                                        states.NOSTATE,"},{"line_number":167,"context_line":"                                        fields.NotificationPriority.WARNING,"},{"line_number":168,"context_line":"                                        \u0027end\u0027)"},{"line_number":169,"context_line":"            LOG.warning(_LW(\"Not going to change node %(node)s power state \""},{"line_number":170,"context_line":"                            \"because current state \u003d requested state \u003d \""}],"source_content_type":"text/x-python","patch_set":6,"id":"3aaa91ec_4301b6ae","line":167,"in_reply_to":"3aaa91ec_9a0fa7e0","updated":"2016-06-29 18:42:10.000000000","message":"I agree, done. Should I change the log level for this message, too?","commit_id":"733c0a3a6bb18831520295905f9689e311b0d4e5"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"a21ec9701b16292a5271cdc704798573c003e68c","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        event_type\u003dnotification.EventType("},{"line_number":62,"context_line":"            object\u003d\u0027node\u0027, action\u003d\u0027set_power_state\u0027, phase\u003dphase),"},{"line_number":63,"context_line":"        priority\u003dpriority,"},{"line_number":64,"context_line":"        payload\u003dpayload).emit(context)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def emit_sync_power_notification(context, node, priority, phase\u003dNone):"}],"source_content_type":"text/x-python","patch_set":11,"id":"dada55a8_c08a6463","line":64,"updated":"2016-07-21 15:51:53.000000000","message":"There are problems if exception will be raised from emit() 1) we drop original exception from ironic power operation 2) ironic power operation will be interrupted. I think we should only do logging in this case:\n\ntry:\n    ...emit()\nexcept Exception:\n    LOG.warning(...","commit_id":"299d2a37b7fd33fa8666e292a148041c69bb2030"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"53f828bb6c1fc461014b8133c2fb7f778fded353","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        event_type\u003dnotification.EventType("},{"line_number":62,"context_line":"            object\u003d\u0027node\u0027, action\u003d\u0027set_power_state\u0027, phase\u003dphase),"},{"line_number":63,"context_line":"        priority\u003dpriority,"},{"line_number":64,"context_line":"        payload\u003dpayload).emit(context)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def emit_sync_power_notification(context, node, priority, phase\u003dNone):"}],"source_content_type":"text/x-python","patch_set":11,"id":"dada55a8_cfd8fa20","line":64,"in_reply_to":"dada55a8_82f122d0","updated":"2016-07-26 22:48:33.000000000","message":"Switched to LOG.exception","commit_id":"299d2a37b7fd33fa8666e292a148041c69bb2030"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"fe4e6600fe9f011bad236b5e0f06e6f63b153d6b","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        event_type\u003dnotification.EventType("},{"line_number":62,"context_line":"            object\u003d\u0027node\u0027, action\u003d\u0027set_power_state\u0027, phase\u003dphase),"},{"line_number":63,"context_line":"        priority\u003dpriority,"},{"line_number":64,"context_line":"        payload\u003dpayload).emit(context)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def emit_sync_power_notification(context, node, priority, phase\u003dNone):"}],"source_content_type":"text/x-python","patch_set":11,"id":"dada55a8_82f122d0","line":64,"in_reply_to":"dada55a8_8b6ccd09","updated":"2016-07-25 08:44:54.000000000","message":"1) This is not error from Ironic point of view, but after reading http://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels agree with LOG.exception. 2) Agree, this is not useful information, operator should known only about connection/config error.","commit_id":"299d2a37b7fd33fa8666e292a148041c69bb2030"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"11835157cd9e5ab2c446016acfd59c490823f754","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        event_type\u003dnotification.EventType("},{"line_number":62,"context_line":"            object\u003d\u0027node\u0027, action\u003d\u0027set_power_state\u0027, phase\u003dphase),"},{"line_number":63,"context_line":"        priority\u003dpriority,"},{"line_number":64,"context_line":"        payload\u003dpayload).emit(context)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def emit_sync_power_notification(context, node, priority, phase\u003dNone):"}],"source_content_type":"text/x-python","patch_set":11,"id":"dada55a8_8b6ccd09","line":64,"in_reply_to":"dada55a8_c08a6463","updated":"2016-07-22 18:15:14.000000000","message":"Agreed, done. What would you think about using LOG.exception instead so that operators can see a traceback?\n\nAlso, I did not include information about which node it failed on or info within the notification, since errors in emit() would be related to connecting to the message bus and not the particular notification, so that information would not be very useful for debugging. Do you think that node/notification info should be included too?","commit_id":"299d2a37b7fd33fa8666e292a148041c69bb2030"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"a21ec9701b16292a5271cdc704798573c003e68c","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        event_type\u003dnotification.EventType("},{"line_number":83,"context_line":"            object\u003d\u0027node\u0027, action\u003d\u0027sync_power_state\u0027, phase\u003dphase),"},{"line_number":84,"context_line":"        priority\u003dpriority,"},{"line_number":85,"context_line":"        payload\u003dpayload).emit(context)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"@task_manager.require_exclusive_lock"}],"source_content_type":"text/x-python","patch_set":11,"id":"dada55a8_e0bde802","line":85,"updated":"2016-07-21 15:51:53.000000000","message":"ditto","commit_id":"299d2a37b7fd33fa8666e292a148041c69bb2030"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"11835157cd9e5ab2c446016acfd59c490823f754","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        event_type\u003dnotification.EventType("},{"line_number":83,"context_line":"            object\u003d\u0027node\u0027, action\u003d\u0027sync_power_state\u0027, phase\u003dphase),"},{"line_number":84,"context_line":"        priority\u003dpriority,"},{"line_number":85,"context_line":"        payload\u003dpayload).emit(context)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"@task_manager.require_exclusive_lock"}],"source_content_type":"text/x-python","patch_set":11,"id":"dada55a8_8e085b2a","line":85,"in_reply_to":"dada55a8_e0bde802","updated":"2016-07-22 18:15:14.000000000","message":"Done","commit_id":"299d2a37b7fd33fa8666e292a148041c69bb2030"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"27b22bfd2c428cd98d910c0898af2d4429586cec","unresolved":false,"context_lines":[{"line_number":64,"context_line":"            priority\u003dpriority,"},{"line_number":65,"context_line":"            payload\u003dpayload).emit(context)"},{"line_number":66,"context_line":"    except Exception:"},{"line_number":67,"context_line":"        LOG.warning(_LW(\"Failed to send set power notification.\"))"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"def emit_sync_power_notification(context, node, priority, phase\u003dNone):"}],"source_content_type":"text/x-python","patch_set":12,"id":"dada55a8_34ca46a2","line":67,"range":{"start_line":67,"start_character":25,"end_line":67,"end_character":62},"updated":"2016-07-24 05:45:35.000000000","message":"I think it could be more valuable if node_uuid and the target_power_state were in the message.","commit_id":"8b2a531b6dccf20c7bb0d8d4a956390de7e6e59c"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d12ed3e5930573e3c88dd98141b7c850996e48f9","unresolved":false,"context_lines":[{"line_number":64,"context_line":"            priority\u003dpriority,"},{"line_number":65,"context_line":"            payload\u003dpayload).emit(context)"},{"line_number":66,"context_line":"    except Exception:"},{"line_number":67,"context_line":"        LOG.warning(_LW(\"Failed to send set power notification.\"))"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"def emit_sync_power_notification(context, node, priority, phase\u003dNone):"}],"source_content_type":"text/x-python","patch_set":12,"id":"dada55a8_0fb7b2d8","line":67,"range":{"start_line":67,"start_character":25,"end_line":67,"end_character":62},"in_reply_to":"dada55a8_34ca46a2","updated":"2016-07-26 22:49:04.000000000","message":"See the discussion with Yuriy in patch set 11 L64.\n\nIncluding node UUID and the target power state wouldn\u0027t really help an operator debug the issue, since the issue would be something in emit() and most likely related to the configuration or connection to the message bus.\n\nI\u0027m willing to add that if there\u0027s a good reason it would be useful, though. I just don\u0027t want to mislead operators into thinking that this is an issue with the node or power state in question instead of the actual problem.","commit_id":"8b2a531b6dccf20c7bb0d8d4a956390de7e6e59c"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"27b22bfd2c428cd98d910c0898af2d4429586cec","unresolved":false,"context_lines":[{"line_number":88,"context_line":"            priority\u003dpriority,"},{"line_number":89,"context_line":"            payload\u003dpayload).emit(context)"},{"line_number":90,"context_line":"    except Exception:"},{"line_number":91,"context_line":"        LOG.warning(_LW(\"Failed to send sync power notification.\"))"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"@task_manager.require_exclusive_lock"}],"source_content_type":"text/x-python","patch_set":12,"id":"dada55a8_74c4be91","line":91,"range":{"start_line":91,"start_character":25,"end_line":91,"end_character":64},"updated":"2016-07-24 05:45:35.000000000","message":"ditto","commit_id":"8b2a531b6dccf20c7bb0d8d4a956390de7e6e59c"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d12ed3e5930573e3c88dd98141b7c850996e48f9","unresolved":false,"context_lines":[{"line_number":88,"context_line":"            priority\u003dpriority,"},{"line_number":89,"context_line":"            payload\u003dpayload).emit(context)"},{"line_number":90,"context_line":"    except Exception:"},{"line_number":91,"context_line":"        LOG.warning(_LW(\"Failed to send sync power notification.\"))"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"@task_manager.require_exclusive_lock"}],"source_content_type":"text/x-python","patch_set":12,"id":"dada55a8_42798181","line":91,"range":{"start_line":91,"start_character":25,"end_line":91,"end_character":64},"in_reply_to":"dada55a8_74c4be91","updated":"2016-07-26 22:49:04.000000000","message":"See above comment","commit_id":"8b2a531b6dccf20c7bb0d8d4a956390de7e6e59c"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"ae0af220a494d24f554886b23a5afc4bfb1e6c8d","unresolved":false,"context_lines":[{"line_number":42,"context_line":"}"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"def emit_set_power_notification(context, node, target_power_state, level,"},{"line_number":46,"context_line":"                                phase):"},{"line_number":47,"context_line":"    \"\"\"Helper for conductor sending a set power state notification."},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"1ac06dbe_f43ddddd","line":45,"updated":"2016-08-23 11:25:18.000000000","message":"You can use only \"task\" parameter instead of \"context\" and \"node\".","commit_id":"e0085816c98152d5437cbf6dcef8f723c5ffcbf2"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"e29715ad740a78cb1c55cb5569fcffe31e3e665b","unresolved":false,"context_lines":[{"line_number":42,"context_line":"}"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"def emit_set_power_notification(context, node, target_power_state, level,"},{"line_number":46,"context_line":"                                phase):"},{"line_number":47,"context_line":"    \"\"\"Helper for conductor sending a set power state notification."},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"fa7ab95a_d12a4e7e","line":45,"in_reply_to":"1ac06dbe_f43ddddd","updated":"2016-08-25 21:47:47.000000000","message":"Done here and in emit_sync_power_notification","commit_id":"e0085816c98152d5437cbf6dcef8f723c5ffcbf2"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"ae0af220a494d24f554886b23a5afc4bfb1e6c8d","unresolved":false,"context_lines":[{"line_number":149,"context_line":"                    \"Failed to change power state to \u0027%(target)s\u0027. \""},{"line_number":150,"context_line":"                    \"Error: %(error)s\") % {\u0027target\u0027: new_state, \u0027error\u0027: e}"},{"line_number":151,"context_line":"                node[\u0027target_power_state\u0027] \u003d states.NOSTATE"},{"line_number":152,"context_line":"                emit_set_power_notification(task.context, task.node,"},{"line_number":153,"context_line":"                                            states.NOSTATE,"},{"line_number":154,"context_line":"                                            fields.NotificationLevel.ERROR,"},{"line_number":155,"context_line":"                                            \u0027fail\u0027)"}],"source_content_type":"text/x-python","patch_set":21,"id":"1ac06dbe_8056eb27","line":152,"updated":"2016-08-23 11:25:18.000000000","message":"I think better to move this after node.save(), like l173 for avoiding possibility of inconsistency.","commit_id":"e0085816c98152d5437cbf6dcef8f723c5ffcbf2"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"e29715ad740a78cb1c55cb5569fcffe31e3e665b","unresolved":false,"context_lines":[{"line_number":149,"context_line":"                    \"Failed to change power state to \u0027%(target)s\u0027. \""},{"line_number":150,"context_line":"                    \"Error: %(error)s\") % {\u0027target\u0027: new_state, \u0027error\u0027: e}"},{"line_number":151,"context_line":"                node[\u0027target_power_state\u0027] \u003d states.NOSTATE"},{"line_number":152,"context_line":"                emit_set_power_notification(task.context, task.node,"},{"line_number":153,"context_line":"                                            states.NOSTATE,"},{"line_number":154,"context_line":"                                            fields.NotificationLevel.ERROR,"},{"line_number":155,"context_line":"                                            \u0027fail\u0027)"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa7ab95a_3141ba3a","line":152,"in_reply_to":"1ac06dbe_8056eb27","updated":"2016-08-25 21:47:47.000000000","message":"Done","commit_id":"e0085816c98152d5437cbf6dcef8f723c5ffcbf2"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"ae0af220a494d24f554886b23a5afc4bfb1e6c8d","unresolved":false,"context_lines":[{"line_number":201,"context_line":"            task.driver.power.reboot(task)"},{"line_number":202,"context_line":"    except Exception as e:"},{"line_number":203,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":204,"context_line":"            emit_set_power_notification(task.context, task.node,"},{"line_number":205,"context_line":"                                        states.NOSTATE,"},{"line_number":206,"context_line":"                                        fields.NotificationLevel.ERROR,"},{"line_number":207,"context_line":"                                        \u0027fail\u0027)"}],"source_content_type":"text/x-python","patch_set":21,"id":"1ac06dbe_e311a905","line":204,"updated":"2016-08-23 11:25:18.000000000","message":"I think this and next notifications sending should be moved to \"finally\" block after node.save().","commit_id":"e0085816c98152d5437cbf6dcef8f723c5ffcbf2"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"e29715ad740a78cb1c55cb5569fcffe31e3e665b","unresolved":false,"context_lines":[{"line_number":201,"context_line":"            task.driver.power.reboot(task)"},{"line_number":202,"context_line":"    except Exception as e:"},{"line_number":203,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":204,"context_line":"            emit_set_power_notification(task.context, task.node,"},{"line_number":205,"context_line":"                                        states.NOSTATE,"},{"line_number":206,"context_line":"                                        fields.NotificationLevel.ERROR,"},{"line_number":207,"context_line":"                                        \u0027fail\u0027)"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa7ab95a_51c71e45","line":204,"in_reply_to":"1ac06dbe_e311a905","updated":"2016-08-25 21:47:47.000000000","message":"Not very cleanly. One case is sending an error/fail notification and one is sending an info/end notification. In a finally block, you can\u0027t check whether an exception occurred, as far as I know.\n\nhttps://docs.python.org/3/reference/compound_stmts.html#the-try-statement\n\nI could get around this by checking last_error and sending the appropriate notification based on that in the finally clause.\n\nWhat do you think about that strategy?","commit_id":"e0085816c98152d5437cbf6dcef8f723c5ffcbf2"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"f32b27bed5c7d00d59ed3059d20535adffcebc3d","unresolved":false,"context_lines":[{"line_number":345,"context_line":"    the worker thread to change the power state of a node."},{"line_number":346,"context_line":""},{"line_number":347,"context_line":"    :param e: the exception object that was raised."},{"line_number":348,"context_line":"    :param task: a TaskManager instance with the request context and the node"},{"line_number":349,"context_line":"                 whose power state was being changed"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":21,"id":"1ac06dbe_bdb4e134","line":348,"updated":"2016-08-23 12:51:58.000000000","message":"Please use \"node\" parameter in l341, context does not needed in the current code.","commit_id":"e0085816c98152d5437cbf6dcef8f723c5ffcbf2"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"e29715ad740a78cb1c55cb5569fcffe31e3e665b","unresolved":false,"context_lines":[{"line_number":345,"context_line":"    the worker thread to change the power state of a node."},{"line_number":346,"context_line":""},{"line_number":347,"context_line":"    :param e: the exception object that was raised."},{"line_number":348,"context_line":"    :param task: a TaskManager instance with the request context and the node"},{"line_number":349,"context_line":"                 whose power state was being changed"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":21,"id":"fa7ab95a_9155261f","line":348,"in_reply_to":"1ac06dbe_bdb4e134","updated":"2016-08-25 21:47:47.000000000","message":"Done","commit_id":"e0085816c98152d5437cbf6dcef8f723c5ffcbf2"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ef288848479b2885996b1adb3863441e000069dc","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    :param task: a TaskManager instance."},{"line_number":47,"context_line":"    :param target_power_state: Power state being set."},{"line_number":48,"context_line":"    :param level: One of fields.NotificationLevel."},{"line_number":49,"context_line":"    :param phase: \"start\", \"end\", or \"fail\""},{"line_number":50,"context_line":"    \"\"\""},{"line_number":51,"context_line":"    payload \u003d node_objects.NodeSetPowerStatePayload("},{"line_number":52,"context_line":"        target_power_state\u003dtarget_power_state)"}],"source_content_type":"text/x-python","patch_set":23,"id":"fa7ab95a_35bf1162","line":49,"updated":"2016-08-30 13:25:30.000000000","message":"I was reading the spec, and wondering, why are we using \u0027start\u0027 and \u0027end\u0027. What do they mean?  Does \u0027start\u0027 \u003d\u003d power on and \u0027end\u0027 \u003d\u003d power off? Or Does \u0027start\u0027 \u003d\u003d starting to change the power to something, \u0027end\u0027 \u003d\u003d the power was changed to something?","commit_id":"d444f74e848ae814e45aca356dcc28a78be90059"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"2914b5ebc8939f7bf0ec650494b1266a9ccb58c5","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    :param task: a TaskManager instance."},{"line_number":47,"context_line":"    :param target_power_state: Power state being set."},{"line_number":48,"context_line":"    :param level: One of fields.NotificationLevel."},{"line_number":49,"context_line":"    :param phase: \"start\", \"end\", or \"fail\""},{"line_number":50,"context_line":"    \"\"\""},{"line_number":51,"context_line":"    payload \u003d node_objects.NodeSetPowerStatePayload("},{"line_number":52,"context_line":"        target_power_state\u003dtarget_power_state)"}],"source_content_type":"text/x-python","patch_set":23,"id":"fa7ab95a_b24881b4","line":49,"in_reply_to":"fa7ab95a_35bf1162","updated":"2016-08-30 17:45:29.000000000","message":"start \u003d\u003d starting to change the power state to something\nend \u003d\u003d the power was changed to something","commit_id":"d444f74e848ae814e45aca356dcc28a78be90059"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"696757012a58e6789af73bfc5774891619bd71fc","unresolved":false,"context_lines":[{"line_number":211,"context_line":"                 {\u0027node\u0027: node.uuid, \u0027state\u0027: target_state})"},{"line_number":212,"context_line":"    finally:"},{"line_number":213,"context_line":"        node[\u0027target_power_state\u0027] \u003d states.NOSTATE"},{"line_number":214,"context_line":"        node.save()"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"@task_manager.require_exclusive_lock"}],"source_content_type":"text/x-python","patch_set":23,"id":"fa7ab95a_de6236d8","line":214,"updated":"2016-08-26 12:36:09.000000000","message":"About my comment on ps21 (place notifications after save()). Simplest way is remove \"finally\" and duplicate l213-214 in \"except\" and \"else\".","commit_id":"d444f74e848ae814e45aca356dcc28a78be90059"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"2914b5ebc8939f7bf0ec650494b1266a9ccb58c5","unresolved":false,"context_lines":[{"line_number":211,"context_line":"                 {\u0027node\u0027: node.uuid, \u0027state\u0027: target_state})"},{"line_number":212,"context_line":"    finally:"},{"line_number":213,"context_line":"        node[\u0027target_power_state\u0027] \u003d states.NOSTATE"},{"line_number":214,"context_line":"        node.save()"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"@task_manager.require_exclusive_lock"}],"source_content_type":"text/x-python","patch_set":23,"id":"fa7ab95a_726b591e","line":214,"in_reply_to":"fa7ab95a_de6236d8","updated":"2016-08-30 17:45:29.000000000","message":"Done","commit_id":"d444f74e848ae814e45aca356dcc28a78be90059"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9d63de254cbc6a9d4149e39c8c3eac718e12bcd2","unresolved":false,"context_lines":[{"line_number":39,"context_line":"}"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"def emit_set_power_notification(task, target_power_state, level,"},{"line_number":43,"context_line":"                                status):"},{"line_number":44,"context_line":"    \"\"\"Helper for conductor sending a set power state notification."},{"line_number":45,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"fa7ab95a_204718bd","line":42,"updated":"2016-09-01 22:20:35.000000000","message":"I suspect we might want a separate file for notifications but I guess we can deal with that when it starts to grow.\n\nI\u0027m also going to bikeshed; i\u0027d prefer that these were named similar to the event type; would make it easier to read/understand I think.","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"81bf35a11ef548fad097f42c595471dd14e5a1c6","unresolved":false,"context_lines":[{"line_number":39,"context_line":"}"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"def emit_set_power_notification(task, target_power_state, level,"},{"line_number":43,"context_line":"                                status):"},{"line_number":44,"context_line":"    \"\"\"Helper for conductor sending a set power state notification."},{"line_number":45,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"fa7ab95a_b7ffdeff","line":42,"in_reply_to":"fa7ab95a_204718bd","updated":"2016-09-02 09:11:47.000000000","message":"+1 as it grows it may worth to have it\u0027s own functions in a separated module such as ironic/conductor/notification_utils.py (like we do have pxe_utils.py for the drivers/ and so on).","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"c7ee6536691a192bb79c51102b54a005d301339f","unresolved":false,"context_lines":[{"line_number":39,"context_line":"}"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"def emit_set_power_notification(task, target_power_state, level,"},{"line_number":43,"context_line":"                                status):"},{"line_number":44,"context_line":"    \"\"\"Helper for conductor sending a set power state notification."},{"line_number":45,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"9a89bdaa_7e8f9f74","line":42,"in_reply_to":"fa7ab95a_204718bd","updated":"2016-09-08 17:35:51.000000000","message":"Done","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"c7ee6536691a192bb79c51102b54a005d301339f","unresolved":false,"context_lines":[{"line_number":39,"context_line":"}"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"def emit_set_power_notification(task, target_power_state, level,"},{"line_number":43,"context_line":"                                status):"},{"line_number":44,"context_line":"    \"\"\"Helper for conductor sending a set power state notification."},{"line_number":45,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"9a89bdaa_9e8aa362","line":42,"in_reply_to":"fa7ab95a_b7ffdeff","updated":"2016-09-08 17:35:51.000000000","message":"Done","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9d63de254cbc6a9d4149e39c8c3eac718e12bcd2","unresolved":false,"context_lines":[{"line_number":59,"context_line":"                object\u003d\u0027node\u0027, action\u003d\u0027power_set\u0027, status\u003dstatus),"},{"line_number":60,"context_line":"            level\u003dlevel,"},{"line_number":61,"context_line":"            payload\u003dpayload).emit(task.context)"},{"line_number":62,"context_line":"    except Exception:"},{"line_number":63,"context_line":"        LOG.exception(_LE(\"Failed to send set power notification.\"))"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"fa7ab95a_a09c080f","line":62,"updated":"2016-09-01 22:20:35.000000000","message":"I don\u0027t really like the catchall Exception. Is that because you don\u0027t know what exceptions are going to be raised? Wouldn\u0027t they all be ironic exceptions?","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"37bd9c44735e0b9ebc33e82de52f0952224eb678","unresolved":false,"context_lines":[{"line_number":59,"context_line":"                object\u003d\u0027node\u0027, action\u003d\u0027power_set\u0027, status\u003dstatus),"},{"line_number":60,"context_line":"            level\u003dlevel,"},{"line_number":61,"context_line":"            payload\u003dpayload).emit(task.context)"},{"line_number":62,"context_line":"    except Exception:"},{"line_number":63,"context_line":"        LOG.exception(_LE(\"Failed to send set power notification.\"))"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"9a89bdaa_74bd5767","line":62,"in_reply_to":"9a89bdaa_44520e68","updated":"2016-09-13 02:20:15.000000000","message":"I would go with the most general exception from a particular library, unless we actually want to handle them differently.","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"c7ee6536691a192bb79c51102b54a005d301339f","unresolved":false,"context_lines":[{"line_number":59,"context_line":"                object\u003d\u0027node\u0027, action\u003d\u0027power_set\u0027, status\u003dstatus),"},{"line_number":60,"context_line":"            level\u003dlevel,"},{"line_number":61,"context_line":"            payload\u003dpayload).emit(task.context)"},{"line_number":62,"context_line":"    except Exception:"},{"line_number":63,"context_line":"        LOG.exception(_LE(\"Failed to send set power notification.\"))"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"9a89bdaa_44520e68","line":62,"in_reply_to":"fa7ab95a_373bced2","updated":"2016-09-08 17:35:51.000000000","message":"Done. There are quite a few of them, but I think I caught all of them. I also documented the exceptions that may be raised by these calls in the appropriate docstrings.\n\nFor catching exceptions that dependencies might raise (i.e. oslo_messaging\u0027s MessageDeliveryFailure), is the convention to catch the specific exception that the oslo docs currently present, or should I be catching the most generic exception possible from that library, like I\u0027m doing with the VersionedObjectsException?\n\nI could imagine something like oslo having the notifier raise more specific exceptions in the future, so I want to make sure we\u0027re as compatible as possible with that.","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"81bf35a11ef548fad097f42c595471dd14e5a1c6","unresolved":false,"context_lines":[{"line_number":59,"context_line":"                object\u003d\u0027node\u0027, action\u003d\u0027power_set\u0027, status\u003dstatus),"},{"line_number":60,"context_line":"            level\u003dlevel,"},{"line_number":61,"context_line":"            payload\u003dpayload).emit(task.context)"},{"line_number":62,"context_line":"    except Exception:"},{"line_number":63,"context_line":"        LOG.exception(_LE(\"Failed to send set power notification.\"))"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"fa7ab95a_373bced2","line":62,"in_reply_to":"fa7ab95a_a09c080f","updated":"2016-09-02 09:11:47.000000000","message":"+1\n\nIt would be good to handle expected exceptions first and have the Exception as a safe guard, e.g:\n\n try:\n    ...\n except ExpectedError:\n    LOG.exceptions(...)\n except Exception\n    LOG.exception(\u0027Unkown error when...\u0027)","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9d63de254cbc6a9d4149e39c8c3eac718e12bcd2","unresolved":false,"context_lines":[{"line_number":60,"context_line":"            level\u003dlevel,"},{"line_number":61,"context_line":"            payload\u003dpayload).emit(task.context)"},{"line_number":62,"context_line":"    except Exception:"},{"line_number":63,"context_line":"        LOG.exception(_LE(\"Failed to send set power notification.\"))"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"def emit_sync_power_notification(task, level, status):"}],"source_content_type":"text/x-python","patch_set":25,"id":"fa7ab95a_40e09c96","line":63,"updated":"2016-09-01 22:20:35.000000000","message":"i think it\u0027d be easier for me if this had the event type. eg \u0027Failed to send \u003cevent_type\u003e notification\u0027","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"c7ee6536691a192bb79c51102b54a005d301339f","unresolved":false,"context_lines":[{"line_number":60,"context_line":"            level\u003dlevel,"},{"line_number":61,"context_line":"            payload\u003dpayload).emit(task.context)"},{"line_number":62,"context_line":"    except Exception:"},{"line_number":63,"context_line":"        LOG.exception(_LE(\"Failed to send set power notification.\"))"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"def emit_sync_power_notification(task, level, status):"}],"source_content_type":"text/x-python","patch_set":25,"id":"9a89bdaa_c4361e02","line":63,"in_reply_to":"fa7ab95a_40e09c96","updated":"2016-09-08 17:35:51.000000000","message":"Done.\n\nI left out the status since it\u0027s theoretically possible for the status to be missing if code is wrong. I could include it, and the generic Exception handler should catch it, if you want.","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"81bf35a11ef548fad097f42c595471dd14e5a1c6","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    \"\"\"Helper for conductor sending a sync power state notification."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    :param task: a TaskManager instance."},{"line_number":70,"context_line":"    :param level: One of fields.NotificationLevel."},{"line_number":71,"context_line":"    :param status: \"success\"or \"fail\". None indicates a successful sync. \"fail\""},{"line_number":72,"context_line":"                   indicates that we couldn\u0027t retrieve power state for this"},{"line_number":73,"context_line":"                   node."}],"source_content_type":"text/x-python","patch_set":25,"id":"fa7ab95a_f70b26d3","line":70,"range":{"start_line":70,"start_character":25,"end_line":70,"end_character":49},"updated":"2016-09-02 09:11:47.000000000","message":"nit:\n\n:class:`fields.NotificationLevel`","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"c7ee6536691a192bb79c51102b54a005d301339f","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    \"\"\"Helper for conductor sending a sync power state notification."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    :param task: a TaskManager instance."},{"line_number":70,"context_line":"    :param level: One of fields.NotificationLevel."},{"line_number":71,"context_line":"    :param status: \"success\"or \"fail\". None indicates a successful sync. \"fail\""},{"line_number":72,"context_line":"                   indicates that we couldn\u0027t retrieve power state for this"},{"line_number":73,"context_line":"                   node."}],"source_content_type":"text/x-python","patch_set":25,"id":"9a89bdaa_8429769d","line":70,"range":{"start_line":70,"start_character":25,"end_line":70,"end_character":49},"in_reply_to":"fa7ab95a_f70b26d3","updated":"2016-09-08 17:35:51.000000000","message":"Done","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"81bf35a11ef548fad097f42c595471dd14e5a1c6","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                object\u003d\u0027node\u0027, action\u003d\u0027power_sync\u0027, status\u003dstatus),"},{"line_number":83,"context_line":"            level\u003dlevel,"},{"line_number":84,"context_line":"            payload\u003dpayload).emit(task.context)"},{"line_number":85,"context_line":"    except Exception:"},{"line_number":86,"context_line":"        LOG.exception(_LE(\"Failed to send sync power notification.\"))"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"fa7ab95a_97e1fa2c","line":85,"updated":"2016-09-02 09:11:47.000000000","message":"ditto L62","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"c7ee6536691a192bb79c51102b54a005d301339f","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                object\u003d\u0027node\u0027, action\u003d\u0027power_sync\u0027, status\u003dstatus),"},{"line_number":83,"context_line":"            level\u003dlevel,"},{"line_number":84,"context_line":"            payload\u003dpayload).emit(task.context)"},{"line_number":85,"context_line":"    except Exception:"},{"line_number":86,"context_line":"        LOG.exception(_LE(\"Failed to send sync power notification.\"))"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"9a89bdaa_a41afa7a","line":85,"in_reply_to":"fa7ab95a_97e1fa2c","updated":"2016-09-08 17:35:51.000000000","message":"Done","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9d63de254cbc6a9d4149e39c8c3eac718e12bcd2","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                node[\u0027target_power_state\u0027] \u003d states.NOSTATE"},{"line_number":147,"context_line":"                node.save()"},{"line_number":148,"context_line":"                emit_set_power_notification(task,"},{"line_number":149,"context_line":"                                            states.NOSTATE,"},{"line_number":150,"context_line":"                                            fields.NotificationLevel.ERROR,"},{"line_number":151,"context_line":"                                            \u0027fail\u0027)"},{"line_number":152,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"fa7ab95a_8069c4fb","line":149,"updated":"2016-09-01 22:20:35.000000000","message":"hmm. Does the end person want to know what state it was trying to be set to, when it failed? NOSTATE seems somewhat useless.","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"c7ee6536691a192bb79c51102b54a005d301339f","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                node[\u0027target_power_state\u0027] \u003d states.NOSTATE"},{"line_number":147,"context_line":"                node.save()"},{"line_number":148,"context_line":"                emit_set_power_notification(task,"},{"line_number":149,"context_line":"                                            states.NOSTATE,"},{"line_number":150,"context_line":"                                            fields.NotificationLevel.ERROR,"},{"line_number":151,"context_line":"                                            \u0027fail\u0027)"},{"line_number":152,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"9a89bdaa_6ff0cbc9","line":149,"in_reply_to":"fa7ab95a_8069c4fb","updated":"2016-09-08 17:35:51.000000000","message":"I think it could be useful.\n\nIt indicates that the failure resulted in an error that ironic won\u0027t automatically try to recover from. I could imagine a future where we had some retry behavior or something where we\u0027d want to keep a target_power_state after 1 failure, and only stop trying after N attempts.\n\nI could make the \"NOSTATE\" implicit, remove it here, and document the behavior, but maybe it\u0027s more obvious what\u0027s happening when it\u0027s explicitly set. WDYT?","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9d63de254cbc6a9d4149e39c8c3eac718e12bcd2","unresolved":false,"context_lines":[{"line_number":333,"context_line":""},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"def power_state_error_handler(e, node):"},{"line_number":336,"context_line":"    \"\"\"Set the node\u0027s power states if error occurs."},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"    This hook gets called upon an exception being raised when spawning"},{"line_number":339,"context_line":"    the worker thread to change the power state of a node."}],"source_content_type":"text/x-python","patch_set":25,"id":"fa7ab95a_0024d4c2","line":336,"updated":"2016-09-01 22:20:35.000000000","message":"Looks like you changed the behavior of this method. Why?","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"c7ee6536691a192bb79c51102b54a005d301339f","unresolved":false,"context_lines":[{"line_number":333,"context_line":""},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"def power_state_error_handler(e, node):"},{"line_number":336,"context_line":"    \"\"\"Set the node\u0027s power states if error occurs."},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"    This hook gets called upon an exception being raised when spawning"},{"line_number":339,"context_line":"    the worker thread to change the power state of a node."}],"source_content_type":"text/x-python","patch_set":25,"id":"9a89bdaa_8f450f44","line":336,"in_reply_to":"fa7ab95a_0024d4c2","updated":"2016-09-08 17:35:51.000000000","message":"This is from a previous patch set where we were notifying in this case. I was asked to remove the notification since it\u0027s related to spawning the worker thread and not actually setting the power state.\n\nI think the reason I changed it originally was because the power state was already set on the node in the caller before the task is spawned, so setting it again was redundant:\n\nhttps://github.com/openstack/ironic/blob/master/ironic/conductor/manager.py#L184\n\nI reset this in patch set 27 though since it\u0027s refactoring not related to the notification patch set anymore.","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"7506620145b937f0cf1442f5542a848150eb3d9b","unresolved":false,"context_lines":[{"line_number":117,"context_line":"            node[\u0027target_power_state\u0027] \u003d states.NOSTATE"},{"line_number":118,"context_line":"            node.save()"},{"line_number":119,"context_line":"            notify_utils.emit_power_set_notification("},{"line_number":120,"context_line":"                task, states.NOSTATE, fields.NotificationLevel.DEBUG, \u0027end\u0027)"},{"line_number":121,"context_line":"            LOG.warning(_LW(\"Not going to change node %(node)s power state \""},{"line_number":122,"context_line":"                            \"because current state \u003d requested state \u003d \""},{"line_number":123,"context_line":"                            \"\u0027%(state)s\u0027.\"),"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a89bdaa_19c9a459","line":120,"updated":"2016-09-13 02:19:51.000000000","message":"I need to think about this and why we\u0027d want to put this as debug.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dc67c0f7419ea63333fb37fc030485b2871283b4","unresolved":false,"context_lines":[{"line_number":117,"context_line":"            node[\u0027target_power_state\u0027] \u003d states.NOSTATE"},{"line_number":118,"context_line":"            node.save()"},{"line_number":119,"context_line":"            notify_utils.emit_power_set_notification("},{"line_number":120,"context_line":"                task, states.NOSTATE, fields.NotificationLevel.DEBUG, \u0027end\u0027)"},{"line_number":121,"context_line":"            LOG.warning(_LW(\"Not going to change node %(node)s power state \""},{"line_number":122,"context_line":"                            \"because current state \u003d requested state \u003d \""},{"line_number":123,"context_line":"                            \"\u0027%(state)s\u0027.\"),"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_c6148f4e","line":120,"in_reply_to":"9a89bdaa_19c9a459","updated":"2016-09-16 23:04:08.000000000","message":"I changed this to INFO per a recommendation in the docs.\n\nI was using it to signal that the power state wasn\u0027t changed.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"7506620145b937f0cf1442f5542a848150eb3d9b","unresolved":false,"context_lines":[{"line_number":120,"context_line":"                task, states.NOSTATE, fields.NotificationLevel.DEBUG, \u0027end\u0027)"},{"line_number":121,"context_line":"            LOG.warning(_LW(\"Not going to change node %(node)s power state \""},{"line_number":122,"context_line":"                            \"because current state \u003d requested state \u003d \""},{"line_number":123,"context_line":"                            \"\u0027%(state)s\u0027.\"),"},{"line_number":124,"context_line":"                        {\u0027node\u0027: node.uuid, \u0027state\u0027: curr_state})"},{"line_number":125,"context_line":"            return"},{"line_number":126,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"9a89bdaa_7990f043","line":123,"updated":"2016-09-13 02:19:51.000000000","message":"why did you change this line?","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dc67c0f7419ea63333fb37fc030485b2871283b4","unresolved":false,"context_lines":[{"line_number":120,"context_line":"                task, states.NOSTATE, fields.NotificationLevel.DEBUG, \u0027end\u0027)"},{"line_number":121,"context_line":"            LOG.warning(_LW(\"Not going to change node %(node)s power state \""},{"line_number":122,"context_line":"                            \"because current state \u003d requested state \u003d \""},{"line_number":123,"context_line":"                            \"\u0027%(state)s\u0027.\"),"},{"line_number":124,"context_line":"                        {\u0027node\u0027: node.uuid, \u0027state\u0027: curr_state})"},{"line_number":125,"context_line":"            return"},{"line_number":126,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_c108f92a","line":123,"in_reply_to":"9a89bdaa_7990f043","updated":"2016-09-16 23:04:08.000000000","message":"No reason, I think my text editor did it. I think I changed it back.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"7506620145b937f0cf1442f5542a848150eb3d9b","unresolved":false,"context_lines":[{"line_number":162,"context_line":"        LOG.info(_LI(\u0027Successfully set node %(node)s power state to \u0027"},{"line_number":163,"context_line":"                     \u0027%(state)s.\u0027),"},{"line_number":164,"context_line":"                 {\u0027node\u0027: node.uuid, \u0027state\u0027: target_state})"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"@task_manager.require_exclusive_lock"},{"line_number":168,"context_line":"def cleanup_after_timeout(task):"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a89bdaa_394748bd","line":165,"updated":"2016-09-13 02:19:51.000000000","message":"Alternatively, you could have left the \"finally:\" code that was originally there, and added a call to notify_utils.emit_power_set_notification(task, states.NOSTATE, notification_level, notification_phase) \n\nwhere notification_level \u0026 notification_phase would be set in the \"except:\" and \"else:\" parts.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dc67c0f7419ea63333fb37fc030485b2871283b4","unresolved":false,"context_lines":[{"line_number":162,"context_line":"        LOG.info(_LI(\u0027Successfully set node %(node)s power state to \u0027"},{"line_number":163,"context_line":"                     \u0027%(state)s.\u0027),"},{"line_number":164,"context_line":"                 {\u0027node\u0027: node.uuid, \u0027state\u0027: target_state})"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"@task_manager.require_exclusive_lock"},{"line_number":168,"context_line":"def cleanup_after_timeout(task):"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_013e61c0","line":165,"in_reply_to":"9a89bdaa_394748bd","updated":"2016-09-16 23:04:08.000000000","message":"Good point. I think this is a bit easier to understand, but I\u0027m fine with either way.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"09c6117da45b00111c1aef21e6204b4710172f1a","unresolved":false,"context_lines":[{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    \"\"\""},{"line_number":295,"context_line":"    if isinstance(e, exception.NoFreeConductorWorker):"},{"line_number":296,"context_line":"        node.power_state \u003d power_state"},{"line_number":297,"context_line":"        node.target_power_state \u003d states.NOSTATE"},{"line_number":298,"context_line":"        node.last_error \u003d (_(\"No free conductor workers available\"))"},{"line_number":299,"context_line":"        node.save()"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_de7ccf74","line":296,"updated":"2016-09-14 22:57:19.000000000","message":"This happens if the user requested a node power set and the request fails. I\u0027m guessing we aren\u0027t going to emit notifications for this, since we don\u0027t start tracking/clocking the start of a power_set until later.\n\nIf that\u0027s the case, I wonder if it is worth adding a comment to that effect here.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dc67c0f7419ea63333fb37fc030485b2871283b4","unresolved":false,"context_lines":[{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    \"\"\""},{"line_number":295,"context_line":"    if isinstance(e, exception.NoFreeConductorWorker):"},{"line_number":296,"context_line":"        node.power_state \u003d power_state"},{"line_number":297,"context_line":"        node.target_power_state \u003d states.NOSTATE"},{"line_number":298,"context_line":"        node.last_error \u003d (_(\"No free conductor workers available\"))"},{"line_number":299,"context_line":"        node.save()"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_414b0959","line":296,"in_reply_to":"7a8ec9b2_de7ccf74","updated":"2016-09-16 23:04:08.000000000","message":"Correct. This is when an exception happens when spawning the worker thread. I will leave a comment about it.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"7506620145b937f0cf1442f5542a848150eb3d9b","unresolved":false,"context_lines":[{"line_number":301,"context_line":"                        \"an action on node %(node)s, setting node\u0027s \""},{"line_number":302,"context_line":"                        \"power state back to %(power_state)s.\"),"},{"line_number":303,"context_line":"                    {\u0027node\u0027: node.uuid,"},{"line_number":304,"context_line":"                     \u0027power_state\u0027: node.power_state})"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"def _step_key(step):"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a89bdaa_391e68bb","line":304,"updated":"2016-09-13 02:19:51.000000000","message":"what changed? Isn\u0027t power_state \u003d\u003d node.power_state?","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dc67c0f7419ea63333fb37fc030485b2871283b4","unresolved":false,"context_lines":[{"line_number":301,"context_line":"                        \"an action on node %(node)s, setting node\u0027s \""},{"line_number":302,"context_line":"                        \"power state back to %(power_state)s.\"),"},{"line_number":303,"context_line":"                    {\u0027node\u0027: node.uuid,"},{"line_number":304,"context_line":"                     \u0027power_state\u0027: node.power_state})"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"def _step_key(step):"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_8185115b","line":304,"in_reply_to":"9a89bdaa_391e68bb","updated":"2016-09-16 23:04:08.000000000","message":"They\u0027re the same. I think I forgot this line when I was asked to revert all changes here.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":100,"context_line":"                node.save()"},{"line_number":101,"context_line":"                notify_utils.emit_power_set_notification("},{"line_number":102,"context_line":"                    task, fields.NotificationLevel.ERROR,"},{"line_number":103,"context_line":"                    fields.NotificationStatus.ERROR, states.NOSTATE)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        if curr_state \u003d\u003d new_state:"},{"line_number":106,"context_line":"            # Neither the ironic service nor the hardware has erred. The"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_c261c2d4","line":103,"updated":"2016-10-03 21:08:10.000000000","message":"I think s/states.NOSTATE/new_state/\n\nsince I think that we still want to indicate that we were trying to set the power state to new-state, and that it failed.","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":100,"context_line":"                node.save()"},{"line_number":101,"context_line":"                notify_utils.emit_power_set_notification("},{"line_number":102,"context_line":"                    task, fields.NotificationLevel.ERROR,"},{"line_number":103,"context_line":"                    fields.NotificationStatus.ERROR, states.NOSTATE)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        if curr_state \u003d\u003d new_state:"},{"line_number":106,"context_line":"            # Neither the ironic service nor the hardware has erred. The"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a95cdbc_8f73454d","line":103,"in_reply_to":"3a98d1f4_c261c2d4","updated":"2016-10-04 20:43:15.000000000","message":"Agreed, done. target_power_state is already present in the notification anyway, so NOSTATE is redundant","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            node.save()"},{"line_number":120,"context_line":"            notify_utils.emit_power_set_notification("},{"line_number":121,"context_line":"                task, fields.NotificationLevel.INFO,"},{"line_number":122,"context_line":"                fields.NotificationStatus.END, states.NOSTATE)"},{"line_number":123,"context_line":"            LOG.warning(_LW(\"Not going to change node %(node)s power \""},{"line_number":124,"context_line":"                            \"state because current state \u003d requested state \""},{"line_number":125,"context_line":"                            \"\u003d \u0027%(state)s\u0027.\"),"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_22a186f8","line":122,"updated":"2016-10-03 21:08:10.000000000","message":"ditto, s/states.NOSTATE/new_state/","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            node.save()"},{"line_number":120,"context_line":"            notify_utils.emit_power_set_notification("},{"line_number":121,"context_line":"                task, fields.NotificationLevel.INFO,"},{"line_number":122,"context_line":"                fields.NotificationStatus.END, states.NOSTATE)"},{"line_number":123,"context_line":"            LOG.warning(_LW(\"Not going to change node %(node)s power \""},{"line_number":124,"context_line":"                            \"state because current state \u003d requested state \""},{"line_number":125,"context_line":"                            \"\u003d \u0027%(state)s\u0027.\"),"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a95cdbc_6fc43940","line":122,"in_reply_to":"3a98d1f4_22a186f8","updated":"2016-10-04 20:43:15.000000000","message":"Done","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":154,"context_line":"            node.save()"},{"line_number":155,"context_line":"            notify_utils.emit_power_set_notification("},{"line_number":156,"context_line":"                task, fields.NotificationLevel.ERROR,"},{"line_number":157,"context_line":"                fields.NotificationStatus.ERROR, states.NOSTATE)"},{"line_number":158,"context_line":"    else:"},{"line_number":159,"context_line":"        # success!"},{"line_number":160,"context_line":"        node[\u0027power_state\u0027] \u003d target_state"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_e2e15e2b","line":157,"updated":"2016-10-03 21:08:10.000000000","message":"ditto s/states.NOSTATE/new_state/","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":154,"context_line":"            node.save()"},{"line_number":155,"context_line":"            notify_utils.emit_power_set_notification("},{"line_number":156,"context_line":"                task, fields.NotificationLevel.ERROR,"},{"line_number":157,"context_line":"                fields.NotificationStatus.ERROR, states.NOSTATE)"},{"line_number":158,"context_line":"    else:"},{"line_number":159,"context_line":"        # success!"},{"line_number":160,"context_line":"        node[\u0027power_state\u0027] \u003d target_state"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a95cdbc_efe689e7","line":157,"in_reply_to":"3a98d1f4_e2e15e2b","updated":"2016-10-04 20:43:15.000000000","message":"Done","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":162,"context_line":"        node.save()"},{"line_number":163,"context_line":"        notify_utils.emit_power_set_notification("},{"line_number":164,"context_line":"            task, fields.NotificationLevel.INFO, fields.NotificationStatus.END,"},{"line_number":165,"context_line":"            states.NOSTATE)"},{"line_number":166,"context_line":"        LOG.info(_LI(\u0027Successfully set node %(node)s power state to \u0027"},{"line_number":167,"context_line":"                     \u0027%(state)s.\u0027),"},{"line_number":168,"context_line":"                 {\u0027node\u0027: node.uuid, \u0027state\u0027: target_state})"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_02d3aa60","line":165,"updated":"2016-10-03 21:08:10.000000000","message":"ditto s/states.NOSTATE/new_state/","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":162,"context_line":"        node.save()"},{"line_number":163,"context_line":"        notify_utils.emit_power_set_notification("},{"line_number":164,"context_line":"            task, fields.NotificationLevel.INFO, fields.NotificationStatus.END,"},{"line_number":165,"context_line":"            states.NOSTATE)"},{"line_number":166,"context_line":"        LOG.info(_LI(\u0027Successfully set node %(node)s power state to \u0027"},{"line_number":167,"context_line":"                     \u0027%(state)s.\u0027),"},{"line_number":168,"context_line":"                 {\u0027node\u0027: node.uuid, \u0027state\u0027: target_state})"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a95cdbc_af03a175","line":165,"in_reply_to":"3a98d1f4_02d3aa60","updated":"2016-10-04 20:43:15.000000000","message":"Done","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"}],"ironic/objects/fields.py":[{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"804579258d719da2d26390fe78d087b9847a2390","unresolved":false,"context_lines":[{"line_number":124,"context_line":"    AUTO_TYPE \u003d NotificationLevel()"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"class NotificationStatus(object_fields.Enum):"},{"line_number":128,"context_line":"    START \u003d \u0027start\u0027"},{"line_number":129,"context_line":"    END \u003d \u0027end\u0027"},{"line_number":130,"context_line":"    ERROR \u003d \u0027error\u0027"}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_793287a8","line":127,"updated":"2016-09-26 19:50:04.000000000","message":"Is this valuable given the strings are well-defined in the documentation?","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"8704ff646aa569ab78935623a939ba4b8c0cfa97","unresolved":false,"context_lines":[{"line_number":124,"context_line":"    AUTO_TYPE \u003d NotificationLevel()"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"class NotificationStatus(object_fields.Enum):"},{"line_number":128,"context_line":"    START \u003d \u0027start\u0027"},{"line_number":129,"context_line":"    END \u003d \u0027end\u0027"},{"line_number":130,"context_line":"    ERROR \u003d \u0027error\u0027"}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_7d4885cc","line":127,"in_reply_to":"5a8bc5a2_793287a8","updated":"2016-09-27 16:29:03.000000000","message":"I think so. If nothing else, it helps document it in the code, too, and makes it easy to use oslo libs to limit the number of values to these 4.","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"}],"ironic/objects/node.py":[{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"b702b42f6297d386ae8ebdb452f449ad9f1774fa","unresolved":false,"context_lines":[{"line_number":380,"context_line":""},{"line_number":381,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":382,"context_line":"class NodeSetPowerStatePayload(notification.NotificationPayloadBase):"},{"line_number":383,"context_line":"    SCHEMA \u003d {"},{"line_number":384,"context_line":"        \u0027uuid\u0027: (\u0027node\u0027, \u0027uuid\u0027),"},{"line_number":385,"context_line":"        \u0027power_state\u0027: (\u0027node\u0027, \u0027power_state\u0027),"},{"line_number":386,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":3,"id":"7aa08908_fe60a2d1","line":383,"updated":"2016-06-15 22:25:54.000000000","message":"docstring please","commit_id":"88f52ff22766d1b4dd54b852cb227fe8b0c0f42b"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d6912634c324ba8578fb327d838108aedeae7ab7","unresolved":false,"context_lines":[{"line_number":380,"context_line":""},{"line_number":381,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":382,"context_line":"class NodeSetPowerStatePayload(notification.NotificationPayloadBase):"},{"line_number":383,"context_line":"    SCHEMA \u003d {"},{"line_number":384,"context_line":"        \u0027uuid\u0027: (\u0027node\u0027, \u0027uuid\u0027),"},{"line_number":385,"context_line":"        \u0027power_state\u0027: (\u0027node\u0027, \u0027power_state\u0027),"},{"line_number":386,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a9d85d2_531e0a64","line":383,"in_reply_to":"7aa08908_fe60a2d1","updated":"2016-06-20 19:35:20.000000000","message":"Done","commit_id":"88f52ff22766d1b4dd54b852cb227fe8b0c0f42b"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"b702b42f6297d386ae8ebdb452f449ad9f1774fa","unresolved":false,"context_lines":[{"line_number":398,"context_line":""},{"line_number":399,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":400,"context_line":"class NodeSyncPowerStatePayload(notification.NotificationPayloadBase):"},{"line_number":401,"context_line":"    SCHEMA \u003d {"},{"line_number":402,"context_line":"        \u0027uuid\u0027: (\u0027node\u0027, \u0027uuid\u0027),"},{"line_number":403,"context_line":"        \u0027power_state\u0027: (\u0027node\u0027, \u0027power_state\u0027)"},{"line_number":404,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":3,"id":"7aa08908_de5de616","line":401,"updated":"2016-06-15 22:25:54.000000000","message":"docstring please","commit_id":"88f52ff22766d1b4dd54b852cb227fe8b0c0f42b"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d6912634c324ba8578fb327d838108aedeae7ab7","unresolved":false,"context_lines":[{"line_number":398,"context_line":""},{"line_number":399,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":400,"context_line":"class NodeSyncPowerStatePayload(notification.NotificationPayloadBase):"},{"line_number":401,"context_line":"    SCHEMA \u003d {"},{"line_number":402,"context_line":"        \u0027uuid\u0027: (\u0027node\u0027, \u0027uuid\u0027),"},{"line_number":403,"context_line":"        \u0027power_state\u0027: (\u0027node\u0027, \u0027power_state\u0027)"},{"line_number":404,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a9d85d2_331b7e74","line":401,"in_reply_to":"7aa08908_de5de616","updated":"2016-06-20 19:35:20.000000000","message":"Done","commit_id":"88f52ff22766d1b4dd54b852cb227fe8b0c0f42b"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"b702b42f6297d386ae8ebdb452f449ad9f1774fa","unresolved":false,"context_lines":[{"line_number":411,"context_line":""},{"line_number":412,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":413,"context_line":"class NodeSyncPowerStateNotification(notification.NotificationBase):"},{"line_number":414,"context_line":"    \"\"\"Notification for when power state changed or error occurred during sync."},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    \"\"\""},{"line_number":417,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7aa08908_9eaa3ed1","line":414,"updated":"2016-06-15 22:25:54.000000000","message":"nit: Looks like the closing quotes could be on this line too","commit_id":"88f52ff22766d1b4dd54b852cb227fe8b0c0f42b"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d6912634c324ba8578fb327d838108aedeae7ab7","unresolved":false,"context_lines":[{"line_number":411,"context_line":""},{"line_number":412,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":413,"context_line":"class NodeSyncPowerStateNotification(notification.NotificationBase):"},{"line_number":414,"context_line":"    \"\"\"Notification for when power state changed or error occurred during sync."},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    \"\"\""},{"line_number":417,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a9d85d2_b3edae8d","line":414,"in_reply_to":"7aa08908_9eaa3ed1","updated":"2016-06-20 19:35:20.000000000","message":"It would have been over the 79 char limit with closing quotes on this line.\n\nI updated the docstring to be a little more descriptive here. WDYT?","commit_id":"88f52ff22766d1b4dd54b852cb227fe8b0c0f42b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"5ab7bc602466d737da030600430bdb4e5cd7e353","unresolved":false,"context_lines":[{"line_number":406,"context_line":"        \u0027uuid\u0027: object_fields.UUIDField(),"},{"line_number":407,"context_line":"        \u0027power_state\u0027: object_fields.StringField(nullable\u003dTrue),"},{"line_number":408,"context_line":"        # target_power_state is not in SCHEMA because we send the notification"},{"line_number":409,"context_line":"        # about change in power state before the Node object is updated"},{"line_number":410,"context_line":"        \u0027target_power_state\u0027: object_fields.StringField(nullable\u003dTrue)"},{"line_number":411,"context_line":"    }"},{"line_number":412,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3aaa91ec_5a053fc0","line":409,"updated":"2016-06-29 07:10:34.000000000","message":"sorry, I don\u0027t quite get this comment. how is updating or not updating the Node object related here?","commit_id":"733c0a3a6bb18831520295905f9689e311b0d4e5"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dff42acabec04fc8535ea02a1017d937d6949a67","unresolved":false,"context_lines":[{"line_number":406,"context_line":"        \u0027uuid\u0027: object_fields.UUIDField(),"},{"line_number":407,"context_line":"        \u0027power_state\u0027: object_fields.StringField(nullable\u003dTrue),"},{"line_number":408,"context_line":"        # target_power_state is not in SCHEMA because we send the notification"},{"line_number":409,"context_line":"        # about change in power state before the Node object is updated"},{"line_number":410,"context_line":"        \u0027target_power_state\u0027: object_fields.StringField(nullable\u003dTrue)"},{"line_number":411,"context_line":"    }"},{"line_number":412,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3aaa91ec_23446ab5","line":409,"in_reply_to":"3aaa91ec_5a053fc0","updated":"2016-06-29 18:42:10.000000000","message":"Take a look at change_node_power_state in ironic/conductor/manager.py.\n\nThe flow of the notification process is this:\n\n1. Start attempting to set power on a node.\n2. Notify that we\u0027re starting this change, passing along what the change should be (the target power state). Notify that we failed if we fail early.\n3. Update the node\u0027s target_power_state and perform the change.\n4. Notify that the change succeeded or failed.\n\nWith the SCHEMA fields, those are auto-filled from the Node object. However, we want to notify immediately when we\u0027re starting a power state change since we could fail out before updating the Node object in step 2. The Node object is not updated at this point in time, so if we filled the schema there, we wouldn\u0027t be able to tell what the target power state was when the failure occurred.\n\nI think the documentation on SCHEMA is pretty comprehensive in the dev docs and code itself. I can update this comment if there\u0027s a better way to phrase it, or improve the SCHEMA docs in the patch set this depends on.\n\nDoes this make sense?","commit_id":"733c0a3a6bb18831520295905f9689e311b0d4e5"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"81bf35a11ef548fad097f42c595471dd14e5a1c6","unresolved":false,"context_lines":[{"line_number":435,"context_line":"        \u0027uuid\u0027: (\u0027node\u0027, \u0027uuid\u0027),"},{"line_number":436,"context_line":"        \u0027power_state\u0027: (\u0027node\u0027, \u0027power_state\u0027)"},{"line_number":437,"context_line":"    }"},{"line_number":438,"context_line":"    # Version 1.0: Initial version"},{"line_number":439,"context_line":"    fields \u003d {"},{"line_number":440,"context_line":"        \u0027uuid\u0027: object_fields.UUIDField(),"},{"line_number":441,"context_line":"        \u0027power_state\u0027: object_fields.StringField(nullable\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":25,"id":"fa7ab95a_d78d4232","line":438,"updated":"2016-09-02 09:11:47.000000000","message":"missing the VERSION attribute","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"c7ee6536691a192bb79c51102b54a005d301339f","unresolved":false,"context_lines":[{"line_number":435,"context_line":"        \u0027uuid\u0027: (\u0027node\u0027, \u0027uuid\u0027),"},{"line_number":436,"context_line":"        \u0027power_state\u0027: (\u0027node\u0027, \u0027power_state\u0027)"},{"line_number":437,"context_line":"    }"},{"line_number":438,"context_line":"    # Version 1.0: Initial version"},{"line_number":439,"context_line":"    fields \u003d {"},{"line_number":440,"context_line":"        \u0027uuid\u0027: object_fields.UUIDField(),"},{"line_number":441,"context_line":"        \u0027power_state\u0027: object_fields.StringField(nullable\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":25,"id":"9a89bdaa_0fb2dfe4","line":438,"in_reply_to":"fa7ab95a_d78d4232","updated":"2016-09-08 17:35:51.000000000","message":"Fixed","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"7506620145b937f0cf1442f5542a848150eb3d9b","unresolved":false,"context_lines":[{"line_number":400,"context_line":""},{"line_number":401,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":402,"context_line":"class NodeSetPowerStateNotification(notification.NotificationBase):"},{"line_number":403,"context_line":"    \"\"\"Notification emitted when ironic changes a node power state.\"\"\""},{"line_number":404,"context_line":"    # Version 1.0: Initial version"},{"line_number":405,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":406,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"9a89bdaa_392d88a8","line":403,"updated":"2016-09-13 02:19:51.000000000","message":"s/node/node\u0027s/","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dc67c0f7419ea63333fb37fc030485b2871283b4","unresolved":false,"context_lines":[{"line_number":400,"context_line":""},{"line_number":401,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":402,"context_line":"class NodeSetPowerStateNotification(notification.NotificationBase):"},{"line_number":403,"context_line":"    \"\"\"Notification emitted when ironic changes a node power state.\"\"\""},{"line_number":404,"context_line":"    # Version 1.0: Initial version"},{"line_number":405,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":406,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_618ba568","line":403,"in_reply_to":"9a89bdaa_392d88a8","updated":"2016-09-16 23:04:08.000000000","message":"Done","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"09c6117da45b00111c1aef21e6204b4710172f1a","unresolved":false,"context_lines":[{"line_number":410,"context_line":""},{"line_number":411,"context_line":""},{"line_number":412,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":413,"context_line":"class NodeSetPowerStatePayload(notification.NotificationPayloadBase):"},{"line_number":414,"context_line":"    \"\"\"Payload schema for when ironic changes a node power state.\"\"\""},{"line_number":415,"context_line":"    SCHEMA \u003d {"},{"line_number":416,"context_line":"        \u0027uuid\u0027: (\u0027node\u0027, \u0027uuid\u0027),"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_7eee5bb5","line":413,"updated":"2016-09-14 22:57:19.000000000","message":"I think I might have chatted with you on IRC about this. It looks like Nova has a \u0027base\u0027 payload for their instance, and then there are payloads that inherit from that base payload. So that all instance* notifications will include the same information, and then maybe some additional ones depending on the event. I like that idea.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dc67c0f7419ea63333fb37fc030485b2871283b4","unresolved":false,"context_lines":[{"line_number":410,"context_line":""},{"line_number":411,"context_line":""},{"line_number":412,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":413,"context_line":"class NodeSetPowerStatePayload(notification.NotificationPayloadBase):"},{"line_number":414,"context_line":"    \"\"\"Payload schema for when ironic changes a node power state.\"\"\""},{"line_number":415,"context_line":"    SCHEMA \u003d {"},{"line_number":416,"context_line":"        \u0027uuid\u0027: (\u0027node\u0027, \u0027uuid\u0027),"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_dc84620c","line":413,"in_reply_to":"7a8ec9b2_7eee5bb5","updated":"2016-09-16 23:04:08.000000000","message":"I agree. I\u0027m pushing up the next patch set without this so people have something to review. I will do this in the patch set after that.\n\nWhat fields do you have in mind? I\u0027ll just model it off of Nova if I get to it before your next response.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d20bde35067af2ebd84a6a3494bc0c24a2ded5d0","unresolved":false,"context_lines":[{"line_number":410,"context_line":""},{"line_number":411,"context_line":""},{"line_number":412,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":413,"context_line":"class NodeSetPowerStatePayload(notification.NotificationPayloadBase):"},{"line_number":414,"context_line":"    \"\"\"Payload schema for when ironic changes a node power state.\"\"\""},{"line_number":415,"context_line":"    SCHEMA \u003d {"},{"line_number":416,"context_line":"        \u0027uuid\u0027: (\u0027node\u0027, \u0027uuid\u0027),"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_09047cc4","line":413,"in_reply_to":"7a8ec9b2_dc84620c","updated":"2016-09-19 19:17:40.000000000","message":"I didn\u0027t think about it, but the CRUD spec may have mentioned it -- take a look there.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"7506620145b937f0cf1442f5542a848150eb3d9b","unresolved":false,"context_lines":[{"line_number":411,"context_line":""},{"line_number":412,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":413,"context_line":"class NodeSetPowerStatePayload(notification.NotificationPayloadBase):"},{"line_number":414,"context_line":"    \"\"\"Payload schema for when ironic changes a node power state.\"\"\""},{"line_number":415,"context_line":"    SCHEMA \u003d {"},{"line_number":416,"context_line":"        \u0027uuid\u0027: (\u0027node\u0027, \u0027uuid\u0027),"},{"line_number":417,"context_line":"        \u0027power_state\u0027: (\u0027node\u0027, \u0027power_state\u0027),"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a89bdaa_7919d087","line":414,"updated":"2016-09-13 02:19:51.000000000","message":"s/node/node\u0027s/","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dc67c0f7419ea63333fb37fc030485b2871283b4","unresolved":false,"context_lines":[{"line_number":411,"context_line":""},{"line_number":412,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":413,"context_line":"class NodeSetPowerStatePayload(notification.NotificationPayloadBase):"},{"line_number":414,"context_line":"    \"\"\"Payload schema for when ironic changes a node power state.\"\"\""},{"line_number":415,"context_line":"    SCHEMA \u003d {"},{"line_number":416,"context_line":"        \u0027uuid\u0027: (\u0027node\u0027, \u0027uuid\u0027),"},{"line_number":417,"context_line":"        \u0027power_state\u0027: (\u0027node\u0027, \u0027power_state\u0027),"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_81ec312b","line":414,"in_reply_to":"9a89bdaa_7919d087","updated":"2016-09-16 23:04:08.000000000","message":"Done","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1b80d021f245f0df976f3086482c4319a1fbcc71","unresolved":false,"context_lines":[{"line_number":420,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"    fields \u003d {"},{"line_number":423,"context_line":"        \u0027uuid\u0027: object_fields.UUIDField(),"},{"line_number":424,"context_line":"        \u0027power_state\u0027: object_fields.StringField(nullable\u003dTrue),"},{"line_number":425,"context_line":"        # target_power_state is not in SCHEMA because we send the notification"},{"line_number":426,"context_line":"        # about change in power state before the Node object is updated"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a89bdaa_23970991","line":423,"range":{"start_line":423,"start_character":9,"end_line":423,"end_character":13},"updated":"2016-09-13 09:22:31.000000000","message":"I would call it node_uuid to be a bit more explicit","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dc67c0f7419ea63333fb37fc030485b2871283b4","unresolved":false,"context_lines":[{"line_number":420,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"    fields \u003d {"},{"line_number":423,"context_line":"        \u0027uuid\u0027: object_fields.UUIDField(),"},{"line_number":424,"context_line":"        \u0027power_state\u0027: object_fields.StringField(nullable\u003dTrue),"},{"line_number":425,"context_line":"        # target_power_state is not in SCHEMA because we send the notification"},{"line_number":426,"context_line":"        # about change in power state before the Node object is updated"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_01e1012d","line":423,"range":{"start_line":423,"start_character":9,"end_line":423,"end_character":13},"in_reply_to":"9a89bdaa_23970991","updated":"2016-09-16 23:04:08.000000000","message":"Done","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"09c6117da45b00111c1aef21e6204b4710172f1a","unresolved":false,"context_lines":[{"line_number":441,"context_line":"    fields \u003d {"},{"line_number":442,"context_line":"        \u0027uuid\u0027: object_fields.UUIDField(),"},{"line_number":443,"context_line":"        \u0027power_state\u0027: object_fields.StringField(nullable\u003dTrue)"},{"line_number":444,"context_line":"    }"},{"line_number":445,"context_line":""},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"@base.IronicObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_3e3bf339","line":444,"updated":"2016-09-14 22:57:19.000000000","message":"I am wondering whether we need a nodesyncpowerstatepayload. A NodePowerStatePayload or NodePowerStateSetPayload could be used for both. Besides the node information, the \u0027target\u0027 power state could be mentioned.","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dc67c0f7419ea63333fb37fc030485b2871283b4","unresolved":false,"context_lines":[{"line_number":441,"context_line":"    fields \u003d {"},{"line_number":442,"context_line":"        \u0027uuid\u0027: object_fields.UUIDField(),"},{"line_number":443,"context_line":"        \u0027power_state\u0027: object_fields.StringField(nullable\u003dTrue)"},{"line_number":444,"context_line":"    }"},{"line_number":445,"context_line":""},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"@base.IronicObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_a10bedd4","line":444,"in_reply_to":"7a8ec9b2_3e3bf339","updated":"2016-09-16 23:04:08.000000000","message":"I do think it\u0027s useful to differentiate between when ironic takes a driver action to change the power state and when the power state is just synced with the DB. Maybe we should rename this to something that captures the additional case you mentioned in manager.py (the one under _do_node_verify)?","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"7506620145b937f0cf1442f5542a848150eb3d9b","unresolved":false,"context_lines":[{"line_number":445,"context_line":""},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":448,"context_line":"class NodeSyncPowerStateNotification(notification.NotificationBase):"},{"line_number":449,"context_line":"    \"\"\"Notification for the periodic node power state sync."},{"line_number":450,"context_line":""},{"line_number":451,"context_line":"       This notification is emitted when ironic detects a change in the power"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a89bdaa_d4e9c3b8","line":448,"updated":"2016-09-13 02:19:51.000000000","message":"I\u0027m guessing that we\u0027re going to have more notification \u0026 payload objects. It would be nice to establish some sort of order in which we want them to be added. Should notifications be together, and payloads, or should the notification/payload be together for a particular event type? And if so, which is first, notification or payload?","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"b86f7d14c0fe9006d544f13ebb6a724b435c6bb8","unresolved":false,"context_lines":[{"line_number":445,"context_line":""},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":448,"context_line":"class NodeSyncPowerStateNotification(notification.NotificationBase):"},{"line_number":449,"context_line":"    \"\"\"Notification for the periodic node power state sync."},{"line_number":450,"context_line":""},{"line_number":451,"context_line":"       This notification is emitted when ironic detects a change in the power"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_15224aa3","line":448,"in_reply_to":"7a8ec9b2_09b9dcec","updated":"2016-09-21 17:06:04.000000000","message":"Fine by me","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d20bde35067af2ebd84a6a3494bc0c24a2ded5d0","unresolved":false,"context_lines":[{"line_number":445,"context_line":""},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":448,"context_line":"class NodeSyncPowerStateNotification(notification.NotificationBase):"},{"line_number":449,"context_line":"    \"\"\"Notification for the periodic node power state sync."},{"line_number":450,"context_line":""},{"line_number":451,"context_line":"       This notification is emitted when ironic detects a change in the power"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_09b9dcec","line":448,"in_reply_to":"7a8ec9b2_41bea9ff","updated":"2016-09-19 19:17:40.000000000","message":"I don\u0027t think we need to update the spec /dev docs about it. (Do we?) I\u0027d hope that folks updating and folks reviewing, will notice...","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dc67c0f7419ea63333fb37fc030485b2871283b4","unresolved":false,"context_lines":[{"line_number":445,"context_line":""},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":448,"context_line":"class NodeSyncPowerStateNotification(notification.NotificationBase):"},{"line_number":449,"context_line":"    \"\"\"Notification for the periodic node power state sync."},{"line_number":450,"context_line":""},{"line_number":451,"context_line":"       This notification is emitted when ironic detects a change in the power"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_41bea9ff","line":448,"in_reply_to":"9a89bdaa_d4e9c3b8","updated":"2016-09-16 23:04:08.000000000","message":"Let\u0027s keep the payload and notifications together, and have the notification first.\n\nHow about I do a follow up patch and update the spec / dev docs accordingly, since I owe another docs patch anyway?","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"f2a644a5b682cdd15c3314cf4f5eaba25d68e332","unresolved":false,"context_lines":[{"line_number":439,"context_line":"    fields \u003d {"},{"line_number":440,"context_line":"        \u0027node_uuid\u0027: object_fields.UUIDField(nullable\u003dTrue),"},{"line_number":441,"context_line":"        \u0027node_name\u0027: object_fields.StringField(nullable\u003dTrue),"},{"line_number":442,"context_line":"        \u0027chassis_id\u0027: object_fields.IntegerField(nullable\u003dTrue),"},{"line_number":443,"context_line":"        \u0027instance_uuid\u0027: object_fields.UUIDField(nullable\u003dTrue),"},{"line_number":444,"context_line":"        \u0027driver\u0027: object_fields.StringField(nullable\u003dTrue),"},{"line_number":445,"context_line":"        \u0027driver_info\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":31,"id":"5a8bc5a2_34e881b4","line":442,"updated":"2016-09-23 08:22:30.000000000","message":"This is internal value.","commit_id":"a998239ff0a1a6ee7db2253a03e69b015b7fd374"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"b654771c59d1a1018c02a336963e01599aac7d06","unresolved":false,"context_lines":[{"line_number":439,"context_line":"    fields \u003d {"},{"line_number":440,"context_line":"        \u0027node_uuid\u0027: object_fields.UUIDField(nullable\u003dTrue),"},{"line_number":441,"context_line":"        \u0027node_name\u0027: object_fields.StringField(nullable\u003dTrue),"},{"line_number":442,"context_line":"        \u0027chassis_id\u0027: object_fields.IntegerField(nullable\u003dTrue),"},{"line_number":443,"context_line":"        \u0027instance_uuid\u0027: object_fields.UUIDField(nullable\u003dTrue),"},{"line_number":444,"context_line":"        \u0027driver\u0027: object_fields.StringField(nullable\u003dTrue),"},{"line_number":445,"context_line":"        \u0027driver_info\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":31,"id":"5a8bc5a2_d8cbf051","line":442,"in_reply_to":"5a8bc5a2_34e881b4","updated":"2016-09-23 17:32:14.000000000","message":"Removed","commit_id":"a998239ff0a1a6ee7db2253a03e69b015b7fd374"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"838d039fc5a6ca824add6e91b6d2fc5691780596","unresolved":false,"context_lines":[{"line_number":481,"context_line":""},{"line_number":482,"context_line":""},{"line_number":483,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":484,"context_line":"class NodeSetPowerStatePayload(NodePayload):"},{"line_number":485,"context_line":"    \"\"\"Payload schema for when ironic changes a node\u0027s power state.\"\"\""},{"line_number":486,"context_line":"    # Version 1.0: Initial version"},{"line_number":487,"context_line":"    VERSION \u003d \u00271.0\u0027"}],"source_content_type":"text/x-python","patch_set":31,"id":"5a8bc5a2_46968395","line":484,"range":{"start_line":484,"start_character":31,"end_line":484,"end_character":42},"updated":"2016-09-22 08:24:59.000000000","message":"I\u0027m not sure that fields like \u0027driver_internal_info\u0027 is needed for power state notifications. At least this patch does not mask passwords in \u0027driver_info\u0027 and send them outside.","commit_id":"a998239ff0a1a6ee7db2253a03e69b015b7fd374"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"b654771c59d1a1018c02a336963e01599aac7d06","unresolved":false,"context_lines":[{"line_number":481,"context_line":""},{"line_number":482,"context_line":""},{"line_number":483,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":484,"context_line":"class NodeSetPowerStatePayload(NodePayload):"},{"line_number":485,"context_line":"    \"\"\"Payload schema for when ironic changes a node\u0027s power state.\"\"\""},{"line_number":486,"context_line":"    # Version 1.0: Initial version"},{"line_number":487,"context_line":"    VERSION \u003d \u00271.0\u0027"}],"source_content_type":"text/x-python","patch_set":31,"id":"5a8bc5a2_18af1882","line":484,"range":{"start_line":484,"start_character":31,"end_line":484,"end_character":42},"in_reply_to":"5a8bc5a2_46968395","updated":"2016-09-23 17:32:14.000000000","message":"Agreed, I\u0027ll remove driver_internal_info. I\u0027ll remove driver_info, too, since I don\u0027t think it really matters for power state notifications. It\u0027d increase code complexity a little bit if someone needed that, too, since we\u0027d have to find all sensitive credentials in driver_info and mask them out, but I\u0027ll re-add it if requested.","commit_id":"a998239ff0a1a6ee7db2253a03e69b015b7fd374"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"6f3540d823239ff45e5b609dbddbca6baa6804a6","unresolved":false,"context_lines":[{"line_number":409,"context_line":"        \u0027clean_step\u0027: (\u0027node\u0027, \u0027clean_step\u0027),"},{"line_number":410,"context_line":"        \u0027raid_config\u0027: (\u0027node\u0027, \u0027raid_config\u0027),"},{"line_number":411,"context_line":"        \u0027target_raid_config\u0027: (\u0027node\u0027, \u0027target_raid_config\u0027),"},{"line_number":412,"context_line":"        \u0027instance_info\u0027: (\u0027node\u0027, \u0027instance_info\u0027),"},{"line_number":413,"context_line":"        \u0027properties\u0027: (\u0027node\u0027, \u0027properties\u0027),"},{"line_number":414,"context_line":"        \u0027reservation\u0027: (\u0027node\u0027, \u0027reservation\u0027),"},{"line_number":415,"context_line":"        \u0027conductor_affinity\u0027: (\u0027node\u0027, \u0027conductor_affinity\u0027),"}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_d9239b54","line":412,"updated":"2016-09-26 19:42:00.000000000","message":"will need to bleep out any secrets from here.","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"8704ff646aa569ab78935623a939ba4b8c0cfa97","unresolved":false,"context_lines":[{"line_number":409,"context_line":"        \u0027clean_step\u0027: (\u0027node\u0027, \u0027clean_step\u0027),"},{"line_number":410,"context_line":"        \u0027raid_config\u0027: (\u0027node\u0027, \u0027raid_config\u0027),"},{"line_number":411,"context_line":"        \u0027target_raid_config\u0027: (\u0027node\u0027, \u0027target_raid_config\u0027),"},{"line_number":412,"context_line":"        \u0027instance_info\u0027: (\u0027node\u0027, \u0027instance_info\u0027),"},{"line_number":413,"context_line":"        \u0027properties\u0027: (\u0027node\u0027, \u0027properties\u0027),"},{"line_number":414,"context_line":"        \u0027reservation\u0027: (\u0027node\u0027, \u0027reservation\u0027),"},{"line_number":415,"context_line":"        \u0027conductor_affinity\u0027: (\u0027node\u0027, \u0027conductor_affinity\u0027),"}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_a38ae718","line":412,"in_reply_to":"5a8bc5a2_d9239b54","updated":"2016-09-27 16:29:03.000000000","message":"Removed per mailing list discussion","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"6f3540d823239ff45e5b609dbddbca6baa6804a6","unresolved":false,"context_lines":[{"line_number":411,"context_line":"        \u0027target_raid_config\u0027: (\u0027node\u0027, \u0027target_raid_config\u0027),"},{"line_number":412,"context_line":"        \u0027instance_info\u0027: (\u0027node\u0027, \u0027instance_info\u0027),"},{"line_number":413,"context_line":"        \u0027properties\u0027: (\u0027node\u0027, \u0027properties\u0027),"},{"line_number":414,"context_line":"        \u0027reservation\u0027: (\u0027node\u0027, \u0027reservation\u0027),"},{"line_number":415,"context_line":"        \u0027conductor_affinity\u0027: (\u0027node\u0027, \u0027conductor_affinity\u0027),"},{"line_number":416,"context_line":"        \u0027power_state\u0027: (\u0027node\u0027, \u0027power_state\u0027),"},{"line_number":417,"context_line":"        \u0027target_power_state\u0027: (\u0027node\u0027, \u0027target_power_state\u0027),"}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_ceb2ef4b","line":414,"updated":"2016-09-26 19:42:00.000000000","message":"I\u0027m not sure this is needed or makes sense. Since it is used to indicate whether a conductor has a lock on the node.","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"8704ff646aa569ab78935623a939ba4b8c0cfa97","unresolved":false,"context_lines":[{"line_number":411,"context_line":"        \u0027target_raid_config\u0027: (\u0027node\u0027, \u0027target_raid_config\u0027),"},{"line_number":412,"context_line":"        \u0027instance_info\u0027: (\u0027node\u0027, \u0027instance_info\u0027),"},{"line_number":413,"context_line":"        \u0027properties\u0027: (\u0027node\u0027, \u0027properties\u0027),"},{"line_number":414,"context_line":"        \u0027reservation\u0027: (\u0027node\u0027, \u0027reservation\u0027),"},{"line_number":415,"context_line":"        \u0027conductor_affinity\u0027: (\u0027node\u0027, \u0027conductor_affinity\u0027),"},{"line_number":416,"context_line":"        \u0027power_state\u0027: (\u0027node\u0027, \u0027power_state\u0027),"},{"line_number":417,"context_line":"        \u0027target_power_state\u0027: (\u0027node\u0027, \u0027target_power_state\u0027),"}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_e3e5cfdb","line":414,"in_reply_to":"5a8bc5a2_ceb2ef4b","updated":"2016-09-27 16:29:03.000000000","message":"Kept per mailing list discussion. I think there could be a use case for this  if something happened that caused locks to be stuck on a node for some reason.\n\nI can remove if no one wants it though. Like Jim mentioned on the mailing list, it\u0027s easier to add fields later than to remove them.","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"6f3540d823239ff45e5b609dbddbca6baa6804a6","unresolved":false,"context_lines":[{"line_number":412,"context_line":"        \u0027instance_info\u0027: (\u0027node\u0027, \u0027instance_info\u0027),"},{"line_number":413,"context_line":"        \u0027properties\u0027: (\u0027node\u0027, \u0027properties\u0027),"},{"line_number":414,"context_line":"        \u0027reservation\u0027: (\u0027node\u0027, \u0027reservation\u0027),"},{"line_number":415,"context_line":"        \u0027conductor_affinity\u0027: (\u0027node\u0027, \u0027conductor_affinity\u0027),"},{"line_number":416,"context_line":"        \u0027power_state\u0027: (\u0027node\u0027, \u0027power_state\u0027),"},{"line_number":417,"context_line":"        \u0027target_power_state\u0027: (\u0027node\u0027, \u0027target_power_state\u0027),"},{"line_number":418,"context_line":"        \u0027provision_state\u0027: (\u0027node\u0027, \u0027provision_state\u0027),"}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_4ed6df28","line":415,"updated":"2016-09-26 19:42:00.000000000","message":"this shouldn\u0027t be shown; it is an internal value.","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"8704ff646aa569ab78935623a939ba4b8c0cfa97","unresolved":false,"context_lines":[{"line_number":412,"context_line":"        \u0027instance_info\u0027: (\u0027node\u0027, \u0027instance_info\u0027),"},{"line_number":413,"context_line":"        \u0027properties\u0027: (\u0027node\u0027, \u0027properties\u0027),"},{"line_number":414,"context_line":"        \u0027reservation\u0027: (\u0027node\u0027, \u0027reservation\u0027),"},{"line_number":415,"context_line":"        \u0027conductor_affinity\u0027: (\u0027node\u0027, \u0027conductor_affinity\u0027),"},{"line_number":416,"context_line":"        \u0027power_state\u0027: (\u0027node\u0027, \u0027power_state\u0027),"},{"line_number":417,"context_line":"        \u0027target_power_state\u0027: (\u0027node\u0027, \u0027target_power_state\u0027),"},{"line_number":418,"context_line":"        \u0027provision_state\u0027: (\u0027node\u0027, \u0027provision_state\u0027),"}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_03e9dbb6","line":415,"in_reply_to":"5a8bc5a2_4ed6df28","updated":"2016-09-27 16:29:03.000000000","message":"Removed","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"6f3540d823239ff45e5b609dbddbca6baa6804a6","unresolved":false,"context_lines":[{"line_number":427,"context_line":"        \u0027inspection_started_at\u0027: (\u0027node\u0027, \u0027inspection_started_at\u0027),"},{"line_number":428,"context_line":"        \u0027extra\u0027: (\u0027node\u0027, \u0027extra\u0027),"},{"line_number":429,"context_line":"        \u0027network_interface\u0027: (\u0027node\u0027, \u0027network_interface\u0027),"},{"line_number":430,"context_line":"    }"},{"line_number":431,"context_line":"    # Version 1.0: Initial version, based off of Node version 1.18."},{"line_number":432,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":433,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_0e4937d0","line":430,"updated":"2016-09-26 19:42:00.000000000","message":"what isn\u0027t here: chassis_uuid, created_at, updated at, driver_info, driver_internal_info.\n\nI agree that driver_internal_info should not be shown, since it is internal. Not sure about the others.\n\nWhatever we decide about which fields we do not put in the payload, I think we should add a comment about them (and why). Otherwise, I could bet you that someone will come along and add a bug/patch because XYZ is missing.","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"8704ff646aa569ab78935623a939ba4b8c0cfa97","unresolved":false,"context_lines":[{"line_number":427,"context_line":"        \u0027inspection_started_at\u0027: (\u0027node\u0027, \u0027inspection_started_at\u0027),"},{"line_number":428,"context_line":"        \u0027extra\u0027: (\u0027node\u0027, \u0027extra\u0027),"},{"line_number":429,"context_line":"        \u0027network_interface\u0027: (\u0027node\u0027, \u0027network_interface\u0027),"},{"line_number":430,"context_line":"    }"},{"line_number":431,"context_line":"    # Version 1.0: Initial version, based off of Node version 1.18."},{"line_number":432,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":433,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_e3fcef73","line":430,"in_reply_to":"5a8bc5a2_0e4937d0","updated":"2016-09-27 16:29:03.000000000","message":"Updated this to match ML discussion, but let me know if you still disagree with the base payload fields.","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"6f3540d823239ff45e5b609dbddbca6baa6804a6","unresolved":false,"context_lines":[{"line_number":436,"context_line":"        \u0027node_name\u0027: object_fields.StringField(nullable\u003dTrue),"},{"line_number":437,"context_line":"        \u0027instance_uuid\u0027: object_fields.UUIDField(nullable\u003dTrue),"},{"line_number":438,"context_line":"        \u0027driver\u0027: object_fields.StringField(nullable\u003dTrue),"},{"line_number":439,"context_line":"        \u0027raid_config\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":440,"context_line":"        \u0027target_raid_config\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":441,"context_line":"        \u0027instance_info\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":442,"context_line":"        \u0027properties\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_2eb43333","line":439,"updated":"2016-09-26 19:42:00.000000000","message":"missing \u0027clean_step\u0027.","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"8704ff646aa569ab78935623a939ba4b8c0cfa97","unresolved":false,"context_lines":[{"line_number":436,"context_line":"        \u0027node_name\u0027: object_fields.StringField(nullable\u003dTrue),"},{"line_number":437,"context_line":"        \u0027instance_uuid\u0027: object_fields.UUIDField(nullable\u003dTrue),"},{"line_number":438,"context_line":"        \u0027driver\u0027: object_fields.StringField(nullable\u003dTrue),"},{"line_number":439,"context_line":"        \u0027raid_config\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":440,"context_line":"        \u0027target_raid_config\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":441,"context_line":"        \u0027instance_info\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":442,"context_line":"        \u0027properties\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_43f6838f","line":439,"in_reply_to":"5a8bc5a2_2eb43333","updated":"2016-09-27 16:29:03.000000000","message":"Added","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"6f3540d823239ff45e5b609dbddbca6baa6804a6","unresolved":false,"context_lines":[{"line_number":456,"context_line":"        \u0027inspection_started_at\u0027: object_fields.DateTimeField(nullable\u003dTrue),"},{"line_number":457,"context_line":"        \u0027extra\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":458,"context_line":"        \u0027network_interface\u0027: object_fields.StringFieldThatAcceptsCallable("},{"line_number":459,"context_line":"            nullable\u003dFalse, default\u003d_default_network_interface),"},{"line_number":460,"context_line":"    }"},{"line_number":461,"context_line":""},{"line_number":462,"context_line":"    def __init__(self, node, **kwargs):"}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_cede6fdc","line":459,"updated":"2016-09-26 19:42:00.000000000","message":"For me, reviewing, it\u0027d have been easier if these were ordered alphabetically. Looks like this is the same order as object.Node. Which explains why there are some missing.","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"8704ff646aa569ab78935623a939ba4b8c0cfa97","unresolved":false,"context_lines":[{"line_number":456,"context_line":"        \u0027inspection_started_at\u0027: object_fields.DateTimeField(nullable\u003dTrue),"},{"line_number":457,"context_line":"        \u0027extra\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":458,"context_line":"        \u0027network_interface\u0027: object_fields.StringFieldThatAcceptsCallable("},{"line_number":459,"context_line":"            nullable\u003dFalse, default\u003d_default_network_interface),"},{"line_number":460,"context_line":"    }"},{"line_number":461,"context_line":""},{"line_number":462,"context_line":"    def __init__(self, node, **kwargs):"}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_fd58158c","line":459,"in_reply_to":"5a8bc5a2_cede6fdc","updated":"2016-09-27 16:29:03.000000000","message":"Yeah, I just copied it straight from objects.Node to try to avoid missing some. Will clean it up alphabetically and limit this to fields discussed in the mailing list.","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"804579258d719da2d26390fe78d087b9847a2390","unresolved":false,"context_lines":[{"line_number":469,"context_line":"    \"\"\"Notification emitted when ironic changes a node\u0027s power state.\"\"\""},{"line_number":470,"context_line":"    # Version 1.0: Initial version"},{"line_number":471,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":472,"context_line":""},{"line_number":473,"context_line":""},{"line_number":474,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":475,"context_line":"class NodeSetPowerStatePayload(NodePayload):"}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_14beaafe","line":472,"updated":"2016-09-26 19:50:04.000000000","message":"Should the NodeSetPowerStatePayload be here?","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"8704ff646aa569ab78935623a939ba4b8c0cfa97","unresolved":false,"context_lines":[{"line_number":469,"context_line":"    \"\"\"Notification emitted when ironic changes a node\u0027s power state.\"\"\""},{"line_number":470,"context_line":"    # Version 1.0: Initial version"},{"line_number":471,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":472,"context_line":""},{"line_number":473,"context_line":""},{"line_number":474,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":475,"context_line":"class NodeSetPowerStatePayload(NodePayload):"}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_ddcc3937","line":472,"in_reply_to":"5a8bc5a2_14beaafe","updated":"2016-09-27 16:29:03.000000000","message":"It\u0027s right below this. Payload classes are separate from notification classes.","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"804579258d719da2d26390fe78d087b9847a2390","unresolved":false,"context_lines":[{"line_number":483,"context_line":"        # baremetal.node.power_set.start notification, which is sent before"},{"line_number":484,"context_line":"        # target_power_state is set on the node, has information about what"},{"line_number":485,"context_line":"        # state the conductor will attempt to set on the node."},{"line_number":486,"context_line":"        \u0027to_power\u0027: object_fields.StringField(nullable\u003dTrue)"},{"line_number":487,"context_line":"    }"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"    def __init__(self, node, to_power):"}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_3972bf11","line":486,"updated":"2016-09-26 19:50:04.000000000","message":"This the only field in the payload?","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"8704ff646aa569ab78935623a939ba4b8c0cfa97","unresolved":false,"context_lines":[{"line_number":483,"context_line":"        # baremetal.node.power_set.start notification, which is sent before"},{"line_number":484,"context_line":"        # target_power_state is set on the node, has information about what"},{"line_number":485,"context_line":"        # state the conductor will attempt to set on the node."},{"line_number":486,"context_line":"        \u0027to_power\u0027: object_fields.StringField(nullable\u003dTrue)"},{"line_number":487,"context_line":"    }"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"    def __init__(self, node, to_power):"}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_3d051d45","line":486,"in_reply_to":"5a8bc5a2_3972bf11","updated":"2016-09-27 16:29:03.000000000","message":"This inherits from NodePayload, so all fields in NodePayload will also be here.","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"804579258d719da2d26390fe78d087b9847a2390","unresolved":false,"context_lines":[{"line_number":515,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"    fields \u003d {"},{"line_number":518,"context_line":"        \u0027from_power\u0027: object_fields.StringField(nullable\u003dTrue)"},{"line_number":519,"context_line":"    }"},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"    def __init__(self, node, from_power):"}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_d4fc42ba","line":518,"updated":"2016-09-26 19:50:04.000000000","message":"This the only field in the payload?","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"8704ff646aa569ab78935623a939ba4b8c0cfa97","unresolved":false,"context_lines":[{"line_number":515,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"    fields \u003d {"},{"line_number":518,"context_line":"        \u0027from_power\u0027: object_fields.StringField(nullable\u003dTrue)"},{"line_number":519,"context_line":"    }"},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"    def __init__(self, node, from_power):"}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_dd9a7913","line":518,"in_reply_to":"5a8bc5a2_d4fc42ba","updated":"2016-09-27 16:29:03.000000000","message":"See my comment on L486. All NodePayload fields will also be here.","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e18dd3535f166ae87c2b3ca034416189a3b2a97f","unresolved":false,"context_lines":[{"line_number":401,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":402,"context_line":"class NodePayload(notification.NotificationPayloadBase):"},{"line_number":403,"context_line":"    \"\"\"Base class used for all notification payloads about a Node object.\"\"\""},{"line_number":404,"context_line":"    SCHEMA \u003d {"},{"line_number":405,"context_line":"        \u0027clean_step\u0027: (\u0027node\u0027, \u0027clean_step\u0027),"},{"line_number":406,"context_line":"        \u0027console_enabled\u0027: (\u0027node\u0027, \u0027console_enabled\u0027),"},{"line_number":407,"context_line":"        \u0027created_at\u0027: (\u0027node\u0027, \u0027created_at\u0027),"}],"source_content_type":"text/x-python","patch_set":33,"id":"5a8bc5a2_49c9345a","line":404,"updated":"2016-09-27 21:17:30.000000000","message":"we should add a comment here as to what we did not add: chassis_uuid, driver_info, driver_internal_info, instance_info, raid_config, reservation, target_raid_config. (And maybe use Yuriy\u0027s reasons, from the ML)\n\nOtherwise, someone may ask later or file a bug saying we forgot to add field X to the payload.","commit_id":"9542d0475007d1fd5ff138b87b7141b08c52141e"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"91d0e458e95ebcf7a166d75d0714da396d665aac","unresolved":false,"context_lines":[{"line_number":401,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":402,"context_line":"class NodePayload(notification.NotificationPayloadBase):"},{"line_number":403,"context_line":"    \"\"\"Base class used for all notification payloads about a Node object.\"\"\""},{"line_number":404,"context_line":"    SCHEMA \u003d {"},{"line_number":405,"context_line":"        \u0027clean_step\u0027: (\u0027node\u0027, \u0027clean_step\u0027),"},{"line_number":406,"context_line":"        \u0027console_enabled\u0027: (\u0027node\u0027, \u0027console_enabled\u0027),"},{"line_number":407,"context_line":"        \u0027created_at\u0027: (\u0027node\u0027, \u0027created_at\u0027),"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a98d1f4_83b064df","line":404,"in_reply_to":"5a8bc5a2_49c9345a","updated":"2016-09-29 15:47:10.000000000","message":"Done","commit_id":"9542d0475007d1fd5ff138b87b7141b08c52141e"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"c98c686d581eed8ead39e9673554270285eb418b","unresolved":false,"context_lines":[{"line_number":414,"context_line":"        \u0027maintenance\u0027: (\u0027node\u0027, \u0027maintenance\u0027),"},{"line_number":415,"context_line":"        \u0027maintenance_reason\u0027: (\u0027node\u0027, \u0027maintenance_reason\u0027),"},{"line_number":416,"context_line":"        \u0027network_interface\u0027: (\u0027node\u0027, \u0027network_interface\u0027),"},{"line_number":417,"context_line":"        \u0027node_name\u0027: (\u0027node\u0027, \u0027name\u0027),"},{"line_number":418,"context_line":"        \u0027node_uuid\u0027: (\u0027node\u0027, \u0027uuid\u0027),"},{"line_number":419,"context_line":"        \u0027power_state\u0027: (\u0027node\u0027, \u0027power_state\u0027),"},{"line_number":420,"context_line":"        \u0027properties\u0027: (\u0027node\u0027, \u0027properties\u0027),"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a98d1f4_50c1dc7f","line":417,"updated":"2016-09-28 13:34:46.000000000","message":"Any reason for renaming this field? There is \"baremetal.node. ...\" in the \"event_type\", no chance to accept it as another resource. Rename back will be needed on the indexer service side for create API-like document.","commit_id":"9542d0475007d1fd5ff138b87b7141b08c52141e"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"91d0e458e95ebcf7a166d75d0714da396d665aac","unresolved":false,"context_lines":[{"line_number":414,"context_line":"        \u0027maintenance\u0027: (\u0027node\u0027, \u0027maintenance\u0027),"},{"line_number":415,"context_line":"        \u0027maintenance_reason\u0027: (\u0027node\u0027, \u0027maintenance_reason\u0027),"},{"line_number":416,"context_line":"        \u0027network_interface\u0027: (\u0027node\u0027, \u0027network_interface\u0027),"},{"line_number":417,"context_line":"        \u0027node_name\u0027: (\u0027node\u0027, \u0027name\u0027),"},{"line_number":418,"context_line":"        \u0027node_uuid\u0027: (\u0027node\u0027, \u0027uuid\u0027),"},{"line_number":419,"context_line":"        \u0027power_state\u0027: (\u0027node\u0027, \u0027power_state\u0027),"},{"line_number":420,"context_line":"        \u0027properties\u0027: (\u0027node\u0027, \u0027properties\u0027),"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a98d1f4_a3200af9","line":417,"in_reply_to":"3a98d1f4_50c1dc7f","updated":"2016-09-29 15:47:10.000000000","message":"I was just asked to do this for clarity, but I think your argument about making this easier for external services makes more sense. Changing it back.","commit_id":"9542d0475007d1fd5ff138b87b7141b08c52141e"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"c98c686d581eed8ead39e9673554270285eb418b","unresolved":false,"context_lines":[{"line_number":415,"context_line":"        \u0027maintenance_reason\u0027: (\u0027node\u0027, \u0027maintenance_reason\u0027),"},{"line_number":416,"context_line":"        \u0027network_interface\u0027: (\u0027node\u0027, \u0027network_interface\u0027),"},{"line_number":417,"context_line":"        \u0027node_name\u0027: (\u0027node\u0027, \u0027name\u0027),"},{"line_number":418,"context_line":"        \u0027node_uuid\u0027: (\u0027node\u0027, \u0027uuid\u0027),"},{"line_number":419,"context_line":"        \u0027power_state\u0027: (\u0027node\u0027, \u0027power_state\u0027),"},{"line_number":420,"context_line":"        \u0027properties\u0027: (\u0027node\u0027, \u0027properties\u0027),"},{"line_number":421,"context_line":"        \u0027provision_state\u0027: (\u0027node\u0027, \u0027provision_state\u0027),"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a98d1f4_90bb640e","line":418,"updated":"2016-09-28 13:34:46.000000000","message":"ditto","commit_id":"9542d0475007d1fd5ff138b87b7141b08c52141e"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"91d0e458e95ebcf7a166d75d0714da396d665aac","unresolved":false,"context_lines":[{"line_number":415,"context_line":"        \u0027maintenance_reason\u0027: (\u0027node\u0027, \u0027maintenance_reason\u0027),"},{"line_number":416,"context_line":"        \u0027network_interface\u0027: (\u0027node\u0027, \u0027network_interface\u0027),"},{"line_number":417,"context_line":"        \u0027node_name\u0027: (\u0027node\u0027, \u0027name\u0027),"},{"line_number":418,"context_line":"        \u0027node_uuid\u0027: (\u0027node\u0027, \u0027uuid\u0027),"},{"line_number":419,"context_line":"        \u0027power_state\u0027: (\u0027node\u0027, \u0027power_state\u0027),"},{"line_number":420,"context_line":"        \u0027properties\u0027: (\u0027node\u0027, \u0027properties\u0027),"},{"line_number":421,"context_line":"        \u0027provision_state\u0027: (\u0027node\u0027, \u0027provision_state\u0027),"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a98d1f4_c31d16bf","line":418,"in_reply_to":"3a98d1f4_90bb640e","updated":"2016-09-29 15:47:10.000000000","message":"Same as L417, changing it back.","commit_id":"9542d0475007d1fd5ff138b87b7141b08c52141e"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e18dd3535f166ae87c2b3ca034416189a3b2a97f","unresolved":false,"context_lines":[{"line_number":441,"context_line":"        \u0027maintenance_reason\u0027: object_fields.StringField(nullable\u003dTrue),"},{"line_number":442,"context_line":"        \u0027network_interface\u0027: object_fields.StringFieldThatAcceptsCallable(),"},{"line_number":443,"context_line":"        \u0027node_name\u0027: object_fields.StringField(nullable\u003dTrue),"},{"line_number":444,"context_line":"        \u0027node_uuid\u0027: object_fields.UUIDField(nullable\u003dTrue),"},{"line_number":445,"context_line":"        \u0027power_state\u0027: object_fields.StringField(nullable\u003dTrue),"},{"line_number":446,"context_line":"        \u0027properties\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":447,"context_line":"        \u0027provision_state\u0027: object_fields.StringField(nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":33,"id":"5a8bc5a2_69f43087","line":444,"updated":"2016-09-27 21:17:30.000000000","message":"this can\u0027t be nullable, but maybe that is fine in this context.","commit_id":"9542d0475007d1fd5ff138b87b7141b08c52141e"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"91d0e458e95ebcf7a166d75d0714da396d665aac","unresolved":false,"context_lines":[{"line_number":441,"context_line":"        \u0027maintenance_reason\u0027: object_fields.StringField(nullable\u003dTrue),"},{"line_number":442,"context_line":"        \u0027network_interface\u0027: object_fields.StringFieldThatAcceptsCallable(),"},{"line_number":443,"context_line":"        \u0027node_name\u0027: object_fields.StringField(nullable\u003dTrue),"},{"line_number":444,"context_line":"        \u0027node_uuid\u0027: object_fields.UUIDField(nullable\u003dTrue),"},{"line_number":445,"context_line":"        \u0027power_state\u0027: object_fields.StringField(nullable\u003dTrue),"},{"line_number":446,"context_line":"        \u0027properties\u0027: object_fields.FlexibleDictField(nullable\u003dTrue),"},{"line_number":447,"context_line":"        \u0027provision_state\u0027: object_fields.StringField(nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a98d1f4_836a2e19","line":444,"in_reply_to":"5a8bc5a2_69f43087","updated":"2016-09-29 15:47:10.000000000","message":"good point, I\u0027ll change it to nullable. I\u0027m not sure how Yuriy\u0027s CRUD notifications will work but maybe he will need it to be nullable if it notifies before a UUID is created. I doubt they will work that way, though.","commit_id":"9542d0475007d1fd5ff138b87b7141b08c52141e"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e18dd3535f166ae87c2b3ca034416189a3b2a97f","unresolved":false,"context_lines":[{"line_number":486,"context_line":""},{"line_number":487,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":488,"context_line":"class NodeSyncPowerStateNotification(notification.NotificationBase):"},{"line_number":489,"context_line":"    \"\"\"Notification for the periodic node power state sync."},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"       This notification is emitted when ironic detects a change in the power"},{"line_number":492,"context_line":"       state of a node during the periodic power state sync task, or when an"}],"source_content_type":"text/x-python","patch_set":33,"id":"5a8bc5a2_29a30851","line":489,"updated":"2016-09-27 21:17:30.000000000","message":"i\u0027d probably also change this, to separate the notification from the periodic node power state sync. (It happens during that sync, but the \u0027sync\u0027 are different.)\n\nMaybe we *should* use a different word than \u0027sync\u0027; will this be confusing otherwise? (And I forgot what other words I proposed for this notification...) UseHWPoweState? Dunno.","commit_id":"9542d0475007d1fd5ff138b87b7141b08c52141e"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"91d0e458e95ebcf7a166d75d0714da396d665aac","unresolved":false,"context_lines":[{"line_number":486,"context_line":""},{"line_number":487,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":488,"context_line":"class NodeSyncPowerStateNotification(notification.NotificationBase):"},{"line_number":489,"context_line":"    \"\"\"Notification for the periodic node power state sync."},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"       This notification is emitted when ironic detects a change in the power"},{"line_number":492,"context_line":"       state of a node during the periodic power state sync task, or when an"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a98d1f4_83514e65","line":489,"in_reply_to":"5a8bc5a2_29a30851","updated":"2016-09-29 15:47:10.000000000","message":"This is becoming NodePowerStateCorrectedNotification. IRC context for anyone else reading: http://eavesdrop.openstack.org/irclogs/%23openstack-ironic/%23openstack-ironic.2016-09-28.log.html#t2016-09-28T17:25:54","commit_id":"9542d0475007d1fd5ff138b87b7141b08c52141e"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e18dd3535f166ae87c2b3ca034416189a3b2a97f","unresolved":false,"context_lines":[{"line_number":490,"context_line":""},{"line_number":491,"context_line":"       This notification is emitted when ironic detects a change in the power"},{"line_number":492,"context_line":"       state of a node during the periodic power state sync task, or when an"},{"line_number":493,"context_line":"       error occurs during the sync."},{"line_number":494,"context_line":"    \"\"\""},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"    # Version 1.0: Initial version"}],"source_content_type":"text/x-python","patch_set":33,"id":"5a8bc5a2_29d5c8b8","line":493,"updated":"2016-09-27 21:17:30.000000000","message":"We should clarify this. it is emitted when the actual hw  node\u0027s power state is different than the expected (in DB) power state, and we update the expected (DB) value to be that of the actual hw power state.","commit_id":"9542d0475007d1fd5ff138b87b7141b08c52141e"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"91d0e458e95ebcf7a166d75d0714da396d665aac","unresolved":false,"context_lines":[{"line_number":490,"context_line":""},{"line_number":491,"context_line":"       This notification is emitted when ironic detects a change in the power"},{"line_number":492,"context_line":"       state of a node during the periodic power state sync task, or when an"},{"line_number":493,"context_line":"       error occurs during the sync."},{"line_number":494,"context_line":"    \"\"\""},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"    # Version 1.0: Initial version"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a98d1f4_63db62ee","line":493,"in_reply_to":"5a8bc5a2_29d5c8b8","updated":"2016-09-29 15:47:10.000000000","message":"Will do. Let me know if this makes sense. I think it\u0027s a lot better with the new class name.","commit_id":"9542d0475007d1fd5ff138b87b7141b08c52141e"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e18dd3535f166ae87c2b3ca034416189a3b2a97f","unresolved":false,"context_lines":[{"line_number":503,"context_line":""},{"line_number":504,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":505,"context_line":"class NodeSyncPowerStatePayload(NodePayload):"},{"line_number":506,"context_line":"    \"\"\"Payload schema for the periodic node power state sync.\"\"\""},{"line_number":507,"context_line":"    # Version 1.0: Initial version"},{"line_number":508,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":509,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"5a8bc5a2_0911ec5d","line":506,"updated":"2016-09-27 21:17:30.000000000","message":"Maybe \u0027Payload schema emitted as part of the notification for syncing the node-db\u0027s power state to that of the hardware node\u0027s power state\u0027.\n\nThat\u0027s probably too long...","commit_id":"9542d0475007d1fd5ff138b87b7141b08c52141e"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"91d0e458e95ebcf7a166d75d0714da396d665aac","unresolved":false,"context_lines":[{"line_number":503,"context_line":""},{"line_number":504,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":505,"context_line":"class NodeSyncPowerStatePayload(NodePayload):"},{"line_number":506,"context_line":"    \"\"\"Payload schema for the periodic node power state sync.\"\"\""},{"line_number":507,"context_line":"    # Version 1.0: Initial version"},{"line_number":508,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":509,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"3a98d1f4_43a4a656","line":506,"in_reply_to":"5a8bc5a2_0911ec5d","updated":"2016-09-29 15:47:10.000000000","message":"I\u0027ll make it match more clearly with the above docstring (the one for NodeSyncPowerStateNotification). Since we agreed in IRC that this is a hard thing to describe concisely, I think it\u0027s fine that the docstring be a little long.","commit_id":"9542d0475007d1fd5ff138b87b7141b08c52141e"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"6fdd14888504f1f53f69300c7e93b330683d7520","unresolved":false,"context_lines":[{"line_number":408,"context_line":"    # - increased complexity needed for creating the payload"},{"line_number":409,"context_line":"    # - sensitive information in the fields that shouldn\u0027t be exposed to"},{"line_number":410,"context_line":"    #   external services"},{"line_number":411,"context_line":"    # - being internal-only or hardware-related fields"},{"line_number":412,"context_line":"    SCHEMA \u003d {"},{"line_number":413,"context_line":"        \u0027clean_step\u0027: (\u0027node\u0027, \u0027clean_step\u0027),"},{"line_number":414,"context_line":"        \u0027console_enabled\u0027: (\u0027node\u0027, \u0027console_enabled\u0027),"}],"source_content_type":"text/x-python","patch_set":34,"id":"3a98d1f4_e75c90ef","line":411,"updated":"2016-09-29 21:55:01.000000000","message":"I would have probably listed each one and indicated next to them the reason. Hopefully folks can figure it out themselves.","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d7929f25e07c42eded36c0a48a41b2fec3768144","unresolved":false,"context_lines":[{"line_number":408,"context_line":"    # - increased complexity needed for creating the payload"},{"line_number":409,"context_line":"    # - sensitive information in the fields that shouldn\u0027t be exposed to"},{"line_number":410,"context_line":"    #   external services"},{"line_number":411,"context_line":"    # - being internal-only or hardware-related fields"},{"line_number":412,"context_line":"    SCHEMA \u003d {"},{"line_number":413,"context_line":"        \u0027clean_step\u0027: (\u0027node\u0027, \u0027clean_step\u0027),"},{"line_number":414,"context_line":"        \u0027console_enabled\u0027: (\u0027node\u0027, \u0027console_enabled\u0027),"}],"source_content_type":"text/x-python","patch_set":34,"id":"3a98d1f4_f44163aa","line":411,"in_reply_to":"3a98d1f4_e75c90ef","updated":"2016-09-30 18:53:54.000000000","message":"OK. Let me know if you\u0027d like me to update anyway. Thought it would be a bit too lengthy that way.","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5cb4f34e8623d632e19407fa0e6ec1b022cea2cb","unresolved":false,"context_lines":[{"line_number":408,"context_line":"    # - increased complexity needed for creating the payload"},{"line_number":409,"context_line":"    # - sensitive information in the fields that shouldn\u0027t be exposed to"},{"line_number":410,"context_line":"    #   external services"},{"line_number":411,"context_line":"    # - being internal-only or hardware-related fields"},{"line_number":412,"context_line":"    SCHEMA \u003d {"},{"line_number":413,"context_line":"        \u0027clean_step\u0027: (\u0027node\u0027, \u0027clean_step\u0027),"},{"line_number":414,"context_line":"        \u0027console_enabled\u0027: (\u0027node\u0027, \u0027console_enabled\u0027),"}],"source_content_type":"text/x-python","patch_set":34,"id":"3a98d1f4_fc910548","line":411,"in_reply_to":"3a98d1f4_f44163aa","updated":"2016-10-04 01:01:02.000000000","message":"Up to you or others, although my preference is to list the field: reason; it makes it clearer for each one, why. Although I don\u0027t think it\u0027d be too lengthy. There are 7 fields, so that\u0027d be 7 ish lines, versus the 6 ish lines you have now. I think/hope that if we list the fields, it\u0027ll be more obvious that it should be updated (and how) if we skip other fields in the future.","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"73301c3fa53a0f62dc853901ad0476ad4a20c073","unresolved":false,"context_lines":[{"line_number":408,"context_line":"    # - increased complexity needed for creating the payload"},{"line_number":409,"context_line":"    # - sensitive information in the fields that shouldn\u0027t be exposed to"},{"line_number":410,"context_line":"    #   external services"},{"line_number":411,"context_line":"    # - being internal-only or hardware-related fields"},{"line_number":412,"context_line":"    SCHEMA \u003d {"},{"line_number":413,"context_line":"        \u0027clean_step\u0027: (\u0027node\u0027, \u0027clean_step\u0027),"},{"line_number":414,"context_line":"        \u0027console_enabled\u0027: (\u0027node\u0027, \u0027console_enabled\u0027),"}],"source_content_type":"text/x-python","patch_set":34,"id":"1a95cdbc_c71a846e","line":411,"in_reply_to":"3a98d1f4_fc910548","updated":"2016-10-04 20:40:00.000000000","message":"OK. I\u0027ll go ahead and update if I have to do another patch set after 36 if that\u0027s alright with you.","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"49e133bd076a9c8525bf38ea99883b01da08100a","unresolved":false,"context_lines":[{"line_number":469,"context_line":"class NodeSetPowerStateNotification(notification.NotificationBase):"},{"line_number":470,"context_line":"    \"\"\"Notification emitted when ironic changes a node\u0027s power state.\"\"\""},{"line_number":471,"context_line":"    # Version 1.0: Initial version"},{"line_number":472,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":473,"context_line":""},{"line_number":474,"context_line":""},{"line_number":475,"context_line":"@base.IronicObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":34,"id":"3a98d1f4_1b28d785","line":472,"updated":"2016-09-30 12:01:24.000000000","message":"Where is the payload field? It\u0027s used in the base class.","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d7929f25e07c42eded36c0a48a41b2fec3768144","unresolved":false,"context_lines":[{"line_number":469,"context_line":"class NodeSetPowerStateNotification(notification.NotificationBase):"},{"line_number":470,"context_line":"    \"\"\"Notification emitted when ironic changes a node\u0027s power state.\"\"\""},{"line_number":471,"context_line":"    # Version 1.0: Initial version"},{"line_number":472,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":473,"context_line":""},{"line_number":474,"context_line":""},{"line_number":475,"context_line":"@base.IronicObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":34,"id":"3a98d1f4_f46fa328","line":472,"in_reply_to":"3a98d1f4_1b28d785","updated":"2016-09-30 18:53:54.000000000","message":"Great catch. This would have allowed any payload to be used with this notification.","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"6fdd14888504f1f53f69300c7e93b330683d7520","unresolved":false,"context_lines":[{"line_number":493,"context_line":""},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":496,"context_line":"class NodePowerStateCorrectedNotification(notification.NotificationBase):"},{"line_number":497,"context_line":"    \"\"\"Notification for when a node\u0027s power state is corrected in the database."},{"line_number":498,"context_line":""},{"line_number":499,"context_line":"       This notification is emitted when ironic detects a change in the actual"}],"source_content_type":"text/x-python","patch_set":34,"id":"3a98d1f4_872d8c48","line":496,"updated":"2016-09-29 21:55:01.000000000","message":"Sorry, we should name this NodeCorrectedPowerState, to be consistent with the above NodeSetPowerState.\n\nOr change NodeSetPowerState -\u003e NodePowerStateSet. My preference is this one, but I didn\u0027t want to bikeshed on it initially since things were consistent then :)","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d7929f25e07c42eded36c0a48a41b2fec3768144","unresolved":false,"context_lines":[{"line_number":493,"context_line":""},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"@base.IronicObjectRegistry.register"},{"line_number":496,"context_line":"class NodePowerStateCorrectedNotification(notification.NotificationBase):"},{"line_number":497,"context_line":"    \"\"\"Notification for when a node\u0027s power state is corrected in the database."},{"line_number":498,"context_line":""},{"line_number":499,"context_line":"       This notification is emitted when ironic detects a change in the actual"}],"source_content_type":"text/x-python","patch_set":34,"id":"3a98d1f4_cf293439","line":496,"in_reply_to":"3a98d1f4_872d8c48","updated":"2016-09-30 18:53:54.000000000","message":"Did 1st one","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"6fdd14888504f1f53f69300c7e93b330683d7520","unresolved":false,"context_lines":[{"line_number":498,"context_line":""},{"line_number":499,"context_line":"       This notification is emitted when ironic detects a change in the actual"},{"line_number":500,"context_line":"       power state of a baremetal node and updates the database to reflect the"},{"line_number":501,"context_line":"       new power state."},{"line_number":502,"context_line":"    \"\"\""},{"line_number":503,"context_line":"    # Version 1.0: Initial version"},{"line_number":504,"context_line":"    VERSION \u003d \u00271.0\u0027"}],"source_content_type":"text/x-python","patch_set":34,"id":"3a98d1f4_87bbcce4","line":501,"updated":"2016-09-29 21:55:01.000000000","message":"I commented on the wording elsewhere; we should sync so they are similar.","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d7929f25e07c42eded36c0a48a41b2fec3768144","unresolved":false,"context_lines":[{"line_number":498,"context_line":""},{"line_number":499,"context_line":"       This notification is emitted when ironic detects a change in the actual"},{"line_number":500,"context_line":"       power state of a baremetal node and updates the database to reflect the"},{"line_number":501,"context_line":"       new power state."},{"line_number":502,"context_line":"    \"\"\""},{"line_number":503,"context_line":"    # Version 1.0: Initial version"},{"line_number":504,"context_line":"    VERSION \u003d \u00271.0\u0027"}],"source_content_type":"text/x-python","patch_set":34,"id":"3a98d1f4_6f4ca09e","line":501,"in_reply_to":"3a98d1f4_87bbcce4","updated":"2016-09-30 18:53:54.000000000","message":"Done","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":529,"context_line":""},{"line_number":530,"context_line":"    def __init__(self, node, from_power):"},{"line_number":531,"context_line":"        super(NodeCorrectedPowerStatePayload, self).__init__("},{"line_number":532,"context_line":"            node, from_power\u003dfrom_power)"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_cfd2ca5b","line":532,"updated":"2016-10-03 21:08:10.000000000","message":"I\u0027m not sure -- should there be unit tests for these code changes?","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":529,"context_line":""},{"line_number":530,"context_line":"    def __init__(self, node, from_power):"},{"line_number":531,"context_line":"        super(NodeCorrectedPowerStatePayload, self).__init__("},{"line_number":532,"context_line":"            node, from_power\u003dfrom_power)"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a95cdbc_0f8815e7","line":532,"in_reply_to":"3a98d1f4_cfd2ca5b","updated":"2016-10-04 20:43:15.000000000","message":"There are object version checks for the changes and tests for the base classes (e.g. payload population). What other kinds of tests would you like to see?","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"}],"ironic/objects/notification.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"7506620145b937f0cf1442f5542a848150eb3d9b","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def to_event_type_field(self):"},{"line_number":52,"context_line":"        \"\"\"Constructs string for event_type to be sent on the wire."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"           :raises: NotificationEventTypeErrora"},{"line_number":55,"context_line":"        \"\"\""},{"line_number":56,"context_line":"        if self.status not in [\u0027start\u0027, \u0027end\u0027, \u0027error\u0027, \u0027success\u0027]:"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a89bdaa_99f4d45b","line":53,"updated":"2016-09-13 02:19:51.000000000","message":"The string is in the format: baremetal.\u003cobject\u003e.\u003caction\u003e.\u003cstatus\u003e","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dc67c0f7419ea63333fb37fc030485b2871283b4","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def to_event_type_field(self):"},{"line_number":52,"context_line":"        \"\"\"Constructs string for event_type to be sent on the wire."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"           :raises: NotificationEventTypeErrora"},{"line_number":55,"context_line":"        \"\"\""},{"line_number":56,"context_line":"        if self.status not in [\u0027start\u0027, \u0027end\u0027, \u0027error\u0027, \u0027success\u0027]:"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_a1320da5","line":53,"in_reply_to":"9a89bdaa_99f4d45b","updated":"2016-09-16 23:04:08.000000000","message":"Done","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"7506620145b937f0cf1442f5542a848150eb3d9b","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    def to_event_type_field(self):"},{"line_number":52,"context_line":"        \"\"\"Constructs string for event_type to be sent on the wire."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"           :raises: NotificationEventTypeErrora"},{"line_number":55,"context_line":"        \"\"\""},{"line_number":56,"context_line":"        if self.status not in [\u0027start\u0027, \u0027end\u0027, \u0027error\u0027, \u0027success\u0027]:"},{"line_number":57,"context_line":"            raise exception.NotificationEventTypeError(status\u003dself.status)"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a89bdaa_394ca8c7","line":54,"updated":"2016-09-13 02:19:51.000000000","message":"s/Errora/Error/\n\n:returns: event_type string","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dc67c0f7419ea63333fb37fc030485b2871283b4","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    def to_event_type_field(self):"},{"line_number":52,"context_line":"        \"\"\"Constructs string for event_type to be sent on the wire."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"           :raises: NotificationEventTypeErrora"},{"line_number":55,"context_line":"        \"\"\""},{"line_number":56,"context_line":"        if self.status not in [\u0027start\u0027, \u0027end\u0027, \u0027error\u0027, \u0027success\u0027]:"},{"line_number":57,"context_line":"            raise exception.NotificationEventTypeError(status\u003dself.status)"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a8ec9b2_81d6f125","line":54,"in_reply_to":"9a89bdaa_394ca8c7","updated":"2016-09-16 23:04:08.000000000","message":"Done","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"8704ff646aa569ab78935623a939ba4b8c0cfa97","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    fields \u003d {"},{"line_number":46,"context_line":"        \u0027object\u0027: fields.StringField(nullable\u003dFalse),"},{"line_number":47,"context_line":"        \u0027action\u0027: fields.StringField(nullable\u003dFalse),"},{"line_number":48,"context_line":"        \u0027status\u0027: fields.EnumField(valid_values\u003d[\u0027start\u0027, \u0027end\u0027, \u0027error\u0027,"},{"line_number":49,"context_line":"                                                 \u0027success\u0027],"},{"line_number":50,"context_line":"                                   nullable\u003dFalse)"},{"line_number":51,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_40759e61","line":48,"updated":"2016-09-27 16:29:03.000000000","message":"Ruby, your comment below made me realize I should probably change this to be the actual class that we made for the status.","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"6f3540d823239ff45e5b609dbddbca6baa6804a6","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    }"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def to_event_type_field(self):"},{"line_number":54,"context_line":"        parts \u003d [\u0027baremetal\u0027, self.object, self.action, self.status]"},{"line_number":55,"context_line":"        return \u0027.\u0027.join(parts)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_0e1db765","line":54,"updated":"2016-09-26 19:42:00.000000000","message":"Why\u0027d you remove the docstring \u0026 if self.status .. code that was here in patch set 30?","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"8704ff646aa569ab78935623a939ba4b8c0cfa97","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    }"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def to_event_type_field(self):"},{"line_number":54,"context_line":"        parts \u003d [\u0027baremetal\u0027, self.object, self.action, self.status]"},{"line_number":55,"context_line":"        return \u0027.\u0027.join(parts)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"5a8bc5a2_c039aea5","line":54,"in_reply_to":"5a8bc5a2_0e1db765","updated":"2016-09-27 16:29:03.000000000","message":"Removed docstring accidentally, thanks for the catch, will add it back.\n\nI removed the if self.status... code because it\u0027s kind of redundant now. Since status is an EnumField with a specific set of values allowed, oslo will throw an error for us automatically (ValueError) if self.status is anything other than start, end, error, or success. There are some test cases that check for this in tests/unit/objects/test_notification.py if you want to check for yourself.","commit_id":"6bf7c74e3da509e68efd2651138e9d64ab0f64ea"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e18dd3535f166ae87c2b3ca034416189a3b2a97f","unresolved":false,"context_lines":[{"line_number":54,"context_line":"           The string is in the format: baremetal.\u003cobject\u003e.\u003caction\u003e.\u003cstatus\u003e"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"           :raises: ValueError if self.status is not one of"},{"line_number":57,"context_line":"                    :class:`fields.NotificationStatusField`"},{"line_number":58,"context_line":"           :returns: event_type string"},{"line_number":59,"context_line":"        \"\"\""},{"line_number":60,"context_line":"        parts \u003d [\u0027baremetal\u0027, self.object, self.action, self.status]"}],"source_content_type":"text/x-python","patch_set":33,"id":"5a8bc5a2_bcfd980a","line":57,"updated":"2016-09-27 21:17:30.000000000","message":"there\u0027s no check for this, is there?","commit_id":"9542d0475007d1fd5ff138b87b7141b08c52141e"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"27980cf2a31912a0948dcafd931d1c3ecc24d8aa","unresolved":false,"context_lines":[{"line_number":54,"context_line":"           The string is in the format: baremetal.\u003cobject\u003e.\u003caction\u003e.\u003cstatus\u003e"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"           :raises: ValueError if self.status is not one of"},{"line_number":57,"context_line":"                    :class:`fields.NotificationStatusField`"},{"line_number":58,"context_line":"           :returns: event_type string"},{"line_number":59,"context_line":"        \"\"\""},{"line_number":60,"context_line":"        parts \u003d [\u0027baremetal\u0027, self.object, self.action, self.status]"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a98d1f4_27a03890","line":57,"in_reply_to":"3a98d1f4_43bbc672","updated":"2016-09-29 21:55:09.000000000","message":"Sweet! :)","commit_id":"9542d0475007d1fd5ff138b87b7141b08c52141e"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"91d0e458e95ebcf7a166d75d0714da396d665aac","unresolved":false,"context_lines":[{"line_number":54,"context_line":"           The string is in the format: baremetal.\u003cobject\u003e.\u003caction\u003e.\u003cstatus\u003e"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"           :raises: ValueError if self.status is not one of"},{"line_number":57,"context_line":"                    :class:`fields.NotificationStatusField`"},{"line_number":58,"context_line":"           :returns: event_type string"},{"line_number":59,"context_line":"        \"\"\""},{"line_number":60,"context_line":"        parts \u003d [\u0027baremetal\u0027, self.object, self.action, self.status]"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a98d1f4_43bbc672","line":57,"in_reply_to":"5a8bc5a2_bcfd980a","updated":"2016-09-29 15:47:10.000000000","message":"oslo checks this for us. I\u0027ll show you the unit test to make sure it does in the next patch set (34).","commit_id":"9542d0475007d1fd5ff138b87b7141b08c52141e"}],"ironic/tests/base.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":178,"context_line":"           :param host: expected host that emits the notification"},{"line_number":179,"context_line":"           :param event_type: expected value of EventType field of notification"},{"line_number":180,"context_line":"                              as a string"},{"line_number":181,"context_line":"           :param priority: expected NotificationLevel"},{"line_number":182,"context_line":"       \"\"\""},{"line_number":183,"context_line":"        self.assertEqual(notif_args[\u0027publisher\u0027].service, service)"},{"line_number":184,"context_line":"        self.assertEqual(notif_args[\u0027publisher\u0027].host, host)"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_220a668a","line":181,"updated":"2016-10-03 21:08:10.000000000","message":"s/priority/level/","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":178,"context_line":"           :param host: expected host that emits the notification"},{"line_number":179,"context_line":"           :param event_type: expected value of EventType field of notification"},{"line_number":180,"context_line":"                              as a string"},{"line_number":181,"context_line":"           :param priority: expected NotificationLevel"},{"line_number":182,"context_line":"       \"\"\""},{"line_number":183,"context_line":"        self.assertEqual(notif_args[\u0027publisher\u0027].service, service)"},{"line_number":184,"context_line":"        self.assertEqual(notif_args[\u0027publisher\u0027].host, host)"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a95cdbc_4fd85df0","line":181,"in_reply_to":"3a98d1f4_220a668a","updated":"2016-10-04 20:43:15.000000000","message":"Done","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        self.assertEqual(notif_args[\u0027publisher\u0027].host, host)"},{"line_number":185,"context_line":"        self.assertEqual(notif_args[\u0027event_type\u0027]."},{"line_number":186,"context_line":"                         to_event_type_field(), event_type)"},{"line_number":187,"context_line":"        self.assertEqual(notif_args[\u0027level\u0027], level)"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_024d6a99","line":187,"updated":"2016-10-03 21:08:10.000000000","message":"These asserts should be reversed sing notif_args contains the actual values and we do self.assertEqual(expected, actual)","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        self.assertEqual(notif_args[\u0027publisher\u0027].host, host)"},{"line_number":185,"context_line":"        self.assertEqual(notif_args[\u0027event_type\u0027]."},{"line_number":186,"context_line":"                         to_event_type_field(), event_type)"},{"line_number":187,"context_line":"        self.assertEqual(notif_args[\u0027level\u0027], level)"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a95cdbc_af62c114","line":187,"in_reply_to":"3a98d1f4_024d6a99","updated":"2016-10-04 20:43:15.000000000","message":"Done","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"}],"ironic/tests/unit/conductor/test_manager.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":203,"context_line":"            self.assertIsNone(node.last_error)"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    @mock.patch(\u0027ironic.objects.node.NodeSetPowerStateNotification\u0027)"},{"line_number":206,"context_line":"    def test_change_node_power_state_notif_success(self, mock_notif):"},{"line_number":207,"context_line":"        # Test that successfully changing a node\u0027s power state sends the"},{"line_number":208,"context_line":"        # correct .start and .end notifications"},{"line_number":209,"context_line":"        self.config(notification_level\u003d\u0027info\u0027)"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_a223d6bb","line":206,"updated":"2016-10-03 21:08:10.000000000","message":"nit, i\u0027d actually call this something like \u0027test_node_set_power_state_notif_success\u0027 since the notification is a power_set, not a power_change.","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":203,"context_line":"            self.assertIsNone(node.last_error)"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"    @mock.patch(\u0027ironic.objects.node.NodeSetPowerStateNotification\u0027)"},{"line_number":206,"context_line":"    def test_change_node_power_state_notif_success(self, mock_notif):"},{"line_number":207,"context_line":"        # Test that successfully changing a node\u0027s power state sends the"},{"line_number":208,"context_line":"        # correct .start and .end notifications"},{"line_number":209,"context_line":"        self.config(notification_level\u003d\u0027info\u0027)"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a95cdbc_78c79845","line":206,"in_reply_to":"3a98d1f4_a223d6bb","updated":"2016-10-04 20:43:15.000000000","message":"Done here and below","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":256,"context_line":"            # Give async worker a chance to finish"},{"line_number":257,"context_line":"            self._stop_service()"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"            # 2 notifications should be sent: 1 .start and 1 .error in the"},{"line_number":260,"context_line":"            # handler spun off in the worker thread"},{"line_number":261,"context_line":"            self.assertEqual(mock_notif.call_count, 2)"},{"line_number":262,"context_line":"            self.assertEqual(mock_notif.return_value.emit.call_count, 2)"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_9d3f1bb3","line":259,"updated":"2016-10-03 21:08:10.000000000","message":"maybe confirm that get_power_mock was called.","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":256,"context_line":"            # Give async worker a chance to finish"},{"line_number":257,"context_line":"            self._stop_service()"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"            # 2 notifications should be sent: 1 .start and 1 .error in the"},{"line_number":260,"context_line":"            # handler spun off in the worker thread"},{"line_number":261,"context_line":"            self.assertEqual(mock_notif.call_count, 2)"},{"line_number":262,"context_line":"            self.assertEqual(mock_notif.return_value.emit.call_count, 2)"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a95cdbc_ea6d97cd","line":259,"in_reply_to":"3a98d1f4_9d3f1bb3","updated":"2016-10-04 20:43:15.000000000","message":"Done","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":267,"context_line":"            self.assertNotificationEqual(first_notif_args,"},{"line_number":268,"context_line":"                                         \u0027ironic-conductor\u0027, CONF.host,"},{"line_number":269,"context_line":"                                         \u0027baremetal.node.power_set\u0027"},{"line_number":270,"context_line":"                                         \u0027.start\u0027,"},{"line_number":271,"context_line":"                                         obj_fields.NotificationLevel.INFO)"},{"line_number":272,"context_line":"            self.assertNotificationEqual(second_notif_args,"},{"line_number":273,"context_line":"                                         \u0027ironic-conductor\u0027, CONF.host,"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_7d3defc2","line":270,"updated":"2016-10-03 21:08:10.000000000","message":"can\u0027t you combine this with the line above?","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":267,"context_line":"            self.assertNotificationEqual(first_notif_args,"},{"line_number":268,"context_line":"                                         \u0027ironic-conductor\u0027, CONF.host,"},{"line_number":269,"context_line":"                                         \u0027baremetal.node.power_set\u0027"},{"line_number":270,"context_line":"                                         \u0027.start\u0027,"},{"line_number":271,"context_line":"                                         obj_fields.NotificationLevel.INFO)"},{"line_number":272,"context_line":"            self.assertNotificationEqual(second_notif_args,"},{"line_number":273,"context_line":"                                         \u0027ironic-conductor\u0027, CONF.host,"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a95cdbc_0a73a3b2","line":270,"in_reply_to":"3a98d1f4_7d3defc2","updated":"2016-10-04 20:43:15.000000000","message":"Done","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":294,"context_line":"            # Give async worker a chance to finish"},{"line_number":295,"context_line":"            self._stop_service()"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"            # 2 notifications should be sent: 1 .start and 1 .error in the"},{"line_number":298,"context_line":"            # handler spun off in the worker thread"},{"line_number":299,"context_line":"            self.assertEqual(mock_notif.call_count, 2)"},{"line_number":300,"context_line":"            self.assertEqual(mock_notif.return_value.emit.call_count, 2)"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_bdb8572b","line":297,"updated":"2016-10-03 21:08:10.000000000","message":"would be good to check that set_power_mock was called.","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":294,"context_line":"            # Give async worker a chance to finish"},{"line_number":295,"context_line":"            self._stop_service()"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"            # 2 notifications should be sent: 1 .start and 1 .error in the"},{"line_number":298,"context_line":"            # handler spun off in the worker thread"},{"line_number":299,"context_line":"            self.assertEqual(mock_notif.call_count, 2)"},{"line_number":300,"context_line":"            self.assertEqual(mock_notif.return_value.emit.call_count, 2)"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a95cdbc_6ab9872e","line":297,"in_reply_to":"3a98d1f4_bdb8572b","updated":"2016-10-04 20:43:15.000000000","message":"Done","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":305,"context_line":"            self.assertNotificationEqual(first_notif_args,"},{"line_number":306,"context_line":"                                         \u0027ironic-conductor\u0027, CONF.host,"},{"line_number":307,"context_line":"                                         \u0027baremetal.node.power_set.\u0027"},{"line_number":308,"context_line":"                                         \u0027start\u0027,"},{"line_number":309,"context_line":"                                         obj_fields.NotificationLevel.INFO)"},{"line_number":310,"context_line":"            self.assertNotificationEqual(second_notif_args,"},{"line_number":311,"context_line":"                                         \u0027ironic-conductor\u0027, CONF.host,"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_5da7530a","line":308,"updated":"2016-10-03 21:08:10.000000000","message":"ditto about combining with above line","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":305,"context_line":"            self.assertNotificationEqual(first_notif_args,"},{"line_number":306,"context_line":"                                         \u0027ironic-conductor\u0027, CONF.host,"},{"line_number":307,"context_line":"                                         \u0027baremetal.node.power_set.\u0027"},{"line_number":308,"context_line":"                                         \u0027start\u0027,"},{"line_number":309,"context_line":"                                         obj_fields.NotificationLevel.INFO)"},{"line_number":310,"context_line":"            self.assertNotificationEqual(second_notif_args,"},{"line_number":311,"context_line":"                                         \u0027ironic-conductor\u0027, CONF.host,"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a95cdbc_ea7bd779","line":308,"in_reply_to":"3a98d1f4_5da7530a","updated":"2016-10-04 20:43:15.000000000","message":"Done","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":331,"context_line":"                              self.context,"},{"line_number":332,"context_line":"                              node.uuid,"},{"line_number":333,"context_line":"                              states.POWER_ON)"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"            self.assertEqual(mock_notif.call_count, 0)"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"    @mock.patch(\u0027ironic.objects.node.NodeSetPowerStateNotification\u0027)"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_dde1a32b","line":334,"updated":"2016-10-03 21:08:10.000000000","message":"check that spawn_mock was called?","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":331,"context_line":"                              self.context,"},{"line_number":332,"context_line":"                              node.uuid,"},{"line_number":333,"context_line":"                              states.POWER_ON)"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"            self.assertEqual(mock_notif.call_count, 0)"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"    @mock.patch(\u0027ironic.objects.node.NodeSetPowerStateNotification\u0027)"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a95cdbc_8a73334d","line":334,"in_reply_to":"3a98d1f4_dde1a32b","updated":"2016-10-04 20:43:15.000000000","message":"Done, and also fixed below to assertEqual(expected, observed). I found a couple other places in this file where it was (observed, expected) and fixed, as well.","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":3707,"context_line":"            notif_args, \u0027ironic-conductor\u0027, CONF.host,"},{"line_number":3708,"context_line":"            \u0027baremetal.node.power_state_corrected.success\u0027,"},{"line_number":3709,"context_line":"            obj_fields.NotificationLevel.INFO)"},{"line_number":3710,"context_line":""},{"line_number":3711,"context_line":"    def test_retry_then_success(self, node_power_action):"},{"line_number":3712,"context_line":"        self.config(force_power_state_during_sync\u003dTrue, group\u003d\u0027conductor\u0027)"},{"line_number":3713,"context_line":"        self.config(power_state_sync_max_retries\u003d2, group\u003d\u0027conductor\u0027)"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_3d3a87e7","line":3710,"updated":"2016-10-03 21:08:10.000000000","message":"I might have missed it, did you test the notification emitted from ConductorManager._do_node_verify()?","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":3707,"context_line":"            notif_args, \u0027ironic-conductor\u0027, CONF.host,"},{"line_number":3708,"context_line":"            \u0027baremetal.node.power_state_corrected.success\u0027,"},{"line_number":3709,"context_line":"            obj_fields.NotificationLevel.INFO)"},{"line_number":3710,"context_line":""},{"line_number":3711,"context_line":"    def test_retry_then_success(self, node_power_action):"},{"line_number":3712,"context_line":"        self.config(force_power_state_during_sync\u003dTrue, group\u003d\u0027conductor\u0027)"},{"line_number":3713,"context_line":"        self.config(power_state_sync_max_retries\u003d2, group\u003d\u0027conductor\u0027)"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a95cdbc_18abf48a","line":3710,"in_reply_to":"3a98d1f4_3d3a87e7","updated":"2016-10-04 20:43:15.000000000","message":"Thought I did but might have missed it. I\u0027ll verify it exists or add one.","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"06d5c9a4cfdd4c87145ddc3018aae81c981e4a26","unresolved":false,"context_lines":[{"line_number":2471,"context_line":"        # 1 notification should be sent -"},{"line_number":2472,"context_line":"        # baremetal.node.power_state_corrected.success"},{"line_number":2473,"context_line":"        self.assertEqual(1, mock_notif.call_count)"},{"line_number":2474,"context_line":"        self.assertEqual(1, mock_notif.return_value.emit.call_count)"},{"line_number":2475,"context_line":""},{"line_number":2476,"context_line":"        node.refresh()"},{"line_number":2477,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"1a95cdbc_39c188e5","line":2474,"updated":"2016-10-04 22:39:40.000000000","message":"I didn\u0027t mention it above, but in this test, you can see L2478 has mock_validate.assert_called_once_with(). To be consistent, it might be better for the above two to also be similar.","commit_id":"b378618476c345ba046853a4c0636316e1265be6"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"c129ee1bc25a305149d612014e3a02e139fc56a5","unresolved":false,"context_lines":[{"line_number":2471,"context_line":"        # 1 notification should be sent -"},{"line_number":2472,"context_line":"        # baremetal.node.power_state_corrected.success"},{"line_number":2473,"context_line":"        self.assertEqual(1, mock_notif.call_count)"},{"line_number":2474,"context_line":"        self.assertEqual(1, mock_notif.return_value.emit.call_count)"},{"line_number":2475,"context_line":""},{"line_number":2476,"context_line":"        node.refresh()"},{"line_number":2477,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"1a95cdbc_8ba147ac","line":2474,"in_reply_to":"1a95cdbc_39c188e5","updated":"2016-10-05 14:07:54.000000000","message":"The problem is that here, we don\u0027t have the values passed to the notification constructor. We could emulate it by passing mock.ANY or something similar, which I\u0027d be OK with.\n\nemit() is totally testable with that method, but I kept it using the call_count method to be consistent with the constructor test.\n\nLet me know what you think about this, or if there\u0027s a better method (for example, if there\u0027s some way of testing that it was called with an instance of a particular class, without testing the actual address of the real object).","commit_id":"b378618476c345ba046853a4c0636316e1265be6"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"06d5c9a4cfdd4c87145ddc3018aae81c981e4a26","unresolved":false,"context_lines":[{"line_number":2481,"context_line":"        self.assertEqual(states.MANAGEABLE, node.provision_state)"},{"line_number":2482,"context_line":"        self.assertIsNone(node.target_provision_state)"},{"line_number":2483,"context_line":"        self.assertIsNone(node.last_error)"},{"line_number":2484,"context_line":"        self.assertEqual(states.POWER_OFF, node.power_state)"},{"line_number":2485,"context_line":""},{"line_number":2486,"context_line":"    @mock.patch(\u0027ironic.drivers.modules.fake.FakePower.get_power_state\u0027)"},{"line_number":2487,"context_line":"    @mock.patch(\u0027ironic.drivers.modules.fake.FakePower.validate\u0027)"}],"source_content_type":"text/x-python","patch_set":36,"id":"1a95cdbc_f9f9e04e","line":2484,"updated":"2016-10-04 22:39:40.000000000","message":"I forgot to mention it the last time, but I\u0027d be perfectly happy if you just modified test__do_node_verify to include testing the notification.","commit_id":"b378618476c345ba046853a4c0636316e1265be6"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"c129ee1bc25a305149d612014e3a02e139fc56a5","unresolved":false,"context_lines":[{"line_number":2481,"context_line":"        self.assertEqual(states.MANAGEABLE, node.provision_state)"},{"line_number":2482,"context_line":"        self.assertIsNone(node.target_provision_state)"},{"line_number":2483,"context_line":"        self.assertIsNone(node.last_error)"},{"line_number":2484,"context_line":"        self.assertEqual(states.POWER_OFF, node.power_state)"},{"line_number":2485,"context_line":""},{"line_number":2486,"context_line":"    @mock.patch(\u0027ironic.drivers.modules.fake.FakePower.get_power_state\u0027)"},{"line_number":2487,"context_line":"    @mock.patch(\u0027ironic.drivers.modules.fake.FakePower.validate\u0027)"}],"source_content_type":"text/x-python","patch_set":36,"id":"1a95cdbc_6b915bf0","line":2484,"in_reply_to":"1a95cdbc_f9f9e04e","updated":"2016-10-05 14:07:54.000000000","message":"Done","commit_id":"b378618476c345ba046853a4c0636316e1265be6"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3eda04824669e706ed9a6ef69b0d4793efbea9cc","unresolved":false,"context_lines":[{"line_number":2443,"context_line":""},{"line_number":2444,"context_line":"        # 1 notification should be sent -"},{"line_number":2445,"context_line":"        # baremetal.node.power_state_corrected.success"},{"line_number":2446,"context_line":"        self.assertEqual(1, mock_notif.call_count)"},{"line_number":2447,"context_line":"        self.assertEqual(1, mock_notif.return_value.emit.call_count)"},{"line_number":2448,"context_line":""},{"line_number":2449,"context_line":"        node.refresh()"}],"source_content_type":"text/x-python","patch_set":38,"id":"1a95cdbc_0fac2733","line":2446,"updated":"2016-10-06 14:54:49.000000000","message":"I think it is totally fine to do mock_notif.assert_called_once_with(mock.ANY, ...)","commit_id":"01d6ff498edfbc93f97d54c6032f49b0a64b8e3e"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"f2da83b4a0a9f3568ed46255869e9db54bfd0a73","unresolved":false,"context_lines":[{"line_number":2443,"context_line":""},{"line_number":2444,"context_line":"        # 1 notification should be sent -"},{"line_number":2445,"context_line":"        # baremetal.node.power_state_corrected.success"},{"line_number":2446,"context_line":"        self.assertEqual(1, mock_notif.call_count)"},{"line_number":2447,"context_line":"        self.assertEqual(1, mock_notif.return_value.emit.call_count)"},{"line_number":2448,"context_line":""},{"line_number":2449,"context_line":"        node.refresh()"}],"source_content_type":"text/x-python","patch_set":38,"id":"1a95cdbc_eb1e0662","line":2446,"in_reply_to":"1a95cdbc_0fac2733","updated":"2016-10-07 15:23:13.000000000","message":"OK, doing this.\n\nDo you think I should also make the ones that assert call count is 2 use assert_has_calls instead? If we\u0027re checking for 2 calls and are going to use mock.ANY anyway, it\u0027s probably more concise to just check the call count.\n\ncall_count is used in some other tests, but I\u0027m fine with either","commit_id":"01d6ff498edfbc93f97d54c6032f49b0a64b8e3e"}],"ironic/tests/unit/conductor/test_notification_utils.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3eda04824669e706ed9a6ef69b0d4793efbea9cc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":38,"id":"1a95cdbc_124b6cca","line":50,"updated":"2016-10-06 14:54:49.000000000","message":"I think the way I\u0027d approach testing this file is\n1. for emit_power_*() functions, I\u0027d mock _emit_conductor_node_notification() and just assert that _emit_conductor... was called with the appropriate parameters\n2. heavy testing of _emit_conductor_node_notification. This code touches a Notification object as well as payload object. The tests should cover the paths for exception handling as well. (And maybe if you had these tests, we\u0027d know if the isinstance() change worked or not...)","commit_id":"01d6ff498edfbc93f97d54c6032f49b0a64b8e3e"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"f2da83b4a0a9f3568ed46255869e9db54bfd0a73","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":38,"id":"1a95cdbc_2e536e6c","line":50,"in_reply_to":"1a95cdbc_124b6cca","updated":"2016-10-07 15:23:13.000000000","message":"Done","commit_id":"01d6ff498edfbc93f97d54c6032f49b0a64b8e3e"}],"ironic/tests/unit/conductor/test_utils.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"80c4bed455e21bfb7dbd2dbd8b906b74d9396b4d","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            self.assertFalse(mock_sbd.called)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"class NodePowerActionTestCase(base.DbTestCase):"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def setUp(self):"},{"line_number":84,"context_line":"        super(NodePowerActionTestCase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":35,"id":"3a98d1f4_6fad36e8","line":81,"updated":"2016-10-03 21:08:10.000000000","message":"are you going to add tests for the changes you made to conductor/utils.py? You did them (or some of them) via the manager tests, but I\u0027d like to see more specific tests here, it is easier to see what is being tested.","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4c094d9ca9fdca7b9cb25846213c69f5b700faa9","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            self.assertFalse(mock_sbd.called)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"class NodePowerActionTestCase(base.DbTestCase):"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def setUp(self):"},{"line_number":84,"context_line":"        super(NodePowerActionTestCase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":35,"id":"1a95cdbc_f81648a6","line":81,"in_reply_to":"3a98d1f4_6fad36e8","updated":"2016-10-04 20:43:15.000000000","message":"OK, they are via the manager tests, but I\u0027ll add more here so they\u0027re actual \"unit\" tests.","commit_id":"89a952dc32f479588112545da79f208372a9d4e7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"06d5c9a4cfdd4c87145ddc3018aae81c981e4a26","unresolved":false,"context_lines":[{"line_number":129,"context_line":"            get_power_mock.assert_called_once_with(mock.ANY)"},{"line_number":130,"context_line":"            self.assertEqual(states.POWER_ON, node[\u0027power_state\u0027])"},{"line_number":131,"context_line":"            self.assertIsNone(node[\u0027target_power_state\u0027])"},{"line_number":132,"context_line":"            self.assertIsNone(node[\u0027last_error\u0027])"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"            # 2 notifications should be sent: 1 .start and 1 .end"},{"line_number":135,"context_line":"            self.assertEqual(2, mock_notif.call_count)"}],"source_content_type":"text/x-python","patch_set":36,"id":"1a95cdbc_0c31ec0b","line":132,"updated":"2016-10-04 22:39:40.000000000","message":"I see you copy/pasted from the above test. I suspect someone will ask you to change these to node.power_state, node.target_power_state, node.last_error, respectively.","commit_id":"b378618476c345ba046853a4c0636316e1265be6"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"c129ee1bc25a305149d612014e3a02e139fc56a5","unresolved":false,"context_lines":[{"line_number":129,"context_line":"            get_power_mock.assert_called_once_with(mock.ANY)"},{"line_number":130,"context_line":"            self.assertEqual(states.POWER_ON, node[\u0027power_state\u0027])"},{"line_number":131,"context_line":"            self.assertIsNone(node[\u0027target_power_state\u0027])"},{"line_number":132,"context_line":"            self.assertIsNone(node[\u0027last_error\u0027])"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"            # 2 notifications should be sent: 1 .start and 1 .end"},{"line_number":135,"context_line":"            self.assertEqual(2, mock_notif.call_count)"}],"source_content_type":"text/x-python","patch_set":36,"id":"1a95cdbc_26db0a7e","line":132,"in_reply_to":"1a95cdbc_0c31ec0b","updated":"2016-10-05 14:07:54.000000000","message":"Guilty. It might be nicer to keep these tests separate (unlike the test__do_node_verify test), since these are a little more comprehensive about the notification. Open to merging them together though.\n\nDone here and below.","commit_id":"b378618476c345ba046853a4c0636316e1265be6"}],"releasenotes/notes/power-state-notifications-9d865d7b3ecaf4ee.yaml":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"a21ec9701b16292a5271cdc704798573c003e68c","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - Notifications for when changes in a node power state are detected during"},{"line_number":4,"context_line":"    the periodic sync, for when the sync fails, and for when ironic sets a node"},{"line_number":5,"context_line":"    power state will now be emitted if notifications are enabled. For details"},{"line_number":6,"context_line":"    on how to enable notifications, see the developer documentation. Setting"},{"line_number":7,"context_line":"    the \"notification_priority\" configuration property will specify which level"},{"line_number":8,"context_line":"    of notifications get sent. This feature is useful for keeping track of node"},{"line_number":9,"context_line":"    power state changes over time. An external service may read the"},{"line_number":10,"context_line":"    notifications from the message bus to enable this kind of tracking."}],"source_content_type":"text/x-yaml","patch_set":11,"id":"dada55a8_fb3da4c4","line":8,"range":{"start_line":6,"start_character":69,"end_line":8,"end_character":30},"updated":"2016-07-21 15:51:53.000000000","message":"This option already mentioned in previous note.","commit_id":"299d2a37b7fd33fa8666e292a148041c69bb2030"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"11835157cd9e5ab2c446016acfd59c490823f754","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - Notifications for when changes in a node power state are detected during"},{"line_number":4,"context_line":"    the periodic sync, for when the sync fails, and for when ironic sets a node"},{"line_number":5,"context_line":"    power state will now be emitted if notifications are enabled. For details"},{"line_number":6,"context_line":"    on how to enable notifications, see the developer documentation. Setting"},{"line_number":7,"context_line":"    the \"notification_priority\" configuration property will specify which level"},{"line_number":8,"context_line":"    of notifications get sent. This feature is useful for keeping track of node"},{"line_number":9,"context_line":"    power state changes over time. An external service may read the"},{"line_number":10,"context_line":"    notifications from the message bus to enable this kind of tracking."}],"source_content_type":"text/x-yaml","patch_set":11,"id":"dada55a8_eb4aa9ab","line":8,"range":{"start_line":6,"start_character":69,"end_line":8,"end_character":30},"in_reply_to":"dada55a8_fb3da4c4","updated":"2016-07-22 18:15:14.000000000","message":"Removed","commit_id":"299d2a37b7fd33fa8666e292a148041c69bb2030"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9d63de254cbc6a9d4149e39c8c3eac718e12bcd2","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - Notifications for when changes in a node power state are detected during"},{"line_number":4,"context_line":"    the periodic sync, for when the sync fails, and for when ironic sets a node"},{"line_number":5,"context_line":"    power state will now be emitted if notifications are enabled. For details"},{"line_number":6,"context_line":"    on how to enable notifications, see the developer documentation."}],"source_content_type":"text/x-yaml","patch_set":25,"id":"fa7ab95a_20047816","line":6,"updated":"2016-09-01 22:20:35.000000000","message":"as well as details of the actual notifications","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"c7ee6536691a192bb79c51102b54a005d301339f","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - Notifications for when changes in a node power state are detected during"},{"line_number":4,"context_line":"    the periodic sync, for when the sync fails, and for when ironic sets a node"},{"line_number":5,"context_line":"    power state will now be emitted if notifications are enabled. For details"},{"line_number":6,"context_line":"    on how to enable notifications, see the developer documentation."}],"source_content_type":"text/x-yaml","patch_set":25,"id":"9a89bdaa_ef421b67","line":6,"in_reply_to":"fa7ab95a_20047816","updated":"2016-09-08 17:35:51.000000000","message":"Done","commit_id":"eff23ecd1e09974373e33e996f86438cbf400aa4"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"7506620145b937f0cf1442f5542a848150eb3d9b","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - Notifications for when changes in a node power state are detected during"},{"line_number":4,"context_line":"    the periodic sync, for when the sync fails, and for when ironic sets a node"},{"line_number":5,"context_line":"    power state will now be emitted if notifications are enabled. For details"},{"line_number":6,"context_line":"    on how to enable notifications and details about the notifications added,"},{"line_number":7,"context_line":"    see the developer documentation."}],"source_content_type":"text/x-yaml","patch_set":28,"id":"9a89bdaa_f9b16090","line":6,"updated":"2016-09-13 02:19:51.000000000","message":"s/notifications added/available notifications/","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"dc67c0f7419ea63333fb37fc030485b2871283b4","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - Notifications for when changes in a node power state are detected during"},{"line_number":4,"context_line":"    the periodic sync, for when the sync fails, and for when ironic sets a node"},{"line_number":5,"context_line":"    power state will now be emitted if notifications are enabled. For details"},{"line_number":6,"context_line":"    on how to enable notifications and details about the notifications added,"},{"line_number":7,"context_line":"    see the developer documentation."}],"source_content_type":"text/x-yaml","patch_set":28,"id":"7a8ec9b2_81bd11da","line":6,"in_reply_to":"9a89bdaa_f9b16090","updated":"2016-09-16 23:04:08.000000000","message":"Done","commit_id":"3c5242af1a694157a97825ab5821854e186ea85d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e18dd3535f166ae87c2b3ca034416189a3b2a97f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Notifications for when changes in a node power state are detected during"},{"line_number":4,"context_line":"    the periodic sync, for when the sync fails, and for when ironic sets a node"},{"line_number":5,"context_line":"    power state will now be emitted if notifications are enabled. For details"},{"line_number":6,"context_line":"    on how to enable notifications and details about the available"}],"source_content_type":"text/x-yaml","patch_set":33,"id":"5a8bc5a2_9ce37c33","line":3,"updated":"2016-09-27 21:17:30.000000000","message":"s/Notifications/Adds notifications/\n\nThis should be reworded, but I don\u0027t have time to think of it now. Something like\nAdds notifications for:\n* power set\n* power sync\nThese are emitted if notifications are enabled. For details...","commit_id":"9542d0475007d1fd5ff138b87b7141b08c52141e"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"91d0e458e95ebcf7a166d75d0714da396d665aac","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Notifications for when changes in a node power state are detected during"},{"line_number":4,"context_line":"    the periodic sync, for when the sync fails, and for when ironic sets a node"},{"line_number":5,"context_line":"    power state will now be emitted if notifications are enabled. For details"},{"line_number":6,"context_line":"    on how to enable notifications and details about the available"}],"source_content_type":"text/x-yaml","patch_set":33,"id":"3a98d1f4_0ca9b5df","line":3,"in_reply_to":"5a8bc5a2_9ce37c33","updated":"2016-09-29 15:47:10.000000000","message":"Done, let me know what you think","commit_id":"9542d0475007d1fd5ff138b87b7141b08c52141e"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"6fdd14888504f1f53f69300c7e93b330683d7520","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"    - Added notifications for:"},{"line_number":4,"context_line":"      * when ironic attempts to set the power state on the node (notifications"},{"line_number":5,"context_line":"        with event type \"baremetal.node.power_set.{start, end, error})"},{"line_number":6,"context_line":"      * when ironic detects the power state on baremetal hardware has changed"}],"source_content_type":"text/x-yaml","patch_set":34,"id":"3a98d1f4_c7acf4a2","line":3,"updated":"2016-09-29 21:55:01.000000000","message":"s/Added/Adds/\n\nJim wants us to use present tense","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d7929f25e07c42eded36c0a48a41b2fec3768144","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"    - Added notifications for:"},{"line_number":4,"context_line":"      * when ironic attempts to set the power state on the node (notifications"},{"line_number":5,"context_line":"        with event type \"baremetal.node.power_set.{start, end, error})"},{"line_number":6,"context_line":"      * when ironic detects the power state on baremetal hardware has changed"}],"source_content_type":"text/x-yaml","patch_set":34,"id":"3a98d1f4_4f4a84ad","line":3,"in_reply_to":"3a98d1f4_c7acf4a2","updated":"2016-09-30 18:53:54.000000000","message":"Done","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"6fdd14888504f1f53f69300c7e93b330683d7520","unresolved":false,"context_lines":[{"line_number":7,"context_line":"        and updates the node in the database appropriately (notifications with"},{"line_number":8,"context_line":"        event type \"baremetal.node.power_state_corrected.success\")"},{"line_number":9,"context_line":"      This are emitted if notifications are enabled. For more details, see the"},{"line_number":10,"context_line":"      developer documentation."}],"source_content_type":"text/x-yaml","patch_set":34,"id":"3a98d1f4_27c75846","line":10,"updated":"2016-09-29 21:55:01.000000000","message":"There might be some formatting error here; gate-ironic-releasenotes failed.","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d7929f25e07c42eded36c0a48a41b2fec3768144","unresolved":false,"context_lines":[{"line_number":7,"context_line":"        and updates the node in the database appropriately (notifications with"},{"line_number":8,"context_line":"        event type \"baremetal.node.power_state_corrected.success\")"},{"line_number":9,"context_line":"      This are emitted if notifications are enabled. For more details, see the"},{"line_number":10,"context_line":"      developer documentation."}],"source_content_type":"text/x-yaml","patch_set":34,"id":"3a98d1f4_6fbca0dc","line":10,"in_reply_to":"3a98d1f4_27c75846","updated":"2016-09-30 18:53:54.000000000","message":"I\u0027m really not sure what\u0027s wrong here. It says that I can\u0027t put a space after *, but there are other release notes that do this.","commit_id":"fa734592c55e9d19cabf644b8a6a76706517f3a1"}]}
