)]}'
{"nova/tests/functional/test_servers.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"648a0e84ebac142ba77f77483efc20df07fa7c8e","unresolved":false,"context_lines":[{"line_number":1056,"context_line":"        self._delete_server(server_id)"},{"line_number":1057,"context_line":""},{"line_number":1058,"context_line":""},{"line_number":1059,"context_line":"class ProviderUsageMixin(object):"},{"line_number":1060,"context_line":"    \"\"\"Helper mixin for tests that query Placement and assert usage."},{"line_number":1061,"context_line":""},{"line_number":1062,"context_line":"    Expects the implementing class to have the following attributes:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_96594236","line":1059,"range":{"start_line":1059,"start_character":6,"end_line":1059,"end_character":24},"updated":"2017-08-29 07:24:12.000000000","message":"+1 for this mixin","commit_id":"b1c603c30dc41288fbaf17d8b295fca3efd744e1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"648a0e84ebac142ba77f77483efc20df07fa7c8e","unresolved":false,"context_lines":[{"line_number":1059,"context_line":"class ProviderUsageMixin(object):"},{"line_number":1060,"context_line":"    \"\"\"Helper mixin for tests that query Placement and assert usage."},{"line_number":1061,"context_line":""},{"line_number":1062,"context_line":"    Expects the implementing class to have the following attributes:"},{"line_number":1063,"context_line":""},{"line_number":1064,"context_line":"    * admin_api - Compute API client with admin credentials"},{"line_number":1065,"context_line":"    * placement_api - Placement API client with admin credentials"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_76b01644","line":1062,"updated":"2017-08-29 07:24:12.000000000","message":"I\u0027m wondering which is better. Having this expectation on the  user of the mixin, or changing the signature of the functions below to take the needed api objects explicitly.","commit_id":"b1c603c30dc41288fbaf17d8b295fca3efd744e1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"88ebe9de50eeb859fe87aa1d3655cd551360c284","unresolved":false,"context_lines":[{"line_number":1059,"context_line":"class ProviderUsageMixin(object):"},{"line_number":1060,"context_line":"    \"\"\"Helper mixin for tests that query Placement and assert usage."},{"line_number":1061,"context_line":""},{"line_number":1062,"context_line":"    Expects the implementing class to have the following attributes:"},{"line_number":1063,"context_line":""},{"line_number":1064,"context_line":"    * admin_api - Compute API client with admin credentials"},{"line_number":1065,"context_line":"    * placement_api - Placement API client with admin credentials"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_26db717c","line":1062,"in_reply_to":"7f287b81_76b01644","updated":"2017-08-29 14:33:00.000000000","message":"I started with the latter and it got annoying changing everything so that\u0027s when I went with the mixin.","commit_id":"b1c603c30dc41288fbaf17d8b295fca3efd744e1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"648a0e84ebac142ba77f77483efc20df07fa7c8e","unresolved":false,"context_lines":[{"line_number":1158,"context_line":"                      \u0027host2\u0027: \u0027host1\u0027}"},{"line_number":1159,"context_line":"        return other_host[host]"},{"line_number":1160,"context_line":""},{"line_number":1161,"context_line":"    def _get_allocations_by_server_uuid(self, server_uuid):"},{"line_number":1162,"context_line":"        return self.placement_api.get("},{"line_number":1163,"context_line":"            \u0027/allocations/%s\u0027 % server_uuid).body[\u0027allocations\u0027]"},{"line_number":1164,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_d320fcae","line":1161,"updated":"2017-08-29 07:24:12.000000000","message":"I suggest to move this to ProviderUsageMixin","commit_id":"b1c603c30dc41288fbaf17d8b295fca3efd744e1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"88ebe9de50eeb859fe87aa1d3655cd551360c284","unresolved":false,"context_lines":[{"line_number":1158,"context_line":"                      \u0027host2\u0027: \u0027host1\u0027}"},{"line_number":1159,"context_line":"        return other_host[host]"},{"line_number":1160,"context_line":""},{"line_number":1161,"context_line":"    def _get_allocations_by_server_uuid(self, server_uuid):"},{"line_number":1162,"context_line":"        return self.placement_api.get("},{"line_number":1163,"context_line":"            \u0027/allocations/%s\u0027 % server_uuid).body[\u0027allocations\u0027]"},{"line_number":1164,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_e6e0c928","line":1161,"in_reply_to":"7f287b81_d320fcae","updated":"2017-08-29 14:33:00.000000000","message":"Done","commit_id":"b1c603c30dc41288fbaf17d8b295fca3efd744e1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"648a0e84ebac142ba77f77483efc20df07fa7c8e","unresolved":false,"context_lines":[{"line_number":1191,"context_line":"    def test_resize_confirm_reverse(self):"},{"line_number":1192,"context_line":"        self._test_resize_confirm(dest_hostname\u003d\u0027host2\u0027)"},{"line_number":1193,"context_line":""},{"line_number":1194,"context_line":"    def assertFlavorsMatchAllocation(self, old_flavor, new_flavor, allocation):"},{"line_number":1195,"context_line":"        self.assertEqual(old_flavor[\u0027vcpus\u0027] + new_flavor[\u0027vcpus\u0027],"},{"line_number":1196,"context_line":"                         allocation[\u0027VCPU\u0027])"},{"line_number":1197,"context_line":"        self.assertEqual(old_flavor[\u0027ram\u0027] + new_flavor[\u0027ram\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_b311f05f","line":1194,"updated":"2017-08-29 07:24:12.000000000","message":"I suggest to move this to ProviderUsageMixin","commit_id":"b1c603c30dc41288fbaf17d8b295fca3efd744e1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"88ebe9de50eeb859fe87aa1d3655cd551360c284","unresolved":false,"context_lines":[{"line_number":1191,"context_line":"    def test_resize_confirm_reverse(self):"},{"line_number":1192,"context_line":"        self._test_resize_confirm(dest_hostname\u003d\u0027host2\u0027)"},{"line_number":1193,"context_line":""},{"line_number":1194,"context_line":"    def assertFlavorsMatchAllocation(self, old_flavor, new_flavor, allocation):"},{"line_number":1195,"context_line":"        self.assertEqual(old_flavor[\u0027vcpus\u0027] + new_flavor[\u0027vcpus\u0027],"},{"line_number":1196,"context_line":"                         allocation[\u0027VCPU\u0027])"},{"line_number":1197,"context_line":"        self.assertEqual(old_flavor[\u0027ram\u0027] + new_flavor[\u0027ram\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_6643b914","line":1194,"in_reply_to":"7f287b81_b311f05f","updated":"2017-08-29 14:33:00.000000000","message":"Done","commit_id":"b1c603c30dc41288fbaf17d8b295fca3efd744e1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"648a0e84ebac142ba77f77483efc20df07fa7c8e","unresolved":false,"context_lines":[{"line_number":2029,"context_line":"        self.start_service(\u0027scheduler\u0027)"},{"line_number":2030,"context_line":""},{"line_number":2031,"context_line":"        self.addCleanup(nova.tests.unit.image.fake.FakeImageService_reset)"},{"line_number":2032,"context_line":""},{"line_number":2033,"context_line":"        fake.set_nodes([\u0027host1\u0027])"},{"line_number":2034,"context_line":"        self.flags(host\u003d\u0027host1\u0027)"},{"line_number":2035,"context_line":"        self.compute1 \u003d self.start_service(\u0027compute\u0027, host\u003d\u0027host1\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_b61f9e59","line":2032,"updated":"2017-08-29 07:24:12.000000000","message":"At least until this point the setUp() is the same as in ServerMovingTests so I\u0027m wondering if we can pull that out to a base class.","commit_id":"b1c603c30dc41288fbaf17d8b295fca3efd744e1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"88ebe9de50eeb859fe87aa1d3655cd551360c284","unresolved":false,"context_lines":[{"line_number":2029,"context_line":"        self.start_service(\u0027scheduler\u0027)"},{"line_number":2030,"context_line":""},{"line_number":2031,"context_line":"        self.addCleanup(nova.tests.unit.image.fake.FakeImageService_reset)"},{"line_number":2032,"context_line":""},{"line_number":2033,"context_line":"        fake.set_nodes([\u0027host1\u0027])"},{"line_number":2034,"context_line":"        self.flags(host\u003d\u0027host1\u0027)"},{"line_number":2035,"context_line":"        self.compute1 \u003d self.start_service(\u0027compute\u0027, host\u003d\u0027host1\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_e68b2965","line":2032,"in_reply_to":"7f287b81_8b3eb088","updated":"2017-08-29 14:33:00.000000000","message":"The virt driver isn\u0027t the same, but I can see what I can do. The subclass can define the virt driver to use in the base class setUp.","commit_id":"b1c603c30dc41288fbaf17d8b295fca3efd744e1"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"688393550d3dde5411f0bf586550331913975514","unresolved":false,"context_lines":[{"line_number":2029,"context_line":"        self.start_service(\u0027scheduler\u0027)"},{"line_number":2030,"context_line":""},{"line_number":2031,"context_line":"        self.addCleanup(nova.tests.unit.image.fake.FakeImageService_reset)"},{"line_number":2032,"context_line":""},{"line_number":2033,"context_line":"        fake.set_nodes([\u0027host1\u0027])"},{"line_number":2034,"context_line":"        self.flags(host\u003d\u0027host1\u0027)"},{"line_number":2035,"context_line":"        self.compute1 \u003d self.start_service(\u0027compute\u0027, host\u003d\u0027host1\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_8b3eb088","line":2032,"in_reply_to":"7f287b81_b61f9e59","updated":"2017-08-29 14:05:12.000000000","message":"Yes, agree","commit_id":"b1c603c30dc41288fbaf17d8b295fca3efd744e1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"648a0e84ebac142ba77f77483efc20df07fa7c8e","unresolved":false,"context_lines":[{"line_number":2116,"context_line":"        self.start_service(\u0027scheduler\u0027)"},{"line_number":2117,"context_line":""},{"line_number":2118,"context_line":"        self.addCleanup(nova.tests.unit.image.fake.FakeImageService_reset)"},{"line_number":2119,"context_line":""},{"line_number":2120,"context_line":"        # We only need one compute service/host/node for these tests."},{"line_number":2121,"context_line":"        fake.set_nodes([\u0027host1\u0027])"},{"line_number":2122,"context_line":"        self.flags(host\u003d\u0027host1\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_763db6c2","line":2119,"updated":"2017-08-29 07:24:12.000000000","message":"ditto","commit_id":"b1c603c30dc41288fbaf17d8b295fca3efd744e1"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"257f7ab722c7a1de6c2401e89c173933c40c59c1","unresolved":false,"context_lines":[{"line_number":1066,"context_line":"    API and asserted."},{"line_number":1067,"context_line":"    \"\"\""},{"line_number":1068,"context_line":""},{"line_number":1069,"context_line":"    REQUIRES_LOCKING \u003d True"},{"line_number":1070,"context_line":"    microversion \u003d \u0027latest\u0027"},{"line_number":1071,"context_line":""},{"line_number":1072,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_e2751c33","side":"PARENT","line":1069,"updated":"2017-08-31 09:45:30.000000000","message":"Honestly I don\u0027t know if removing this will cause unstable test in the future or not. Right now it seems that both ServerRescheduleTests and ServerBuildAbortTests stable without it.","commit_id":"a21cac214c44799a9a9c2cfd78c51fc3ce36cf2b"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"257f7ab722c7a1de6c2401e89c173933c40c59c1","unresolved":false,"context_lines":[{"line_number":1094,"context_line":"        self.start_service(\u0027scheduler\u0027)"},{"line_number":1095,"context_line":""},{"line_number":1096,"context_line":"        self.addCleanup(nova.tests.unit.image.fake.FakeImageService_reset)"},{"line_number":1097,"context_line":"        fake_network.set_stub_network_methods(self)"},{"line_number":1098,"context_line":""},{"line_number":1099,"context_line":"    def _get_provider_uuid_by_host(self, host):"},{"line_number":1100,"context_line":"        # NOTE(gibi): the compute node id is the same as the compute node"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_42b3d0e9","line":1097,"updated":"2017-08-31 09:45:30.000000000","message":"good catch! I missed this line in my first refactor trial and I was shocked by the stack traces :)","commit_id":"6f21179dd91882c907a2fe4dcb956ee53af1733f"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"72dff4db0d18c2874e44e8700468865d65012659","unresolved":false,"context_lines":[{"line_number":1134,"context_line":"    API and asserted."},{"line_number":1135,"context_line":"    \"\"\""},{"line_number":1136,"context_line":""},{"line_number":1137,"context_line":"    REQUIRES_LOCKING \u003d True"},{"line_number":1138,"context_line":"    # NOTE(danms): The test defaults to using SmallFakeDriver,"},{"line_number":1139,"context_line":"    # which only has one vcpu, which can\u0027t take the doubled allocation"},{"line_number":1140,"context_line":"    # we\u0027re now giving it. So, use the bigger MediumFakeDriver here."}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_a9e8d115","line":1137,"range":{"start_line":1137,"start_character":4,"end_line":1137,"end_character":27},"updated":"2017-09-04 13:52:03.000000000","message":"For my own knowledge, what is this doing and why is it necessary? Would a comment here be possible?","commit_id":"6f21179dd91882c907a2fe4dcb956ee53af1733f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"063a9f16225903aa52969a12e3102864a33f1a4a","unresolved":false,"context_lines":[{"line_number":1134,"context_line":"    API and asserted."},{"line_number":1135,"context_line":"    \"\"\""},{"line_number":1136,"context_line":""},{"line_number":1137,"context_line":"    REQUIRES_LOCKING \u003d True"},{"line_number":1138,"context_line":"    # NOTE(danms): The test defaults to using SmallFakeDriver,"},{"line_number":1139,"context_line":"    # which only has one vcpu, which can\u0027t take the doubled allocation"},{"line_number":1140,"context_line":"    # we\u0027re now giving it. So, use the bigger MediumFakeDriver here."}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_5b835e05","line":1137,"range":{"start_line":1137,"start_character":4,"end_line":1137,"end_character":27},"in_reply_to":"7f287b81_1a64c5e4","updated":"2017-09-05 14:01:10.000000000","message":"I think this was just copied originally from another test, and could be removed, but as noted, let\u0027s do it in a separate change.","commit_id":"6f21179dd91882c907a2fe4dcb956ee53af1733f"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"ca132826c6b172704eae8bbd321c272096f4a807","unresolved":false,"context_lines":[{"line_number":1134,"context_line":"    API and asserted."},{"line_number":1135,"context_line":"    \"\"\""},{"line_number":1136,"context_line":""},{"line_number":1137,"context_line":"    REQUIRES_LOCKING \u003d True"},{"line_number":1138,"context_line":"    # NOTE(danms): The test defaults to using SmallFakeDriver,"},{"line_number":1139,"context_line":"    # which only has one vcpu, which can\u0027t take the doubled allocation"},{"line_number":1140,"context_line":"    # we\u0027re now giving it. So, use the bigger MediumFakeDriver here."}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_1a64c5e4","line":1137,"range":{"start_line":1137,"start_character":4,"end_line":1137,"end_character":27},"in_reply_to":"7f287b81_5a592d33","updated":"2017-09-04 15:46:30.000000000","message":"Great, thanks for the info","commit_id":"6f21179dd91882c907a2fe4dcb956ee53af1733f"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"c32d6c43e341e4d2790739756c28d434773f5d9b","unresolved":false,"context_lines":[{"line_number":1134,"context_line":"    API and asserted."},{"line_number":1135,"context_line":"    \"\"\""},{"line_number":1136,"context_line":""},{"line_number":1137,"context_line":"    REQUIRES_LOCKING \u003d True"},{"line_number":1138,"context_line":"    # NOTE(danms): The test defaults to using SmallFakeDriver,"},{"line_number":1139,"context_line":"    # which only has one vcpu, which can\u0027t take the doubled allocation"},{"line_number":1140,"context_line":"    # we\u0027re now giving it. So, use the bigger MediumFakeDriver here."}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_5a592d33","line":1137,"range":{"start_line":1137,"start_character":4,"end_line":1137,"end_character":27},"in_reply_to":"7f287b81_a9e8d115","updated":"2017-09-04 15:44:52.000000000","message":"It basically makes oslo.concurrency using a lockfile for not running concurrent tests for that same test class.\n\nhttps://github.com/openstack/nova/blob/b74115c2f55f5340af60d1ec2321d91c4098fb21/nova/test.py#L237-L247 \n\nAFAICS, given we modify allocations, concurrent tests could be having problems because the fake Placement API could be returning wrong values.\n\nIf you see https://review.openstack.org/#/c/498596/2/nova/tests/functional/test_servers.py@1069a that\u0027s already there, so maybe we should be seeing whether it\u0027s still needed in a separate change, but not this one.","commit_id":"6f21179dd91882c907a2fe4dcb956ee53af1733f"}],"nova/virt/fake.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"648a0e84ebac142ba77f77483efc20df07fa7c8e","unresolved":false,"context_lines":[{"line_number":619,"context_line":"    # instance has been rescheduled or not"},{"line_number":620,"context_line":"    rescheduled \u003d {}"},{"line_number":621,"context_line":""},{"line_number":622,"context_line":"    def spawn(self, context, instance, image_meta, injected_files,"},{"line_number":623,"context_line":"              admin_password, network_info\u003dNone, block_device_info\u003dNone):"},{"line_number":624,"context_line":"        if not self.rescheduled.get(instance.uuid, False):"},{"line_number":625,"context_line":"            # We only reschedule on the first time something hits spawn()."}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_933dd4de","line":622,"updated":"2017-08-29 07:24:12.000000000","message":"My first idea was to mock the FakeDriver.spawn method in the test as that will keep the behavior change close to the test case which depends on it. But this way with the extra class doc it is also pretty easy to understand.","commit_id":"b1c603c30dc41288fbaf17d8b295fca3efd744e1"}]}
