From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 8 May 2007 21:31:04 -0000 Subject: [Cluster-devel] conga/luci/site/luci/Extensions/ClusterModel M ... Message-ID: <20070508213104.5866.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 Branch: EXPERIMENTAL Changes by: rmccabe at sourceware.org 2007-05-08 21:31:00 Modified files: luci/site/luci/Extensions/ClusterModel: ModelBuilder.py Added files: luci/site/luci/Extensions/ClusterModel: SAPDatabase.py SAPInstance.py Log message: recognize SAPInstance and SAPDatabase tags in cluster.conf Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/SAPDatabase.py.diff?cvsroot=cluster&only_with_tag=EXPERIMENTAL&r1=NONE&r2=1.1.2.1 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/SAPInstance.py.diff?cvsroot=cluster&only_with_tag=EXPERIMENTAL&r1=NONE&r2=1.1.2.1 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/ModelBuilder.py.diff?cvsroot=cluster&only_with_tag=EXPERIMENTAL&r1=1.1.2.1&r2=1.1.2.2 --- conga/luci/site/luci/Extensions/ClusterModel/Attic/ModelBuilder.py 2007/05/03 20:16:38 1.1.2.1 +++ conga/luci/site/luci/Extensions/ClusterModel/Attic/ModelBuilder.py 2007/05/08 21:30:59 1.1.2.2 @@ -24,6 +24,8 @@ from OpenLDAP import OpenLDAP from Postgres8 import Postgres8 from Tomcat5 import Tomcat5 +from SAPInstance import SAPInstance +from SAPDatabase import SAPDatabase from Multicast import Multicast from FenceDaemon import FenceDaemon from FenceXVMd import FenceXVMd @@ -81,6 +83,8 @@ 'script': Script, 'nfsexport': NFSExport, 'nfsclient': NFSClient, + 'SAPInstance': SAPInstance, + 'SABDatabase': SAPDatabase, 'device': Device } @@ -750,7 +754,16 @@ def getResourceManagerPtr(self): return self.resourcemanager_ptr - + + def getResourceByName(self, name): + resources = self.resources_ptr.getChildren() + res = filter(lambda x: x.getName() == name, resources) + if not res or len(res) < 1: + raise KeyError, name + if len(res) > 1: + raise Exception, 'More than one resource is named "%s"' % name + return res[0] + def getClusterNodesPtr(self): return self.clusternodes_ptr