Skip to contentSkip to conversation

conga/luci/site/luci/Extensions ricci_bridge.py

Cluster-devel [email protected] 1 participant 1 message Aug 14, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Changes by: jparsons at sourceware.org 2006-08-14 17:01:59

Modified files:
luci/site/luci/Extensions: ricci_bridge.py

Log message:
finalize logging code

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ricci_bridge.py.diff?cvsroot=cluster&r1=1.16&r2=1.17

luci/site/luci/Extensions/ricci_bridge.py +8 -2
@@ -581,9 +581,15 @@
     return (batch_number, result)
 
   def getNodeLogs(self):
-    QUERY_STR = '<?xml version="1.0" ?><ricci async="false" function="process_batch" version="1.0"><batch><module name=logging'
+    QUERY_STR = '<?xml version="1.0" ?><ricci async="false" function="process_batch" version="1.0"><batch><module name="log"><request sequence="1254" API_version="1.0"><function_call name="get"><var mutable="false" name="age" type="int" value="360000"/><var mutable="false" name="tags" type="list_str"><listentry value="cluster"/></var></function_call></request></module>'
 
-    pass
+    try:
+      payload = self.makeConnection(QUERY_STR)
+    except RicciReceiveError, r:
+      return "log not accessible"
+
+    #parse out log entry  
+    return payload
 
 def createClusterBatch(cluster_name, cluster_alias, nodeList, services, shared_storage, LVS):
     batch = '<?xml version="1.0" ?>'