# HG changeset patch # User Sandro Knauß # Date 1333039468 -7200 # Node ID f6c906b40ccede6c741b47ce36317e8a3295a75a # Parent 584b9c97ecfdfaa988c4b42f935cac0dfc456764 iro.view: adding docstrings diff -r 584b9c97ecfd -r f6c906b40cce iro/view/xmlrpc.py --- a/iro/view/xmlrpc.py Thu Mar 29 18:31:53 2012 +0200 +++ b/iro/view/xmlrpc.py Thu Mar 29 18:44:28 2012 +0200 @@ -17,6 +17,7 @@ from ..error import InterfaceException, ValidateException class TwistedInterface(Interface): + """Class that addes needed function for XML-RPC/SOAP""" def __init__(self): Interface.__init__(self) @@ -28,13 +29,12 @@ def listProcedures(self): - """Since we override lookupProcedure, its suggested to override - listProcedures too. - """ + """returns a list of all functions that are allowed to call via XML-RPC.""" return ['listMethods','status','sms','fax','mail','routes','defaultRoute','bill','telnumber','email'] class XMLRPCInterface(TwistedInterface,xmlrpc.XMLRPC): + """XML-RPC interface""" def __init__(self): xmlrpc.XMLRPC.__init__(self) TwistedInterface.__init__(self) @@ -58,19 +58,12 @@ class SOAPInterface(TwistedInterface,soap.SOAPPublisher): + """SOAP interface""" def __init__(self): soap.SOAPPublisher.__init__(self) TwistedInterface.__init__(self) def lookupFunction(self, functionName): - """Lookup published SOAP function. - - Override in subclasses. Default behaviour - publish methods - starting with soap_, if they have true attribute useKeywords - they are expected to accept keywords. - - @return: tuple (callable, useKeywords), or (None, None) if not found. - """ if functionName in self.listProcedures(): function = getattr(self, functionName, None) if function: @@ -80,6 +73,7 @@ return None def appendResource(root): + """adding XML-RPC and SOAP to root.""" root.putChild('RPC2', XMLRPCInterface()) root.putChild('SOAP', SOAPInterface()) return root diff -r 584b9c97ecfd -r f6c906b40cce iro/view/xmlrpc_old.py --- a/iro/view/xmlrpc_old.py Thu Mar 29 18:31:53 2012 +0200 +++ b/iro/view/xmlrpc_old.py Thu Mar 29 18:44:28 2012 +0200 @@ -10,6 +10,9 @@ #You should have received a copy of the GNU General Public License #along with this program; if not, see . + +""".. deprecated:: 1.0a""" + import logging logger=logging.getLogger("iro.user") class NotSupportedFeature (Exception):