diff options
author | Artom Lifshitz <alifshit@redhat.com> | 2020-12-10 13:45:49 -0500 |
---|---|---|
committer | Artom Lifshitz <alifshit@redhat.com> | 2021-02-21 11:30:07 -0500 |
commit | 95b9481aa4e4271503ccfdde80ab8b52838d5ffe (patch) | |
tree | 0f4206bd2c26ddec856e59b08aa7738373d5448b /nova/tests/unit/objects/test_numa.py | |
parent | ede0147abd54fdd043e7aabd33c01f88e4a01e51 (diff) | |
download | nova-95b9481aa4e4271503ccfdde80ab8b52838d5ffe.tar.gz |
libvirt: start tracking NUMACell.socket for hosts
This patch adds a `socket` field to NUMACell, and the libvirt driver
starts populating it. For testing, we need to fix how fakelibvirt's
HostInfo handled sockets: it previously assumed one or more sockets
within a NUMA node, but we want the reverse - one or more NUMA nodes
within a socket.
Implements: blueprint pci-socket-affinity
Change-Id: Ie4deb265f6093558ab86dc69f6ffab9da62ca15d
Diffstat (limited to 'nova/tests/unit/objects/test_numa.py')
-rw-r--r-- | nova/tests/unit/objects/test_numa.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nova/tests/unit/objects/test_numa.py b/nova/tests/unit/objects/test_numa.py index c684083817..e0793760c5 100644 --- a/nova/tests/unit/objects/test_numa.py +++ b/nova/tests/unit/objects/test_numa.py @@ -342,6 +342,7 @@ class _TestNUMACell(object): physnets=set(['foo', 'bar']), tunneled=True) cell = objects.NUMACell( id=0, + socket=0, cpuset=set([1, 2]), pcpuset=set([3, 4]), memory=32, @@ -351,10 +352,14 @@ class _TestNUMACell(object): network_metadata=network_metadata) versions = ovo_base.obj_tree_get_versions('NUMACell') + primitive = cell.obj_to_primitive(target_version='1.5', + version_manifest=versions) + self.assertIn('socket', primitive['nova_object.data']) primitive = cell.obj_to_primitive(target_version='1.4', version_manifest=versions) self.assertIn('pcpuset', primitive['nova_object.data']) + self.assertNotIn('socket', primitive['nova_object.data']) primitive = cell.obj_to_primitive(target_version='1.3', version_manifest=versions) |