Commit 35d0674b authored by Vangelis Koukis's avatar Vangelis Koukis
Browse files

Use server's FQDN in API reply for VNC console

parent 71af1141
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
# Copyright (c) 2010 Greek Research and Technology Network # Copyright (c) 2010 Greek Research and Technology Network
# #
from socket import getfqdn
from django.conf import settings from django.conf import settings
from django.http import HttpResponse from django.http import HttpResponse
from django.template.loader import render_to_string from django.template.loader import render_to_string
...@@ -74,7 +76,7 @@ def get_console(request, vm, args): ...@@ -74,7 +76,7 @@ def get_console(request, vm, args):
passwd = random_password() passwd = random_password()
request_vnc_forwarding(sport, daddr, dport, passwd) request_vnc_forwarding(sport, daddr, dport, passwd)
vnc = { 'host': '62.217.120.67', 'port': sport, 'password': passwd } vnc = { 'host': socket.getfqdn(), 'port': sport, 'password': passwd }
# Format to be reviewed by [verigak], FIXME # Format to be reviewed by [verigak], FIXME
if request.serialization == 'xml': if request.serialization == 'xml':
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment