1
0
mirror of https://github.com/dkmstr/openuds.git synced 2025-03-20 06:50:23 +03:00

Fixing opennebula password spice access

This commit is contained in:
Adolfo Gómez García 2016-11-24 10:06:25 +01:00
parent 983114af88
commit 1ae22ff249
2 changed files with 10 additions and 4 deletions

View File

@ -50,7 +50,7 @@ import six
# Python bindings for OpenNebula
# import oca
__updated__ = '2016-11-23'
__updated__ = '2016-11-24'
logger = logging.getLogger(__name__)
@ -252,7 +252,7 @@ class Provider(ServiceProvider):
'monitors': 1,
'cert_subject': '',
'ticket': {
'value': '',
'value': display['passwd'],
'expiry': ''
}
}

View File

@ -39,7 +39,7 @@ from defusedxml import minidom
# Python bindings for OpenNebula
from .common import VmState
__updated__ = '2016-11-23'
__updated__ = '2016-11-24'
logger = logging.getLogger(__name__)
@ -185,11 +185,17 @@ def getDisplayConnection(api, machineId):
type_ = graphics.getElementsByTagName('TYPE')[0].childNodes[0].data
port = graphics.getElementsByTagName('PORT')[0].childNodes[0].data
try:
passwd = graphics.getElementsByTagName('PASSWD').childNodes[0].data
except Exception:
passwd = ''
host = md.getElementsByTagName('HISTORY_RECORDS')[0].lastChild.getElementsByTagName('HOSTNAME')[0].childNodes[0].data
return {
'type': type_,
'host': host,
'port': int(port)
'port': int(port),
'passwd': passwd
}
except Exception: