extras-buildsys/client client.py,1.5,1.6
Daniel Williams (dcbw)
fedora-extras-commits at redhat.com
Tue Jul 5 21:07:59 UTC 2005
- Previous message: extras-buildsys/builder CONFIG.py,1.3,1.4 builder.py,1.4,1.5
- Next message: extras-buildsys/common AuthedXMLRPCServer.py, NONE, 1.1 HTTPServer.py, NONE, 1.1 XMLRPCServerProxy.py, NONE, 1.1 FileDownloader.py, 1.9, 1.10 Makefile, 1.3, 1.4 SSLCommon.py, 1.7, 1.8 lighttpdManager.py, 1.1, 1.2 SSLXMLRPCServerProxy.py, 1.3, NONE SimpleHTTPSServer.py, 1.6, NONE SimpleSSLXMLRPCServer.py, 1.7, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: dcbw
Update of /cvs/fedora/extras-buildsys/client
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3768/client
Modified Files:
client.py
Log Message:
2005-07-05 Dan Williams <dcbw at redhat.com>
* Rework a bunch of stuff so the build server doesn't use quite as much CPU,
also split out stuff from server/client_manager.py
* Generalize the common/ classes to provide both SSL and non-SSL facilities,
renaming a lot of those files in the process
* Fix non-SSL builder/server and client/server communication
Note: At this time, SSL may be broken.
Index: client.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/client/client.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- client.py 1 Jul 2005 11:51:27 -0000 1.5
+++ client.py 5 Jul 2005 21:07:57 -0000 1.6
@@ -17,7 +17,7 @@
# Copyright 2005 Dan Williams <dcbw at redhat.com> and Red Hat, Inc.
import sys, os
-from plague import SSLXMLRPCServerProxy
+from plague import XMLRPCServerProxy
import ConfigParser
import M2Crypto
import M2Crypto.m2xmlrpclib
@@ -39,7 +39,7 @@
config.set('User', 'email', 'foo at it.com')
-config_file_path = os.path.expanduser('~/.plague-builder.cfg')
+config_file_path = os.path.expanduser('~/.plague-client.cfg')
config.read([config_file_path])
@@ -128,46 +128,46 @@
print msg
-def print_clients(banner, client_list):
+def print_builders(banner, builder_list):
print "\n%s:" % banner
print "-" * 70
- for client in client_list:
- string = " " + client['address']
- string = string + " " * (40 - len(client['address']))
- for arch in client['arches']:
+ for builder in builder_list:
+ string = " " + builder['address']
+ string = string + " " * (40 - len(builder['address']))
+ for arch in builder['arches']:
string = string + arch + " "
- string = string + " " + client['status']
+ string = string + " " + builder['status']
print string
print ""
-def update_clients(server, email):
+def update_builders(server, email):
"""
- Tell the build server to requery its build client list and re-add dropped
- clients that are now alive.
+ Tell the build server to requery its builder list and re-add dropped
+ builders that are now alive.
"""
try:
- (e, msg, client_list) = server.update_clients()
- if len(client_list) > 0:
- print_clients("New Build Clients", client_list)
+ (e, msg, builder_list) = server.update_builders()
+ if len(builder_list) > 0:
+ print_builders("New Builders", builder_list)
else:
- print "No new build clients found."
+ print "No new builders found."
except (M2Crypto.SSL.SSLError, socket.error), e:
print "Error connecting to build server: '%s'" % e
-def list_clients(server, email):
+def list_builders(server, email):
"""
- Get a list of currently active build clients.
+ Get a list of currently active builders.
"""
try:
- (e, msg, client_list) = server.list_clients()
- if len(client_list) > 0:
- print_clients("Active Build Clients", client_list)
+ (e, msg, builder_list) = server.list_builders()
+ if len(builder_list) > 0:
+ print_builders("Active Builders", builder_list)
else:
- print "No active build clients found."
+ print "No active builders found."
except (M2Crypto.SSL.SSLError, socket.error), e:
print "Error connecting to build server: '%s'" % e
@@ -189,7 +189,7 @@
certs['key_and_cert'] = os.path.expanduser(config.get('Certs', 'user-cert'))
certs['ca_cert'] = os.path.expanduser(config.get('Certs', 'user-ca-cert'))
certs['peer_ca_cert'] = os.path.expanduser(config.get('Certs', 'server-ca-cert'))
- server = SSLXMLRPCServerProxy.SSLXMLRPCServerProxy(certs, config.get('Server', 'address'))
+ server = XMLRPCServerProxy.XMLRPCServerProxy(addr, certs)
elif use_ssl == 'false':
if addr.startswith("https:"):
raise ServerException("Error: '%s' is an SSL server, but the use_ssl config option set to False. See %s" % (addr, config_file_path))
@@ -236,8 +236,8 @@
print " list <status>"
print " list <email> <status>"
print " kill <jobid>"
- print " update_clients"
- print " list_clients"
+ print " update_builders"
+ print " list_builders"
print ""
sys.exit(1)
@@ -284,10 +284,10 @@
sys.exit(1)
jobid = sys.argv[2]
kill(server, email, jobid)
- elif cmd == 'update_clients':
- update_clients(server, email)
- elif cmd == 'list_clients':
- list_clients(server, email)
+ elif cmd == 'update_builders':
+ update_builders(server, email)
+ elif cmd == 'list_builders':
+ list_builders(server, email)
else:
print "Unknown command."
sys.exit(1)
- Previous message: extras-buildsys/builder CONFIG.py,1.3,1.4 builder.py,1.4,1.5
- Next message: extras-buildsys/common AuthedXMLRPCServer.py, NONE, 1.1 HTTPServer.py, NONE, 1.1 XMLRPCServerProxy.py, NONE, 1.1 FileDownloader.py, 1.9, 1.10 Makefile, 1.3, 1.4 SSLCommon.py, 1.7, 1.8 lighttpdManager.py, 1.1, 1.2 SSLXMLRPCServerProxy.py, 1.3, NONE SimpleHTTPSServer.py, 1.6, NONE SimpleSSLXMLRPCServer.py, 1.7, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list