vmware: Drop JSON for supported_instances

The virt drivers pass the value for supported_instances
to the resource tracker as a JSON encoded string. This
gets decoded as soon as it is copied to the compute node
object. The JSON is not used anymore since compute node
object was added so we will remove the encoding for all
virt drivers.

This patch removes that unnecessary encoding from the
vmware driver.

blueprint mitaka-objects

Change-Id: I0680fd236e607a9ea0909f596d31033c3600c494
This commit is contained in:
Paul Murray 2015-12-07 13:23:18 +00:00
parent d7e9c37bf6
commit 227d3ece6c
2 changed files with 2 additions and 4 deletions

View File

@ -2060,7 +2060,7 @@ class VMwareAPIVMTestCase(test.NoDBTestCase):
self.assertEqual(self.node_name, stats['hypervisor_hostname'])
self.assertIsNone(stats['cpu_info'])
self.assertEqual(
'[["i686", "vmware", "hvm"], ["x86_64", "vmware", "hvm"]]',
[("i686", "vmware", "hvm"), ("x86_64", "vmware", "hvm")],
stats['supported_instances'])
def test_invalid_datastore_regex(self):

View File

@ -23,7 +23,6 @@ import re
from oslo_config import cfg
from oslo_log import log as logging
from oslo_serialization import jsonutils
from oslo_utils import excutils
from oslo_utils import versionutils as v_utils
from oslo_vmware import api
@ -353,8 +352,7 @@ class VMwareVCDriver(driver.ComputeDriver):
# impossible to provide any meaningful info on the CPU
# model of the "host"
'cpu_info': None,
'supported_instances': jsonutils.dumps(
host_stats['supported_instances']),
'supported_instances': host_stats['supported_instances'],
'numa_topology': None,
}