During vsphere config check attempt cast before marking values missing

Fixes #7385
This commit is contained in:
James Cammarata 2014-05-14 15:56:08 -05:00
parent 7faecd54b0
commit 67d8df0e32

View file

@ -974,6 +974,14 @@ class DefaultVMConfig(object):
for k, v in value.items():
if k in self.check_dict[key]:
if not isinstance(self.check_dict[key][k], v):
try:
if v == int:
self.check_dict[key][k] = int(self.check_dict[key][k])
elif v == basestring:
self.check_dict[key][k] = str(self.check_dict[key][k])
else:
raise ValueError
except ValueError:
self.recursive_missing.append((k, v))
else:
self.recursive_missing.append((k, v))