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

Class FoamMetaServer

source code


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 help(type(x)) for signature
source code
 
_registerServer(self, ip, pid, port, sync=True, external=False)
Registers a new server
source code
 
_suicide(self)
The server kills itself
source code
 
collect(self)
Starts a thread that collects the data of the servers from the net
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
 
kill(self)
Exits the server
source code
 
list(self)
Returns a list of the found Foam-Runs
source code
 
registerServer(self, ip, pid, port, sync=True, external=False)
Registers a new server via XMLRPC
source code
 
scan(self, additional)
Starts a thread that collects the data of the servers from the net
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, port=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

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

_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

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

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