diff --git a/actors/src/udsactor/windows/UDSActorService.py b/actors/src/udsactor/windows/UDSActorService.py index c26f17ef..c6376dbd 100644 --- a/actors/src/udsactor/windows/UDSActorService.py +++ b/actors/src/udsactor/windows/UDSActorService.py @@ -137,7 +137,8 @@ class UDSActorSvc(win32serviceutil.ServiceFramework, CommonService): currName = operations.getComputerName() if currName.lower() == name.lower(): currDomain = operations.getDomainName() - if currDomain is not None and currDomain.lower() == domain.lower(): + logger.debug('Name: "{}" vs "{}", Domain: "{}" vs "{}"'.format(currName.lower(), name.lower(), currDomain.lower(), domain.lower())) + if currDomain is not None: logger.info( 'Machine {} is part of domain {}'.format(name, domain)) self.setReady() @@ -164,6 +165,7 @@ class UDSActorSvc(win32serviceutil.ServiceFramework, CommonService): self.multiStepJoin(name, domain, ou, account, password) def preConnect(self, user, protocol): + logger.debug('Pre connect invoked') if protocol != 'rdp': # If connection is not using rdp, skip adding user return 'ok' # Well known SSID for Remote Desktop Users diff --git a/actors/src/udsactor/windows/operations.py b/actors/src/udsactor/windows/operations.py index 1807ece8..b2ab6d2b 100644 --- a/actors/src/udsactor/windows/operations.py +++ b/actors/src/udsactor/windows/operations.py @@ -64,7 +64,7 @@ def getNetworkInfo(): continue if ip == '' or ip is None: continue - logger.debug('Net config found: {}=({}, {})'.format(obj.Caption, obj.MACAddress, ip)) + # logger.debug('Net config found: {}=({}, {})'.format(obj.Caption, obj.MACAddress, ip)) yield utils.Bunch(name=obj.Caption, mac=obj.MACAddress, ip=ip) except Exception: return diff --git a/server/src/uds/REST/methods/osmanagers.py b/server/src/uds/REST/methods/osmanagers.py index 14a84238..886b7a67 100644 --- a/server/src/uds/REST/methods/osmanagers.py +++ b/server/src/uds/REST/methods/osmanagers.py @@ -77,9 +77,8 @@ class OsManagers(ModelHandler): if item.deployedServices.count() > 0: raise RequestError(ugettext('Can\'t delete an OS Manager with services pools associated')) - def checkSave(self, item): - if item.deployedServices.count() > 0 and settings.DEBUG is False: - raise RequestError(ugettext('Can\'t modify an OS Manager with services pools associated')) + def checkSave(self, item): # Right now, always can be saved + pass # Types related def enum_types(self): diff --git a/server/src/uds/REST/methods/user_services.py b/server/src/uds/REST/methods/user_services.py index 828c2732..2f557488 100644 --- a/server/src/uds/REST/methods/user_services.py +++ b/server/src/uds/REST/methods/user_services.py @@ -270,8 +270,8 @@ class Publications(DetailHandler): Custom method "publish", provided to initiate a publication of a deployed service :param parent: Parent service pool ''' - logger.debug('Custom "publish" invoked') - parent.publish() + logger.debug('Custom "publish" invoked for {}'.format(parent)) + parent.publish() # Can raise exceptions that will be processed on response return self.success() def cancel(self, parent, uuid): diff --git a/server/src/uds/REST/model.py b/server/src/uds/REST/model.py index e2ef50bf..f3f5a0b3 100644 --- a/server/src/uds/REST/model.py +++ b/server/src/uds/REST/model.py @@ -40,6 +40,7 @@ from django.db import IntegrityError from uds.core.ui.UserInterface import gui as uiGui from uds.REST.handlers import Handler, HandlerError from uds.core.util import log + import fnmatch import re import itertools @@ -49,7 +50,7 @@ import logging logger = logging.getLogger(__name__) -__updated__ = '2015-02-10' +__updated__ = '2015-02-16' # a few constants @@ -293,15 +294,12 @@ class DetailHandler(BaseModelHandler): # pylint: disable=abstract-class-not-use ''' logger.debug('Checking custom method {0}'.format(check)) if check in self.custom_methods: - try: - operation = getattr(self, check) + operation = getattr(self, check) - if arg is None: - return operation(parent) - else: - return operation(parent, arg) - except Exception: - self.invalidMethodException() + if arg is None: + return operation(parent) + else: + return operation(parent, arg) return None diff --git a/server/src/uds/osmanagers/LinuxOsManager/LinuxOsManager.py b/server/src/uds/osmanagers/LinuxOsManager/LinuxOsManager.py index d4f22418..0ec16951 100644 --- a/server/src/uds/osmanagers/LinuxOsManager/LinuxOsManager.py +++ b/server/src/uds/osmanagers/LinuxOsManager/LinuxOsManager.py @@ -55,7 +55,7 @@ class LinuxOsManager(osmanagers.OSManager): onLogout = gui.ChoiceField( label=_('On Logout'), order=10, - rdonly=False, + rdonly=True, tooltip=_('What to do when user logs out from service'), values=[ {'id': 'keep', 'text': _('Keep service assigned')}, @@ -63,8 +63,13 @@ class LinuxOsManager(osmanagers.OSManager): ], defvalue='keep') - idle = gui.NumericField(label=_("Max.Idle time"), length=4, defvalue=-1, rdonly=False, order=11, - tooltip=_('Maximum idle time (in seconds) before session is automaticatlly closed to the user (<= 0 means no max idle time).'), required=True) + idle = gui.NumericField( + label=_("Max.Idle time"), + length=4, + defvalue=-1, + rdonly=False, order=11, + tooltip=_('Maximum idle time (in seconds) before session is automaticatlly closed to the user (<= 0 means no max idle time).'), + required=True) def __setProcessUnusedMachines(self): self.processUnusedMachines = self._onLogout == 'remove' diff --git a/server/src/uds/osmanagers/WindowsOsManager/WindowsOsManager.py b/server/src/uds/osmanagers/WindowsOsManager/WindowsOsManager.py index 29b30ec6..aa6c818a 100644 --- a/server/src/uds/osmanagers/WindowsOsManager/WindowsOsManager.py +++ b/server/src/uds/osmanagers/WindowsOsManager/WindowsOsManager.py @@ -47,7 +47,7 @@ class WindowsOsManager(osmanagers.OSManager): onLogout = gui.ChoiceField( label=_('On Logout'), order=10, - rdonly=False, + rdonly=True, tooltip=_('What to do when user logs out from service'), values=[ {'id': 'keep', 'text': _('Keep service assigned')}, @@ -56,8 +56,15 @@ class WindowsOsManager(osmanagers.OSManager): defvalue='keep' ) - idle = gui.NumericField(label=_("Max.Idle time"), length=4, defvalue=-1, rdonly=False, order=11, - tooltip=_('Maximum idle time (in seconds) before session is automaticatlly closed to the user (<= 0 means no max. idle time)'), required=True) + idle = gui.NumericField( + label=_("Max.Idle time"), + length=4, + defvalue=-1, + rdonly=False, + order=11, + tooltip=_('Maximum idle time (in seconds) before session is automaticatlly closed to the user (<= 0 means no max. idle time)'), + required=True +) @staticmethod def validateLen(length): diff --git a/ssh-tunnel/tunnelLaucher/.gitignore b/ssh-tunnel/tunnelLaucher/.gitignore index ae3c1726..db33f247 100644 --- a/ssh-tunnel/tunnelLaucher/.gitignore +++ b/ssh-tunnel/tunnelLaucher/.gitignore @@ -1 +1,2 @@ /bin/ +/jar/