Hello Yaniv Bronhaim, Dan Kenigsberg,
I'd like you to do a code review. Please visit
https://gerrit.ovirt.org/61187
to review the following change.
Change subject: vdscli: added DeprecationWarning to module
......................................................................
vdscli: added DeprecationWarning to module
vdscli is deprecated and will be replaced soon by jsonrpccli.
since we want to eliminate the calls to vdscli module a
DeprecationWarning will be issued once this module will be
imported.
Change-Id: I728db1ed55e1449000f82c78d26f2774a2650c7e
Signed-off-by: Irit Goihman <igoihman(a)redhat.com>
Reviewed-on:
https://gerrit.ovirt.org/60318
Continuous-Integration: Jenkins CI
Reviewed-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
Reviewed-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/vdscli.py
1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/87/61187/1
diff --git a/lib/vdsm/vdscli.py b/lib/vdsm/vdscli.py
index 66657aa..88d2db1 100644
--- a/lib/vdsm/vdscli.py
+++ b/lib/vdsm/vdscli.py
@@ -25,6 +25,7 @@
import os
import re
import sys
+import warnings
from xml.parsers.expat import ExpatError
from .sslcompat import sslutils
@@ -133,6 +134,11 @@
server = xmlrpclib.Server('http://%s' % hostPort, transport)
return server
+warnings.simplefilter("always", category=DeprecationWarning)
+warnings.warn(
+ "vdscli uses xmlrpc. since ovirt 3.6 xmlrpc is deprecated, please use "
+ "vdsm.jsonrpcvdscli", DeprecationWarning, stacklevel=2)
+
if __name__ == '__main__':
print('connecting to %s:%s ssl %s ts %s' % (
ADDRESS, PORT, _USE_SSL, _TRUSTED_STORE_PATH))
--
To view, visit
https://gerrit.ovirt.org/61187
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I728db1ed55e1449000f82c78d26f2774a2650c7e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-4.0
Gerrit-Owner: Irit Goihman <igoihman(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>