Package PyFoam :: Package Infrastructure :: Module FoamMetaServer :: Class FoamMetaServer
[hide private]
[frames] | no frames]

Class FoamMetaServer

source code

object --+
         |
        FoamMetaServer

The Metaserver.

Collects all the known FoamServers. Then waits for the servers to register themselves. Checks at regular intervalls whether the processes are still alive

Instance Methods [hide private]
 
__init__(self, port=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
list(self)
Returns a list of the found Foam-Runs
source code
 
collect(self)
Starts a thread that collects the data of the servers from the net
source code
 
scan(self, additional)
Starts a thread that collects the data of the servers from the net
source code
 
kill(self)
Exits the server
source code
 
_suicide(self)
The server kills itself
source code
 
registerServer(self, ip, pid, port, sync=True, external=False)
Registers a new server via XMLRPC
source code
 
_registerServer(self, ip, pid, port, sync=True, external=False)
Registers a new server
source code
 
deregisterServer(self, ip, pid, port, sync=True)
Deregisters a server
source code
 
forwardCommand(self, ip, port, cmd)
Forwards a RPC to another machine
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, port=None)
(Constructor)

source code 

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

Parameters:
  • port - The port on which the server should listen
Overrides: object.__init__

scan(self, additional)

source code 

Starts a thread that collects the data of the servers from the net

Parameters:
  • additional - a string with a list of additional subnets that should be scanned

registerServer(self, ip, pid, port, sync=True, external=False)

source code 

Registers a new server via XMLRPC

Parameters:
  • ip - IP of the server
  • pid - Die PID at the server
  • port - the port at which the server is listening
  • sync - (optional) if to sync with the webserver or not

_registerServer(self, ip, pid, port, sync=True, external=False)

source code 

Registers a new server

Parameters:
  • ip - IP of the server
  • pid - Die PID at the server
  • port - the port at which the server is listening
  • external - was called via XMLRPC
  • sync - (optional) if to sync with the webserver or not

deregisterServer(self, ip, pid, port, sync=True)

source code 

Deregisters a server

Parameters:
  • ip - IP of the server
  • pid - Die PID at the server
  • port - the port at which the server is listening
  • sync - (optional) if to sync with the webserver or not

forwardCommand(self, ip, port, cmd)

source code 

Forwards a RPC to another machine

Parameters:
  • ip - IP of the server
  • port - the port at which the server is listening
  • cmd - the command that should be executed there
Returns:
the result of the command