)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5a7a4bba5d8663d166c9f61fc95a74ce5b956963","unresolved":false,"context_lines":[{"line_number":27,"context_line":"provide this value manually, and then use it to populate the"},{"line_number":28,"context_line":"inventory."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"This depends on the change to os-resource-classes which adds the"},{"line_number":31,"context_line":"MEM_ENCRYPTION_CONTEXT resource class."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"blueprint: amd-sev-libvirt-support"},{"line_number":34,"context_line":"Change-Id: Ib1304e65f1a203e6aed66e530d6e573c36165cd7"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9fb8cfa7_6484680d","line":31,"range":{"start_line":30,"start_character":0,"end_line":31,"end_character":38},"updated":"2019-06-05 14:34:47.000000000","message":"redundant with L10","commit_id":"c6e4821f450718f707838a07438252f8bed864ab"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"6bb2d36392dd1c6d1059f338a0947bfd3e6833f8","unresolved":false,"context_lines":[{"line_number":27,"context_line":"provide this value manually, and then use it to populate the"},{"line_number":28,"context_line":"inventory."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"This depends on the change to os-resource-classes which adds the"},{"line_number":31,"context_line":"MEM_ENCRYPTION_CONTEXT resource class."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"blueprint: amd-sev-libvirt-support"},{"line_number":34,"context_line":"Change-Id: Ib1304e65f1a203e6aed66e530d6e573c36165cd7"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9fb8cfa7_bbbefa62","line":31,"range":{"start_line":30,"start_character":0,"end_line":31,"end_character":38},"in_reply_to":"9fb8cfa7_6484680d","updated":"2019-06-05 21:46:10.000000000","message":"Removed.","commit_id":"c6e4821f450718f707838a07438252f8bed864ab"}],"lower-constraints.txt":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"3563e121de662d57280d2e1205d216bccec23473","unresolved":false,"context_lines":[{"line_number":66,"context_line":"openstacksdk\u003d\u003d0.12.0"},{"line_number":67,"context_line":"os-brick\u003d\u003d2.6.1"},{"line_number":68,"context_line":"os-client-config\u003d\u003d1.29.0"},{"line_number":69,"context_line":"os-resource-classes\u003d\u003d0.4.0"},{"line_number":70,"context_line":"os-service-types\u003d\u003d1.2.0"},{"line_number":71,"context_line":"os-traits\u003d\u003d0.13.0"},{"line_number":72,"context_line":"os-vif\u003d\u003d1.14.0"}],"source_content_type":"text/plain","patch_set":5,"id":"9fb8cfa7_e43e0e28","line":69,"range":{"start_line":69,"start_character":0,"end_line":69,"end_character":19},"updated":"2019-06-05 23:03:41.000000000","message":"ok so this is bumped for the new MEM_ENCRYPTION_CONTEXT resource class","commit_id":"90cfcc2cd390271509d2325bc6b6080183f240d7"}],"nova/conf/libvirt.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5a7a4bba5d8663d166c9f61fc95a74ce5b956963","unresolved":false,"context_lines":[{"line_number":838,"context_line":"* ``virt_type`` must be set to ``kvm`` or ``qemu``."},{"line_number":839,"context_line":"* ``ram_allocation_ratio`` must be set to 1.0."},{"line_number":840,"context_line":"\"\"\"),"},{"line_number":841,"context_line":"    cfg.IntOpt(\u0027num_memory_encrypted_guests\u0027,"},{"line_number":842,"context_line":"               default\u003dNone,"},{"line_number":843,"context_line":"               min\u003d0,"},{"line_number":844,"context_line":"               help\u003d\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_e4acd88d","line":841,"updated":"2019-06-05 14:34:47.000000000","message":"✔ Very nice","commit_id":"c6e4821f450718f707838a07438252f8bed864ab"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"3563e121de662d57280d2e1205d216bccec23473","unresolved":false,"context_lines":[{"line_number":855,"context_line":"the future."},{"line_number":856,"context_line":""},{"line_number":857,"context_line":"A value of ``None`` means auto-detect the inventory, or if this is not"},{"line_number":858,"context_line":"possible, set the inventory to 0 on hosts which don\u0027t support SEV, and"},{"line_number":859,"context_line":"on hosts which do, don\u0027t impose any limit."},{"line_number":860,"context_line":""},{"line_number":861,"context_line":".. note::"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fb8cfa7_a44fb6bb","line":858,"range":{"start_line":858,"start_character":9,"end_line":858,"end_character":66},"updated":"2019-06-05 23:03:41.000000000","message":"i thought we were not going to create the inventory at all on host that did not support sev.\n\nif i am reading https://review.opendev.org/#/c/662105/5/nova/virt/libvirt/driver.py@6813\n\ncorrectly then we only add the MEM_ENCRYPTION_CONTEX inventory when self._get_memory_encrypted_slots() is \u003e 0\n\nwe are also asserting the inventory does not exists here\nhttps://review.opendev.org/#/c/662105/5/nova/tests/functional/libvirt/test_report_cpu_traits.py@39\n\nso i think this is incorrect","commit_id":"90cfcc2cd390271509d2325bc6b6080183f240d7"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"0d64d4a03ccbbd36823b7a1fde921ec7f81aa071","unresolved":false,"context_lines":[{"line_number":855,"context_line":"the future."},{"line_number":856,"context_line":""},{"line_number":857,"context_line":"A value of ``None`` means auto-detect the inventory, or if this is not"},{"line_number":858,"context_line":"possible, set the inventory to 0 on hosts which don\u0027t support SEV, and"},{"line_number":859,"context_line":"on hosts which do, don\u0027t impose any limit."},{"line_number":860,"context_line":""},{"line_number":861,"context_line":".. note::"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fb8cfa7_6d443a1c","line":858,"range":{"start_line":858,"start_character":9,"end_line":858,"end_character":66},"in_reply_to":"9fb8cfa7_27dd0842","updated":"2019-06-06 09:24:59.000000000","message":"Right.  You\u0027re reading this literally in terms of internal implementation details, but it\u0027s meant semantically.  If I say \"I don\u0027t have any apples\" then that is semantically equivalent to saying \"I have 0 apples\".\n\nSuggestions on a better wording are very welcome.  IMHO something like\n\n\u003e don\u0027t set the inventory on hosts which don\u0027t support SEV\n\nis less clear, since it assumes an understanding of the aspect of the internals which ensure that absent inventory is treated like non-developers would expect an inventory of 0 to be treated.","commit_id":"90cfcc2cd390271509d2325bc6b6080183f240d7"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6b143e00d82bddeaf218c0364db57163ea4ff491","unresolved":false,"context_lines":[{"line_number":855,"context_line":"the future."},{"line_number":856,"context_line":""},{"line_number":857,"context_line":"A value of ``None`` means auto-detect the inventory, or if this is not"},{"line_number":858,"context_line":"possible, set the inventory to 0 on hosts which don\u0027t support SEV, and"},{"line_number":859,"context_line":"on hosts which do, don\u0027t impose any limit."},{"line_number":860,"context_line":""},{"line_number":861,"context_line":".. note::"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fb8cfa7_27dd0842","line":858,"range":{"start_line":858,"start_character":9,"end_line":858,"end_character":66},"in_reply_to":"9fb8cfa7_443efada","updated":"2019-06-05 23:41:13.000000000","message":"From the consumer\u0027s point of view there\u0027s no difference. Phrasing it otherwise would be pretty awkward, or assume too much understanding of the nova/placement internals. Do you have a suggestion?","commit_id":"90cfcc2cd390271509d2325bc6b6080183f240d7"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"f633f0aa1c96bc78d3b04faa185d76ebedb21b76","unresolved":false,"context_lines":[{"line_number":855,"context_line":"the future."},{"line_number":856,"context_line":""},{"line_number":857,"context_line":"A value of ``None`` means auto-detect the inventory, or if this is not"},{"line_number":858,"context_line":"possible, set the inventory to 0 on hosts which don\u0027t support SEV, and"},{"line_number":859,"context_line":"on hosts which do, don\u0027t impose any limit."},{"line_number":860,"context_line":""},{"line_number":861,"context_line":".. note::"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fb8cfa7_59b574cc","line":858,"range":{"start_line":858,"start_character":9,"end_line":858,"end_character":66},"in_reply_to":"9fb8cfa7_6d443a1c","updated":"2019-06-06 13:05:16.000000000","message":"i was thinking\n\n\"A value of ``None`` means auto-detect the inventory capsity, or if this is not possible,set the capacity to max_int. on host which don\u0027t support sev no inventory is created.\"","commit_id":"90cfcc2cd390271509d2325bc6b6080183f240d7"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"eb93c77b5d71b93d5a45ec3338428be76a41dc1b","unresolved":false,"context_lines":[{"line_number":855,"context_line":"the future."},{"line_number":856,"context_line":""},{"line_number":857,"context_line":"A value of ``None`` means auto-detect the inventory, or if this is not"},{"line_number":858,"context_line":"possible, set the inventory to 0 on hosts which don\u0027t support SEV, and"},{"line_number":859,"context_line":"on hosts which do, don\u0027t impose any limit."},{"line_number":860,"context_line":""},{"line_number":861,"context_line":".. note::"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fb8cfa7_443efada","line":858,"range":{"start_line":858,"start_character":9,"end_line":858,"end_character":66},"in_reply_to":"9fb8cfa7_a44fb6bb","updated":"2019-06-05 23:10:42.000000000","message":"by the way the -1 is for this.\nwe generally use the term inventory to exclivly refer to placement inventoires and i dont want operators to be confused by the fact the invenotry will not exist on the RP if the host does not support SEV or when its explitctly set to 0","commit_id":"90cfcc2cd390271509d2325bc6b6080183f240d7"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"3563e121de662d57280d2e1205d216bccec23473","unresolved":false,"context_lines":[{"line_number":856,"context_line":""},{"line_number":857,"context_line":"A value of ``None`` means auto-detect the inventory, or if this is not"},{"line_number":858,"context_line":"possible, set the inventory to 0 on hosts which don\u0027t support SEV, and"},{"line_number":859,"context_line":"on hosts which do, don\u0027t impose any limit."},{"line_number":860,"context_line":""},{"line_number":861,"context_line":".. note::"},{"line_number":862,"context_line":"   Auto-detection of the inventory is not yet possible, therefore it is"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fb8cfa7_8465d247","line":859,"range":{"start_line":859,"start_character":19,"end_line":859,"end_character":41},"updated":"2019-06-05 23:03:41.000000000","message":"nit: we technically set it to max int right in placment\nwhich is practically unlimited but this ya this is just a nit.\n\nhttps://review.opendev.org/#/c/662105/5/nova/virt/libvirt/driver.py@6894","commit_id":"90cfcc2cd390271509d2325bc6b6080183f240d7"}],"nova/tests/functional/libvirt/test_report_cpu_traits.py":[{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"afe0e61b2fd46430e0423e39b482f1f2d0adb22d","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    def pre_start_compute(self):"},{"line_number":37,"context_line":"        self.assertEqual([], self._get_all_providers())"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def assertMemEncryptionSlotsEqual(self, slots):"},{"line_number":40,"context_line":"        inventory \u003d self._get_provider_inventory(self.host_uuid)"},{"line_number":41,"context_line":"        if slots \u003d\u003d 0:"},{"line_number":42,"context_line":"            self.assertNotIn(orc.MEM_ENCRYPTION_CONTEXT, inventory)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bfb3d3c7_32fce63c","line":39,"updated":"2019-05-29 22:32:50.000000000","message":"Adding these inventory tests to this file expands its scope beyond just traits, as suggested by the name of the file and class.  However there is too much test code shared with the existing tests for it to make sense to add the tests elsewhere, so maybe this file and class should be renamed to something which mentions inventory too?","commit_id":"846ec8948a6ff6fc3061c027159458d2eb22072c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5a7a4bba5d8663d166c9f61fc95a74ce5b956963","unresolved":false,"context_lines":[{"line_number":144,"context_line":"class LibvirtReportSevTraitsTests(LibvirtReportTraitsTestBase):"},{"line_number":145,"context_line":"    STUB_INIT_HOST \u003d False"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def pre_start_compute(self):"},{"line_number":148,"context_line":"        super(LibvirtReportSevTraitsTests, self).pre_start_compute()"},{"line_number":149,"context_line":"        self.flags(num_memory_encrypted_guests\u003d16, group\u003d\u0027libvirt\u0027)"},{"line_number":150,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_44ccc460","line":147,"range":{"start_line":147,"start_character":8,"end_line":147,"end_character":25},"updated":"2019-06-05 14:34:47.000000000","message":"Is there a reason this couldn\u0027t just be setUp?\n\nNot saying you should change it, it just looks a little odd (until I think it through, and then it makes sense and feels explicit).","commit_id":"c6e4821f450718f707838a07438252f8bed864ab"}],"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5a7a4bba5d8663d166c9f61fc95a74ce5b956963","unresolved":false,"context_lines":[{"line_number":23281,"context_line":"        self.flags(num_memory_encrypted_guests\u003d16, group\u003d\u0027libvirt\u0027)"},{"line_number":23282,"context_line":"        self.driver._set_amd_sev_support()"},{"line_number":23283,"context_line":"        # Still zero without mocking SEV support"},{"line_number":23284,"context_line":"        self.assertEqual(0, self.driver._get_memory_encrypted_slots())"},{"line_number":23285,"context_line":""},{"line_number":23286,"context_line":"    @mock.patch.object(os.path, \u0027exists\u0027, return_value\u003dFalse)"},{"line_number":23287,"context_line":"    @mock.patch.object(libvirt_driver.LOG, \u0027warning\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_44684420","line":23284,"updated":"2019-06-05 14:34:47.000000000","message":"assert the warning log here?","commit_id":"c6e4821f450718f707838a07438252f8bed864ab"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"6bb2d36392dd1c6d1059f338a0947bfd3e6833f8","unresolved":false,"context_lines":[{"line_number":23281,"context_line":"        self.flags(num_memory_encrypted_guests\u003d16, group\u003d\u0027libvirt\u0027)"},{"line_number":23282,"context_line":"        self.driver._set_amd_sev_support()"},{"line_number":23283,"context_line":"        # Still zero without mocking SEV support"},{"line_number":23284,"context_line":"        self.assertEqual(0, self.driver._get_memory_encrypted_slots())"},{"line_number":23285,"context_line":""},{"line_number":23286,"context_line":"    @mock.patch.object(os.path, \u0027exists\u0027, return_value\u003dFalse)"},{"line_number":23287,"context_line":"    @mock.patch.object(libvirt_driver.LOG, \u0027warning\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_01e23402","line":23284,"in_reply_to":"9fb8cfa7_44684420","updated":"2019-06-05 21:46:10.000000000","message":"Ah, good catch - but actually this test is a slightly incorrect duplicate of the one immediately below, since it doesn\u0027t make sense to test this without mocking os.path.exists to return False.  We only get away with it because in the majority of cases we\u0027re not running the tests on SEV-capable hardware.  So I\u0027m gonna delete this test and add missing mocks of os.path.exists to other tests.","commit_id":"c6e4821f450718f707838a07438252f8bed864ab"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5a7a4bba5d8663d166c9f61fc95a74ce5b956963","unresolved":false,"context_lines":[{"line_number":23292,"context_line":"        self.assertEqual(0, self.driver._get_memory_encrypted_slots())"},{"line_number":23293,"context_line":"        mock_log.assert_called_with("},{"line_number":23294,"context_line":"            \u0027Host is configured with libvirt.num_memory_encrypted_guests \u0027"},{"line_number":23295,"context_line":"            \u0027set to %s, but is not SEV-capable.\u0027, 16)"},{"line_number":23296,"context_line":""},{"line_number":23297,"context_line":"    @mock.patch.object(os.path, \u0027exists\u0027, return_value\u003dTrue)"},{"line_number":23298,"context_line":"    @mock.patch.object(builtins, \u0027open\u0027, mock.mock_open(read_data\u003d\"0\\n\"))"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_84d4fcbe","line":23295,"range":{"start_line":23295,"start_character":21,"end_line":23295,"end_character":22},"updated":"2019-06-05 14:34:47.000000000","message":"d","commit_id":"c6e4821f450718f707838a07438252f8bed864ab"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"6bb2d36392dd1c6d1059f338a0947bfd3e6833f8","unresolved":false,"context_lines":[{"line_number":23292,"context_line":"        self.assertEqual(0, self.driver._get_memory_encrypted_slots())"},{"line_number":23293,"context_line":"        mock_log.assert_called_with("},{"line_number":23294,"context_line":"            \u0027Host is configured with libvirt.num_memory_encrypted_guests \u0027"},{"line_number":23295,"context_line":"            \u0027set to %s, but is not SEV-capable.\u0027, 16)"},{"line_number":23296,"context_line":""},{"line_number":23297,"context_line":"    @mock.patch.object(os.path, \u0027exists\u0027, return_value\u003dTrue)"},{"line_number":23298,"context_line":"    @mock.patch.object(builtins, \u0027open\u0027, mock.mock_open(read_data\u003d\"0\\n\"))"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_8eb976ea","line":23295,"range":{"start_line":23295,"start_character":21,"end_line":23295,"end_character":22},"in_reply_to":"9fb8cfa7_84d4fcbe","updated":"2019-06-05 21:46:10.000000000","message":"Done","commit_id":"c6e4821f450718f707838a07438252f8bed864ab"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5a7a4bba5d8663d166c9f61fc95a74ce5b956963","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"9fb8cfa7_c43434fe","line":23313,"updated":"2019-06-05 14:34:47.000000000","message":"Missing permutations:\n- conf value set to a real value when the feature is supported (assertEqual(the_conf_value, ...))\n- conf value set explicitly to zero when the feature is supported (assertEqual(0, ...)) - I think this one might be broken, see later.","commit_id":"c6e4821f450718f707838a07438252f8bed864ab"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"6bb2d36392dd1c6d1059f338a0947bfd3e6833f8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"9fb8cfa7_41b58ccc","line":23313,"in_reply_to":"9fb8cfa7_c43434fe","updated":"2019-06-05 21:46:10.000000000","message":"Done","commit_id":"c6e4821f450718f707838a07438252f8bed864ab"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0fa46e7c6a9cd0c4ce98aeb935e1860081c14592","unresolved":false,"context_lines":[{"line_number":23299,"context_line":"class TestLibvirtSEVSupported(TestLibvirtSEV):"},{"line_number":23300,"context_line":"    \"\"\"Libvirt driver tests for when AMD SEV support is present.\"\"\""},{"line_number":23301,"context_line":""},{"line_number":23302,"context_line":"    def test_supported_with_feature(self, fake_exists):"},{"line_number":23303,"context_line":"        self.driver._set_amd_sev_support()"},{"line_number":23304,"context_line":"        self.assertTrue(self.driver.supports_amd_sev)"},{"line_number":23305,"context_line":""},{"line_number":23306,"context_line":"    def test_get_mem_encrypted_slots_unlimited(self, mock_exists):"},{"line_number":23307,"context_line":"        self.driver._set_amd_sev_support()"},{"line_number":23308,"context_line":"        self.assertEqual(db_const.MAX_INT,"},{"line_number":23309,"context_line":"                         self.driver._get_memory_encrypted_slots())"},{"line_number":23310,"context_line":""},{"line_number":23311,"context_line":"    def test_get_mem_encrypted_slots_config_non_zero_supported("},{"line_number":23312,"context_line":"            self, mock_exists):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fb8cfa7_44b91ae7","line":23309,"range":{"start_line":23302,"start_character":1,"end_line":23309,"end_character":67},"updated":"2019-06-05 22:32:08.000000000","message":"seems like these could be one","commit_id":"90cfcc2cd390271509d2325bc6b6080183f240d7"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"0d64d4a03ccbbd36823b7a1fde921ec7f81aa071","unresolved":false,"context_lines":[{"line_number":23299,"context_line":"class TestLibvirtSEVSupported(TestLibvirtSEV):"},{"line_number":23300,"context_line":"    \"\"\"Libvirt driver tests for when AMD SEV support is present.\"\"\""},{"line_number":23301,"context_line":""},{"line_number":23302,"context_line":"    def test_supported_with_feature(self, fake_exists):"},{"line_number":23303,"context_line":"        self.driver._set_amd_sev_support()"},{"line_number":23304,"context_line":"        self.assertTrue(self.driver.supports_amd_sev)"},{"line_number":23305,"context_line":""},{"line_number":23306,"context_line":"    def test_get_mem_encrypted_slots_unlimited(self, mock_exists):"},{"line_number":23307,"context_line":"        self.driver._set_amd_sev_support()"},{"line_number":23308,"context_line":"        self.assertEqual(db_const.MAX_INT,"},{"line_number":23309,"context_line":"                         self.driver._get_memory_encrypted_slots())"},{"line_number":23310,"context_line":""},{"line_number":23311,"context_line":"    def test_get_mem_encrypted_slots_config_non_zero_supported("},{"line_number":23312,"context_line":"            self, mock_exists):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fb8cfa7_cd0206b5","line":23309,"range":{"start_line":23302,"start_character":1,"end_line":23309,"end_character":67},"in_reply_to":"9fb8cfa7_44b91ae7","updated":"2019-06-06 09:24:59.000000000","message":"True.  As a general principle I kinda like keeping tests as small as possible though, so that failures provide a specific test name which quickly pins down which assertion failed, rather than requiring the developer to go wading through a bunch of assertions to figure out which one failed.  It\u0027s not  a huge win in this case though - can change if you\u0027d prefer.","commit_id":"90cfcc2cd390271509d2325bc6b6080183f240d7"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5a7a4bba5d8663d166c9f61fc95a74ce5b956963","unresolved":false,"context_lines":[{"line_number":6870,"context_line":"            if slots and slots \u003e 0:"},{"line_number":6871,"context_line":"                LOG.warning(_LW(\"Host is configured with \""},{"line_number":6872,"context_line":"                                \"libvirt.num_memory_encrypted_guests set to \""},{"line_number":6873,"context_line":"                                \"%s, but is not SEV-capable.\"), slots)"},{"line_number":6874,"context_line":"            return 0"},{"line_number":6875,"context_line":""},{"line_number":6876,"context_line":"        # NOTE(aspiers): Auto-detection of the number of available"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_44d604c6","line":6873,"range":{"start_line":6873,"start_character":34,"end_line":6873,"end_character":35},"updated":"2019-06-05 14:34:47.000000000","message":"d","commit_id":"c6e4821f450718f707838a07438252f8bed864ab"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5a7a4bba5d8663d166c9f61fc95a74ce5b956963","unresolved":false,"context_lines":[{"line_number":6882,"context_line":"        # failing at launch-time.  However at least SEV guests will"},{"line_number":6883,"context_line":"        # launch until the maximum, and when auto-detection code is"},{"line_number":6884,"context_line":"        # added later, an upgrade will magically fix the issue."},{"line_number":6885,"context_line":"        if slots:"},{"line_number":6886,"context_line":"            return slots"},{"line_number":6887,"context_line":"        else:"},{"line_number":6888,"context_line":"            return db_const.MAX_INT"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_6414684f","line":6885,"range":{"start_line":6885,"start_character":11,"end_line":6885,"end_character":16},"updated":"2019-06-05 14:34:47.000000000","message":"I think this should be\n\n if slots is not None:\n\nIf my host is SEV-capable, but I don\u0027t want my guests using it, I should be able to turn it off by setting the conf value to 0. (Not sure if/why I would want that, but it seems like it should be supported thusly.) See also note about missing unit test for this path.","commit_id":"c6e4821f450718f707838a07438252f8bed864ab"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"6bb2d36392dd1c6d1059f338a0947bfd3e6833f8","unresolved":false,"context_lines":[{"line_number":6882,"context_line":"        # failing at launch-time.  However at least SEV guests will"},{"line_number":6883,"context_line":"        # launch until the maximum, and when auto-detection code is"},{"line_number":6884,"context_line":"        # added later, an upgrade will magically fix the issue."},{"line_number":6885,"context_line":"        if slots:"},{"line_number":6886,"context_line":"            return slots"},{"line_number":6887,"context_line":"        else:"},{"line_number":6888,"context_line":"            return db_const.MAX_INT"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_a1da4814","line":6885,"range":{"start_line":6885,"start_character":11,"end_line":6885,"end_character":16},"in_reply_to":"9fb8cfa7_6414684f","updated":"2019-06-05 21:46:10.000000000","message":"Good catch.  I keep forgetting that Python is like Perl in this respect of silently coercing 0 to False in a boolean context.","commit_id":"c6e4821f450718f707838a07438252f8bed864ab"}]}
