)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d56677d29c70e5c4ac9700aceaf8acc12e5a9b38","unresolved":false,"context_lines":[{"line_number":14,"context_line":"called from ironic\u0027s perspective as an external consumer of ironic-lib."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I91d3c7d7b8f4dd6b7652e0cac90ea562ae710636"},{"line_number":17,"context_line":"Partial-Bug: #1552843"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa6399be_a0d6baee","line":17,"updated":"2016-10-13 22:20:43.000000000","message":"Put Partial-Bug here, since I haven\u0027t yet audited the rest of the test codebase to see if we assert things internal to ironic-lib.","commit_id":"5d5a7d4cc085922755b8aecf47fc86e504f7c325"}],"ironic/tests/unit/drivers/modules/test_deploy_utils.py":[{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"c5a1a965ac62e44700d0f6da766c7686a3be421b","unresolved":false,"context_lines":[{"line_number":336,"context_line":"        return parent_mock"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"    def _test_deploy_partition_image(self,"},{"line_number":339,"context_line":"                                     boot_mode\u003dNone,"},{"line_number":340,"context_line":"                                     boot_option\u003dNone,"},{"line_number":341,"context_line":"                                     configdrive\u003dNone,"},{"line_number":342,"context_line":"                                     disk_label\u003dNone,"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_5baeb3e6","line":339,"updated":"2016-10-13 22:39:14.000000000","message":"dtantsur may not approve. But maybe:\n\n def _test_deploy_partion_image(self, **kwargs):\n\n default_values \u003d {\u0027foo\u0027: 1, \u0027spam\u0027: 2}\n not_allowed_args \u003d set(kwargs) - set(default_values)\n if not_allowed_args: Bad bad bad!\n default_values.update(kwargs)\n\nor something like that.\nAnd then if the mocks get added maybe not so big","commit_id":"5d5a7d4cc085922755b8aecf47fc86e504f7c325"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"0c9a41c1a4f2d81ad2fe2a33b5089f2964893bc1","unresolved":false,"context_lines":[{"line_number":355,"context_line":"        dev \u003d \u0027/dev/fake\u0027"},{"line_number":356,"context_line":"        root_uuid \u003d \u002712345678-1234-1234-12345678-12345678abcdef\u0027"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"        # Mocks to create for methods in deploy_utils module"},{"line_number":359,"context_line":"        utils_name_list \u003d [\u0027get_dev\u0027, \u0027discovery\u0027, \u0027login_iscsi\u0027,"},{"line_number":360,"context_line":"                           \u0027logout_iscsi\u0027, \u0027delete_iscsi\u0027]"},{"line_number":361,"context_line":"        # Mocks to create for ironic_lib.disk_utils"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_e050b234","line":358,"updated":"2016-10-13 22:29:50.000000000","message":"Personally I think this is horrific :)\n\nI\u0027d much rather have decorators on the function like we do everywhere else.\n\nOpen to counter-arguments though.","commit_id":"5d5a7d4cc085922755b8aecf47fc86e504f7c325"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"f716912ad416f0b555fc0bb25ed8d9cbe1a8b6c9","unresolved":false,"context_lines":[{"line_number":355,"context_line":"        dev \u003d \u0027/dev/fake\u0027"},{"line_number":356,"context_line":"        root_uuid \u003d \u002712345678-1234-1234-12345678-12345678abcdef\u0027"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"        # Mocks to create for methods in deploy_utils module"},{"line_number":359,"context_line":"        utils_name_list \u003d [\u0027get_dev\u0027, \u0027discovery\u0027, \u0027login_iscsi\u0027,"},{"line_number":360,"context_line":"                           \u0027logout_iscsi\u0027, \u0027delete_iscsi\u0027]"},{"line_number":361,"context_line":"        # Mocks to create for ironic_lib.disk_utils"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_9bb4cb35","line":358,"in_reply_to":"fa6399be_e050b234","updated":"2016-10-13 22:39:41.000000000","message":"+1, this is awful.\n\nLet\u0027s mock with the decorators, and do like you suggested here to avoid exploding the number of parameters:\n\nhttp://eavesdrop.openstack.org/irclogs/%23openstack-ironic/%23openstack-ironic.2016-10-13.log.html#t2016-10-13T22:30:04\n\nWill update soon with those changes","commit_id":"5d5a7d4cc085922755b8aecf47fc86e504f7c325"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"5cc565351b54b03128637f5373a01f8ee328a148","unresolved":false,"context_lines":[{"line_number":408,"context_line":""},{"line_number":409,"context_line":"        self.assertEqual(utils_calls_expected, utils_mock.mock_calls)"},{"line_number":410,"context_line":"        self.assertEqual(disk_utils_calls_expected, disk_utils_mock.mock_calls)"},{"line_number":411,"context_line":"        self.assertEqual(disk_utils_mock.work_on_disk.return_value,"},{"line_number":412,"context_line":"                         uuids_dict_returned)"},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"    def test_deploy_partition_image_without_boot_option(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_1b127b09","line":411,"updated":"2016-10-13 22:44:50.000000000","message":"-1 for this.\n\nThe expected value is a dictionary which was passed to the function. The function could have modified this dict without us knowing.","commit_id":"5d5a7d4cc085922755b8aecf47fc86e504f7c325"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"d1a307fa9811e9c49856a2ba267d1c8b3e18111c","unresolved":false,"context_lines":[{"line_number":408,"context_line":""},{"line_number":409,"context_line":"        self.assertEqual(utils_calls_expected, utils_mock.mock_calls)"},{"line_number":410,"context_line":"        self.assertEqual(disk_utils_calls_expected, disk_utils_mock.mock_calls)"},{"line_number":411,"context_line":"        self.assertEqual(disk_utils_mock.work_on_disk.return_value,"},{"line_number":412,"context_line":"                         uuids_dict_returned)"},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"    def test_deploy_partition_image_without_boot_option(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_1beb5b79","line":411,"in_reply_to":"fa6399be_1b127b09","updated":"2016-10-13 22:56:08.000000000","message":"Yeah - I\u0027ll switch it to just make sure that work_on_disk is called with the correct args.","commit_id":"5d5a7d4cc085922755b8aecf47fc86e504f7c325"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"1c00b012670dd6215c2cbe159e50a2694ff94878","unresolved":false,"context_lines":[{"line_number":371,"context_line":"            raise ValueError(\"Only the following kwargs are allowed in \""},{"line_number":372,"context_line":"                             \"_test_deploy_partition_image: %s\""},{"line_number":373,"context_line":"                             % deploy_args.keys().join(\", \"))"},{"line_number":374,"context_line":"        else:"},{"line_number":375,"context_line":"            deploy_args.update(kwargs)"},{"line_number":376,"context_line":""},{"line_number":377,"context_line":"        address \u003d \u0027127.0.0.1\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa6399be_127b1929","line":374,"updated":"2016-10-14 17:04:20.000000000","message":"nit: Don\u0027t need the else statement. If the above hits the ValueError() execution will stop\n\nSo the deploy_args.update(kwargs) can have the indent decreased.","commit_id":"c2519061f92e42ed58b7b05a7f974310e2f68a00"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"f56b6f3ee6665c1f932062266f21dfa29d2d66ef","unresolved":false,"context_lines":[{"line_number":371,"context_line":"            raise ValueError(\"Only the following kwargs are allowed in \""},{"line_number":372,"context_line":"                             \"_test_deploy_partition_image: %s\""},{"line_number":373,"context_line":"                             % deploy_args.keys().join(\", \"))"},{"line_number":374,"context_line":"        else:"},{"line_number":375,"context_line":"            deploy_args.update(kwargs)"},{"line_number":376,"context_line":""},{"line_number":377,"context_line":"        address \u003d \u0027127.0.0.1\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa6399be_7ad4bc46","line":374,"in_reply_to":"fa6399be_127b1929","updated":"2016-10-18 18:11:16.000000000","message":"Done","commit_id":"c2519061f92e42ed58b7b05a7f974310e2f68a00"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"0a35317b80d293d85cee3ddea936d5135cd955bf","unresolved":false,"context_lines":[{"line_number":378,"context_line":"        iqn \u003d \u0027iqn.xyz\u0027"},{"line_number":379,"context_line":"        lun \u003d 1"},{"line_number":380,"context_line":"        image_path \u003d \u0027/tmp/xyz/image\u0027"},{"line_number":381,"context_line":"        root_mb \u003d 128"},{"line_number":382,"context_line":"        node_uuid \u003d \"12345678-1234-1234-1234-1234567890abcxyz\""},{"line_number":383,"context_line":"        dev \u003d \u0027/dev/fake\u0027"},{"line_number":384,"context_line":"        root_uuid \u003d \u002712345678-1234-1234-12345678-12345678abcdef\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa6399be_e503c874","line":381,"updated":"2016-10-18 20:38:21.000000000","message":"Why you\u0027re not using value passed in deploy_args instead? This way value passed in kwargs is overriden","commit_id":"d758611cc2d390fdec28a08313e699148edb4f17"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"4ccd843b9730856cb363bc83ae8f66dbd751c23b","unresolved":false,"context_lines":[{"line_number":378,"context_line":"        iqn \u003d \u0027iqn.xyz\u0027"},{"line_number":379,"context_line":"        lun \u003d 1"},{"line_number":380,"context_line":"        image_path \u003d \u0027/tmp/xyz/image\u0027"},{"line_number":381,"context_line":"        root_mb \u003d 128"},{"line_number":382,"context_line":"        node_uuid \u003d \"12345678-1234-1234-1234-1234567890abcxyz\""},{"line_number":383,"context_line":"        dev \u003d \u0027/dev/fake\u0027"},{"line_number":384,"context_line":"        root_uuid \u003d \u002712345678-1234-1234-12345678-12345678abcdef\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa6399be_b61d8868","line":381,"in_reply_to":"fa6399be_e503c874","updated":"2016-10-18 21:44:47.000000000","message":"Good catch, fixed. My tests were passing by coincidence since this value is the same as in the caller.","commit_id":"d758611cc2d390fdec28a08313e699148edb4f17"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"be2e64dfeb224a9c7a52acc54319d9f9c239929f","unresolved":false,"context_lines":[{"line_number":342,"context_line":"    @mock.patch.object(utils, \u0027login_iscsi\u0027)"},{"line_number":343,"context_line":"    @mock.patch.object(utils, \u0027get_dev\u0027)"},{"line_number":344,"context_line":"    @mock.patch.object(utils, \u0027discovery\u0027)"},{"line_number":345,"context_line":"    @mock.patch.object(utils, \u0027delete_iscsi\u0027)"},{"line_number":346,"context_line":"    def _test_deploy_partition_image(self,"},{"line_number":347,"context_line":"                                     mock_delete_iscsi,"},{"line_number":348,"context_line":"                                     mock_discovery,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_f4fd266f","line":345,"updated":"2016-12-08 21:43:55.000000000","message":"I thought John liked to see autospec\u003dTrue though.","commit_id":"ce46c43246ee05f76805b22f4656080b27c2266b"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"c2a06fbc221dedd7cf42a6cfd0786189c52a8c07","unresolved":false,"context_lines":[{"line_number":368,"context_line":"        }"},{"line_number":369,"context_line":"        disallowed_values \u003d set(kwargs) - set(deploy_args)"},{"line_number":370,"context_line":"        if disallowed_values:"},{"line_number":371,"context_line":"            raise ValueError(\"Only the following kwargs are allowed in \""},{"line_number":372,"context_line":"                             \"_test_deploy_partition_image: %s\""},{"line_number":373,"context_line":"                             % deploy_args.keys().join(\", \"))"},{"line_number":374,"context_line":"        deploy_args.update(kwargs)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_949a326d","line":371,"updated":"2016-12-08 21:51:29.000000000","message":"Maybe a follow-up patch could be to print the value that was unexpected. To help with debugging.","commit_id":"ce46c43246ee05f76805b22f4656080b27c2266b"}]}
