Package x2go :: Module telekinesis :: Class X2GoTelekinesisClient
[frames] | no frames]

Class X2GoTelekinesisClient

source code

        object --+        
                 |        
threading._Verbose --+    
                     |    
      threading.Thread --+
                         |
                        X2GoTelekinesisClient

Telekinesis is a communication framework used by X2Go.

This class implements the startup of the telekinesis client used by Python X2Go.

Instance Methods
 
__init__(self, session_info=None, ssh_transport=None, sessions_rootdir=os.path.join(_LOCAL_HOME,_X2GO_SESSIONS_ROOTDIR), session_instance=None, logger=None, loglevel=log.loglevel_DEFAULT)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__del__(self)
On instance destruction make sure this telekinesis client thread is stopped properly.
source code
bool
has_telekinesis_client(self)
Test if the Telekinesis client command is installed on this machine.
source code
 
stop_thread(self)
End the thread runner and tidy up.
source code
 
run(self)
Start the X2Go Telekinesis client command.
source code
obj
start_telekinesis(self)
Start the thread runner and wait for the Telekinesis client to come up.
source code
 
ok(self)
Check if a proxy instance is up and running.
source code

Inherited from threading.Thread: __repr__, daemon, getName, ident, isAlive, isDaemon, is_alive, join, name, setDaemon, setName, start

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  TEKICLIENT_CMD = 'telekinesis-client'
Telekinesis client command.
  TEKICLIENT_ARGS = ['-setWORMHOLEPORT={port}', '-setX2GOSID={si...
Arguments to be passed to the Telekinesis client.
  TEKICLIENT_ENV = {}
Provide environment variables to the Telekinesis client command.
Properties

Inherited from object: __class__

Method Details

__init__(self, session_info=None, ssh_transport=None, sessions_rootdir=os.path.join(_LOCAL_HOME,_X2GO_SESSIONS_ROOTDIR), session_instance=None, logger=None, loglevel=log.loglevel_DEFAULT)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  • session_info (X2GoServerSessionInfo* instance) - session information provided as an X2GoServerSessionInfo* backend instance
  • ssh_transport (paramiko.Transport instance) - SSH transport object from paramiko.SSHClient
  • sessions_rootdir (str) - base dir where X2Go session files are stored (by default: ~/.x2go)
  • logger (X2GoLogger instance) - you can pass an X2GoLogger object to the X2GoTelekinesisClient constructor
  • session_instance (X2GoSession instance) - the X2GoSession instance this X2GoProxy* instance belongs to
  • loglevel (int) - if no X2GoLogger object has been supplied a new one will be constructed with the given loglevel
Overrides: object.__init__

has_telekinesis_client(self)

source code 

Test if the Telekinesis client command is installed on this machine.

Returns: bool
True if the Telekinesis client command is available

run(self)

source code 

Start the X2Go Telekinesis client command. The Telekinesis client command utilizes a Paramiko/SSH based forwarding tunnel (openssh -L option). This tunnel gets started here and is forked into background (Greenlet/gevent).

Overrides: threading.Thread.run

start_telekinesis(self)

source code 

Start the thread runner and wait for the Telekinesis client to come up.

Returns: obj
a subprocess instance that knows about the externally started Telekinesis client command.

ok(self)

source code 

Check if a proxy instance is up and running.

Returns:
Proxy state, True for proxy being up-and-running, False otherwise @rtype bool

Class Variable Details

TEKICLIENT_CMD

Telekinesis client command. Might be OS specific.

Value:
'telekinesis-client'

TEKICLIENT_ARGS

Arguments to be passed to the Telekinesis client.

Value:
['-setWORMHOLEPORT={port}', '-setX2GOSID={sid}',]