Change in vdsm[master]: tests: functional - convert to run over jsonrpc

ykaplan at redhat.com ykaplan at redhat.com
Mon Jul 6 12:47:32 UTC 2015


Yeela Kaplan has uploaded a new change for review.

Change subject: tests: functional - convert to run over jsonrpc
......................................................................

tests: functional - convert to run over jsonrpc

will run functional tests by default over jsonrpc
if its enabled,
otherwise will run over xmlrpc.

Change-Id: I468e7eae74dd37b915b15e18ac4b0a830675cb47
Signed-off-by: Yeela Kaplan <ykaplan at redhat.com>
---
M lib/vdsm/jsonrpcvdscli.py
M tests/functional/utils.py
2 files changed, 17 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/37/43237/1

diff --git a/lib/vdsm/jsonrpcvdscli.py b/lib/vdsm/jsonrpcvdscli.py
index 64c9879..affe281 100644
--- a/lib/vdsm/jsonrpcvdscli.py
+++ b/lib/vdsm/jsonrpcvdscli.py
@@ -37,6 +37,16 @@
     'destroy': 'VM.destroy',
     'getVmStats': 'VM.getStats',
     'migrationCreate': 'VM.migrationCreate',
+    'updateVmPolicy': 'VM.updateVmPolicy',
+    'getVdsCapabilities': 'Host.getCapabilities',
+    'list': 'Host.getVMList',
+    'getAllVmStats': 'Host.getAllVmStats',
+    'getVdsStats': 'Host.getStats',
+    'setupNetworks': 'Host.setupNetworks',
+    'editNetwork': 'Host.editNetwork',
+    'delNetwork': 'Host.delNetwork',
+    'addNetwork': 'Host.addNetwork',
+    'setSafeNetworkConfig': 'Host.setSafeNetworkConfig',
 }
 
 
diff --git a/tests/functional/utils.py b/tests/functional/utils.py
index 263fd31..05d5f5c 100644
--- a/tests/functional/utils.py
+++ b/tests/functional/utils.py
@@ -26,6 +26,7 @@
 from vdsm.config import config
 from vdsm.utils import retry
 from vdsm import ipwrapper
+from vdsm import jsonrpcvdscli
 from vdsm import netinfo
 from vdsm import vdscli
 from vdsm.netconfpersistence import RunningConfig
@@ -71,7 +72,12 @@
         retry(self.start, (socket.error, KeyError), tries=30)
 
     def start(self):
-        self.vdscli = vdscli.connect()
+        if config.getboolean('vars', 'jsonrpc_enable'):
+            requestQueues = config.get('addresses', 'request_queues')
+            requestQueue = requestQueues.split(",")[0]
+            self.vdscli = jsonrpcvdscli.create(requestQueue)
+        else:
+            self.vdscli = vdscli.connect()
         self.netinfo = self._get_netinfo()
         if config.get('vars', 'net_persistence') == 'unified':
             self.config = RunningConfig()


-- 
To view, visit https://gerrit.ovirt.org/43237
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I468e7eae74dd37b915b15e18ac4b0a830675cb47
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan at redhat.com>


More information about the vdsm-patches mailing list