libvirt: Start populating NUMACell.network_metadata field

We're basically reading what's stored in config. Nothing too complicated
here, outside of the dynamic option magicness.

Part of blueprint numa-aware-vswitches

Change-Id: Ice45f64546cb05db4c6f2928af0efd484f3a6aaf
This commit is contained in:
Stephen Finucane
2018-04-10 17:03:46 +01:00
parent 9dfac2fda7
commit bd334f0048
6 changed files with 191 additions and 1 deletions

View File

@@ -1786,6 +1786,9 @@ def numa_usage_from_instances(host, instances, free=False):
cpu_usage=0, memory_usage=0, mempages=hostcell.mempages,
pinned_cpus=hostcell.pinned_cpus, siblings=hostcell.siblings)
if 'network_metadata' in hostcell:
newcell.network_metadata = hostcell.network_metadata
for instance in instances:
for cellid, instancecell in enumerate(instance.cells):
if instancecell.id != hostcell.id: