conga/luci/site/luci/Extensions ricci_bridge.py
CVSROOT: /cvs/cluster
Module name: conga
Changes by: jparsons at sourceware.org 2006-07-27 14:23:59
Modified files:
luci/site/luci/Extensions: ricci_bridge.py
Log message:
set cluster.conf method
luci/site/luci/Extensions/ricci_bridge.py +18 -0
@@ -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>'