From 67d8df0e322aad9313d4e167235d1c81bc86abe0 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Wed, 14 May 2014 15:56:08 -0500 Subject: [PATCH] During vsphere config check attempt cast before marking values missing Fixes #7385 --- library/cloud/vsphere_guest | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/library/cloud/vsphere_guest b/library/cloud/vsphere_guest index bfca334c53c..2a02b933b20 100644 --- a/library/cloud/vsphere_guest +++ b/library/cloud/vsphere_guest @@ -974,7 +974,15 @@ 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): - self.recursive_missing.append((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))