From 8fabde7dd23dc275c26e0b36c50f758e691fa342 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Fri, 9 Apr 2010 19:58:36 +0200 Subject: Added Hello() method to XML-RPC server Enhanced rteval with trying to access the Hello() method. If the server responds (even if Hello() is not available), rteval will continue to run. If the server is not accessible, rteval will abort. In a future version, rteval should expect a proper response to the XML-RPC Hello() call. --- server/xmlrpc_API1.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'server/xmlrpc_API1.py') diff --git a/server/xmlrpc_API1.py b/server/xmlrpc_API1.py index d477b59..e874b5c 100644 --- a/server/xmlrpc_API1.py +++ b/server/xmlrpc_API1.py @@ -29,13 +29,14 @@ import bz2 import base64 import libxml2 import string -import inspect +import platform import rtevaldb class XMLRPC_API1(): def __init__(self, config=None, debug=False, nodbaction=False): # Some defaults + self.apiversion = 1 self.fnametrans = string.maketrans("/\\.", "::_") # replace path delimiters in filenames self.debug = debug self.nodbaction = nodbaction @@ -104,3 +105,8 @@ class XMLRPC_API1(): return rterid + + def Hello(self, clientid): + return {"greeting": "Hello %s" % clientid, + "server": platform.node(), + "APIversion": self.apiversion} -- cgit