1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-22 13:34:04 +03:00

Some minor fixes

This commit is contained in:
Adolfo Gómez García 2015-08-03 02:27:20 +02:00
parent 6979d9bc17
commit d2298f77b9
3 changed files with 9 additions and 7 deletions

View File

@ -236,4 +236,7 @@ class ServicesPools(ModelHandler):
# Logs
def getLogs(self, item):
try:
return log.getLogs(item)
except Exception:
return []

View File

@ -41,7 +41,7 @@ from uds.core.ui import gui
import logging
__updated__ = '2015-05-29'
__updated__ = '2015-07-24'
logger = logging.getLogger(__name__)
@ -223,6 +223,7 @@ class OVirtLinkedService(Service):
vals = []
for c in clusters:
vals.append(gui.choiceItem(c['id'], c['name']))
self.cluster.setValues(vals)
def datastoreHasSpace(self):

View File

@ -45,7 +45,7 @@ from client import oVirtClient
import logging
__updated__ = '2015-06-09'
__updated__ = '2015-07-24'
logger = logging.getLogger(__name__)
@ -96,9 +96,9 @@ class Provider(ServiceProvider):
host = gui.TextField(length=64, label=_('Host'), order=1, tooltip=_('oVirt Server IP or Hostname'), required=True)
username = gui.TextField(length=32, label=_('Username'), order=3, tooltip=_('User with valid privileges on oVirt, (use "user@domain" form)'), required=True, defvalue='admin@internal')
password = gui.PasswordField(lenth=32, label=_('Password'), order=4, tooltip=_('Password of the user of oVirt'), required=True)
timeout = gui.NumericField(length=3, label=_('Timeout'), defvalue='10', order=5, tooltip=_('Timeout in seconds of connection to VC'), required=True)
timeout = gui.NumericField(length=3, label=_('Timeout'), defvalue='10', order=5, tooltip=_('Timeout in seconds of connection to oVirt'), required=True)
macsRange = gui.TextField(length=36, label=_('Macs range'), defvalue='52:54:00:00:00:00-52:54:00:FF:FF:FF', order=6, rdonly=True,
tooltip=_('Range of valid macs for created machines'), required=True)
tooltip=_('Range of valid macs for UDS managed machines'), required=True)
# oVirt engine, right now, only permits a connection to one server and only one per instance
# If we want to connect to more than one server, we need keep locked access to api, change api server, etc..
@ -292,8 +292,6 @@ class Provider(ServiceProvider):
'''
return self.__getApi().getMachineState(machineId)
return State.INACTIVE
def removeTemplate(self, templateId):
'''
Removes a template from ovirt server