From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 19 Jul 2006 20:57:39 -0000 Subject: [Cluster-devel] conga/luci/site/luci/Extensions cluster_adapte ... Message-ID: <20060719205739.31061.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: rmccabe at sourceware.org 2006-07-19 20:57:39 Modified files: luci/site/luci/Extensions: cluster_adapters.py ricci_bridge.py Log message: add in stan's code to generate the batch command for creating a cluster Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.3&r2=1.4 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ricci_bridge.py.diff?cvsroot=cluster&r1=1.3&r2=1.4 --- conga/luci/site/luci/Extensions/cluster_adapters.py 2006/07/19 20:19:53 1.3 +++ conga/luci/site/luci/Extensions/cluster_adapters.py 2006/07/19 20:57:39 1.4 @@ -105,7 +105,15 @@ 'rnodeHash': rnodeHash, 'isComplete': len(errors) < 1 and len(filter(dfn, nodeList)) == 0 } - return (len(errors) < 1, {'errors': errors, 'requestResults': cluster_properties }) + + if cluster_properties['isComplete'] != True: + return (False, {'errors': errors, 'requestResults':cluster_properties }) + + if cluster_properties['isComplete'] == True: + for i in nodeList: + i = i # yell@ricci + + return (len(errors) < 1, {'errors': errors, 'messages': messages }) def createCluChooser(self, request, systems): dummynode = {} --- conga/luci/site/luci/Extensions/ricci_bridge.py 2006/07/17 21:58:48 1.3 +++ conga/luci/site/luci/Extensions/ricci_bridge.py 2006/07/19 20:57:39 1.4 @@ -513,3 +513,61 @@ return False return False + +def createClusterBatch(cluster_name, nodeList, services, shared_storage, LVS): + batch = '' + batch += '' + batch += '' + batch += '' + batch += '' + batch += '' + batch += '' + + if services: + batch += '' + + if shared_storage: + batch += '' + + if LVS: + batch += '' + + batch += '' + batch += '' + batch += '' + batch += '' + + batch += '' + batch += '' + batch += '' + batch += '' + batch += '' + + batch += '' + batch += '' + batch += '' + batch += '' + batch += '' + batch += '' + batch += '' + + batch += '' + for i in nodeList: + batch += '' + batch += '' + + batch += '' + batch += '' + batch += '' + batch += '' + batch += '' + batch += '' + batch += '' + batch += '' + + batch += '' + batch += '' + batch += '' + batch += '' + batch += '' + batch += ''