PyFoam.Infrastructure.FoamMetaServer module

A XMLRPC-Server that knows all PyFoam-Runs in its subnet

class PyFoam.Infrastructure.FoamMetaServer.FoamMetaServer(port=None)[source]

Bases: object

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

collect()[source]

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

deregisterServer(ip, pid, port, sync=True)[source]

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

forwardCommand(ip, port, cmd)[source]

Forwards a RPC to another machine :param ip: IP of the server :param port: the port at which the server is listening :param cmd: the command that should be executed there :return: the result of the command

kill()[source]

Exits the server

list()[source]

Returns a list of the found Foam-Runs

registerServer(ip, pid, port, sync=True, external=False)[source]

Registers a new server via XMLRPC :param ip: IP of the server :param pid: Die PID at the server :param port: the port at which the server is listening :param sync: (optional) if to sync with the webserver or not

scan(additional)[source]

Starts a thread that collects the data of the servers from the net :param additional: a string with a list of additional subnets that should be scanned

class PyFoam.Infrastructure.FoamMetaServer.MetaChecker(parent)[source]

Bases: threading.Thread

Checks regularily whether the registered Servers are still alive

run()[source]
class PyFoam.Infrastructure.FoamMetaServer.MetaCollector(parent, additional=None)[source]

Bases: threading.Thread

Scans the net in a separate thread

run()[source]
class PyFoam.Infrastructure.FoamMetaServer.ServerInfo(ip, pid, port, ssl=False)[source]

Bases: object

Contains the information about a server

checkValid()[source]

Check with server whether this data item is still valid

queryData()[source]

Ask the server for additional data