extras-buildsys/server UserInterface.py,1.46,1.47
Daniel Williams (dcbw)
fedora-extras-commits at redhat.com
Mon Aug 15 14:37:03 UTC 2005
Author: dcbw
Update of /cvs/fedora/extras-buildsys/server
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20687/server
Modified Files:
UserInterface.py
Log Message:
2005-08-15 Dan Williams <dcbw at redhat.com>
* client/client.py
server/UserInterface.py
- Implement API versioning, and check the API version in the client
before doing anything else
Index: UserInterface.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/server/UserInterface.py,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- UserInterface.py 15 Aug 2005 12:05:02 -0000 1.46
+++ UserInterface.py 15 Aug 2005 14:37:00 -0000 1.47
@@ -30,6 +30,10 @@
CONFIG_LOCATION = "/etc/plague/server/"
+# API version #, just increment each time an incompatible API change is made
+XMLRPC_API_VERSION = 100
+
+
def get_dbcx():
dbcx = None
dbcx = sqlite.connect(CONFIG_LOCATION + "jobdb", encoding="utf-8", timeout=3)
@@ -505,6 +509,9 @@
dbcx.commit()
return (0, "Success.")
+ def api_version(self):
+ return XMLRPC_API_VERSION
+
class UserInterfaceSSLAuth(UserInterface):
"""
@@ -524,6 +531,7 @@
return (-1, "Insufficient privileges.", -1)
return UserInterface.enqueue_srpm(self, user.email, package, srpm_file, target, buildreq)
+
def requeue(self, uid):
user = AuthedXMLRPCServer.get_authinfo()
if not user or not user.own_jobs:
@@ -551,6 +559,7 @@
return UserInterface.requeue(self, uid)
+
def kill_job(self, email, jobid):
user = AuthedXMLRPCServer.get_authinfo()
if not user or not user.own_jobs:
More information about the fedora-extras-commits
mailing list