remotelogin/devices/managers/services.py
def add_service(self, service, assign_name='', use_svc_name=False):
        """ Adds a service to this device and creates an attribute called assign_name, if given, or
            svc_ + name of the service (given by the function svc_name in service)

        :param services.base.Service service: a service (eg Site) to add to the services offered by this device
        :param str assign_name: if given, this will be the name of the attribute on the device.

        """
        session_mgr = SessionManager(service)
        if session_mgr.already_assigned_to_device(self):
            raise ValueError('Service already assigned')

        if session_mgr.host is None:
            session_mgr.set_host(self.host)

        service_name = 'svc_' + session_mgr.svc_name()
        if not assign_name and not use_svc_name:
            setattr(self, service_name, session_mgr)
        else:
            assign_name = assign_name if assign_name else session_mgr.name
            if assign_name in self.__dict__:
                log.error('The provided assigned name {} already exist in the device attribute'.format(assign_name))
                raise ValueError('Provided attribute name "{}" already in used'.format(assign_name))
            setattr(self, assign_name, session_mgr)
            service_name = assign_name

        service.name_assigned_on_device = service_name
        service.device_assigned_to = self
        if hasattr(service, 'download_folder'):
            service.download_folder = self.folder
        self._services.append(service_name)
        self.add_capability(session_mgr.send)

        return session_mgr
 Adds a service to this device and creates an attribute called assign_name, if given, or
            svc_ + name of the service (given by the function svc_name in service)

        :param services.base.Service service: a service (eg Site) to add to the services offered by this device
        :param str assign_name: if given, this will be the name of the attribute on the device.

        
Adds a service to this device and creates an attribute called assign_name, if given, or
svc_ + name of the service (given by the function svc_name in service)
Adds a service to this device and creates an attribute called assign_name if given or svc_ + name of the service ( given by the function svc_name in service )
def add_service(self, service, assign_name='', use_svc_name=False):
        session_mgr = SessionManager(service)
        if session_mgr.already_assigned_to_device(self):
            raise ValueError('Service already assigned')
        if session_mgr.host is None:
            session_mgr.set_host(self.host)
        service_name = 'svc_' + session_mgr.svc_name()
        if not assign_name and not use_svc_name:
            setattr(self, service_name, session_mgr)
        else:
            assign_name = assign_name if assign_name else session_mgr.name
            if assign_name in self.__dict__:
                log.error('The provided assigned name {} already exist in the device attribute'.format(assign_name))
                raise ValueError('Provided attribute name "{}" already in used'.format(assign_name))
            setattr(self, assign_name, session_mgr)
            service_name = assign_name
        service.name_assigned_on_device = service_name
        service.device_assigned_to = self
        if hasattr(service, 'download_folder'):
            service.download_folder = self.folder
        self._services.append(service_name)
        self.add_capability(session_mgr.send)
        return session_mgr
def add_service ( self , service , assign_name = '' , use_svc_name = False ) : session_mgr = SessionManager ( service ) if session_mgr . already_assigned_to_device ( self ) : raise ValueError ( 'Service already assigned' ) if session_mgr . host is None : session_mgr . set_host ( self . host ) service_name = 'svc_' + session_mgr . svc_name ( ) if not assign_name and not use_svc_name : setattr ( self , service_name , session_mgr ) else : assign_name = assign_name if assign_name else session_mgr . name if assign_name in self . __dict__ : log . error ( 'The provided assigned name {} already exist in the device attribute' . format ( assign_name ) ) raise ValueError ( 'Provided attribute name "{}" already in used' . format ( assign_name ) ) setattr ( self , assign_name , session_mgr ) service_name = assign_name service . name_assigned_on_device = service_name service . device_assigned_to = self if hasattr ( service , 'download_folder' ) : service . download_folder = self . folder self . _services . append ( service_name ) self . add_capability ( session_mgr . send ) return session_mgr
Adds a service to this device and creates an attribute called assign_name, if given, or
svc_ + name of the service (given by the function svc_name in service)
Adds a service to this device and creates an attribute called assign_name if given or svc_ + name of the service ( given by the function svc_name in service )
""" Adds a service to this device and creates an attribute called assign_name, if given, or
            svc_ + name of the service (given by the function svc_name in service)

        :param services.base.Service service: a service (eg Site) to add to the services offered by this device
        :param str assign_name: if given, this will be the name of the attribute on the device.

        """
self
service
a service  to add to the services offered by this device
a service to add to the services offered by this device
assign_name
if given, this will be the name of the attribute on the device.
if given this will be the name of the attribute on the device .
use_svc_name