From: Thierry Parmentelat Date: Wed, 2 Nov 2011 12:42:01 +0000 (+0100) Subject: trash unused sfa/client/soapprotocol.py X-Git-Tag: sfa-1.1-2~1^2~8 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=9e45569259b9db70e1b663c749f7fbc7fea5c117;p=sfa.git trash unused sfa/client/soapprotocol.py --- diff --git a/sfa/client/soapprotocol.py b/sfa/client/soapprotocol.py deleted file mode 100644 index e714cc42..00000000 --- a/sfa/client/soapprotocol.py +++ /dev/null @@ -1,35 +0,0 @@ -# SOAP-specific code for SFA Client - -from httplib import HTTPSConnection -from ZSI.client import Binding - -def xmlrpc_like_callable (soap_callable, *x): - soap_result = soap_callable(*x) - xmlrpc_result = soap_result['Result'] - return xmlrpc_result - -class SFACallable: - def __init__(self, soap_callable): - self.soap_callable = soap_callable - - def __call__(self, *args): - outer_result = self.soap_callable(*args) - return outer_result['Result'] - - -class SFASoapBinding(Binding): - def __getattr__(self, attr): - soap_callable = Binding.__getattr__(self, attr) - return SFACallable(soap_callable) - - -def server_proxy(url, key_file, cert_file): - auth = { - 'transport' : HTTPSConnection, - 'transdict' : {'cert_file' : cert_file, - 'key_file' : key_file - }, - } - - return SFASoapBinding(url=url, **auth) -