)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"2f8d29a8090dac530549ef64684822e440ad56ac","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add explanatory comments for each of the required commands and"},{"line_number":10,"context_line":"relax the unusual restriction on the list_running output."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I55a259f8687627a4ebd2d8bb941eb5b1041045c7"},{"line_number":13,"context_line":"Closes-Bug: #1496867"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ba15a1d1_38dc2c45","line":11,"updated":"2015-09-18 02:34:43.000000000","message":"To some extent, there are two different changes in this patch. (So you could break this into two patches but personally, I\u0027m fine with it as is.) For me, the most important one is the code change, because that changes the behaviour (and fixes a bug I believe).\n\nI\u0027d rather that the main line be something like \u0027Handle unquoted node names from virt types\u0027 with the body, eg: (I\u0027m winging it here)\n\nNot all virt types return node names in quotations when requesting a list of running VMs. This patch handles the case where the returned values are simply the node names (unquoted).\n\nAlso, comments were added to clarify each of the required commands.","commit_id":"9316fde7a59959a26c21694761a72b1c4e4b2249"}],"ironic/drivers/modules/ssh.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"2f8d29a8090dac530549ef64684822e440ad56ac","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    # Required commands are as follows:"},{"line_number":114,"context_line":"    #"},{"line_number":115,"context_line":"    # base_cmd: Used by most sub-commands as the primary executable"},{"line_number":116,"context_line":"    # list_all: Lists all VMs (by virt_type identifier) can be managed."},{"line_number":117,"context_line":"    #     One name per line, must not be quoted."},{"line_number":118,"context_line":"    # list_running: Lists all running VMs (by virt_type identifier)."},{"line_number":119,"context_line":"    #     One name per line, can be quoted."}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_983d3891","line":116,"updated":"2015-09-18 02:34:43.000000000","message":"s/can/that can/ ?","commit_id":"9316fde7a59959a26c21694761a72b1c4e4b2249"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"2f8d29a8090dac530549ef64684822e440ad56ac","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    # list_running: Lists all running VMs (by virt_type identifier)."},{"line_number":119,"context_line":"    #     One name per line, can be quoted."},{"line_number":120,"context_line":"    # start_cmd / stop_cmd: Starts or stops the identified VM"},{"line_number":121,"context_line":"    # get_node_macs: Retreives all MACs for an identified VM."},{"line_number":122,"context_line":"    #     One MAC per line, any standard format (see _normalize_mac)"},{"line_number":123,"context_line":"    # get_boot_device / set_boot_device: Gets or sets the primary boot device"},{"line_number":124,"context_line":"    if virt_type \u003d\u003d \u0027vbox\u0027:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_184a8826","line":121,"updated":"2015-09-18 02:34:43.000000000","message":"s/Retreives/Retrieves/","commit_id":"9316fde7a59959a26c21694761a72b1c4e4b2249"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"2f8d29a8090dac530549ef64684822e440ad56ac","unresolved":false,"context_lines":[{"line_number":379,"context_line":"        for node in running_list:"},{"line_number":380,"context_line":"            if not node:"},{"line_number":381,"context_line":"                continue"},{"line_number":382,"context_line":"            # \u0027node\u0027 here is an formatted output from the virt cli\u0027s. The"},{"line_number":383,"context_line":"            # node name can be quoted, and can contain other information, e.g."},{"line_number":384,"context_line":"            # vbox returns \u0027\"NodeName\" {b43c4982-110c-4c29-9325-d5f41b053513}\u0027"},{"line_number":385,"context_line":"            if (quoted_node_name in node) or (node_name \u003d\u003d node):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_587ec06a","line":382,"updated":"2015-09-18 02:34:43.000000000","message":"while you\u0027re at it, s/an/a/","commit_id":"9316fde7a59959a26c21694761a72b1c4e4b2249"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"2f8d29a8090dac530549ef64684822e440ad56ac","unresolved":false,"context_lines":[{"line_number":380,"context_line":"            if not node:"},{"line_number":381,"context_line":"                continue"},{"line_number":382,"context_line":"            # \u0027node\u0027 here is an formatted output from the virt cli\u0027s. The"},{"line_number":383,"context_line":"            # node name can be quoted, and can contain other information, e.g."},{"line_number":384,"context_line":"            # vbox returns \u0027\"NodeName\" {b43c4982-110c-4c29-9325-d5f41b053513}\u0027"},{"line_number":385,"context_line":"            if (quoted_node_name in node) or (node_name \u003d\u003d node):"},{"line_number":386,"context_line":"                power_state \u003d states.POWER_ON"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_58f560ea","line":383,"updated":"2015-09-18 02:34:43.000000000","message":"Based on your code change, it seems more like\n\n\u0027node\u0027 may be 1. the node name, or 2. it may consist of a quoted node name along with other information (e.g., vbox returns...)","commit_id":"9316fde7a59959a26c21694761a72b1c4e4b2249"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"fd3bc552e63f2f286e834b782dc673a31a696f22","unresolved":false,"context_lines":[{"line_number":111,"context_line":""},{"line_number":112,"context_line":"def _get_command_sets(virt_type):"},{"line_number":113,"context_line":"    # Required commands are as follows:"},{"line_number":114,"context_line":"    #"},{"line_number":115,"context_line":"    # base_cmd: Used by most sub-commands as the primary executable"},{"line_number":116,"context_line":"    # list_all: Lists all VMs (by virt_type identifier) that can be managed."},{"line_number":117,"context_line":"    #     One name per line, must not be quoted."}],"source_content_type":"text/x-python","patch_set":2,"id":"ba15a1d1_7bfb7747","line":114,"updated":"2015-09-18 08:59:39.000000000","message":"it would be nice to format this as docstring","commit_id":"6c2f681f020cbeddda7f44c06eda9f6896c9fa34"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"22080ad0dcbb3357ae32dbd8d2e0be0b5ee0b6d3","unresolved":false,"context_lines":[{"line_number":382,"context_line":"            # \u0027node\u0027 here is an formatted output from the virt cli\u0027s. The"},{"line_number":383,"context_line":"            # node name is either an exact match or quoted (optionally with"},{"line_number":384,"context_line":"            # other information, e.g. vbox returns \u0027\"NodeName\" {\u003cuuid\u003e}\u0027)"},{"line_number":385,"context_line":"            if (quoted_node_name in node) or (node_name \u003d\u003d node):"},{"line_number":386,"context_line":"                power_state \u003d states.POWER_ON"},{"line_number":387,"context_line":"                break"},{"line_number":388,"context_line":"        if not power_state:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba15a1d1_3d05ec0f","line":385,"updated":"2015-09-18 13:09:07.000000000","message":"If there is a case when node name is not quoted, why not just do\n\n if node_name in node:\n     ...\n\nAlso would be nice to add a unittest for it.","commit_id":"6c2f681f020cbeddda7f44c06eda9f6896c9fa34"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"7a88691430efea71ec0307b319202d5c299b082a","unresolved":false,"context_lines":[{"line_number":382,"context_line":"            # \u0027node\u0027 here is an formatted output from the virt cli\u0027s. The"},{"line_number":383,"context_line":"            # node name is either an exact match or quoted (optionally with"},{"line_number":384,"context_line":"            # other information, e.g. vbox returns \u0027\"NodeName\" {\u003cuuid\u003e}\u0027)"},{"line_number":385,"context_line":"            if (quoted_node_name in node) or (node_name \u003d\u003d node):"},{"line_number":386,"context_line":"                power_state \u003d states.POWER_ON"},{"line_number":387,"context_line":"                break"},{"line_number":388,"context_line":"        if not power_state:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba15a1d1_131ed06f","line":385,"in_reply_to":"ba15a1d1_13a7b0bd","updated":"2015-09-18 16:34:36.000000000","message":"This would fail on \"Windows 8\" vs \"Windows 8 (clone)\" or similar; I really think we either must have an exact match or the name must be quoted","commit_id":"6c2f681f020cbeddda7f44c06eda9f6896c9fa34"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"a2d8d17a7595ba812c0e4a36fd4c6c728c33a8fb","unresolved":false,"context_lines":[{"line_number":382,"context_line":"            # \u0027node\u0027 here is an formatted output from the virt cli\u0027s. The"},{"line_number":383,"context_line":"            # node name is either an exact match or quoted (optionally with"},{"line_number":384,"context_line":"            # other information, e.g. vbox returns \u0027\"NodeName\" {\u003cuuid\u003e}\u0027)"},{"line_number":385,"context_line":"            if (quoted_node_name in node) or (node_name \u003d\u003d node):"},{"line_number":386,"context_line":"                power_state \u003d states.POWER_ON"},{"line_number":387,"context_line":"                break"},{"line_number":388,"context_line":"        if not power_state:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba15a1d1_5d4d40c2","line":385,"in_reply_to":"ba15a1d1_3d05ec0f","updated":"2015-09-18 14:36:30.000000000","message":"If node names are not unique (i.e. are the _actual_ names) they might be \"VM1\" and \"VM12\" or some other substring.  Unquoted node names can only be used when there is an exact match.","commit_id":"6c2f681f020cbeddda7f44c06eda9f6896c9fa34"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"c6edb3c2bedced0012c63413095067b737b44160","unresolved":false,"context_lines":[{"line_number":382,"context_line":"            # \u0027node\u0027 here is an formatted output from the virt cli\u0027s. The"},{"line_number":383,"context_line":"            # node name is either an exact match or quoted (optionally with"},{"line_number":384,"context_line":"            # other information, e.g. vbox returns \u0027\"NodeName\" {\u003cuuid\u003e}\u0027)"},{"line_number":385,"context_line":"            if (quoted_node_name in node) or (node_name \u003d\u003d node):"},{"line_number":386,"context_line":"                power_state \u003d states.POWER_ON"},{"line_number":387,"context_line":"                break"},{"line_number":388,"context_line":"        if not power_state:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba15a1d1_13a7b0bd","line":385,"in_reply_to":"ba15a1d1_5d4d40c2","updated":"2015-09-18 16:10:21.000000000","message":"Oh indeed :) Suggestion - to use re.search in case of some other virt_types add some other stuff to string (maybe enclose node name in parenthesis):\n\n r \u003d r\u0027\\b%s\\b\u0027 % node_name  # Whole word only match\n ...\n if re.search(r, node):\n     ...","commit_id":"6c2f681f020cbeddda7f44c06eda9f6896c9fa34"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"6d5816b33c11dff8fe9427a49306a4cf4565976b","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"def _get_command_sets(virt_type):"},{"line_number":113,"context_line":"    # Required commands are as follows:"},{"line_number":114,"context_line":"    #"},{"line_number":115,"context_line":"    # base_cmd: Used by most sub-commands as the primary executable"},{"line_number":116,"context_line":"    # list_all: Lists all VMs (by virt_type identifier) that can be managed."}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_e56033a7","line":113,"updated":"2015-09-18 16:40:46.000000000","message":"Seems like this should be a docstring.","commit_id":"b8af2af50656b6e85b2ecb72968b29f4ac69668d"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"6d5816b33c11dff8fe9427a49306a4cf4565976b","unresolved":false,"context_lines":[{"line_number":379,"context_line":"        for node in running_list:"},{"line_number":380,"context_line":"            if not node:"},{"line_number":381,"context_line":"                continue"},{"line_number":382,"context_line":"            # \u0027node\u0027 here is an formatted output from the virt cli\u0027s. The"},{"line_number":383,"context_line":"            # node name is either an exact match or quoted (optionally with"},{"line_number":384,"context_line":"            # other information, e.g. vbox returns \u0027\"NodeName\" {\u003cuuid\u003e}\u0027)"},{"line_number":385,"context_line":"            if (quoted_node_name in node) or (node_name \u003d\u003d node):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_e507d3c7","line":382,"updated":"2015-09-18 16:40:46.000000000","message":"nit: s/an formatted/a formatted/\n\nMaybe while in here this could be fixed :)","commit_id":"b8af2af50656b6e85b2ecb72968b29f4ac69668d"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"1311c30dbe3f9467e80a4449e47390dbf03ffc90","unresolved":false,"context_lines":[{"line_number":379,"context_line":"        for node in running_list:"},{"line_number":380,"context_line":"            if not node:"},{"line_number":381,"context_line":"                continue"},{"line_number":382,"context_line":"            # \u0027node\u0027 here is an formatted output from the virt cli\u0027s. The"},{"line_number":383,"context_line":"            # node name is either an exact match or quoted (optionally with"},{"line_number":384,"context_line":"            # other information, e.g. vbox returns \u0027\"NodeName\" {\u003cuuid\u003e}\u0027)"},{"line_number":385,"context_line":"            if (quoted_node_name in node) or (node_name \u003d\u003d node):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_d9f07669","line":382,"in_reply_to":"ba15a1d1_e507d3c7","updated":"2015-09-18 18:13:34.000000000","message":"Done","commit_id":"b8af2af50656b6e85b2ecb72968b29f4ac69668d"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3e6630c744021eae323d3632fb51d5b2117facd3","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"def _get_command_sets(virt_type):"},{"line_number":113,"context_line":"    \"\"\""},{"line_number":114,"context_line":"    Retrieves the virt_type-specific commands to control power"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    Required commands are as follows:"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_81912055","line":113,"updated":"2015-09-18 21:40:24.000000000","message":"I think the line below needs to be here.\n\n \"\"\"Title line of docstring without a period\n \u003ca blank line\u003e\n docstring stuff\n end of docstring\n \"\"\"","commit_id":"9e3d85d3289f910588409b9f06cc55bfa6db8cf6"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"68dc352cccad9a5b756a3939ad4b6172d1bd9d9b","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"def _get_command_sets(virt_type):"},{"line_number":113,"context_line":"    \"\"\" Retrieves the virt_type-specific commands to control power"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    Required commands are as follows:"},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba15a1d1_0511835d","line":113,"updated":"2015-09-21 08:12:48.000000000","message":"Super nit but this is going to fail pep8 with a \"docstring should not start with a space\" error","commit_id":"7fdf3627842dea4cb49f761d02139102d467a83f"}],"ironic/tests/drivers/test_ssh.py":[{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"6d5816b33c11dff8fe9427a49306a4cf4565976b","unresolved":false,"context_lines":[{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    @mock.patch.object(processutils, \u0027ssh_execute\u0027, autospec\u003dTrue)"},{"line_number":242,"context_line":"    @mock.patch.object(ssh, \u0027_get_hosts_name_for_node\u0027, autospec\u003dTrue)"},{"line_number":243,"context_line":"    def test__get_power_status_on_unquoted(self, get_hosts_name_mock,"},{"line_number":244,"context_line":"                                           exec_ssh_mock):"},{"line_number":245,"context_line":"        info \u003d ssh._parse_driver_info(self.node)"},{"line_number":246,"context_line":"        exec_ssh_mock.return_value \u003d ("}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_45df9fd5","line":243,"updated":"2015-09-18 16:40:46.000000000","message":"I\u0027m probably in the minority, but I would prefer a test that called the tested function directly.  In particular the \u0027_get_command_sets\u0027 function.\n\nI realize that isn\u0027t how it was done and we are testing that function by calling another function which calls the function we are actually trying to test.","commit_id":"b8af2af50656b6e85b2ecb72968b29f4ac69668d"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"46d75aca8b73088e4b4af0b232c8d1cbce2f605b","unresolved":false,"context_lines":[{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    @mock.patch.object(processutils, \u0027ssh_execute\u0027, autospec\u003dTrue)"},{"line_number":242,"context_line":"    @mock.patch.object(ssh, \u0027_get_hosts_name_for_node\u0027, autospec\u003dTrue)"},{"line_number":243,"context_line":"    def test__get_power_status_on_unquoted(self, get_hosts_name_mock,"},{"line_number":244,"context_line":"                                           exec_ssh_mock):"},{"line_number":245,"context_line":"        info \u003d ssh._parse_driver_info(self.node)"},{"line_number":246,"context_line":"        exec_ssh_mock.return_value \u003d ("}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_5e70cc0a","line":243,"in_reply_to":"ba15a1d1_45df9fd5","updated":"2015-09-18 17:49:35.000000000","message":"Looks like the test is calling ssh._get_power_status directly, which is the modified function here?","commit_id":"b8af2af50656b6e85b2ecb72968b29f4ac69668d"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"8a4f3ad32cedae9f7f38873cd4fd2d2409426ec5","unresolved":false,"context_lines":[{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    @mock.patch.object(processutils, \u0027ssh_execute\u0027, autospec\u003dTrue)"},{"line_number":242,"context_line":"    @mock.patch.object(ssh, \u0027_get_hosts_name_for_node\u0027, autospec\u003dTrue)"},{"line_number":243,"context_line":"    def test__get_power_status_on_unquoted(self, get_hosts_name_mock,"},{"line_number":244,"context_line":"                                           exec_ssh_mock):"},{"line_number":245,"context_line":"        info \u003d ssh._parse_driver_info(self.node)"},{"line_number":246,"context_line":"        exec_ssh_mock.return_value \u003d ("}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_f9945a37","line":243,"in_reply_to":"ba15a1d1_5e70cc0a","updated":"2015-09-18 18:06:11.000000000","message":"Never mind. I was not seeing the \u0027skipped\u0027 part of the diff. Ignore what I said please :)","commit_id":"b8af2af50656b6e85b2ecb72968b29f4ac69668d"}]}
