objects: remove cpu_topology from __init__ of InstanceNUMATopology

This commit removes the initialization of cpu_topology to None when
creating object InstanceNUMATopology

Change-Id: Ibd5f0436d8ce2d819f71e6897216f67b4c978407
This commit is contained in:
Sahid Orentino Ferdjaoui
2016-12-07 08:58:14 -05:00
parent 045f08ab8a
commit 99f3bbc1ac
3 changed files with 8 additions and 7 deletions

View File

@@ -571,7 +571,8 @@ def _get_desirable_cpu_topologies(flavor, image_meta, allow_threads=True,
if numa_topology:
min_requested_threads = None
cell_topologies = [cell.cpu_topology for cell in numa_topology.cells
if cell.cpu_topology]
if ('cpu_topology' in cell
and cell.cpu_topology)]
if cell_topologies:
min_requested_threads = min(
topo.threads for topo in cell_topologies)
@@ -1529,6 +1530,7 @@ def instance_topology_from_instance(instance):
cpuset=set(cell['cpuset']),
memory=cell['memory'],
pagesize=cell.get('pagesize'),
cpu_topology=cell.get('cpu_topology'),
cpu_pinning=cell.get('cpu_pinning_raw'),
cpu_policy=cell.get('cpu_policy'),
cpu_thread_policy=cell.get('cpu_thread_policy'))