)]}'
{"nova/tests/functional/libvirt/test_reshape.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6c73ac22e0fa48148ac7a4accf2af9cca3cfbb40","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        # start a compute with vgpu support disabled so the driver will"},{"line_number":65,"context_line":"        # ignore the content of the above HostMdevDeviceInfo"},{"line_number":66,"context_line":"        self.flags(enabled_vgpu_types\u003d\u0027\u0027, group\u003d\u0027devices\u0027)"},{"line_number":67,"context_line":"        self.compute \u003d self.start_service(\u0027compute\u0027)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # create the VGPU resource in placement manually"},{"line_number":70,"context_line":"        compute_rp_uuid \u003d self.placement_api.get("}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_df271912","line":67,"updated":"2019-01-24 00:00:19.000000000","message":"This fails for me locally:\n\nnova.tests.functional.libvirt.test_reshape.VGPUReshapeTests.test_create_server_with_vgpu\n----------------------------------------------------------------------------------------\n\nCaptured traceback:\n~~~~~~~~~~~~~~~~~~~\n    b\u0027Traceback (most recent call last):\u0027\n    b\u0027  File \"/home/osboxes/git/nova/nova/tests/functional/libvirt/test_reshape.py\", line 67, in test_create_server_with_vgpu\u0027\n    b\"    self.compute \u003d self.start_service(\u0027compute\u0027)\"\n    b\u0027  File \"/home/osboxes/git/nova/nova/test.py\", line 398, in start_service\u0027\n    b\u0027    nova_fixtures.ServiceFixture(name, host, cell\u003dcell, **kwargs))\u0027\n    b\u0027  File \"/home/osboxes/git/nova/.tox/functional-py35/lib/python3.5/site-packages/testtools/testcase.py\", line 756, in useFixture\u0027\n    b\u0027    reraise(*exc_info)\u0027\n    b\u0027  File \"/home/osboxes/git/nova/.tox/functional-py35/lib/python3.5/site-packages/testtools/_compat3x.py\", line 16, in reraise\u0027\n    b\u0027    raise exc_obj.with_traceback(exc_tb)\u0027\n    b\u0027  File \"/home/osboxes/git/nova/.tox/functional-py35/lib/python3.5/site-packages/testtools/testcase.py\", line 731, in useFixture\u0027\n    b\u0027    fixture.setUp()\u0027\n    b\u0027  File \"/home/osboxes/git/nova/nova/tests/fixtures.py\", line 90, in setUp\u0027\n    b\u0027    self.service.start()\u0027\n    b\u0027  File \"/home/osboxes/git/nova/nova/service.py\", line 162, in start\u0027\n    b\u0027    self.manager.init_host()\u0027\n    b\u0027  File \"/home/osboxes/git/nova/nova/compute/manager.py\", line 1204, in init_host\u0027\n    b\u0027    self.driver.init_host(host\u003dself.host)\u0027\n    b\u0027  File \"/home/osboxes/git/nova/nova/virt/libvirt/driver.py\", line 502, in init_host\u0027\n    b\u0027    libvirt_utils.version_to_string(MIN_LIBVIRT_VERSION))\u0027\n    b\u0027nova.exception.InternalError: Nova requires libvirt version 1.3.1 or greater.\u0027\n    b\u0027\u0027\n\n\nBut the get_connection mock seems to be doing the same thing as the other libvirt functional tests so I don\u0027t really get it.","commit_id":"a433aa1f76e32c4522e48df158e7185bacb8e385"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"43d070bb71a58b095adb7845d2a612d762999dd3","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        # start a compute with vgpu support disabled so the driver will"},{"line_number":65,"context_line":"        # ignore the content of the above HostMdevDeviceInfo"},{"line_number":66,"context_line":"        self.flags(enabled_vgpu_types\u003d\u0027\u0027, group\u003d\u0027devices\u0027)"},{"line_number":67,"context_line":"        self.compute \u003d self.start_service(\u0027compute\u0027)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # create the VGPU resource in placement manually"},{"line_number":70,"context_line":"        compute_rp_uuid \u003d self.placement_api.get("}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_7b3ce1c7","line":67,"in_reply_to":"9fdfeff1_df271912","updated":"2019-01-25 11:16:26.000000000","message":"OK finally I had time to figure it out. It is the format of the MIN_LIBVIRT_MDEV_SUPPORT that is wrong as I\u0027m passing in a tuple instead of a single int. It somehow works in python 2.7 magically but in python 3.x tuples are not comparable with int.","commit_id":"a433aa1f76e32c4522e48df158e7185bacb8e385"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"51d6de99066f948ed5d1a633feb063a1d7679645","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    # the minimum libvirt version needed for vgpu"},{"line_number":29,"context_line":"    MIN_LIBVIRT_MDEV_SUPPORT \u003d 3004000"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def _wait_for_state_change(self, server, expected_status):"},{"line_number":32,"context_line":"        for i in range(0, 50):"},{"line_number":33,"context_line":"            server \u003d self.api.get_server(server[\u0027id\u0027])"},{"line_number":34,"context_line":"            if server[\u0027status\u0027] \u003d\u003d expected_status:"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_b327eec7","line":31,"range":{"start_line":31,"start_character":8,"end_line":31,"end_character":30},"updated":"2019-02-21 23:26:29.000000000","message":"Can\u0027t you reuse InstanceHelperMixin._wait_for_state_change?","commit_id":"35737e27d7e05068fddb0cc4fda3b7d5aeadb307"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"5e281da96d295693a2e4c7af33f073a7d8167dfe","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    # the minimum libvirt version needed for vgpu"},{"line_number":29,"context_line":"    MIN_LIBVIRT_MDEV_SUPPORT \u003d 3004000"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def _wait_for_state_change(self, server, expected_status):"},{"line_number":32,"context_line":"        for i in range(0, 50):"},{"line_number":33,"context_line":"            server \u003d self.api.get_server(server[\u0027id\u0027])"},{"line_number":34,"context_line":"            if server[\u0027status\u0027] \u003d\u003d expected_status:"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_bbfd3bb3","line":31,"range":{"start_line":31,"start_character":8,"end_line":31,"end_character":30},"in_reply_to":"9fdfeff1_b327eec7","updated":"2019-02-27 12:23:37.000000000","message":"Maybe.","commit_id":"35737e27d7e05068fddb0cc4fda3b7d5aeadb307"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"51d6de99066f948ed5d1a633feb063a1d7679645","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def test_create_server_with_vgpu(self):"},{"line_number":41,"context_line":"        \"\"\"Verify that vgpu rehape works with libvirt driver"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        1) create a server with an old tree where ther VGPU resource is on the"},{"line_number":44,"context_line":"           compute provider"},{"line_number":45,"context_line":"        2) trigger a reshape"},{"line_number":46,"context_line":"        3) check that the allocation of the server is still valid"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_53180283","line":43,"range":{"start_line":43,"start_character":50,"end_line":43,"end_character":54},"updated":"2019-02-21 23:26:29.000000000","message":"the","commit_id":"35737e27d7e05068fddb0cc4fda3b7d5aeadb307"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"5e281da96d295693a2e4c7af33f073a7d8167dfe","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def test_create_server_with_vgpu(self):"},{"line_number":41,"context_line":"        \"\"\"Verify that vgpu rehape works with libvirt driver"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        1) create a server with an old tree where ther VGPU resource is on the"},{"line_number":44,"context_line":"           compute provider"},{"line_number":45,"context_line":"        2) trigger a reshape"},{"line_number":46,"context_line":"        3) check that the allocation of the server is still valid"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_fbf743d3","line":43,"range":{"start_line":43,"start_character":50,"end_line":43,"end_character":54},"in_reply_to":"9fdfeff1_53180283","updated":"2019-02-27 12:23:37.000000000","message":"Done","commit_id":"35737e27d7e05068fddb0cc4fda3b7d5aeadb307"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"51d6de99066f948ed5d1a633feb063a1d7679645","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        \"\"\""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        # NOTE(gibi): We cannot simply ask the virt driver to create an old"},{"line_number":51,"context_line":"        # RP tree with vgpu on the root RP as that code path does not exists"},{"line_number":52,"context_line":"        # any more. So we have to hack a \"bit\". We will create a compute"},{"line_number":53,"context_line":"        # service without vgpu support to have the compute RP ready then we"},{"line_number":54,"context_line":"        # manually add the VGPU resource to that RP in placement. Also we make"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_731bc67f","line":51,"range":{"start_line":51,"start_character":70,"end_line":51,"end_character":76},"updated":"2019-02-21 23:26:29.000000000","message":"exist","commit_id":"35737e27d7e05068fddb0cc4fda3b7d5aeadb307"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"5e281da96d295693a2e4c7af33f073a7d8167dfe","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        \"\"\""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        # NOTE(gibi): We cannot simply ask the virt driver to create an old"},{"line_number":51,"context_line":"        # RP tree with vgpu on the root RP as that code path does not exists"},{"line_number":52,"context_line":"        # any more. So we have to hack a \"bit\". We will create a compute"},{"line_number":53,"context_line":"        # service without vgpu support to have the compute RP ready then we"},{"line_number":54,"context_line":"        # manually add the VGPU resource to that RP in placement. Also we make"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_1bf567cb","line":51,"range":{"start_line":51,"start_character":70,"end_line":51,"end_character":76},"in_reply_to":"9fdfeff1_731bc67f","updated":"2019-02-27 12:23:37.000000000","message":"Done","commit_id":"35737e27d7e05068fddb0cc4fda3b7d5aeadb307"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"51d6de99066f948ed5d1a633feb063a1d7679645","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        # any more. So we have to hack a \"bit\". We will create a compute"},{"line_number":53,"context_line":"        # service without vgpu support to have the compute RP ready then we"},{"line_number":54,"context_line":"        # manually add the VGPU resource to that RP in placement. Also we make"},{"line_number":55,"context_line":"        # sure that during the instance claim the virt drive does not detect"},{"line_number":56,"context_line":"        # the old tree as that would be a bad time for reshape. Later when the"},{"line_number":57,"context_line":"        # compute service is restarted the driver will do the reshape."},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_33153e4a","line":55,"range":{"start_line":55,"start_character":55,"end_line":55,"end_character":60},"updated":"2019-02-21 23:26:29.000000000","message":"driver","commit_id":"35737e27d7e05068fddb0cc4fda3b7d5aeadb307"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"5e281da96d295693a2e4c7af33f073a7d8167dfe","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        # any more. So we have to hack a \"bit\". We will create a compute"},{"line_number":53,"context_line":"        # service without vgpu support to have the compute RP ready then we"},{"line_number":54,"context_line":"        # manually add the VGPU resource to that RP in placement. Also we make"},{"line_number":55,"context_line":"        # sure that during the instance claim the virt drive does not detect"},{"line_number":56,"context_line":"        # the old tree as that would be a bad time for reshape. Later when the"},{"line_number":57,"context_line":"        # compute service is restarted the driver will do the reshape."},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_7b2d9344","line":55,"range":{"start_line":55,"start_character":55,"end_line":55,"end_character":60},"in_reply_to":"9fdfeff1_33153e4a","updated":"2019-02-27 12:23:37.000000000","message":"Done","commit_id":"35737e27d7e05068fddb0cc4fda3b7d5aeadb307"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"51d6de99066f948ed5d1a633feb063a1d7679645","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            \u0027reserved\u0027: 0,"},{"line_number":81,"context_line":"            \u0027step_size\u0027: 1,"},{"line_number":82,"context_line":"            \u0027total\u0027: 2}"},{"line_number":83,"context_line":"        self.placement_api.put("},{"line_number":84,"context_line":"            \u0027/resource_providers/%s/inventories\u0027 % compute_rp_uuid,"},{"line_number":85,"context_line":"            inventories)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        # now we boot a server with vgpu"},{"line_number":88,"context_line":"        extra_spec \u003d {\"resources:VGPU\": 1}"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_4e2619bd","line":85,"range":{"start_line":83,"start_character":0,"end_line":85,"end_character":24},"updated":"2019-02-21 23:26:29.000000000","message":"Could you use set_inventory_for_provider here? Otherwise the report client\u0027s provider tree is out of sync with placement after this. In particular, I\u0027m concerned that the reshape will be triggered as if we started with no VGPUs.\n\n[Later] Okay, clearly it\u0027s doing a real reshape, which is cool. I actually suspect it\u0027s doing... something once, bouncing 409, hitting the retry, refetching the world, and then doing the reshape on the second try. Is it worth confirming that?","commit_id":"35737e27d7e05068fddb0cc4fda3b7d5aeadb307"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"51d6de99066f948ed5d1a633feb063a1d7679645","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        # verify that the inventory, usages and allocation are correct before"},{"line_number":103,"context_line":"        # the reshape"},{"line_number":104,"context_line":"        compute_inventory \u003d self.placement_api.get("},{"line_number":105,"context_line":"            \u0027/resource_providers/%s/inventories\u0027 % compute_rp_uuid).body["},{"line_number":106,"context_line":"            \u0027inventories\u0027]"},{"line_number":107,"context_line":"        self.assertEqual(2, compute_inventory[\u0027VGPU\u0027][\u0027total\u0027])"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_0e20119b","line":104,"updated":"2019-02-21 23:26:29.000000000","message":"likewise, could use report client methods to pull the provider tree","commit_id":"35737e27d7e05068fddb0cc4fda3b7d5aeadb307"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9c45fec418b99440decf1b86916ec5227eb734ca","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# All Rights Reserved."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_cafa7e73","line":1,"updated":"2019-02-28 03:23:47.000000000","message":"nit: you can remove this","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8a0abba917f48983b4b727979f4cc26094a43eab","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# All Rights Reserved."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_2f56b72b","line":1,"in_reply_to":"9fdfeff1_cafa7e73","updated":"2019-02-28 09:49:16.000000000","message":"Done","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9c45fec418b99440decf1b86916ec5227eb734ca","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    # the minimum libvirt version needed for vgpu"},{"line_number":29,"context_line":"    MIN_LIBVIRT_MDEV_SUPPORT \u003d 3004000"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def _wait_for_state_change(self, server, expected_status):"},{"line_number":32,"context_line":"        for i in range(0, 50):"},{"line_number":33,"context_line":"            server \u003d self.api.get_server(server[\u0027id\u0027])"},{"line_number":34,"context_line":"            if server[\u0027status\u0027] \u003d\u003d expected_status:"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_4a2c4e01","line":31,"range":{"start_line":31,"start_character":8,"end_line":31,"end_character":30},"updated":"2019-02-28 03:23:47.000000000","message":"The super class already has self._wait_for_state_change but I like this version better, since the version in the parent class uses that \"from_status\" which is always very confusing to me. At some point I\u0027d like to move everything over to this version.","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8a0abba917f48983b4b727979f4cc26094a43eab","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    # the minimum libvirt version needed for vgpu"},{"line_number":29,"context_line":"    MIN_LIBVIRT_MDEV_SUPPORT \u003d 3004000"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def _wait_for_state_change(self, server, expected_status):"},{"line_number":32,"context_line":"        for i in range(0, 50):"},{"line_number":33,"context_line":"            server \u003d self.api.get_server(server[\u0027id\u0027])"},{"line_number":34,"context_line":"            if server[\u0027status\u0027] \u003d\u003d expected_status:"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_efc74f11","line":31,"range":{"start_line":31,"start_character":8,"end_line":31,"end_character":30},"in_reply_to":"9fdfeff1_4a2c4e01","updated":"2019-02-28 09:49:16.000000000","message":"Yeah, I saw the base class version of this, hated it, copied a nicer one from test_servers. At some point we should re-think the test class hierarchy or pull out a lot of this helpers to a test_util module.","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9c45fec418b99440decf1b86916ec5227eb734ca","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        # create the VGPU resource in placement manually"},{"line_number":72,"context_line":"        compute_rp_uuid \u003d self.placement_api.get("},{"line_number":73,"context_line":"            \u0027/resource_providers?name\u003dcompute1\u0027).body["},{"line_number":74,"context_line":"            \u0027resource_providers\u0027][0][\u0027uuid\u0027]"},{"line_number":75,"context_line":"        inventories \u003d self.placement_api.get("},{"line_number":76,"context_line":"            \u0027/resource_providers/%s/inventories\u0027 % compute_rp_uuid).body"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_ca6d9e32","line":73,"range":{"start_line":73,"start_character":38,"end_line":73,"end_character":46},"updated":"2019-02-28 03:23:47.000000000","message":"Where does compute1 come from when you started a compute service named \u0027compute\u0027?","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8a0abba917f48983b4b727979f4cc26094a43eab","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        # create the VGPU resource in placement manually"},{"line_number":72,"context_line":"        compute_rp_uuid \u003d self.placement_api.get("},{"line_number":73,"context_line":"            \u0027/resource_providers?name\u003dcompute1\u0027).body["},{"line_number":74,"context_line":"            \u0027resource_providers\u0027][0][\u0027uuid\u0027]"},{"line_number":75,"context_line":"        inventories \u003d self.placement_api.get("},{"line_number":76,"context_line":"            \u0027/resource_providers/%s/inventories\u0027 % compute_rp_uuid).body"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_cf45ab70","line":73,"range":{"start_line":73,"start_character":38,"end_line":73,"end_character":46},"in_reply_to":"9fdfeff1_ca6d9e32","updated":"2019-02-28 09:49:16.000000000","message":"ohh. self.start_service(\u0027compute\u0027) means start a nova-compute service with some default hostname. Now I changed this to explicitly state the hostname (compute1) as well in the call.\nDone.","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9c45fec418b99440decf1b86916ec5227eb734ca","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            created_server2 \u003d self.api.post_server({\u0027server\u0027: server_req})"},{"line_number":103,"context_line":"            server2 \u003d self._wait_for_state_change(created_server2, \u0027ACTIVE\u0027)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        # verify that the inventory, usages and allocation are correct before"},{"line_number":106,"context_line":"        # the reshape"},{"line_number":107,"context_line":"        compute_inventory \u003d self.placement_api.get("},{"line_number":108,"context_line":"            \u0027/resource_providers/%s/inventories\u0027 % compute_rp_uuid).body["}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_4af1ae6a","line":105,"updated":"2019-02-28 03:23:47.000000000","message":"Would have been nice to re-use the assertion methods from ProviderUsageBaseTestCase here but that\u0027s a minor detail.","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8a0abba917f48983b4b727979f4cc26094a43eab","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            created_server2 \u003d self.api.post_server({\u0027server\u0027: server_req})"},{"line_number":103,"context_line":"            server2 \u003d self._wait_for_state_change(created_server2, \u0027ACTIVE\u0027)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        # verify that the inventory, usages and allocation are correct before"},{"line_number":106,"context_line":"        # the reshape"},{"line_number":107,"context_line":"        compute_inventory \u003d self.placement_api.get("},{"line_number":108,"context_line":"            \u0027/resource_providers/%s/inventories\u0027 % compute_rp_uuid).body["}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_ef318f0c","line":105,"in_reply_to":"9fdfeff1_4af1ae6a","updated":"2019-02-28 09:49:16.000000000","message":"They are in different class hierarchy. :/","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cb2e52c01bda1b84a311d185eb1274fb686a6eb2","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            created_server2 \u003d self.api.post_server({\u0027server\u0027: server_req})"},{"line_number":103,"context_line":"            server2 \u003d self._wait_for_state_change(created_server2, \u0027ACTIVE\u0027)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        # verify that the inventory, usages and allocation are correct before"},{"line_number":106,"context_line":"        # the reshape"},{"line_number":107,"context_line":"        compute_inventory \u003d self.placement_api.get("},{"line_number":108,"context_line":"            \u0027/resource_providers/%s/inventories\u0027 % compute_rp_uuid).body["}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_4b56862c","line":105,"in_reply_to":"9fdfeff1_ef318f0c","updated":"2019-02-28 14:19:07.000000000","message":"Yup. As noted, it would be nice to redo some of the helpers at some point but low priority.","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9c45fec418b99440decf1b86916ec5227eb734ca","unresolved":false,"context_lines":[{"line_number":113,"context_line":"            \u0027usages\u0027]"},{"line_number":114,"context_line":"        self.assertEqual(2, compute_usages[\u0027VGPU\u0027])"},{"line_number":115,"context_line":"        allocations \u003d self.placement_api.get("},{"line_number":116,"context_line":"            \u0027/allocations/%s\u0027 % server1[\u0027id\u0027]).body["},{"line_number":117,"context_line":"            \u0027allocations\u0027]"},{"line_number":118,"context_line":"        self.assertEqual("},{"line_number":119,"context_line":"            {\u0027DISK_GB\u0027: 20, \u0027MEMORY_MB\u0027: 2048, \u0027VCPU\u0027: 2, \u0027VGPU\u0027: 1},"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_2a9f8a02","line":116,"updated":"2019-02-28 03:23:47.000000000","message":"You could loop over server1 and server2 for this right? The allocations should be identical.","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8a0abba917f48983b4b727979f4cc26094a43eab","unresolved":false,"context_lines":[{"line_number":113,"context_line":"            \u0027usages\u0027]"},{"line_number":114,"context_line":"        self.assertEqual(2, compute_usages[\u0027VGPU\u0027])"},{"line_number":115,"context_line":"        allocations \u003d self.placement_api.get("},{"line_number":116,"context_line":"            \u0027/allocations/%s\u0027 % server1[\u0027id\u0027]).body["},{"line_number":117,"context_line":"            \u0027allocations\u0027]"},{"line_number":118,"context_line":"        self.assertEqual("},{"line_number":119,"context_line":"            {\u0027DISK_GB\u0027: 20, \u0027MEMORY_MB\u0027: 2048, \u0027VCPU\u0027: 2, \u0027VGPU\u0027: 1},"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_b2a1acf9","line":116,"in_reply_to":"9fdfeff1_2a9f8a02","updated":"2019-02-28 09:49:16.000000000","message":"correct. Done.","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9c45fec418b99440decf1b86916ec5227eb734ca","unresolved":false,"context_lines":[{"line_number":116,"context_line":"            \u0027/allocations/%s\u0027 % server1[\u0027id\u0027]).body["},{"line_number":117,"context_line":"            \u0027allocations\u0027]"},{"line_number":118,"context_line":"        self.assertEqual("},{"line_number":119,"context_line":"            {\u0027DISK_GB\u0027: 20, \u0027MEMORY_MB\u0027: 2048, \u0027VCPU\u0027: 2, \u0027VGPU\u0027: 1},"},{"line_number":120,"context_line":"            allocations[compute_rp_uuid][\u0027resources\u0027])"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        # enabled vgpu support"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_8afa3640","line":119,"range":{"start_line":119,"start_character":12,"end_line":119,"end_character":26},"updated":"2019-02-28 03:23:47.000000000","message":"Why is this 20 when _create_flavor defaults disk to 10?","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8a0abba917f48983b4b727979f4cc26094a43eab","unresolved":false,"context_lines":[{"line_number":116,"context_line":"            \u0027/allocations/%s\u0027 % server1[\u0027id\u0027]).body["},{"line_number":117,"context_line":"            \u0027allocations\u0027]"},{"line_number":118,"context_line":"        self.assertEqual("},{"line_number":119,"context_line":"            {\u0027DISK_GB\u0027: 20, \u0027MEMORY_MB\u0027: 2048, \u0027VCPU\u0027: 2, \u0027VGPU\u0027: 1},"},{"line_number":120,"context_line":"            allocations[compute_rp_uuid][\u0027resources\u0027])"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        # enabled vgpu support"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_d27d506d","line":119,"range":{"start_line":119,"start_character":12,"end_line":119,"end_character":26},"in_reply_to":"9fdfeff1_8afa3640","updated":"2019-02-28 09:49:16.000000000","message":"disk\u003d10, ephemeral\u003d10,","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cb2e52c01bda1b84a311d185eb1274fb686a6eb2","unresolved":false,"context_lines":[{"line_number":116,"context_line":"            \u0027/allocations/%s\u0027 % server1[\u0027id\u0027]).body["},{"line_number":117,"context_line":"            \u0027allocations\u0027]"},{"line_number":118,"context_line":"        self.assertEqual("},{"line_number":119,"context_line":"            {\u0027DISK_GB\u0027: 20, \u0027MEMORY_MB\u0027: 2048, \u0027VCPU\u0027: 2, \u0027VGPU\u0027: 1},"},{"line_number":120,"context_line":"            allocations[compute_rp_uuid][\u0027resources\u0027])"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        # enabled vgpu support"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_8b60ee02","line":119,"range":{"start_line":119,"start_character":12,"end_line":119,"end_character":26},"in_reply_to":"9fdfeff1_d27d506d","updated":"2019-02-28 14:19:07.000000000","message":"Ah yeah, OK.","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9c45fec418b99440decf1b86916ec5227eb734ca","unresolved":false,"context_lines":[{"line_number":120,"context_line":"            allocations[compute_rp_uuid][\u0027resources\u0027])"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        # enabled vgpu support"},{"line_number":123,"context_line":"        self.flags(enabled_vgpu_types\u003d\u0027nvidia-11\u0027, group\u003d\u0027devices\u0027)"},{"line_number":124,"context_line":"        # restart compute which will trigger a reshape"},{"line_number":125,"context_line":"        self.restart_compute_service(self.compute)"},{"line_number":126,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_2ab8ea72","line":123,"range":{"start_line":123,"start_character":38,"end_line":123,"end_character":49},"updated":"2019-02-28 03:23:47.000000000","message":"Would be nice to define a constant for this in fakelibvirt so people looking at this test know where it\u0027s used.","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8a0abba917f48983b4b727979f4cc26094a43eab","unresolved":false,"context_lines":[{"line_number":120,"context_line":"            allocations[compute_rp_uuid][\u0027resources\u0027])"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        # enabled vgpu support"},{"line_number":123,"context_line":"        self.flags(enabled_vgpu_types\u003d\u0027nvidia-11\u0027, group\u003d\u0027devices\u0027)"},{"line_number":124,"context_line":"        # restart compute which will trigger a reshape"},{"line_number":125,"context_line":"        self.restart_compute_service(self.compute)"},{"line_number":126,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_724b442a","line":123,"range":{"start_line":123,"start_character":38,"end_line":123,"end_character":49},"in_reply_to":"9fdfeff1_2ab8ea72","updated":"2019-02-28 09:49:16.000000000","message":"Done","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9c45fec418b99440decf1b86916ec5227eb734ca","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        # That said, we need to check all the pGPU inventories for knowing"},{"line_number":136,"context_line":"        # which ones are used."},{"line_number":137,"context_line":"        usages \u003d {}"},{"line_number":138,"context_line":"        for pci_device in [\u0027pci_0000_06_00_0\u0027, \u0027pci_0000_07_00_0\u0027,"},{"line_number":139,"context_line":"                           \u0027pci_0000_08_00_0\u0027]:"},{"line_number":140,"context_line":"            gpu_rp_uuid \u003d self.placement_api.get("},{"line_number":141,"context_line":"                \u0027/resource_providers?name\u003dcompute1_%s\u0027 % pci_device).body["},{"line_number":142,"context_line":"                \u0027resource_providers\u0027][0][\u0027uuid\u0027]"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_6ac272eb","line":139,"range":{"start_line":138,"start_character":26,"end_line":139,"end_character":46},"updated":"2019-02-28 03:23:47.000000000","message":"Would be nice if these were defined in a variable in fakelibvirt so we didn\u0027t have to know where these are coming from and how they are matched up.","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8a0abba917f48983b4b727979f4cc26094a43eab","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        # That said, we need to check all the pGPU inventories for knowing"},{"line_number":136,"context_line":"        # which ones are used."},{"line_number":137,"context_line":"        usages \u003d {}"},{"line_number":138,"context_line":"        for pci_device in [\u0027pci_0000_06_00_0\u0027, \u0027pci_0000_07_00_0\u0027,"},{"line_number":139,"context_line":"                           \u0027pci_0000_08_00_0\u0027]:"},{"line_number":140,"context_line":"            gpu_rp_uuid \u003d self.placement_api.get("},{"line_number":141,"context_line":"                \u0027/resource_providers?name\u003dcompute1_%s\u0027 % pci_device).body["},{"line_number":142,"context_line":"                \u0027resource_providers\u0027][0][\u0027uuid\u0027]"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_52fac0b9","line":139,"range":{"start_line":138,"start_character":26,"end_line":139,"end_character":46},"in_reply_to":"9fdfeff1_6ac272eb","updated":"2019-02-28 09:49:16.000000000","message":"Done","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9c45fec418b99440decf1b86916ec5227eb734ca","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                \u0027/allocations/%s\u0027 % server[\u0027id\u0027]).body["},{"line_number":160,"context_line":"                \u0027allocations\u0027]"},{"line_number":161,"context_line":"            self.assertEqual("},{"line_number":162,"context_line":"                {\u0027DISK_GB\u0027: 20, \u0027MEMORY_MB\u0027: 2048, \u0027VCPU\u0027: 2},"},{"line_number":163,"context_line":"                allocations[compute_rp_uuid][\u0027resources\u0027])"},{"line_number":164,"context_line":"            rp_uuids \u003d list(allocations.keys())"},{"line_number":165,"context_line":"            # We only have two RPs, the root and the child pGPU RP"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_2a6d4a02","line":162,"range":{"start_line":162,"start_character":28,"end_line":162,"end_character":30},"updated":"2019-02-28 03:23:47.000000000","message":"same - I don\u0027t get it","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8a0abba917f48983b4b727979f4cc26094a43eab","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                \u0027/allocations/%s\u0027 % server[\u0027id\u0027]).body["},{"line_number":160,"context_line":"                \u0027allocations\u0027]"},{"line_number":161,"context_line":"            self.assertEqual("},{"line_number":162,"context_line":"                {\u0027DISK_GB\u0027: 20, \u0027MEMORY_MB\u0027: 2048, \u0027VCPU\u0027: 2},"},{"line_number":163,"context_line":"                allocations[compute_rp_uuid][\u0027resources\u0027])"},{"line_number":164,"context_line":"            rp_uuids \u003d list(allocations.keys())"},{"line_number":165,"context_line":"            # We only have two RPs, the root and the child pGPU RP"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_32fffcab","line":162,"range":{"start_line":162,"start_character":28,"end_line":162,"end_character":30},"in_reply_to":"9fdfeff1_2a6d4a02","updated":"2019-02-28 09:49:16.000000000","message":"See above.","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9c45fec418b99440decf1b86916ec5227eb734ca","unresolved":false,"context_lines":[{"line_number":162,"context_line":"                {\u0027DISK_GB\u0027: 20, \u0027MEMORY_MB\u0027: 2048, \u0027VCPU\u0027: 2},"},{"line_number":163,"context_line":"                allocations[compute_rp_uuid][\u0027resources\u0027])"},{"line_number":164,"context_line":"            rp_uuids \u003d list(allocations.keys())"},{"line_number":165,"context_line":"            # We only have two RPs, the root and the child pGPU RP"},{"line_number":166,"context_line":"            gpu_rp_uuid \u003d (rp_uuids[1] if rp_uuids[0] \u003d\u003d compute_rp_uuid"},{"line_number":167,"context_line":"                           else rp_uuids[0])"},{"line_number":168,"context_line":"            self.assertEqual("}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_4a4d2e98","line":165,"range":{"start_line":165,"start_character":45,"end_line":165,"end_character":66},"updated":"2019-02-28 03:23:47.000000000","message":"This confuses me because above you say 2 pGPUs and I thought there would be a child resource provider per pGPU?","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8a0abba917f48983b4b727979f4cc26094a43eab","unresolved":false,"context_lines":[{"line_number":162,"context_line":"                {\u0027DISK_GB\u0027: 20, \u0027MEMORY_MB\u0027: 2048, \u0027VCPU\u0027: 2},"},{"line_number":163,"context_line":"                allocations[compute_rp_uuid][\u0027resources\u0027])"},{"line_number":164,"context_line":"            rp_uuids \u003d list(allocations.keys())"},{"line_number":165,"context_line":"            # We only have two RPs, the root and the child pGPU RP"},{"line_number":166,"context_line":"            gpu_rp_uuid \u003d (rp_uuids[1] if rp_uuids[0] \u003d\u003d compute_rp_uuid"},{"line_number":167,"context_line":"                           else rp_uuids[0])"},{"line_number":168,"context_line":"            self.assertEqual("}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_f2d3b436","line":165,"range":{"start_line":165,"start_character":45,"end_line":165,"end_character":66},"in_reply_to":"9fdfeff1_4a4d2e98","updated":"2019-02-28 09:49:16.000000000","message":"This check is per server. Each server has a single VGPU from a single PGPU. Here the two RPs are the compute RP and the PGPU RP.","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cb2e52c01bda1b84a311d185eb1274fb686a6eb2","unresolved":false,"context_lines":[{"line_number":162,"context_line":"                {\u0027DISK_GB\u0027: 20, \u0027MEMORY_MB\u0027: 2048, \u0027VCPU\u0027: 2},"},{"line_number":163,"context_line":"                allocations[compute_rp_uuid][\u0027resources\u0027])"},{"line_number":164,"context_line":"            rp_uuids \u003d list(allocations.keys())"},{"line_number":165,"context_line":"            # We only have two RPs, the root and the child pGPU RP"},{"line_number":166,"context_line":"            gpu_rp_uuid \u003d (rp_uuids[1] if rp_uuids[0] \u003d\u003d compute_rp_uuid"},{"line_number":167,"context_line":"                           else rp_uuids[0])"},{"line_number":168,"context_line":"            self.assertEqual("}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_cb37d6fd","line":165,"range":{"start_line":165,"start_character":45,"end_line":165,"end_character":66},"in_reply_to":"9fdfeff1_f2d3b436","updated":"2019-02-28 14:19:07.000000000","message":"Ah OK oops.","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"a637bdfb1b4792e2423ae0726f387cb553ec8c3a","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        # NOTE(gibi): during instance_claim() there is a"},{"line_number":94,"context_line":"        # driver.update_provider_tree() call that would detect the old tree and"},{"line_number":95,"context_line":"        # would fail as this is not a good time to reshape. To avoid that we"},{"line_number":96,"context_line":"        # temporally mock update_provider_tree here."},{"line_number":97,"context_line":"        with mock.patch(\u0027nova.virt.libvirt.driver.LibvirtDriver.\u0027"},{"line_number":98,"context_line":"                        \u0027update_provider_tree\u0027):"},{"line_number":99,"context_line":"            created_server1 \u003d self.api.post_server({\u0027server\u0027: server_req})"}],"source_content_type":"text/x-python","patch_set":13,"id":"9fdfeff1_5e2887e0","line":96,"range":{"start_line":96,"start_character":10,"end_line":96,"end_character":20},"updated":"2019-02-28 11:33:48.000000000","message":"temporarily","commit_id":"a76eefed62db96fe51ef40e3209c187af3eb9834"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"a637bdfb1b4792e2423ae0726f387cb553ec8c3a","unresolved":false,"context_lines":[{"line_number":166,"context_line":"                {\u0027DISK_GB\u0027: 20, \u0027MEMORY_MB\u0027: 2048, \u0027VCPU\u0027: 2},"},{"line_number":167,"context_line":"                allocations[compute_rp_uuid][\u0027resources\u0027])"},{"line_number":168,"context_line":"            rp_uuids \u003d list(allocations.keys())"},{"line_number":169,"context_line":"            # We only have two RPs, the compute PR (the root) and the child"},{"line_number":170,"context_line":"            # pGPU RP"},{"line_number":171,"context_line":"            gpu_rp_uuid \u003d (rp_uuids[1] if rp_uuids[0] \u003d\u003d compute_rp_uuid"},{"line_number":172,"context_line":"                           else rp_uuids[0])"}],"source_content_type":"text/x-python","patch_set":13,"id":"9fdfeff1_9e7fcfdd","line":169,"range":{"start_line":169,"start_character":48,"end_line":169,"end_character":50},"updated":"2019-02-28 11:33:48.000000000","message":"RP","commit_id":"a76eefed62db96fe51ef40e3209c187af3eb9834"}],"nova/tests/unit/virt/libvirt/fakelibvirt.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"51d6de99066f948ed5d1a633feb063a1d7679645","unresolved":false,"context_lines":[{"line_number":332,"context_line":"        }"},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"    def get_all_devices(self):"},{"line_number":335,"context_line":"        return self.devices.keys()"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"    def get_device_by_name(self, device_name):"},{"line_number":338,"context_line":"        dev \u003d self.devices.get(device_name)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_1344ba73","line":335,"range":{"start_line":335,"start_character":15,"end_line":335,"end_character":34},"updated":"2019-02-21 23:26:29.000000000","message":"This returns a list in py2 and an iterator in py3. That okay?\n\n[Later] Guess so, same as L289.","commit_id":"35737e27d7e05068fddb0cc4fda3b7d5aeadb307"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"5e281da96d295693a2e4c7af33f073a7d8167dfe","unresolved":false,"context_lines":[{"line_number":332,"context_line":"        }"},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"    def get_all_devices(self):"},{"line_number":335,"context_line":"        return self.devices.keys()"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"    def get_device_by_name(self, device_name):"},{"line_number":338,"context_line":"        dev \u003d self.devices.get(device_name)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_bbc0db2c","line":335,"range":{"start_line":335,"start_character":15,"end_line":335,"end_character":34},"in_reply_to":"9fdfeff1_1344ba73","updated":"2019-02-27 12:23:37.000000000","message":"Yup, it\u0027s fine.","commit_id":"35737e27d7e05068fddb0cc4fda3b7d5aeadb307"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"51d6de99066f948ed5d1a633feb063a1d7679645","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        return self.devices.keys()"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"    def get_device_by_name(self, device_name):"},{"line_number":338,"context_line":"        dev \u003d self.devices.get(device_name)"},{"line_number":339,"context_line":"        return dev"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_d35dd248","line":338,"range":{"start_line":338,"start_character":8,"end_line":338,"end_character":11},"updated":"2019-02-21 23:26:29.000000000","message":"unnecessary var\n\n[Later] Templated on L292-3, shrug.","commit_id":"35737e27d7e05068fddb0cc4fda3b7d5aeadb307"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9c45fec418b99440decf1b86916ec5227eb734ca","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        return self.devices.keys()"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"    def get_device_by_name(self, device_name):"},{"line_number":343,"context_line":"        dev \u003d self.devices.get(device_name)"},{"line_number":344,"context_line":"        return dev"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_cad11efd","line":343,"range":{"start_line":343,"start_character":26,"end_line":343,"end_character":31},"updated":"2019-02-28 03:23:47.000000000","message":"Wouldn\u0027t it be better to use self.devices[device_name] here so KeyError is raised if a bogus device_name is passed in?","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8a0abba917f48983b4b727979f4cc26094a43eab","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        return self.devices.keys()"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"    def get_device_by_name(self, device_name):"},{"line_number":343,"context_line":"        dev \u003d self.devices.get(device_name)"},{"line_number":344,"context_line":"        return dev"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_f2bc14dd","line":343,"range":{"start_line":343,"start_character":26,"end_line":343,"end_character":31},"in_reply_to":"9fdfeff1_cad11efd","updated":"2019-02-28 09:49:16.000000000","message":"Done","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9c45fec418b99440decf1b86916ec5227eb734ca","unresolved":false,"context_lines":[{"line_number":761,"context_line":"            for hostdev in hostdevs:"},{"line_number":762,"context_line":"                address \u003d hostdev.find(\u0027./source/address\u0027)"},{"line_number":763,"context_line":"                # NOTE(gibi): only handle mdevs as pci is complicated"},{"line_number":764,"context_line":"                type \u003d hostdev.get(\u0027type\u0027)"},{"line_number":765,"context_line":"                if type \u003d\u003d \u0027mdev\u0027:"},{"line_number":766,"context_line":"                    hostdev_info.append({"},{"line_number":767,"context_line":"                        \u0027type\u0027: type,"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_8ac23633","line":764,"range":{"start_line":764,"start_character":16,"end_line":764,"end_character":20},"updated":"2019-02-28 03:23:47.000000000","message":"nit: type is a reserved keyword so would be better if this were dev_type or _type or something.","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8a0abba917f48983b4b727979f4cc26094a43eab","unresolved":false,"context_lines":[{"line_number":761,"context_line":"            for hostdev in hostdevs:"},{"line_number":762,"context_line":"                address \u003d hostdev.find(\u0027./source/address\u0027)"},{"line_number":763,"context_line":"                # NOTE(gibi): only handle mdevs as pci is complicated"},{"line_number":764,"context_line":"                type \u003d hostdev.get(\u0027type\u0027)"},{"line_number":765,"context_line":"                if type \u003d\u003d \u0027mdev\u0027:"},{"line_number":766,"context_line":"                    hostdev_info.append({"},{"line_number":767,"context_line":"                        \u0027type\u0027: type,"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_52c1604d","line":764,"range":{"start_line":764,"start_character":16,"end_line":764,"end_character":20},"in_reply_to":"9fdfeff1_8ac23633","updated":"2019-02-28 09:49:16.000000000","message":"Done","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9c45fec418b99440decf1b86916ec5227eb734ca","unresolved":false,"context_lines":[{"line_number":1519,"context_line":"    def nodeDeviceLookupByName(self, name):"},{"line_number":1520,"context_line":"        if name.startswith(\u0027mdev\u0027):"},{"line_number":1521,"context_line":"            return self.mdev_info.get_device_by_name(name)"},{"line_number":1522,"context_line":"        else:"},{"line_number":1523,"context_line":"            pci_dev \u003d self.pci_info.get_device_by_name(name)"},{"line_number":1524,"context_line":"            if pci_dev:"},{"line_number":1525,"context_line":"                return pci_dev"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_6a0a728a","line":1522,"range":{"start_line":1522,"start_character":8,"end_line":1522,"end_character":13},"updated":"2019-02-28 03:23:47.000000000","message":"You don\u0027t need this else or the indent since the condition above returns.","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8a0abba917f48983b4b727979f4cc26094a43eab","unresolved":false,"context_lines":[{"line_number":1519,"context_line":"    def nodeDeviceLookupByName(self, name):"},{"line_number":1520,"context_line":"        if name.startswith(\u0027mdev\u0027):"},{"line_number":1521,"context_line":"            return self.mdev_info.get_device_by_name(name)"},{"line_number":1522,"context_line":"        else:"},{"line_number":1523,"context_line":"            pci_dev \u003d self.pci_info.get_device_by_name(name)"},{"line_number":1524,"context_line":"            if pci_dev:"},{"line_number":1525,"context_line":"                return pci_dev"}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_b2a76cbc","line":1522,"range":{"start_line":1522,"start_character":8,"end_line":1522,"end_character":13},"in_reply_to":"9fdfeff1_6a0a728a","updated":"2019-02-28 09:49:16.000000000","message":"Done","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9c45fec418b99440decf1b86916ec5227eb734ca","unresolved":false,"context_lines":[{"line_number":1538,"context_line":"        if cap \u003d\u003d \u0027mdev\u0027:"},{"line_number":1539,"context_line":"            return self.mdev_info.get_all_devices()"},{"line_number":1540,"context_line":"        else:"},{"line_number":1541,"context_line":"            ValueError(\u0027Capability \"%s\" is not supported\u0027 % cap)"},{"line_number":1542,"context_line":""},{"line_number":1543,"context_line":"    def baselineCPU(self, cpu, flag):"},{"line_number":1544,"context_line":"        \"\"\"Add new libvirt API.\"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_2a00ea65","line":1541,"range":{"start_line":1541,"start_character":12,"end_line":1541,"end_character":22},"updated":"2019-02-28 03:23:47.000000000","message":"raise?","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8a0abba917f48983b4b727979f4cc26094a43eab","unresolved":false,"context_lines":[{"line_number":1538,"context_line":"        if cap \u003d\u003d \u0027mdev\u0027:"},{"line_number":1539,"context_line":"            return self.mdev_info.get_all_devices()"},{"line_number":1540,"context_line":"        else:"},{"line_number":1541,"context_line":"            ValueError(\u0027Capability \"%s\" is not supported\u0027 % cap)"},{"line_number":1542,"context_line":""},{"line_number":1543,"context_line":"    def baselineCPU(self, cpu, flag):"},{"line_number":1544,"context_line":"        \"\"\"Add new libvirt API.\"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"9fdfeff1_329b7c73","line":1541,"range":{"start_line":1541,"start_character":12,"end_line":1541,"end_character":22},"in_reply_to":"9fdfeff1_2a00ea65","updated":"2019-02-28 09:49:16.000000000","message":"Done","commit_id":"34f815817cc3b85a6ce6ea5101e2d9b82fb3c46e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8a0abba917f48983b4b727979f4cc26094a43eab","unresolved":false,"context_lines":[{"line_number":1545,"context_line":"        if cap \u003d\u003d \u0027mdev_types\u0027:"},{"line_number":1546,"context_line":"            # TODO(gibi): We should return something like"},{"line_number":1547,"context_line":"            # https://libvirt.org/drvnodedev.html#MDEVCap but I tried and it"},{"line_number":1548,"context_line":"            # did not work for me."},{"line_number":1549,"context_line":"            return None"},{"line_number":1550,"context_line":"        else:"},{"line_number":1551,"context_line":"            raise ValueError(\u0027Capability \"%s\" is not supported\u0027 % cap)"}],"source_content_type":"text/x-python","patch_set":13,"id":"9fdfeff1_1d73e917","line":1548,"updated":"2019-02-28 09:49:16.000000000","message":"I created something similar to FakeMdevDevice for mdev_type according to the xml example in https://libvirt.org/drvnodedev.html#MDEVCap  but the driver blows if I return it here. :/","commit_id":"a76eefed62db96fe51ef40e3209c187af3eb9834"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"a637bdfb1b4792e2423ae0726f387cb553ec8c3a","unresolved":false,"context_lines":[{"line_number":1547,"context_line":"            # https://libvirt.org/drvnodedev.html#MDEVCap but I tried and it"},{"line_number":1548,"context_line":"            # did not work for me."},{"line_number":1549,"context_line":"            return None"},{"line_number":1550,"context_line":"        else:"},{"line_number":1551,"context_line":"            raise ValueError(\u0027Capability \"%s\" is not supported\u0027 % cap)"},{"line_number":1552,"context_line":""},{"line_number":1553,"context_line":"    def baselineCPU(self, cpu, flag):"}],"source_content_type":"text/x-python","patch_set":13,"id":"9fdfeff1_9ee6efaf","line":1550,"range":{"start_line":1550,"start_character":8,"end_line":1550,"end_character":13},"updated":"2019-02-28 11:33:48.000000000","message":"nit: redundant","commit_id":"a76eefed62db96fe51ef40e3209c187af3eb9834"}]}
