)]}'
{"nova/tests/functional/db/test_instance_group.py":[{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"ecf80f65587c2f6df678626d7fd596476df44f15","unresolved":false,"context_lines":[{"line_number":283,"context_line":"class InstanceGroupAggregatesTestCase(test.TestCase):"},{"line_number":284,"context_line":"    def setUp(self):"},{"line_number":285,"context_line":"        super(InstanceGroupAggregatesTestCase, self).setUp()"},{"line_number":286,"context_line":"        self.ctx \u003d context.RequestContext(\u0027fake-user\u0027, \u0027fake-project\u0027)"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    def _create_compute_node(self, host, node):"},{"line_number":289,"context_line":"        cn \u003d objects.ComputeNode("}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_cdcc516c","line":286,"range":{"start_line":286,"start_character":19,"end_line":286,"end_character":70},"updated":"2018-01-05 01:44:28.000000000","message":"`context.get_admin_context()`\nwill help you to pass the test, or create instances with the project.\n\nhttps://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/api.py#L2023-L2028\n\nI don\u0027t response in IRC since I\u0027m in JST(+9:00), but I\u0027m checking it in the morning. :)","commit_id":"95ccab566760a94982b9ca4fcfffa9b70553cdc6"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"f7d7131de2349f5f68fdb84df1137298145d60fb","unresolved":false,"context_lines":[{"line_number":283,"context_line":"class InstanceGroupAggregatesTestCase(test.TestCase):"},{"line_number":284,"context_line":"    def setUp(self):"},{"line_number":285,"context_line":"        super(InstanceGroupAggregatesTestCase, self).setUp()"},{"line_number":286,"context_line":"        self.ctx \u003d context.RequestContext(\u0027fake-user\u0027, \u0027fake-project\u0027)"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    def _create_compute_node(self, host, node):"},{"line_number":289,"context_line":"        cn \u003d objects.ComputeNode("}],"source_content_type":"text/x-python","patch_set":1,"id":"7f96bb07_7d247eaf","line":286,"range":{"start_line":286,"start_character":19,"end_line":286,"end_character":70},"in_reply_to":"9f91af0f_7f3fd924","updated":"2018-01-17 13:11:25.000000000","message":"Creating instances like you do in line 342, doesn\u0027t propagate `project_id` to the instance object for some reason, so quering InstanceList for instances gives empty list. The solution which I found working is just pass project_id during creation of instance objects, like:\n\n  i1 \u003d objects.Instance(self.ctx, host\u003d\u0027host1\u0027, node\u003d\u0027node1\u0027,\n                        project_id\u003dself.ctx.project_id)\n  i1.create()","commit_id":"95ccab566760a94982b9ca4fcfffa9b70553cdc6"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f029e6600c2e544a24fc8ca3142906af67bbf463","unresolved":false,"context_lines":[{"line_number":283,"context_line":"class InstanceGroupAggregatesTestCase(test.TestCase):"},{"line_number":284,"context_line":"    def setUp(self):"},{"line_number":285,"context_line":"        super(InstanceGroupAggregatesTestCase, self).setUp()"},{"line_number":286,"context_line":"        self.ctx \u003d context.RequestContext(\u0027fake-user\u0027, \u0027fake-project\u0027)"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    def _create_compute_node(self, host, node):"},{"line_number":289,"context_line":"        cn \u003d objects.ComputeNode("}],"source_content_type":"text/x-python","patch_set":1,"id":"9f91af0f_7f3fd924","line":286,"range":{"start_line":286,"start_character":19,"end_line":286,"end_character":70},"in_reply_to":"9f91af0f_cdcc516c","updated":"2018-01-05 17:41:57.000000000","message":"Gah, that\u0027s it. :) I won\u0027t use admin context (since I\u0027m trying to emulate end-user requests here) but I need to set the user_id of the instances below to the \u0027fake-user\u0027 in order for the tests to work. Thanks very much for heading me in the right direction! :)","commit_id":"95ccab566760a94982b9ca4fcfffa9b70553cdc6"}]}
