mirror of https://github.com/apache/cloudstack.git
marvin_refactor: decode the response as first class python object
createAccountResponse is now an instance of createAccountResponse and not just a plain dict. TODO: 1. nested entities don't work yet. Signed-off-by: Prasanna Santhanam <tsp@apache.org>
This commit is contained in:
parent
c6f0876fe9
commit
b862772e46
|
|
@ -22,9 +22,9 @@ import hmac
|
|||
import hashlib
|
||||
import logging
|
||||
import time
|
||||
import marvin.cloudstackException
|
||||
from marvin import cloudstackException
|
||||
from marvin.cloudstackAPI import *
|
||||
import marvin.jsonHelper
|
||||
from marvin import jsonHelper
|
||||
from requests import ConnectionError
|
||||
from requests import HTTPError
|
||||
from requests import Timeout
|
||||
|
|
|
|||
|
|
@ -123,7 +123,8 @@ def finalizeResultObj(result, responseName, responsecls):
|
|||
mirrorObj = False
|
||||
break
|
||||
if mirrorObj:
|
||||
return value
|
||||
responsecls.__dict__.update(value.__dict__)
|
||||
return responsecls
|
||||
else:
|
||||
return result
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in New Issue