Irit Goihman has uploaded a new change for review.
Change subject: dump_volume_chains: migrate to jsonrpcvdscli
......................................................................
dump_volume_chains: migrate to jsonrpcvdscli
Change-Id: I6f34824ba84498bedf9ddc7cb5b41e8cdce603a1
Signed-off-by: Irit Goihman <igoihman(a)redhat.com>
---
M lib/vdsm/tool/dump_volume_chains.py
1 file changed, 9 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/24/62324/1
diff --git a/lib/vdsm/tool/dump_volume_chains.py b/lib/vdsm/tool/dump_volume_chains.py
index 7928b32..eb46926 100644
--- a/lib/vdsm/tool/dump_volume_chains.py
+++ b/lib/vdsm/tool/dump_volume_chains.py
@@ -25,7 +25,8 @@
from . import expose
-from vdsm import vdscli
+from vdsm.config import config
+from vdsm import jsonrpcvdscli
# BLANK_UUID is re-declared here since it cannot be imported properly. This
# constant should be introduced under lib publicly available
@@ -96,15 +97,19 @@
_print_volume_chains(image_chains, volumes_info)
+ server.close()
+
def _connect_to_server(host, port, use_ssl):
- host_port = "%s:%s" % (host, port)
+ requestQueues = config.get("addresses", "request_queues")
+ requestQueue = requestQueues.split(",")[0]
try:
- return vdscli.connect(host_port, use_ssl)
+ return jsonrpcvdscli.connect(
+ requestQueue=requestQueue, host=host, port=port, useSSL=use_ssl)
except socket.error as e:
if e[0] == errno.ECONNREFUSED:
raise ConnectionRefusedError(
- "Connection to %s refused" % (host_port,))
+ "Connection to %s:%s refused" % (host, port))
raise
--
To view, visit
https://gerrit.ovirt.org/62324
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f34824ba84498bedf9ddc7cb5b41e8cdce603a1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Irit Goihman <igoihman(a)redhat.com>