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

[Cluster-devel] conga/luci/site/luci/Extensions ricci_bridge.py



CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	jparsons sourceware org	2006-07-27 14:23:59

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

Log message:
	set cluster.conf method

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

--- conga/luci/site/luci/Extensions/ricci_bridge.py	2006/07/19 22:50:13	1.8
+++ conga/luci/site/luci/Extensions/ricci_bridge.py	2006/07/27 14:23:59	1.9
@@ -514,6 +514,24 @@
 
       return False
 
+def setClusterConf(clusterconf, propagate=True):
+  if propagate == True:
+    propg = "True"
+  else:
+    propg = "False"
+
+  QUERY_STR='<?xml version="1.0" ?><ricci async="true" function="process_batch" version="1.0"><batch><module name="cluster"><request API_version="1.0"><function_call name="set_cluster.conf"/><var propagate="' + propg + '" cluster.conf="' + clusterconf + '"/></request></module></batch></ricci>'
+
+  try:
+    payload = self.makeConnection(QUERY_STR)
+  except RicciReceiveError, r:
+    return None
+                                                                                
+                                                                                
+  batch_number, result = self.batchAttemptResult(payload)
+  return (batch_number, result)
+
+
 def createClusterBatch(cluster_name, cluster_alias, nodeList, services, shared_storage, LVS):
     batch = '<?xml version="1.0" ?>'
     batch += '<batch>'


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