)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8e1f8d95d383d1c4a18af28567bff255713f9f79","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"_get_power_status was checking if the node name was in"},{"line_number":10,"context_line":"the list of returned running node names. But it was"},{"line_number":11,"context_line":"matching baremetal_1 against baremetal_11 return an"},{"line_number":12,"context_line":"incorrect status."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"The list of running nodes is quoted with \" so quoting the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3a961159_c7075d1d","line":11,"updated":"2015-01-19 16:32:43.000000000","message":"nit: you mean something like \u0027and returning an...\u0027","commit_id":"c61ca6f94eb18a29f09237fce9841f7182f1edfa"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8e1f8d95d383d1c4a18af28567bff255713f9f79","unresolved":false,"context_lines":[{"line_number":12,"context_line":"incorrect status."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"The list of running nodes is quoted with \" so quoting the"},{"line_number":15,"context_line":"node name and doing an exact match against the running list."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Closes-bug: #1397834"},{"line_number":18,"context_line":"Change-Id: I2a6d32a212a7a6bbc9c2c788d989386a38173c28"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3a961159_c23cabc3","line":15,"updated":"2015-01-19 16:32:43.000000000","message":"I would like this to be clearer. The list isn\u0027t quoted, it is more like \u0027The list of running nodes contains node names quoted with \" (double quote). The code is changed to check the quoted node name against this list.\u0027\n\nI noticed that the code isn\u0027t doing an exact match ;)","commit_id":"c61ca6f94eb18a29f09237fce9841f7182f1edfa"}],"ironic/drivers/modules/ssh.py":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"de08be699a0db8f95e4e1625cde16b2983f27693","unresolved":false,"context_lines":[{"line_number":352,"context_line":""},{"line_number":353,"context_line":"        # Command should return a list of running vms. If the current node is"},{"line_number":354,"context_line":"        # not listed then we can assume it is not powered on."},{"line_number":355,"context_line":"        q_node_name \u003d \u0027\"%s\"\u0027 % node_name"},{"line_number":356,"context_line":"        for node in running_list:"},{"line_number":357,"context_line":"            if not node:"},{"line_number":358,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_1b95753f","line":355,"updated":"2015-01-16 13:54:36.000000000","message":"Maybe better to use more meaningful variable name, like quoted_node_name?","commit_id":"e61107d01fd2e91003edeeac4a730729c6caec57"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"642aa3d6cc80e17c059ea42837abd6ce0ceb58f1","unresolved":false,"context_lines":[{"line_number":352,"context_line":""},{"line_number":353,"context_line":"        # Command should return a list of running vms. If the current node is"},{"line_number":354,"context_line":"        # not listed then we can assume it is not powered on."},{"line_number":355,"context_line":"        q_node_name \u003d \u0027\"%s\"\u0027 % node_name"},{"line_number":356,"context_line":"        for node in running_list:"},{"line_number":357,"context_line":"            if not node:"},{"line_number":358,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_a326f7c8","line":355,"in_reply_to":"3a961159_1b95753f","updated":"2015-01-16 15:39:17.000000000","message":"Also, virsh doesn\u0027t seem to add quotes to names.","commit_id":"e61107d01fd2e91003edeeac4a730729c6caec57"},{"author":{"_account_id":6969,"name":"Michael Kerrin","email":"michael.kerrin@hpe.com","username":"mkerrin"},"change_message_id":"f5dd6812a3151c9463ea671efdfd98d716549e1c","unresolved":false,"context_lines":[{"line_number":352,"context_line":""},{"line_number":353,"context_line":"        # Command should return a list of running vms. If the current node is"},{"line_number":354,"context_line":"        # not listed then we can assume it is not powered on."},{"line_number":355,"context_line":"        q_node_name \u003d \u0027\"%s\"\u0027 % node_name"},{"line_number":356,"context_line":"        for node in running_list:"},{"line_number":357,"context_line":"            if not node:"},{"line_number":358,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_b7e9cd1b","line":355,"in_reply_to":"3a961159_1b95753f","updated":"2015-01-16 17:36:32.000000000","message":"Done","commit_id":"e61107d01fd2e91003edeeac4a730729c6caec57"},{"author":{"_account_id":6969,"name":"Michael Kerrin","email":"michael.kerrin@hpe.com","username":"mkerrin"},"change_message_id":"f5dd6812a3151c9463ea671efdfd98d716549e1c","unresolved":false,"context_lines":[{"line_number":352,"context_line":""},{"line_number":353,"context_line":"        # Command should return a list of running vms. If the current node is"},{"line_number":354,"context_line":"        # not listed then we can assume it is not powered on."},{"line_number":355,"context_line":"        q_node_name \u003d \u0027\"%s\"\u0027 % node_name"},{"line_number":356,"context_line":"        for node in running_list:"},{"line_number":357,"context_line":"            if not node:"},{"line_number":358,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_1891f199","line":355,"in_reply_to":"3a961159_a326f7c8","updated":"2015-01-16 17:36:32.000000000","message":"virsh doesn\u0027t but the list_running command that we run does via some awk magic. This is a bit of a mess because tripleo can break if change the awk to not do this.\n\nThe vmware list_running command also adds quotes. I don\u0027t know if the other virt_type do or not","commit_id":"e61107d01fd2e91003edeeac4a730729c6caec57"},{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"729df88ba06ce0636533b8bdac4c58996e686450","unresolved":false,"context_lines":[{"line_number":356,"context_line":"        for node in running_list:"},{"line_number":357,"context_line":"            if not node:"},{"line_number":358,"context_line":"                continue"},{"line_number":359,"context_line":"            if q_node_name \u003d\u003d node:"},{"line_number":360,"context_line":"                power_state \u003d states.POWER_ON"},{"line_number":361,"context_line":"                break"},{"line_number":362,"context_line":"        if not power_state:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_4592974b","line":359,"updated":"2015-01-19 06:08:03.000000000","message":"I think this line should be remain. please see the above experimentation.\n\u003e\u003e\u003e node_name \u003d \"baremetalnode_1\"\n\u003e\u003e\u003e node \u003d \"baremetalnode_11\"\n\u003e\u003e\u003e if node_name in node:\n...     print \"yes\"\n... else:\n...     print \"no\"\n...\nyes\n\u003e\u003e\u003e if node_name \u003d\u003d node:\n...     print \"yes\"\n... else:\n...     print \"no\"\n...\nno\n\u003e\u003e\u003e","commit_id":"e61107d01fd2e91003edeeac4a730729c6caec57"},{"author":{"_account_id":6969,"name":"Michael Kerrin","email":"michael.kerrin@hpe.com","username":"mkerrin"},"change_message_id":"a04bb5b933a13fcfd9c63f67e673c752daccb809","unresolved":false,"context_lines":[{"line_number":356,"context_line":"        for node in running_list:"},{"line_number":357,"context_line":"            if not node:"},{"line_number":358,"context_line":"                continue"},{"line_number":359,"context_line":"            if q_node_name \u003d\u003d node:"},{"line_number":360,"context_line":"                power_state \u003d states.POWER_ON"},{"line_number":361,"context_line":"                break"},{"line_number":362,"context_line":"        if not power_state:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_76b3c708","line":359,"in_reply_to":"3a961159_4592974b","updated":"2015-01-19 09:18:49.000000000","message":"Yuiko your experiment is wrong is should if you set node_name to \u0027baremeatl_1\"\u0027 and node to \u0027\"baremetal_11\"\u0027 (noticed the extra single quote) then this is what I have done. And you should get no, no\n\nI have to keep the \"in\" because the unit tests in test__get_power_status_on have to work with the list_running command returning the following output:\n\u0027\"NodeName\" {b43c4982-110c-4c29-9325-d5f41b053513}\u0027 I don\u0027t know what command generates this output but there you go.","commit_id":"e61107d01fd2e91003edeeac4a730729c6caec57"},{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"326bb21d104e8149f0faa78012b32ef95d3e6dfb","unresolved":false,"context_lines":[{"line_number":356,"context_line":"        for node in running_list:"},{"line_number":357,"context_line":"            if not node:"},{"line_number":358,"context_line":"                continue"},{"line_number":359,"context_line":"            if q_node_name \u003d\u003d node:"},{"line_number":360,"context_line":"                power_state \u003d states.POWER_ON"},{"line_number":361,"context_line":"                break"},{"line_number":362,"context_line":"        if not power_state:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_9419ef89","line":359,"in_reply_to":"3a961159_76b3c708","updated":"2015-01-20 03:44:12.000000000","message":"Michael, thank you for your reply and I\u0027ve got it.","commit_id":"e61107d01fd2e91003edeeac4a730729c6caec57"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8e1f8d95d383d1c4a18af28567bff255713f9f79","unresolved":false,"context_lines":[{"line_number":356,"context_line":"        for node in running_list:"},{"line_number":357,"context_line":"            if not node:"},{"line_number":358,"context_line":"                continue"},{"line_number":359,"context_line":"            if quoted_node_name in node:"},{"line_number":360,"context_line":"                power_state \u003d states.POWER_ON"},{"line_number":361,"context_line":"                break"},{"line_number":362,"context_line":"        if not power_state:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_22b2cf49","line":359,"updated":"2015-01-19 16:32:43.000000000","message":"It might be worth putting a comment here that a node could have the format (as you mentioned) so people don\u0027t wonder why it is \u0027in\u0027 instead of \u0027\u003d\u003d\u0027.\n\nI looked, and that is the format returned by vbox (VBoxManage\u0027s \"list runningvms\" command), so might be worth mentioning that it is vbox in case people wonder about that too :-)","commit_id":"c61ca6f94eb18a29f09237fce9841f7182f1edfa"}],"ironic/tests/drivers/test_ssh.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"54034a6b92b03354daeaf790f9d0199559fa93b5","unresolved":false,"context_lines":[{"line_number":302,"context_line":"    def test__get_power_status_correct_node(self, get_hosts_name_mock,"},{"line_number":303,"context_line":"                                            exec_ssh_mock):"},{"line_number":304,"context_line":"        # Bug: #1397834 test that get_power_status return status of"},{"line_number":305,"context_line":"        # baremeta_1 (off) and not baremetal_11 (on)"},{"line_number":306,"context_line":"        info \u003d ssh._parse_driver_info(self.node)"},{"line_number":307,"context_line":"        exec_ssh_mock.return_value \u003d (\u0027\"baremetal_11\"\\n\"seed\"\\n\u0027, \u0027\u0027)"},{"line_number":308,"context_line":"        get_hosts_name_mock.return_value \u003d \"baremetal_1\""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_c5e3b232","line":305,"updated":"2015-01-20 14:52:02.000000000","message":"nit: s/baremeta_1/baremetal_1/ (if you do another patch)","commit_id":"b19b7b7230792809a5b34b079ad4feaeb25e08b1"}]}
