From mboxrd@z Thu Jan 1 00:00:00 1970 From: jparsons@sourceware.org Date: 12 Aug 2006 17:59:41 -0000 Subject: [Cluster-devel] conga/luci/site/luci/Extensions ricci_bridge.py Message-ID: <20060812175941.26517.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: conga Changes by: jparsons at sourceware.org 2006-08-12 18:59:40 Modified files: luci/site/luci/Extensions: ricci_bridge.py Log message: new helper functions Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ricci_bridge.py.diff?cvsroot=cluster&r1=1.14&r2=1.15 --- conga/luci/site/luci/Extensions/ricci_bridge.py 2006/07/31 22:16:41 1.14 +++ conga/luci/site/luci/Extensions/ricci_bridge.py 2006/08/12 17:59:40 1.15 @@ -526,6 +526,59 @@ batch_number, result = self.batchAttemptResult(payload) return (batch_number, result) + def nodeLeaveCluster(self, cluster_shutdown=False): + cshutdown = "false" + if cluster_shutdown == True: + cshutdown = "true" + QUERY_STR='' + + try: + payload = self.makeConnection(QUERY_STR) + except RicciReceiveError, r: + return None + + batch_number, result = self.batchAttemptResult(payload) + + return (batch_number, result) + + def nodeJoinCluster(self, cluster_startup=False): + cstartup = "false" + if cluster_startup == True: + cstartup = "true" + QUERY_STR='' + + try: + payload = self.makeConnection(QUERY_STR) + except RicciReceiveError, r: + return None + + batch_number, result = self.batchAttemptResult(payload) + + return (batch_number, result) + + def nodeReboot(self): + QUERY_STR='' + + try: + payload = self.makeConnection(QUERY_STR) + except RicciReceiveError, r: + return None + + batch_number, result = self.batchAttemptResult(payload) + + return (batch_number, result) + + def nodeFence(self, nodename): + QUERY_STR='' + + 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 = '' @@ -592,3 +645,4 @@ batch += '' return minidom.parseString(batch).firstChild +