PyFoam.Infrastructure.FoamMetaServer module¶
A XMLRPC-Server that knows all PyFoam-Runs in its subnet
-
class
PyFoam.Infrastructure.FoamMetaServer.FoamMetaServer(port=None)[source]¶ Bases:
objectThe Metaserver.
Collects all the known FoamServers. Then waits for the servers to register themselves. Checks at regular intervalls whether the processes are still alive
-
__dict__= mappingproxy({'deregisterServer': <function FoamMetaServer.deregisterServer>, '__dict__': <attribute '__dict__' of 'FoamMetaServer' objects>, '_suicide': <function FoamMetaServer._suicide>, '__weakref__': <attribute '__weakref__' of 'FoamMetaServer' objects>, 'registerServer': <function FoamMetaServer.registerServer>, 'collect': <function FoamMetaServer.collect>, '__doc__': 'The Metaserver.\n\n Collects all the known FoamServers. Then waits for the servers to\n register themselves. Checks at regular intervalls whether the processes are still alive\n ', '__module__': 'PyFoam.Infrastructure.FoamMetaServer', 'scan': <function FoamMetaServer.scan>, '__init__': <function FoamMetaServer.__init__>, 'kill': <function FoamMetaServer.kill>, 'list': <function FoamMetaServer.list>, 'forwardCommand': <function FoamMetaServer.forwardCommand>, '_registerServer': <function FoamMetaServer._registerServer>})¶
-
__module__= 'PyFoam.Infrastructure.FoamMetaServer'¶
-
__weakref__¶ list of weak references to the object (if defined)
-
_registerServer(ip, pid, port, sync=True, external=False)[source]¶ Registers a new 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 external: was called via XMLRPC :param sync: (optional) if to sync with the webserver or not
-
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
-
-
class
PyFoam.Infrastructure.FoamMetaServer.MetaChecker(parent)[source]¶ Bases:
threading.ThreadChecks regularily whether the registered Servers are still alive
-
__module__= 'PyFoam.Infrastructure.FoamMetaServer'¶
-
-
class
PyFoam.Infrastructure.FoamMetaServer.MetaCollector(parent, additional=None)[source]¶ Bases:
threading.ThreadScans the net in a separate thread
-
__init__(parent, additional=None)[source]¶ Parameters: - parent – the FoamMetaServer that gets the information
- additional – A string with alist of additional subnets that should be scanned
-
__module__= 'PyFoam.Infrastructure.FoamMetaServer'¶
-
-
class
PyFoam.Infrastructure.FoamMetaServer.ServerInfo(ip, pid, port, ssl=False)[source]¶ Bases:
objectContains the information about a server
-
__dict__= mappingproxy({'__module__': 'PyFoam.Infrastructure.FoamMetaServer', '__weakref__': <attribute '__weakref__' of 'ServerInfo' objects>, '__doc__': 'Contains the information about a server', '__dict__': <attribute '__dict__' of 'ServerInfo' objects>, 'checkValid': <function ServerInfo.checkValid>, '__getitem__': <function ServerInfo.__getitem__>, 'queryData': <function ServerInfo.queryData>, '__setitem__': <function ServerInfo.__setitem__>, '__init__': <function ServerInfo.__init__>})¶
-
__init__(ip, pid, port, ssl=False)[source]¶ Parameters: - ip – IP of the server
- pid – Die PID at the server
- port – the port at which the server is listening
-
__module__= 'PyFoam.Infrastructure.FoamMetaServer'¶
-
__weakref__¶ list of weak references to the object (if defined)
-