Drop JSON decoding for supported_instances
JSON encoding for supported_instances in the virt drivers was a temporary measure that is not needed. The encoding has been removed for all in tree virt drivers. This patch removes the code that checks for JSON encoding in the compute node object. blueprint mitaka-objects Change-Id: I2d0391f71436655f94f910c3b73920c6bbdd372b
This commit is contained in:
parent
a88f073e6c
commit
13d9040657
|
@ -15,7 +15,6 @@
|
|||
from oslo_config import cfg
|
||||
from oslo_serialization import jsonutils
|
||||
from oslo_utils import versionutils
|
||||
import six
|
||||
|
||||
from nova import db
|
||||
from nova import exception
|
||||
|
@ -332,12 +331,8 @@ class ComputeNode(base.NovaPersistentObject, base.NovaObject,
|
|||
self[key] = resources[key]
|
||||
|
||||
# supported_instances has a different name in compute_node
|
||||
# TODO(pmurray): change virt drivers not to json encode
|
||||
# values they add to the resources dict
|
||||
if 'supported_instances' in resources:
|
||||
si = resources['supported_instances']
|
||||
if isinstance(si, six.string_types):
|
||||
si = jsonutils.loads(si)
|
||||
self.supported_hv_specs = [objects.HVSpec.from_list(s) for s in si]
|
||||
|
||||
|
||||
|
|
|
@ -149,9 +149,7 @@ class FakeDriver(driver.ComputeDriver):
|
|||
'hypervisor_hostname': CONF.host,
|
||||
'cpu_info': {},
|
||||
'disk_available_least': 0,
|
||||
'supported_instances': jsonutils.dumps([(arch.X86_64,
|
||||
hv_type.FAKE,
|
||||
vm_mode.HVM)]),
|
||||
'supported_instances': [(arch.X86_64, hv_type.FAKE, vm_mode.HVM)],
|
||||
'numa_topology': None,
|
||||
}
|
||||
self._mounts = {}
|
||||
|
|
Loading…
Reference in New Issue