marvin_refactor: Working around CLOUDSTACK-2126

Marvin deserializes by matching attributes of the response with the
responseObject expected. In case the object's attributes don't mirror
the response Marvin assumes the response is invalid and can't return a
proper first class entity. This makes it difficult for tests to
reference the object's attributes in a sensible way.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
This commit is contained in:
Prasanna Santhanam 2013-04-21 19:40:45 +05:30
parent 7c60c563d1
commit d84535ee10
1 changed files with 2 additions and 0 deletions

View File

@ -119,6 +119,8 @@ def finalizeResultObj(result, responseName, responsecls):
mirrorObj = True
for k,v in value.__dict__.iteritems():
if k == 'jobstatus':
continue
if k not in responsecls.__dict__:
mirrorObj = False
break