[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

extras-buildsys/server UserInterface.py, 1.3, 1.4 client_manager.py, 1.9, 1.10



Author: dcbw

Update of /cvs/fedora/extras-buildsys/server
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24698/server

Modified Files:
	UserInterface.py client_manager.py 
Log Message:
2005-06-15  Dan Williams <dcbw redhat com>

    * server/UserInterface.py
        - Add a list_clients call that returns a list of currentl active build clients

    * server/client_manager.py
        - Return list of active build clients

    * utils/package-builder.py
        - Hook up list_clients call, and refactor client printing code into new function
            use by both list_clients and update_clients




Index: UserInterface.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/server/UserInterface.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- UserInterface.py	15 Jun 2005 04:49:08 -0000	1.3
+++ UserInterface.py	15 Jun 2005 05:13:59 -0000	1.4
@@ -158,6 +158,11 @@
         return (0, "Success.", client_list)
 
 
+    def list_clients(self):
+        reload(CONFIG)
+        client_list = self.bcm.list_clients()
+        return (0, "Success.", client_list)
+
 
 class UserInterfaceSSLAuth(UserInterface):
     """
@@ -185,6 +190,11 @@
             return (-1, "Insufficient privileges.")
         return UserInterface.update_clients(self)
 
+    def list_clients(self, user):
+        if not user.server_admin:
+            return (-1, "Insufficient privileges.")
+        return UserInterface.list_clients(self)
+
 
 class UserInterfaceNoAuth(UserInterface):
     """


Index: client_manager.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/server/client_manager.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- client_manager.py	15 Jun 2005 04:10:08 -0000	1.9
+++ client_manager.py	15 Jun 2005 05:13:59 -0000	1.10
@@ -336,6 +336,12 @@
 
         return client_list
 
+    def list_clients(self):
+        client_list = []
+        for client in self.running_clients:
+            client_list.append(client.to_dict())
+        return client_list
+
     def process(self):
         """ Allow each BuildClient to update its status and do some processing """
         for client in self.running_clients:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]