From 72bf33dbed929d15637fcf66d7feca68a193269c Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Tue, 18 Apr 2006 13:03:38 +0000 Subject: [PATCH] - removed old code git-svn-id: file:///home/www/usr01/svn/gnuviechadmin/gnuviech.info/gnuviechadmin/trunk@188 a67ec6bc-e5d5-0310-a910-815c51eb3124 --- backend.old/soapclient/soapclient.py | 4 - backend.old/soapserver/soapserver.py | 8 -- common/setup.py | 14 --- common/src/data/gnuviechadmin.wsdl | 55 ----------- common/src/gnuviechadminCommon/__init__.py | 4 - .../gnuviechadmin_services.py | 92 ------------------- .../gnuviechadmin_services_types.py | 80 ---------------- 7 files changed, 257 deletions(-) delete mode 100644 backend.old/soapclient/soapclient.py delete mode 100644 backend.old/soapserver/soapserver.py delete mode 100644 common/setup.py delete mode 100644 common/src/data/gnuviechadmin.wsdl delete mode 100644 common/src/gnuviechadminCommon/__init__.py delete mode 100644 common/src/gnuviechadminCommon/gnuviechadmin_services.py delete mode 100644 common/src/gnuviechadminCommon/gnuviechadmin_services_types.py diff --git a/backend.old/soapclient/soapclient.py b/backend.old/soapclient/soapclient.py deleted file mode 100644 index 03ea1a4..0000000 --- a/backend.old/soapclient/soapclient.py +++ /dev/null @@ -1,4 +0,0 @@ -from SOAPpy import SOAPProxy - -server = SOAPProxy("http://localhost:8080/") -print server.hello() diff --git a/backend.old/soapserver/soapserver.py b/backend.old/soapserver/soapserver.py deleted file mode 100644 index 01c9d46..0000000 --- a/backend.old/soapserver/soapserver.py +++ /dev/null @@ -1,8 +0,0 @@ -from SOAPpy import SOAPServer - -def hello(): - return "Hello World" - -server = SOAPServer(("localhost", 8080)) -server.registerFunction(hello) -server.serve_forever() diff --git a/common/setup.py b/common/setup.py deleted file mode 100644 index dfdac7a..0000000 --- a/common/setup.py +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/python -# -# (c) 2006 Jan Dittberner -# $Id$ -# -from distutils.core import setup -setup(name='gnuviechadmin-common', - version='0.1.0', - description='common classes for gnuviech admin clients and server', - author='Jan Dittberner', - author_email='jan@gnuviech.info', - url='http://www.gnuviech.info/gnuviechadmin', - packages=['gnuviechadminCommon'], - package_dir= {'': 'src'}) \ No newline at end of file diff --git a/common/src/data/gnuviechadmin.wsdl b/common/src/data/gnuviechadmin.wsdl deleted file mode 100644 index 293581c..0000000 --- a/common/src/data/gnuviechadmin.wsdl +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/common/src/gnuviechadminCommon/__init__.py b/common/src/gnuviechadminCommon/__init__.py deleted file mode 100644 index 03199f1..0000000 --- a/common/src/gnuviechadminCommon/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# -# (c) 2006 Jan Dittberner -# $Id$ -# \ No newline at end of file diff --git a/common/src/gnuviechadminCommon/gnuviechadmin_services.py b/common/src/gnuviechadminCommon/gnuviechadmin_services.py deleted file mode 100644 index fc241a1..0000000 --- a/common/src/gnuviechadminCommon/gnuviechadmin_services.py +++ /dev/null @@ -1,92 +0,0 @@ -################################################## -# src/gnuviechadminCommon/gnuviechadmin_services.py -# generated by ZSI.wsdl2python -# -# -################################################## - - -from gnuviechadmin_services_types import * -from gnuviechadmin_services_types import \ - https___ssl_gnuviech_info_gnuviechadmin as ns1 -import urlparse, types -from ZSI.TCcompound import Struct -from ZSI import client -import ZSI - -class gnuviechadminInterface: - def getgnuviechadmin(self, portAddress=None, **kw): - raise NonImplementationError, "method not implemented" - - -class gnuviechadminLocator(gnuviechadminInterface): - gnuviechadmin_address = "https://ssl.gnuviech.info/gnuviechadmin" - def getgnuviechadminAddress(self): - return gnuviechadminLocator.gnuviechadmin_address - - def getgnuviechadmin(self, portAddress=None, **kw): - return gnuviechadminSOAPSOAP(portAddress or gnuviechadminLocator.gnuviechadmin_address, **kw) - - -class gnuviechadminSOAPSOAP: - - def __init__(self, addr, **kw): - netloc = (urlparse.urlparse(addr)[1]).split(":") + [80,] - if not kw.has_key("host"): - kw["host"] = netloc[0] - if not kw.has_key("port"): - kw["port"] = int(netloc[1]) - if not kw.has_key("url"): - kw["url"] = urlparse.urlparse(addr)[2] - self.binding = client.Binding(**kw) - - - def Authenticate(self, request): - """ - @param: request to AuthRequest:: - _login: str - _password: str - - @return: response is str - """ - - if not isinstance(request, AuthRequest) and\ - not issubclass(AuthRequest, request.__class__): - raise TypeError, "%s incorrect request type" %(request.__class__) - kw = {} - response = self.binding.Send(None, None, request, soapaction="https://ssl.gnuviech.info/gnuviechadmin/Authenticate", **kw) - response = self.binding.Receive(AuthResponseWrapper()) - - if not isinstance(response, basestring): - raise TypeError, "%s incorrect response type" %(response.__class__) - return response - - - -class AuthRequest(ns1.LoginInfo_Dec): - if not hasattr( ns1.LoginInfo_Dec(), "typecode" ): - typecode = ns1.LoginInfo_Dec() - - def __init__(self, name=None, ns=None): - ns1.LoginInfo_Dec.__init__(self, name=None, ns=None) - -class AuthRequestWrapper(AuthRequest): - """wrapper for document:literal message""" - - typecode = AuthRequest( name=None, ns=None ).typecode - def __init__( self, name=None, ns=None, **kw ): - AuthRequest.__init__( self, name=None, ns=None ) - -class AuthResponse(ns1.AuthCode_Dec): - if not hasattr( ns1.AuthCode_Dec(), "typecode" ): - typecode = ns1.AuthCode_Dec() - - def __init__(self, name=None, ns=None): - ns1.AuthCode_Dec.__init__(self, name=None, ns=None) - -class AuthResponseWrapper(AuthResponse): - """wrapper for document:literal message""" - - typecode = AuthResponse( name=None, ns=None ).typecode - def __init__( self, name=None, ns=None, **kw ): - AuthResponse.__init__( self, name=None, ns=None ) diff --git a/common/src/gnuviechadminCommon/gnuviechadmin_services_types.py b/common/src/gnuviechadminCommon/gnuviechadmin_services_types.py deleted file mode 100644 index fff4cf0..0000000 --- a/common/src/gnuviechadminCommon/gnuviechadmin_services_types.py +++ /dev/null @@ -1,80 +0,0 @@ -################################################## -# src/gnuviechadminCommon/gnuviechadmin_services_types.py -# generated by ZSI.wsdl2python -# -# -################################################## - - -import ZSI -from ZSI.TCcompound import Struct - -############################## -# targetNamespace -# -# https://ssl.gnuviech.info/gnuviechadmin/ -############################## - - -# imported as: ns1 -class https___ssl_gnuviech_info_gnuviechadmin: - targetNamespace = 'https://ssl.gnuviech.info/gnuviechadmin/' - - class LoginInfo_Dec(ZSI.TCcompound.Struct): - schema = 'https://ssl.gnuviech.info/gnuviechadmin/' - literal = 'LoginInfo' - - def __init__(self, name=None, ns=None, **kw): - name = name or self.__class__.literal - ns = ns or self.__class__.schema - - # internal vars - self._login = None - self._password = None - - TClist = [ZSI.TC.String(pname="login",aname="_login"), ZSI.TC.String(pname="password",aname="_password"), ] - - oname = name - - if name: - aname = '_%s' % name - if ns: - oname += ' xmlns="%s"' % ns - else: - oname += ' xmlns="%s"' % self.__class__.schema - else: - aname = None - - ZSI.TCcompound.Struct.__init__(self, self.__class__, TClist, - pname=name, inorder=0, - aname=aname, oname=oname, - **kw) - def Get_login(self): - return self._login - - def Set_login(self,_login): - self._login = _login - - def Get_password(self): - return self._password - - def Set_password(self,_password): - self._password = _password - - - class AuthCode_Dec(ZSI.TC.String): - literal = "AuthCode" - schema = "https://ssl.gnuviech.info/gnuviechadmin/" - - def __init__(self, name=None, ns=None, **kw): - name = name or self.__class__.literal - ns = ns or self.__class__.schema - kw["oname"] = '%s xmlns="%s"' %(name, ns) - - ZSI.TC.String.__init__(self,pname=name, aname="%s" % name, **kw) - -# define class alias for subsequent ns classes -ns1 = https___ssl_gnuviech_info_gnuviechadmin - - -