Ejemplo n.º 1
0
 def initialize(self, values):
     if values is None:
         return
     self.guacamoleServer.value = self.guacamoleServer.value.strip()
     if self.guacamoleServer.value[0:4] != 'http':
         raise Transport.ValidationException(_('The server must be http or https'))
     if self.useEmptyCreds.isTrue() and self.security.value != 'rdp':
         raise Transport.ValidationException(_('Empty credentials (on Credentials tab) is only allowed with Security level (on Parameters tab) set to "RDP"'))
Ejemplo n.º 2
0
 def __init__(self, environment, values=None):
     super(TSNXTransport, self).__init__(environment, values)
     if values is not None:
         if values['tunnelServer'].find(':') == -1:
             raise Transport.ValidationException(_('Must use HOST:PORT in Tunnel Server Field'))
         self._tunnelServer = values['tunnelServer']
         self._tunnelCheckServer = values['tunnelCheckServer']
         self._useEmptyCreds = gui.strToBool(values['useEmptyCreds'])
         self._fixedName = values['fixedName']
         self._fixedPassword = values['fixedPassword']
         self._listenPort = values['listenPort']
         self._connection = values['connection']
         self._session = values['session']
         self._cacheDisk = values['cacheDisk']
         self._cacheMem = values['cacheMem']
     else:
         self._tunnelServer = ''
         self._tunnelCheckServer = ''
         self._useEmptyCreds = ''
         self._fixedName = ''
         self._fixedPassword = ''
         self._listenPort = ''
         self._connection = ''
         self._session = ''
         self._cacheDisk = ''
         self._cacheMem = ''
Ejemplo n.º 3
0
 def initialize(self, values):
     if values is None:
         return
     self.guacamoleServer.value = self.guacamoleServer.value.strip()
     if self.guacamoleServer.value[0:4] != 'http':
         raise Transport.ValidationException(
             _('The server must be http or https'))
Ejemplo n.º 4
0
 def initialize(self, values):
     if values is not None:
         if values['tunnelServer'].count(':') != 1:
             raise Transport.ValidationException(
                 _('Must use HOST:PORT in Tunnel Server Field'))