Skip to content
Snippets Groups Projects
Commit e9d7ea3f authored by Thibault VINCENT's avatar Thibault VINCENT
Browse files

add: support for unix sockets in TCPTunnelJob

parent 6cd44a88
No related branches found
No related tags found
No related merge requests found
......@@ -732,18 +732,21 @@ class NodeHandler(RpcHandler):
def tun_connect_hv(self, res, migration=False):
'''
'''
# FIXME magic values
ip = '127.0.0.1'
if migration and self._host_handle.get_hv_type() == 'xen':
port = 8002
else:
port = 16509
# facilities
jobmgr = self._host_handle.jobmgr
# get the job
job = jobmgr.get_job(res['jid'])
# connect to libvirt
job.tunnel_connect((ip, port))
# choose connection endpoint
if self._host_handle.get_hv_type() == 'xen':
# FIXME magic values
ip = '127.0.0.1'
port = 8002 if migration else 16509
endpoint = (ip, port)
else:
# FIXME magic values
endpoint = '/var/run/libvirt/libvirt-sock'
# connect to libvirt/hv
job.tunnel_connect(endpoint)
@pure
def tun_destroy(self, res):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment