)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"d2e9ef44cfdb33a3ffa7c9586117db08f5a97226","unresolved":false,"context_lines":[{"line_number":9,"context_line":"The test_boot_from_volume_10_servers_255_volumes_2_images uses two"},{"line_number":10,"context_line":"random images to build servers with a lot of BDMs and asserts that an"},{"line_number":11,"context_line":"image cache is used to avoid hitting glance for the same image many"},{"line_number":12,"context_line":"times. The functional tests uses _FakeImageService that predefines a"},{"line_number":13,"context_line":"list of images. The test selects the first two returned by the"},{"line_number":14,"context_line":"api.get_images() call. As the fixture stores the images in a dict the"},{"line_number":15,"context_line":"returned image list is random in python2.7. Therefore the test runs with"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3fa7e38b_64e95b18","line":12,"range":{"start_line":12,"start_character":33,"end_line":12,"end_character":50},"updated":"2019-10-11 15:29:19.000000000","message":"For my own reference, it does this via a call to \u0027stub_out_image_service\u0027 in \u0027_IntegratedTestBase.setUp\u0027","commit_id":"cacca209ab4458378a9e2522ff50078826933c3e"}],"nova/tests/functional/test_boot_from_volume.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"d2e9ef44cfdb33a3ffa7c9586117db08f5a97226","unresolved":false,"context_lines":[{"line_number":200,"context_line":"        # as that is defined with a separate kernel image, leading to one extra"},{"line_number":201,"context_line":"        # call to nova.image.api.API.get from compute.api"},{"line_number":202,"context_line":"        # _handle_kernel_and_ramdisk()"},{"line_number":203,"context_line":"        image1 \u003d \u0027a2459075-d96c-40d5-893e-577ff92e721c\u0027"},{"line_number":204,"context_line":"        image2 \u003d \u002776fa36fc-c930-4bf3-8c8a-ea2a2420deb6\u0027"},{"line_number":205,"context_line":"        server \u003d self._build_minimal_create_server_request("},{"line_number":206,"context_line":"            self.api, \u0027test_boot_from_volume_10_servers_255_volumes_2_images\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_04dae776","line":203,"range":{"start_line":203,"start_character":17,"end_line":203,"end_character":55},"updated":"2019-10-11 15:29:19.000000000","message":"Instead of hardcoding these, could you reference them from the fixture? Something like\n\n  from nova.tests.unit.image import fake as fake_image\n\n  ...\n\n  image1 \u003d fake_image._FakeImageService.image1[\u0027id\u0027]\n\nshould do the trick","commit_id":"cacca209ab4458378a9e2522ff50078826933c3e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4f020edd6560cd6fbc26c8c0f32d6c2c5259d11f","unresolved":false,"context_lines":[{"line_number":200,"context_line":"        # as that is defined with a separate kernel image, leading to one extra"},{"line_number":201,"context_line":"        # call to nova.image.api.API.get from compute.api"},{"line_number":202,"context_line":"        # _handle_kernel_and_ramdisk()"},{"line_number":203,"context_line":"        image1 \u003d \u0027a2459075-d96c-40d5-893e-577ff92e721c\u0027"},{"line_number":204,"context_line":"        image2 \u003d \u002776fa36fc-c930-4bf3-8c8a-ea2a2420deb6\u0027"},{"line_number":205,"context_line":"        server \u003d self._build_minimal_create_server_request("},{"line_number":206,"context_line":"            self.api, \u0027test_boot_from_volume_10_servers_255_volumes_2_images\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_ca285987","line":203,"range":{"start_line":203,"start_character":17,"end_line":203,"end_character":55},"in_reply_to":"3fa7e38b_04dae776","updated":"2019-10-11 16:08:48.000000000","message":"It almost works but image1 is not a member of _FakeImageService, it is a local variable of the __init__ only.","commit_id":"cacca209ab4458378a9e2522ff50078826933c3e"}]}
