)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":20522,"name":"Aline Bousquet","email":"albousque@gmail.com","username":"alineb"},"change_message_id":"745c1f347fb7360c3ea8d8425d63791d75bc9640","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add multi nodes support for \"baremetal delete\" command"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently the command \"baremetal delete\" can only support a single node."},{"line_number":10,"context_line":"This patch tried to improve it to handle more than one servers."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Idbf94038d0bda6cbc2c76fac80ce967dfd4fb809"},{"line_number":13,"context_line":"Implenents: blueprint improve-baremetal-unittest"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"9a061dce_0199d71f","line":10,"range":{"start_line":10,"start_character":55,"end_line":10,"end_character":62},"updated":"2016-04-08 15:29:38.000000000","message":"s/servers/server","commit_id":"51e61603221e55d9ebad247220d8f36fa419a7f2"},{"author":{"_account_id":20522,"name":"Aline Bousquet","email":"albousque@gmail.com","username":"alineb"},"change_message_id":"745c1f347fb7360c3ea8d8425d63791d75bc9640","unresolved":false,"context_lines":[{"line_number":10,"context_line":"This patch tried to improve it to handle more than one servers."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Idbf94038d0bda6cbc2c76fac80ce967dfd4fb809"},{"line_number":13,"context_line":"Implenents: blueprint improve-baremetal-unittest"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"9a061dce_21621b17","line":13,"range":{"start_line":13,"start_character":0,"end_line":13,"end_character":10},"updated":"2016-04-08 15:29:38.000000000","message":"s/Implenents/Implements","commit_id":"51e61603221e55d9ebad247220d8f36fa419a7f2"}],"ironicclient/osc/v1/baremetal.py":[{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"58478dd81636826c637b9a5b54eec7c616da4b09","unresolved":false,"context_lines":[{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        baremetal_client \u003d self.app.client_manager.baremetal"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        for node in parsed_args.node:"},{"line_number":119,"context_line":"            baremetal_client.node.delete(oscutils.find_resource("},{"line_number":120,"context_line":"                                         baremetal_client.node,"},{"line_number":121,"context_line":"                                         node).uuid)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"class ListBaremetal(lister.Lister):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a061dce_62895a26","line":121,"range":{"start_line":118,"start_character":3,"end_line":121,"end_character":52},"updated":"2016-04-06 06:13:09.000000000","message":"IMO, a try-catch block is required here to handle the error cases, such as one of node deleting failed, based on current logic, will break the rest of portgroup deletion.","commit_id":"0dd28dc233028122c75f3a78ff044d8ed7a44ae3"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"df9f8b5c6c0314985e6ec758313dd88c0fef7b3e","unresolved":false,"context_lines":[{"line_number":121,"context_line":"                baremetal_client.node.delete(oscutils.find_resource("},{"line_number":122,"context_line":"                                             baremetal_client.node,"},{"line_number":123,"context_line":"                                             node).uuid)"},{"line_number":124,"context_line":"            except Exception as e:"},{"line_number":125,"context_line":"                self.log.debug(\"Delete baremetal %s failed: %s\" % (node, e))"},{"line_number":126,"context_line":"                failures.append(\"Failed to delete node %(node)s: %(error)s\""},{"line_number":127,"context_line":"                                % {\u0027node\u0027: node, \u0027error\u0027: e})"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a1b2928_b10327b8","line":124,"range":{"start_line":124,"start_character":12,"end_line":124,"end_character":34},"updated":"2016-04-11 08:01:25.000000000","message":"Not sure if it will not raise exception, and just return http code such as 4xx, so should we check the http response code also?","commit_id":"83f01b8a7977fc97cfa80bd755d4998d10dfcf06"}],"ironicclient/tests/unit/osc/v1/test_baremetal.py":[{"author":{"_account_id":20522,"name":"Aline Bousquet","email":"albousque@gmail.com","username":"alineb"},"change_message_id":"0b9bebf80ca4894a9f314ae8db675a4611f228e2","unresolved":false,"context_lines":[{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        self.cmd.take_action(parsed_args)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        self.assertEqual(2, self.baremetal_mock.node.delete.call_count)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"class TestBaremetalList(TestBaremetal):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_e1bf55f9","line":201,"range":{"start_line":201,"start_character":8,"end_line":201,"end_character":71},"updated":"2016-04-05 12:33:03.000000000","message":"Maybe you could also check that the deleted nodes are the right ones (similar to the test_baremetal_delete function)? What do you think?","commit_id":"432fe7fdfab546774532a3a1f9154a29e21c76a5"},{"author":{"_account_id":16066,"name":"xiexs","email":"xiexs@cn.fujitsu.com","username":"simen"},"change_message_id":"a396f18406d79218785a16e9f80a615084d25390","unresolved":false,"context_lines":[{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        self.cmd.take_action(parsed_args)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        self.assertEqual(2, self.baremetal_mock.node.delete.call_count)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"class TestBaremetalList(TestBaremetal):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_82246eaf","line":201,"range":{"start_line":201,"start_character":8,"end_line":201,"end_character":71},"in_reply_to":"9a061dce_9a77d739","updated":"2016-04-06 05:58:28.000000000","message":"No, there is a difference between them about the mocked nodes/baremetals.\n\nThe mocked nodes needed by the do_node_delete() is passed with his parameter \u0027args\u0027, so that we can generate two different mocked nodes in the test_do_node_delete_multiple() and pass them into do_node_delete().\nFor this case, the mocked baremetals will be indirectly got by the find_resource(). But unfortunately, as the self.baremetal_mock.node.get is not iterable, in current framework only one mocked baremetal can be got.\n\nSo, I launched a new BP to resolve this issue.\nhttps://blueprints.launchpad.net/python-ironicclient/+spec/improve-baremetal-unittest","commit_id":"432fe7fdfab546774532a3a1f9154a29e21c76a5"},{"author":{"_account_id":20522,"name":"Aline Bousquet","email":"albousque@gmail.com","username":"alineb"},"change_message_id":"5661d87e2f3a924718c17a4aa1ac66ef9c5073ef","unresolved":false,"context_lines":[{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        self.cmd.take_action(parsed_args)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        self.assertEqual(2, self.baremetal_mock.node.delete.call_count)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"class TestBaremetalList(TestBaremetal):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_9a77d739","line":201,"range":{"start_line":201,"start_character":8,"end_line":201,"end_character":71},"in_reply_to":"9a061dce_cd19a07b","updated":"2016-04-05 14:22:49.000000000","message":"Indeed, but maybe the test could be done using the assert_has_calls() function or the call_args_list attribute? Both seem to check the list of all the calls made (see test_do_node_delete_multiple() in ironicclient/tests/unit/v1/test_node_shell.py).","commit_id":"432fe7fdfab546774532a3a1f9154a29e21c76a5"},{"author":{"_account_id":16066,"name":"xiexs","email":"xiexs@cn.fujitsu.com","username":"simen"},"change_message_id":"fc48cbbabce169b7b9f07b75cb150a006665fe85","unresolved":false,"context_lines":[{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        self.cmd.take_action(parsed_args)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        self.assertEqual(2, self.baremetal_mock.node.delete.call_count)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"class TestBaremetalList(TestBaremetal):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a061dce_cd19a07b","line":201,"range":{"start_line":201,"start_character":8,"end_line":201,"end_character":71},"in_reply_to":"9a061dce_e1bf55f9","updated":"2016-04-05 13:30:38.000000000","message":"Hi, Aline,\nThanks for your review and advice.\nBut only one node would be checked, always the first node \u0027xxx-xxxxxx-xxxx\u0027, if test this case with the assert_called_with() function.","commit_id":"432fe7fdfab546774532a3a1f9154a29e21c76a5"}]}
