This commit is contained in:
Wolfgang Hottgenroth
2009-02-19 17:54:22 +01:00
parent beba6a5806
commit a2d3bd6e79
5 changed files with 81 additions and 44 deletions

View File

@ -28,21 +28,11 @@ class XmlRpcServer(SimpleXMLRPCServer):
else:
return func(*params)
def export_register(self, subdomain, sharedSecret, email):
def export_register(self, dynid, subdomain, zone, sharedSecret, email):
try:
dynid = subdomain
zone = 'yadynns.net'
if XmlRpcServer.entries.has_key(dynid):
raise LocalException("duplicate dynid")
for entry in XmlRpcServer.entries.values():
if entry.name == subdomain and entry.zone == zone:
raise LocalException("duplicate full name")
newEntry = Entry.Entry(dynid, sharedSecret, subdomain, zone)
XmlRpcServer.entries[dynid] = newEntry
AdminFuncs.register(dynid, subdomain, zone, sharedSecret)
return 'ok'
except LocalException, e:
except AdminFuncs.AdminFuncException, e:
return 'not ok ' + e.msg