Yeela Kaplan has uploaded a new change for review.
Change subject: vdscli: jsonrpc: fix getVdsCapabilities and Stats result
......................................................................
vdscli: jsonrpc: fix getVdsCapabilities and Stats result
so it will be compatible with result we receive
using xmlrpc vdscli
Change-Id: Ibd0c7f787b1ad3475328080d9043046ce81a2cbd
Signed-off-by: Yeela Kaplan <ykaplan(a)redhat.com>
---
M lib/vdsm/jsonrpcvdscli.py
1 file changed, 15 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/36/43436/1
diff --git a/lib/vdsm/jsonrpcvdscli.py b/lib/vdsm/jsonrpcvdscli.py
index 16a5d5e..c56ec1d 100644
--- a/lib/vdsm/jsonrpcvdscli.py
+++ b/lib/vdsm/jsonrpcvdscli.py
@@ -45,6 +45,15 @@
def __init__(self, client):
self._client = client
+ def _addInfo(self, res):
+ newRes = {
+ 'status': res['status']
+ }
+ del res['status']
+ newRes['info'] = res
+
+ return newRes
+
def _callMethod(self, methodName, *args):
try:
method = _COMMAND_CONVERTER[methodName]
@@ -68,7 +77,12 @@
# None is translated to True inside our JSONRPC implementation
return response.success(**resp.result)
- return response.success()
+ result = response.success()
+
+ if method in ('getVdsCapabilities', 'getVdsStats'):
+ return self._addInfo(result)
+
+ return result
def migrationCreate(self, params):
return self._callMethod('migrationCreate',
--
To view, visit
https://gerrit.ovirt.org/43436
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibd0c7f787b1ad3475328080d9043046ce81a2cbd
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan(a)redhat.com>