)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":27909,"name":"Aija Jauntēva","email":"code@clusums.eu","username":"ajya"},"change_message_id":"82f3d255ec3c0096b7645a3a105487e05f4fdd27","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add support for fields in drivers API"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This commit add support for the fields query parameter to the GET /v1/drivers?fields\u003d... and GET /v1/drivers/\u003cdriver_name\u003e?fields\u003d...."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Story: 1674775"},{"line_number":12,"context_line":"Task: 10581"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"061baf32_3f73c335","line":9,"updated":"2021-09-14 14:38:33.000000000","message":"nit: should break this line at 72 characters manually [1]\n\n[1] https://wiki.openstack.org/wiki/GitCommitMessages#Summary_of_Git_commit_message_structure","commit_id":"ee06761b0ec5edb42199c1b96ddcd4900d50002b"}],"ironic/api/controllers/v1/driver.py":[{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"5685e40434fec32ba61fd03d8b3367ddc958ab7f","unresolved":true,"context_lines":[{"line_number":92,"context_line":"    :param interface_info: optional list of dicts of hardware interface"},{"line_number":93,"context_line":"                            info."},{"line_number":94,"context_line":"    :param fields: list of fields to preserve, or ``None`` to preserve default"},{"line_number":95,"context_line":"    :param sanitize: boolean,  sanitize driver"},{"line_number":96,"context_line":"    :returns: dict representing the driver object."},{"line_number":97,"context_line":"    \"\"\""},{"line_number":98,"context_line":"    driver \u003d {"}],"source_content_type":"text/x-python","patch_set":5,"id":"09766811_4f5083a6","line":95,"range":{"start_line":95,"start_character":21,"end_line":95,"end_character":46},"updated":"2021-09-14 14:34:27.000000000","message":"Is this a \"go santizie\" or \"go use this method to sanitize\"?","commit_id":"ee06761b0ec5edb42199c1b96ddcd4900d50002b"},{"author":{"_account_id":15519,"name":"Iury Gregory Melo Ferreira","display_name":"Iury Gregory","email":"iurygregory@gmail.com","username":"iurygregory"},"change_message_id":"51cb8394be55cd031a3ffc772cd8fa1876111dd4","unresolved":true,"context_lines":[{"line_number":92,"context_line":"    :param interface_info: optional list of dicts of hardware interface"},{"line_number":93,"context_line":"                            info."},{"line_number":94,"context_line":"    :param fields: list of fields to preserve, or ``None`` to preserve default"},{"line_number":95,"context_line":"    :param sanitize: boolean,  sanitize driver"},{"line_number":96,"context_line":"    :returns: dict representing the driver object."},{"line_number":97,"context_line":"    \"\"\""},{"line_number":98,"context_line":"    driver \u003d {"}],"source_content_type":"text/x-python","patch_set":5,"id":"ac7bf9e6_359e5099","line":95,"range":{"start_line":95,"start_character":21,"end_line":95,"end_character":46},"in_reply_to":"09766811_4f5083a6","updated":"2021-09-14 21:26:47.000000000","message":"It should be to tell if we want to sanitize the information we will provide (we probably don\u0027t need to mention that this will be done via the sanitize_driver function that was created","commit_id":"ee06761b0ec5edb42199c1b96ddcd4900d50002b"}],"ironic/tests/unit/api/controllers/v1/test_driver.py":[{"author":{"_account_id":15519,"name":"Iury Gregory Melo Ferreira","display_name":"Iury Gregory","email":"iurygregory@gmail.com","username":"iurygregory"},"change_message_id":"308910144cbf2a98e6b97233b0f60f7360f6eb66","unresolved":true,"context_lines":[{"line_number":273,"context_line":"    def test_drivers_get_one_not_found(self):"},{"line_number":274,"context_line":"        response \u003d self.get_json(\u0027/drivers/nope\u0027, expect_errors\u003dTrue)"},{"line_number":275,"context_line":"        self.assertEqual(http_client.NOT_FOUND, response.status_int)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def test_drivers_get_all_custom_fields(self):"},{"line_number":278,"context_line":"        fields \u003d \"name,hosts\""},{"line_number":279,"context_line":"        data \u003d self.get_json(\u0027/drivers?fields\u003d%s\u0027 % fields,"}],"source_content_type":"text/x-python","patch_set":4,"id":"58178836_ffdc04e1","line":276,"updated":"2021-08-26 08:32:35.000000000","message":"You need to add some error scenarios here:\n\n- Request not acceptable when trying to use fields when the API version does not support\nThis includes trying to access\n* /v1/drivers?fields\u003d... \n* /v1/drivers?detail\u003dTrue\u0026fields\u003d... \n* /v1/drivers/\u003cdriver_name\u003e?fields\u003d... (This one you covered in test_get_one_custom_fields_older_api but I would change the name of the test to  test_get_custom_fields_invalid_api_version and include all 3 scenarios I\u0027ve mentioned.)","commit_id":"f8b417c83b6cb593ae1fb91f93487b358664f81c"},{"author":{"_account_id":33725,"name":"Tadeas Kot","email":"tkot@redhat.com","username":"tkot"},"change_message_id":"15646d88ae02951a3cd639762c40f5a735f95460","unresolved":false,"context_lines":[{"line_number":273,"context_line":"    def test_drivers_get_one_not_found(self):"},{"line_number":274,"context_line":"        response \u003d self.get_json(\u0027/drivers/nope\u0027, expect_errors\u003dTrue)"},{"line_number":275,"context_line":"        self.assertEqual(http_client.NOT_FOUND, response.status_int)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def test_drivers_get_all_custom_fields(self):"},{"line_number":278,"context_line":"        fields \u003d \"name,hosts\""},{"line_number":279,"context_line":"        data \u003d self.get_json(\u0027/drivers?fields\u003d%s\u0027 % fields,"}],"source_content_type":"text/x-python","patch_set":4,"id":"2ae3dffc_76453a55","line":276,"in_reply_to":"58178836_ffdc04e1","updated":"2021-08-27 10:16:06.000000000","message":"Done","commit_id":"f8b417c83b6cb593ae1fb91f93487b358664f81c"},{"author":{"_account_id":15519,"name":"Iury Gregory Melo Ferreira","display_name":"Iury Gregory","email":"iurygregory@gmail.com","username":"iurygregory"},"change_message_id":"308910144cbf2a98e6b97233b0f60f7360f6eb66","unresolved":true,"context_lines":[{"line_number":274,"context_line":"        response \u003d self.get_json(\u0027/drivers/nope\u0027, expect_errors\u003dTrue)"},{"line_number":275,"context_line":"        self.assertEqual(http_client.NOT_FOUND, response.status_int)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def test_drivers_get_all_custom_fields(self):"},{"line_number":278,"context_line":"        fields \u003d \"name,hosts\""},{"line_number":279,"context_line":"        data \u003d self.get_json(\u0027/drivers?fields\u003d%s\u0027 % fields,"},{"line_number":280,"context_line":"                             headers\u003d{api_base.Version.string:"}],"source_content_type":"text/x-python","patch_set":4,"id":"a93de711_18d812f3","line":277,"updated":"2021-08-26 08:32:35.000000000","message":"I would change the name of the test since you are not getting all custom fields, maybe something test_drivers_collection_with_fields.\n\nAlso, instead of having api_versions.max_version_string() it would be good to specify the version we are adding the support for fields.\n\n/v1/drivers has support for detail, so it would be good to add tests with detail\u003dTrue and detail\u003dFalse + fields, with detail\u003dTrue the API should report BAD_REQUEST.\n\nPlease also include a test where there is a field that doesn\u0027t exist in the drivers response.","commit_id":"f8b417c83b6cb593ae1fb91f93487b358664f81c"},{"author":{"_account_id":33725,"name":"Tadeas Kot","email":"tkot@redhat.com","username":"tkot"},"change_message_id":"15646d88ae02951a3cd639762c40f5a735f95460","unresolved":false,"context_lines":[{"line_number":274,"context_line":"        response \u003d self.get_json(\u0027/drivers/nope\u0027, expect_errors\u003dTrue)"},{"line_number":275,"context_line":"        self.assertEqual(http_client.NOT_FOUND, response.status_int)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def test_drivers_get_all_custom_fields(self):"},{"line_number":278,"context_line":"        fields \u003d \"name,hosts\""},{"line_number":279,"context_line":"        data \u003d self.get_json(\u0027/drivers?fields\u003d%s\u0027 % fields,"},{"line_number":280,"context_line":"                             headers\u003d{api_base.Version.string:"}],"source_content_type":"text/x-python","patch_set":4,"id":"386e06e1_1ecea436","line":277,"in_reply_to":"a93de711_18d812f3","updated":"2021-08-27 10:16:06.000000000","message":"Done","commit_id":"f8b417c83b6cb593ae1fb91f93487b358664f81c"},{"author":{"_account_id":15519,"name":"Iury Gregory Melo Ferreira","display_name":"Iury Gregory","email":"iurygregory@gmail.com","username":"iurygregory"},"change_message_id":"308910144cbf2a98e6b97233b0f60f7360f6eb66","unresolved":true,"context_lines":[{"line_number":283,"context_line":"            self.assertCountEqual([\u0027name\u0027, \u0027hosts\u0027, \u0027links\u0027], data_driver)"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"    def test_get_one_custom_fields(self):"},{"line_number":286,"context_line":"        self.register_fake_conductors()"},{"line_number":287,"context_line":"        driver \u003d self.hw1"},{"line_number":288,"context_line":"        fields \u003d \"name,hosts\""},{"line_number":289,"context_line":"        data \u003d self.get_json(\u0027/drivers/%s?fields\u003d%s\u0027 % (driver, fields),"}],"source_content_type":"text/x-python","patch_set":4,"id":"21c410e7_aed9588b","line":286,"updated":"2021-08-26 08:32:35.000000000","message":"For the scenario where you are accessing the fields of a given driver you need to add a negative case, when there is an invalid field requested.","commit_id":"f8b417c83b6cb593ae1fb91f93487b358664f81c"},{"author":{"_account_id":33725,"name":"Tadeas Kot","email":"tkot@redhat.com","username":"tkot"},"change_message_id":"15646d88ae02951a3cd639762c40f5a735f95460","unresolved":false,"context_lines":[{"line_number":283,"context_line":"            self.assertCountEqual([\u0027name\u0027, \u0027hosts\u0027, \u0027links\u0027], data_driver)"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"    def test_get_one_custom_fields(self):"},{"line_number":286,"context_line":"        self.register_fake_conductors()"},{"line_number":287,"context_line":"        driver \u003d self.hw1"},{"line_number":288,"context_line":"        fields \u003d \"name,hosts\""},{"line_number":289,"context_line":"        data \u003d self.get_json(\u0027/drivers/%s?fields\u003d%s\u0027 % (driver, fields),"}],"source_content_type":"text/x-python","patch_set":4,"id":"0da35797_3b0f61f8","line":286,"in_reply_to":"21c410e7_aed9588b","updated":"2021-08-27 10:16:06.000000000","message":"Done","commit_id":"f8b417c83b6cb593ae1fb91f93487b358664f81c"}]}
