[Cluster-devel] conga/luci/site/luci/Extensions/ClusterModel M ...

rmccabe at sourceware.org rmccabe at sourceware.org
Tue May 8 21:31:04 UTC 2007


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
         




More information about the Cluster-devel mailing list