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

rmccabe at sourceware.org rmccabe at sourceware.org
Thu Aug 9 21:32:54 UTC 2007


CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	RHEL4
Changes by:	rmccabe at sourceware.org	2007-08-09 21:32:34

Added files:
	luci/site/luci/Extensions/ClusterModel: .cvsignore Apache.py 
	                                        BaseResource.py 
	                                        Cluster.py 
	                                        ClusterNode.py 
	                                        ClusterNodes.py 
	                                        Clusterfs.py Cman.py 
	                                        Device.py 
	                                        FailoverDomain.py 
	                                        FailoverDomainNode.py 
	                                        FailoverDomains.py 
	                                        Fence.py FenceDaemon.py 
	                                        FenceDevice.py 
	                                        FenceDevices.py 
	                                        FenceXVMd.py Fs.py 
	                                        GeneralError.py Gulm.py 
	                                        Heuristic.py Ip.py 
	                                        LVM.py Lockserver.py 
	                                        Method.py 
	                                        ModelBuilder.py 
	                                        Multicast.py MySQL.py 
	                                        NFSClient.py 
	                                        NFSExport.py Netfs.py 
	                                        OpenLDAP.py Postgres8.py 
	                                        QuorumD.py RefObject.py 
	                                        Resources.py Rm.py 
	                                        SAPDatabase.py 
	                                        SAPInstance.py Samba.py 
	                                        Script.py Service.py 
	                                        TagObject.py Tomcat5.py 
	                                        Totem.py Vm.py 
	                                        __init__.py 
Removed files:
	luci/site/luci/Extensions: Apache.py BaseResource.py Cluster.py 
	                           ClusterNode.py ClusterNodes.py 
	                           Clusterfs.py Cman.py Device.py 
	                           FailoverDomain.py 
	                           FailoverDomainNode.py 
	                           FailoverDomains.py Fence.py 
	                           FenceDaemon.py FenceDevice.py 
	                           FenceDevices.py FenceXVMd.py Fs.py 
	                           GeneralError.py Gulm.py Heuristic.py 
	                           Ip.py LVM.py Lockserver.py Method.py 
	                           ModelBuilder.py Multicast.py MySQL.py 
	                           NFSClient.py NFSExport.py Netfs.py 
	                           NodeData.py OpenLDAP.py Postgres8.py 
	                           QuorumD.py README.txt RefObject.py 
	                           Resources.py Rm.py SAPDatabase.py 
	                           SAPInstance.py Samba.py Script.py 
	                           Service.py ServiceData.py 
	                           TagObject.py Tomcat5.py Totem.py 
	                           Vm.py clui_constants.py clusterOS.py 
	                           permission_check.py ricci_bridge.py 

Log message:
	Merge in changes from the RHEL5 branch, pass 3

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/Apache.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.2&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/BaseResource.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/Cluster.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.5&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterNode.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.2&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterNodes.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/Clusterfs.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.2&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/Cman.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/Device.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/FailoverDomain.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.4.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/FailoverDomainNode.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/FailoverDomains.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/Fence.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/FenceDaemon.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.2&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/FenceDevice.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.3&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/FenceDevices.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/FenceXVMd.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/Fs.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.2&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/GeneralError.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/Gulm.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/Heuristic.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/Ip.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.2&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LVM.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/Lockserver.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/Method.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ModelBuilder.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.19.2.6&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/Multicast.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/MySQL.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.2&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/NFSClient.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.4.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/NFSExport.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.2&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/Netfs.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.2&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/NodeData.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/OpenLDAP.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.2&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/Postgres8.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.2&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/QuorumD.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/README.txt.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/RefObject.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/Resources.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/Rm.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/SAPDatabase.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.4.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/SAPInstance.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.4.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/Samba.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.2&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/Script.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.2&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/Service.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ServiceData.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/TagObject.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.2.2.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/Tomcat5.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.2&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/Totem.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/Vm.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.4&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/clui_constants.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.2&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/clusterOS.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.3&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/permission_check.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ricci_bridge.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.56.2.6&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/.cvsignore.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/Apache.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/BaseResource.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/Cluster.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/ClusterNode.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/ClusterNodes.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/Clusterfs.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/Cman.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/Device.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.4.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/FailoverDomain.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/FailoverDomainNode.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/FailoverDomains.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/Fence.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/FenceDaemon.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/FenceDevice.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/FenceDevices.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/FenceXVMd.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/Fs.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/GeneralError.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.3.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/Gulm.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/Heuristic.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/Ip.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/LVM.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/Lockserver.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/Method.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/ModelBuilder.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.5.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/Multicast.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/MySQL.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/NFSClient.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/NFSExport.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/Netfs.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/OpenLDAP.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/Postgres8.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/QuorumD.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/RefObject.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/Resources.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/Rm.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/SAPDatabase.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/SAPInstance.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/Samba.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/Script.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/Service.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/TagObject.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/Tomcat5.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/Totem.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/Vm.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/__init__.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1

/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/.cvsignore,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/.cvsignore
+++ -	2007-08-09 21:32:47.074083000 +0000
@@ -0,0 +1,2 @@
+*.pyc
+*.pyo
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/Apache.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/Apache.py
+++ -	2007-08-09 21:32:47.159580000 +0000
@@ -0,0 +1,18 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from BaseResource import BaseResource
+from gettext import gettext as _
+
+TAG_NAME = 'apache'
+RESOURCE_TYPE = _('Apache Server')
+
+class Apache(BaseResource):
+  def __init__(self):
+    BaseResource.__init__(self)
+    self.TAG_NAME = TAG_NAME
+    self.resource_type = RESOURCE_TYPE
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/BaseResource.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/BaseResource.py
+++ -	2007-08-09 21:32:47.237252000 +0000
@@ -0,0 +1,23 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from TagObject import TagObject
+
+TAG_NAME = "base_resource"  #This tag name should never be seen
+
+class BaseResource(TagObject):
+  def __init__(self):
+    TagObject.__init__(self)
+    self.TAG_NAME = TAG_NAME
+    self.resource_type = ""
+    self.deny_all_children = False
+
+  def getResourceType(self):
+    return self.resource_type
+
+  def isDenyAll(self):
+    return self.deny_all_children
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/Cluster.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/Cluster.py
+++ -	2007-08-09 21:32:47.316207000 +0000
@@ -0,0 +1,78 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from TagObject import TagObject
+
+TAG_NAME = "cluster"
+
+class Cluster(TagObject):
+  def __init__(self):
+    TagObject.__init__(self)
+    self.TAG_NAME = TAG_NAME
+    self.is_cfg_version_dirty = False
+
+  def getConfigVersion(self):
+    version = self.getAttribute("config_version")
+    return version
+
+  def setConfigVersion(self, version):
+    current_version = self.getConfigVersion()
+    if current_version == version:
+      return
+
+    self.addAttribute("config_version", version)
+    self.is_cfg_version_dirty = True
+
+  def incrementConfigVersion(self):
+    version = self.getAttribute("config_version")
+    intversion = int(version)
+    intversion = intversion + 1
+    self.addAttribute("config_version", str(intversion))
+    #self.is_cfg_version_dirty = True
+
+  def doesClusterUseQuorumDisk(self):
+    kids = self.getChildren()
+    for kid in kids:
+      if kid.getTagName().strip() == "quorumd":
+        return True
+
+    return False
+
+  def getQuorumdPtr(self):
+    kids = self.getChildren()
+    for kid in kids:
+      if kid.getTagName().strip() == "quorumd":
+        return kid
+
+    return None
+
+  def generateXML(self, doc, parent=None):
+    if self.is_cfg_version_dirty is False:
+      self.incrementConfigVersion()
+    else:
+      self.is_cfg_version_dirty = False
+
+    tag = doc.createElement(self.TAG_NAME)
+    if parent is None:
+      parent = doc
+    parent.appendChild(tag)
+    self.exportAttributes(tag)
+    if len(self.children) > 0:
+      for child in self.children:
+        if child is not None:
+          child.generateXML(doc, tag)
+
+  def getNameAlias(self):
+    return self.getAlias()
+
+  def getAlias(self):
+    # returns None if no alias set
+    alias = self.getAttribute("alias")
+    if alias is None:
+      alias = self.getName()
+      self.addAttribute('alias', alias)
+    return alias
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/ClusterNode.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/ClusterNode.py
+++ -	2007-08-09 21:32:47.396024000 +0000
@@ -0,0 +1,70 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from TagObject import TagObject
+
+TAG_NAME = "clusternode"
+
+class ClusterNode(TagObject):
+  def __init__(self):
+    TagObject.__init__(self)
+    self.TAG_NAME = TAG_NAME
+
+  def getFenceLevels(self):
+    #under this node will be a 'fence' block, then 0 or more 'method'  blocks.
+    #This method returns the set of 'method' objs. 'method' blocks represent
+    #fence levels
+    child = self.getChildren()
+    if len(child) > 0:
+      return child[0].getChildren()
+    else:
+      retval = list()
+      return retval
+
+  def getMulticastNode(self):
+    children = self.getChildren()
+    for child in children:
+      if child.getTagName() == "multicast":
+        return child
+
+    return None
+
+  def getInterface(self):
+    nd = self.getMulticastNode()
+    if nd is None:
+      return None
+    else:
+      return nd.getAttribute("interface")
+
+  def setInterface(self, ifc):
+    nd = self.getMulticastNode()
+    if nd is None:
+      return 
+    else:
+      nd.addAttribute("interface", ifc)
+
+  def isFenced(self):
+    fence_sum = 0
+    flevels = self.getFenceLevels()
+    if len(flevels) == 0:
+      return False
+
+    for flevel in flevels:
+      fence_sum = fence_sum + len(flevel.getChildren())
+
+    if fence_sum > 0:
+      return True
+    else:
+      return False
+
+  def getVotes(self):
+    try:
+      return self.getAttribute('votes')
+    except KeyError, e:
+      return "1"
+    except:
+      return None
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/ClusterNodes.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/ClusterNodes.py
+++ -	2007-08-09 21:32:47.483812000 +0000
@@ -0,0 +1,19 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from TagObject import TagObject
+
+CLUSTERNODES = "Cluster Nodes"
+TAG_NAME = "clusternodes"
+
+class ClusterNodes(TagObject):
+  def __init__(self):
+    TagObject.__init__(self)
+    self.TAG_NAME = TAG_NAME
+
+  def getName(self):
+    return CLUSTERNODES
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/Clusterfs.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/Clusterfs.py
+++ -	2007-08-09 21:32:47.564704000 +0000
@@ -0,0 +1,20 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from BaseResource import BaseResource
+from gettext import gettext as _
+
+TAG_NAME = 'clusterfs'
+RESOURCE_TYPE = _('GFS')
+
+class Clusterfs(BaseResource):
+  def __init__(self):
+    BaseResource.__init__(self)
+    self.TAG_NAME = TAG_NAME
+    self.resource_type = RESOURCE_TYPE
+    #only fstype supported right now is gfs
+    self.addAttribute('fstype', 'gfs')
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/Cman.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/Cman.py
+++ -	2007-08-09 21:32:47.651342000 +0000
@@ -0,0 +1,15 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from TagObject import TagObject
+
+TAG_NAME = 'cman'
+
+class Cman(TagObject):
+  def __init__(self):
+    TagObject.__init__(self)
+    self.TAG_NAME = TAG_NAME 
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/Device.py,v  -->  standard output
revision 1.4.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/Device.py
+++ -	2007-08-09 21:32:47.737816000 +0000
@@ -0,0 +1,47 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+import FenceHandler
+from TagObject import TagObject
+
+TAG_NAME = "device"
+OPTION = "option"
+
+#New Power Controller Fence Agent names should be added to
+#the list below
+power_controller_list = [ "fence_wti", "fence_apc", "fence_apc_snmp" ]
+
+class Device(TagObject):
+  def __init__(self):
+    TagObject.__init__(self)
+    self.TAG_NAME = TAG_NAME
+    self.agent_type = ""
+    self.has_native_option_set = False
+    self.fi_attrs = FenceHandler.FENCE_FI_ATTRS
+    self.pretty_fence_names = FenceHandler.FENCE_OPTS
+    self.pretty_name_attrs = FenceHandler.PRETTY_NAME_ATTRS
+
+  def getAgentType(self):
+    return self.agent_type
+
+  def setAgentType(self, agent_type):
+    self.agent_type = agent_type
+
+  def hasNativeOptionSet(self):
+    return self.has_native_option_set
+
+  def isPowerController(self):
+    for item in power_controller_list:
+      if self.agent_type == item:
+        return True
+
+    return False
+
+  def addAttribute(self, name, value):
+    if name == OPTION:
+      self.has_native_option_set = True
+    self.attr_hash[name] = value
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/FailoverDomain.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/FailoverDomain.py
+++ -	2007-08-09 21:32:47.823347000 +0000
@@ -0,0 +1,15 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from TagObject import TagObject
+
+TAG_NAME = "failoverdomain"
+
+class FailoverDomain(TagObject):
+  def __init__(self):
+    TagObject.__init__(self)
+    self.TAG_NAME = TAG_NAME
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/FailoverDomainNode.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/FailoverDomainNode.py
+++ -	2007-08-09 21:32:47.907581000 +0000
@@ -0,0 +1,38 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from TagObject import TagObject
+
+TAG_NAME = "failoverdomainnode"
+
+class FailoverDomainNode(TagObject):
+  def __init__(self):
+    self.priority_level = 1
+    TagObject.__init__(self)
+    self.TAG_NAME = TAG_NAME
+    self.addAttribute("priority", str(self.priority_level))
+
+  def raisePriorityLevel(self):
+    if self.priority_level  > 1:
+      self.priority_level = self.priority_level - 1
+      self.addAttribute("priority", str(self.priority_level))
+
+  def lowerPriorityLevel(self):
+    self.priority_level = self.priority_level + 1
+    self.addAttribute("priority", str(self.priority_level))
+
+  def getPriorityLevel(self):
+    return self.priority_level
+
+  def setPriorityLevel(self, level):
+    self.priority_level = level
+    self.addAttribute("priority", str(self.priority_level))
+
+  def addAttribute(self, name, value):
+    if name == "priority":
+      self.priority_level = int(value)
+    self.attr_hash[name] = value
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/FailoverDomains.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/FailoverDomains.py
+++ -	2007-08-09 21:32:47.998277000 +0000
@@ -0,0 +1,15 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from TagObject import TagObject
+
+TAG_NAME = "failoverdomains"
+
+class FailoverDomains(TagObject):
+  def __init__(self):
+    TagObject.__init__(self)
+    self.TAG_NAME = TAG_NAME
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/Fence.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/Fence.py
+++ -	2007-08-09 21:32:48.081320000 +0000
@@ -0,0 +1,15 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from TagObject import TagObject
+
+TAG_NAME = "fence"
+
+class Fence(TagObject):
+  def __init__(self):
+    TagObject.__init__(self)
+    self.TAG_NAME = TAG_NAME 
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/FenceDaemon.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/FenceDaemon.py
+++ -	2007-08-09 21:32:48.167455000 +0000
@@ -0,0 +1,40 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from TagObject import TagObject
+
+POST_JOIN_DEFAULT	= '3'
+POST_FAIL_DEFAULT	= '0'
+CLEAN_START_DEFAULT	= '0'
+
+TAG_NAME = "fence_daemon"
+
+class FenceDaemon(TagObject):
+  def __init__(self):
+    TagObject.__init__(self)
+    self.TAG_NAME = TAG_NAME 
+    self.addAttribute('post_join_delay', POST_JOIN_DEFAULT)
+    self.addAttribute('post_fail_delay', POST_FAIL_DEFAULT)
+    self.addAttribute('clean_start', CLEAN_START_DEFAULT)
+
+  def getPostJoinDelay(self):
+    val = self.getAttribute('post_join_delay')
+    return val
+
+  def getPostFailDelay(self):
+    val = self.getAttribute('post_fail_delay')
+    return val
+
+  def getCleanStart(self):
+    val = self.getAttribute('clean_start')
+    return val
+
+  def setPostJoinDelay(self, delay):
+    self.addAttribute('post_join_delay', delay)
+
+  def setPostFailDelay(self, delay):
+    self.addAttribute('post_fail_delay', delay)
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/FenceDevice.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/FenceDevice.py
+++ -	2007-08-09 21:32:48.247361000 +0000
@@ -0,0 +1,45 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+import FenceHandler
+from TagObject import TagObject
+
+TAG_NAME = "fencedevice"
+
+
+class FenceDevice(TagObject):
+  def __init__(self):
+    TagObject.__init__(self)
+    self.TAG_NAME = TAG_NAME
+    self.fd_attrs = FenceHandler.FENCE_FD_ATTRS
+    self.pretty_fence_names = FenceHandler.FENCE_OPTS
+    self.pretty_name_attrs = FenceHandler.PRETTY_NAME_ATTRS
+    self.shared_fences = FenceHandler.FENCE_SHARED
+
+
+
+  def getAgentType(self):
+    agent = self.attr_hash["agent"]
+    try:
+      return agent[agent.rfind('/') + 1:]
+    except:
+      pass
+    return agent
+
+  def isShared(self):
+    agent = self.getAgentType()
+    if agent == "fence_drac": #2 variants of drac...
+      mname = self.getAttribute("modulename")
+      if not mname:
+        return False
+      else:
+        return True
+
+    try:
+      return self.shared_fences[agent]
+    except KeyError, e:
+      return False
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/FenceDevices.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/FenceDevices.py
+++ -	2007-08-09 21:32:48.330058000 +0000
@@ -0,0 +1,15 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from TagObject import TagObject
+
+TAG_NAME = "fencedevices"
+
+class FenceDevices(TagObject):
+  def __init__(self):
+    TagObject.__init__(self)
+    self.TAG_NAME = TAG_NAME
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/FenceXVMd.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/FenceXVMd.py
+++ -	2007-08-09 21:32:48.409080000 +0000
@@ -0,0 +1,15 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from TagObject import TagObject
+
+TAG_NAME = "fence_xvmd"
+
+class FenceXVMd(TagObject):
+  def __init__(self):
+    TagObject.__init__(self)
+    self.TAG_NAME = TAG_NAME
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/Fs.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/Fs.py
+++ -	2007-08-09 21:32:48.495277000 +0000
@@ -0,0 +1,18 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from BaseResource import BaseResource
+from gettext import gettext as _
+
+TAG_NAME = 'fs'
+RESOURCE_TYPE = _('File System')
+
+class Fs(BaseResource):
+  def __init__(self):
+    BaseResource.__init__(self)
+    self.TAG_NAME = TAG_NAME
+    self.resource_type = RESOURCE_TYPE
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/Gulm.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/Gulm.py
+++ -	2007-08-09 21:32:48.724612000 +0000
@@ -0,0 +1,15 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from TagObject import TagObject
+
+TAG_NAME = "gulm"
+
+class Gulm(TagObject):
+  def __init__(self):
+    TagObject.__init__(self)
+    self.TAG_NAME = TAG_NAME 
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/Heuristic.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/Heuristic.py
+++ -	2007-08-09 21:32:48.809894000 +0000
@@ -0,0 +1,15 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from TagObject import TagObject
+
+TAG_NAME = "heuristic"
+
+class Heuristic(TagObject):
+  def __init__(self):
+    TagObject.__init__(self)
+    self.TAG_NAME = TAG_NAME 
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/Ip.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/Ip.py
+++ -	2007-08-09 21:32:48.898964000 +0000
@@ -0,0 +1,24 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from BaseResource import BaseResource
+from gettext import gettext as _
+
+TAG_NAME = 'ip'
+RESOURCE_TYPE = _('IP Address')
+
+class Ip(BaseResource):
+  def __init__(self):
+    BaseResource.__init__(self)
+    self.TAG_NAME = TAG_NAME
+    self.resource_type = RESOURCE_TYPE
+
+  def getName(self):
+    try:
+      return self.attr_hash['address']
+    except KeyError, e:
+      return ''
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/LVM.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/LVM.py
+++ -	2007-08-09 21:32:48.993819000 +0000
@@ -0,0 +1,18 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from BaseResource import BaseResource
+from gettext import gettext as _
+
+TAG_NAME = 'lvm'
+RESOURCE_TYPE = _('Logical Volume Management')
+
+class LVM(BaseResource):
+  def __init__(self):
+    BaseResource.__init__(self)
+    self.TAG_NAME = TAG_NAME
+    self.resource_type = RESOURCE_TYPE
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/Lockserver.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/Lockserver.py
+++ -	2007-08-09 21:32:49.084550000 +0000
@@ -0,0 +1,15 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from TagObject import TagObject
+
+TAG_NAME = "lockserver"
+
+class Lockserver(TagObject):
+  def __init__(self):
+    TagObject.__init__(self)
+    self.TAG_NAME = TAG_NAME 
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/Method.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/Method.py
+++ -	2007-08-09 21:32:49.169791000 +0000
@@ -0,0 +1,15 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from TagObject import TagObject
+
+TAG_NAME = "method"
+
+class Method(TagObject):
+  def __init__(self):
+    TagObject.__init__(self)
+    self.TAG_NAME = TAG_NAME
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/ModelBuilder.py,v  -->  standard output
revision 1.5.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/ModelBuilder.py
+++ -	2007-08-09 21:32:49.271341000 +0000
@@ -0,0 +1,1143 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from xml.dom import minidom, Node
+from TagObject import TagObject
+from Cluster import Cluster
+from ClusterNode import ClusterNode
+from ClusterNodes import ClusterNodes
+from Fence import Fence
+from FenceDevice import FenceDevice
+from FenceDevices import FenceDevices
+from Method import Method
+from Device import Device
+from Cman import Cman
+from Totem import Totem
+from Gulm import Gulm
+from Lockserver import Lockserver
+from Ip import Ip
+from Script import Script
+from NFSClient import NFSClient
+from NFSExport import NFSExport
+from Fs import Fs
+from Samba import Samba
+from Apache import Apache
+from LVM import LVM
+from MySQL import MySQL
+from OpenLDAP import OpenLDAP
+from Postgres8 import Postgres8
+from Tomcat5 import Tomcat5
+from SAPDatabase import SAPDatabase
+from SAPInstance import SAPInstance
+from Multicast import Multicast
+from FenceDaemon import FenceDaemon
+from FenceXVMd import FenceXVMd
+from Netfs import Netfs
+from Clusterfs import Clusterfs
+from Resources import Resources
+from Service import Service
+from QuorumD import QuorumD
+from Heuristic import Heuristic
+from Vm import Vm
+from RefObject import RefObject
+from FailoverDomain import FailoverDomain
+from FailoverDomains import FailoverDomains
+from FailoverDomainNode import FailoverDomainNode
+from Rm import Rm
+
+DLM_TYPE	= 0
+GULM_TYPE	= 1
+
+TAGNAMES = { 'cluster': Cluster,
+             'clusternodes': ClusterNodes,
+             'clusternode': ClusterNode,
+             'fence': Fence,
+             'fencedevice': FenceDevice,
+             'fencedevices': FenceDevices,
+             'method': Method,
+             'cman': Cman,
+             'totem': Totem,
+             'gulm': Gulm,
+             'lockserver': Lockserver,
+             'rm': Rm,
+             'service': Service,
+             'vm': Vm,
+             'fence_xvmd': FenceXVMd,
+             'resources': Resources,
+             'failoverdomain': FailoverDomain,
+             'failoverdomains': FailoverDomains,
+             'failoverdomainnode': FailoverDomainNode,
+             'ip': Ip,
+             'fs': Fs,
+             'smb': Samba,
+             'apache': Apache,
+             'lvm': LVM,
+             'mysql': MySQL,
+             'openldap': OpenLDAP,
+             'postgres-8': Postgres8,
+             'tomcat-5': Tomcat5,
+             'fence_daemon': FenceDaemon,
+             'multicast': Multicast,
+             'clusterfs': Clusterfs,
+             'netfs': Netfs,
+             'quorumd': QuorumD,
+             'heuristic': Heuristic,
+             'script': Script,
+             'nfsexport': NFSExport,
+             'nfsclient': NFSClient,
+             'SAPDatabase': SAPDatabase,
+             'SAPInstance': SAPInstance,
+             'device': Device }
+
+
+###---Don't translate strings below---
+CLUSTER_PTR_STR = "cluster"
+CLUSTERNODES_PTR_STR = "clusternodes"
+FAILDOMS_PTR_STR = "failoverdomains"
+FENCEDEVICES_PTR_STR = "fencedevices"
+RESOURCEMANAGER_PTR_STR = "rm"
+RESOURCES_PTR_STR = "resources"
+FENCEDAEMON_PTR_STR = "fence_daemon"
+SERVICE = "service"
+VM = "vm"
+FENCE_XVMD_STR = "fence_xvmd"
+GULM_TAG_STR = "gulm"
+MCAST_STR = "multicast"
+CMAN_PTR_STR = "cman"
+TOTEM_PTR_STR = "totem"
+QUORUMD_PTR_STR = "quorumd"
+###-----------------------------------
+
+
+INVALID_GULM_COUNT = "GULM locking mechanism may consist of 1, 3, or 5 locking servers. You have configured %d. Fix the error and try saving again."
+
+
+class ModelBuilder:
+  def __init__(self, lock_type, filename=None, mcast_addr=None, domm=None):
+    self.filename = filename
+    self.lock_type = DLM_TYPE
+    self.mcast_address = mcast_addr
+    self.cluster_ptr = None
+    self.GULM_ptr = None
+    self.CMAN_ptr = None
+    self.TOTEM_ptr = None
+    self.clusternodes_ptr = None
+    self.failoverdomains_ptr = None
+    self.fencedevices_ptr = None
+    self.resourcemanager_ptr = None
+    self.resources_ptr = None
+    self.fence_daemon_ptr = None
+    self.isModified = False
+    self.quorumd_ptr = None
+    self.usesQuorumd = False
+    self.fence_xvmd_ptr = None
+    self.unusual_items = list()
+    self.isVirtualized = False
+    if mcast_addr is None:
+      self.usesMulticast = False
+    else:
+      self.usesMulticast = True
+
+    if domm is not None:
+      self.parent = domm
+      self.object_tree = self.buildModel(None)
+      self.check_empty_ptrs()
+      self.check_fence_daemon()
+      self.resolve_fence_instance_types()
+      self.purgePCDuplicates()
+      self.resolve_references()
+      self.check_for_multicast()
+      self.check_for_nodeids()
+    else:
+      if filename is None:
+        if lock_type == DLM_TYPE:
+          self.lock_type = DLM_TYPE
+          self.object_tree = self.buildDLMModelTemplate()
+        else:
+          self.lock_type = GULM_TYPE
+          self.object_tree = self.buildGULMModelTemplate()
+      else:
+        try:
+          self.parent = minidom.parse(self.filename)
+        except IOError, e:
+          pass
+
+        self.object_tree = self.buildModel(None)
+        self.check_empty_ptrs()
+        self.check_fence_daemon()
+        self.resolve_fence_instance_types()
+        self.purgePCDuplicates()
+        self.resolve_references()
+        self.check_for_multicast()
+
+
+  def buildModel(self, parent_node, parent_object=None):
+
+    if parent_node is None:
+      parent_node = self.parent
+
+    new_object = None
+    if parent_node.nodeType == Node.DOCUMENT_NODE:
+      parent_node = parent_node.firstChild
+
+    if parent_node.nodeType == Node.ELEMENT_NODE:
+      #Create proper type
+      try:
+        new_object = TAGNAMES[parent_node.nodeName]()
+        attrs = parent_node.attributes
+        for attrName in attrs.keys():
+          attrNode = attrs.get(attrName)
+          attrValue = attrNode.nodeValue
+          new_object.addAttribute(attrName, attrValue)
+      except KeyError, e: ##This allows for custom tags
+        new_object = TagObject(parent_node.nodeName)
+        attrs = parent_node.attributes
+        for attrName in attrs.keys():
+          attrNode = attrs.get(attrName)
+          attrValue = attrNode.nodeValue
+          new_object.addAttribute(attrName, attrValue)
+        self.unusual_items.append((parent_object, new_object))
+        for item in parent_node.childNodes:
+          result_object = self.buildModel(item, new_object)
+          if result_object is not None:
+            new_object.addChild(result_object)
+        return None
+
+       ######End of unusual item exception
+
+      if parent_node.nodeName == CLUSTER_PTR_STR:
+        self.cluster_ptr = new_object
+      if parent_node.nodeName == CLUSTERNODES_PTR_STR:
+        self.clusternodes_ptr = new_object
+      elif parent_node.nodeName == FENCEDEVICES_PTR_STR:
+        self.fencedevices_ptr = new_object
+      elif parent_node.nodeName == FAILDOMS_PTR_STR:
+        self.failoverdomains_ptr = new_object
+      elif parent_node.nodeName == RESOURCEMANAGER_PTR_STR:
+        self.resourcemanager_ptr = new_object
+      elif parent_node.nodeName == RESOURCES_PTR_STR:
+        self.resources_ptr = new_object
+      elif parent_node.nodeName == FENCEDAEMON_PTR_STR:
+        self.fence_daemon_ptr = new_object
+      elif parent_node.nodeName == QUORUMD_PTR_STR:
+        self.quorumd_ptr = new_object
+        self.usesQuorumd = True
+      elif parent_node.nodeName == GULM_TAG_STR:
+        self.GULM_ptr = new_object
+        self.lock_type = GULM_TYPE
+      elif parent_node.nodeName == CMAN_PTR_STR:
+        self.CMAN_ptr = new_object
+      elif parent_node.nodeName == TOTEM_PTR_STR:
+        self.TOTEM_ptr = new_object
+      elif parent_node.nodeName == MCAST_STR:
+        self.usesMulticast = True
+      elif parent_node.nodeName == FENCE_XVMD_STR:
+        self.fence_xvmd_ptr = new_object
+
+    else:
+      return None
+
+
+    for item in parent_node.childNodes:
+      result_object = self.buildModel(item, new_object)
+      if result_object is not None:
+        new_object.addChild(result_object)
+
+    return (new_object)
+
+  def buildDLMModelTemplate(self):
+    obj_tree = Cluster()
+    self.cluster_ptr = obj_tree
+
+    obj_tree.addAttribute("name", "alpha_cluster")
+    obj_tree.addAttribute("config_version", "1")
+    fdp = FenceDaemon()
+    obj_tree.addChild(fdp)
+    self.fence_daemon_ptr = fdp
+    cns = ClusterNodes()
+    obj_tree.addChild(cns)
+    self.clusternodes_ptr = cns
+
+    cman = Cman()
+    self.CMAN_ptr = cman
+    obj_tree.addChild(cman)
+
+    if self.usesMulticast is True:
+      mcast = Multicast()
+      mcast.addAttribute("addr", self.mcast_address)
+      cman.addChild(mcast)
+
+    fds = FenceDevices()
+    obj_tree.addChild(fds)
+    self.fencedevices_ptr = fds
+
+    rm = Rm()
+    obj_tree.addChild(rm)
+    self.resourcemanager_ptr = rm
+
+    fdoms = FailoverDomains()
+    self.failoverdomains_ptr = fdoms
+    rm.addChild(fdoms)
+
+    rcs = Resources()
+    rm.addChild(rcs)
+    self.resources_ptr = rcs
+
+    self.isModified = False
+
+    return obj_tree
+
+  def buildGULMModelTemplate(self):
+    obj_tree = Cluster()
+    self.cluster_ptr = obj_tree
+
+    obj_tree.addAttribute("name", "alpha_cluster")
+    obj_tree.addAttribute("config_version", "1")
+    cns = ClusterNodes()
+    obj_tree.addChild(cns)
+    self.clusternodes_ptr = cns
+
+    gulm = Gulm()
+    self.GULM_ptr = gulm
+    self.fence_daemon_ptr = None
+    obj_tree.addChild(gulm)
+
+    fds = FenceDevices()
+    obj_tree.addChild(fds)
+    self.fencedevices_ptr = fds
+
+    rm = Rm()
+    obj_tree.addChild(rm)
+    self.resourcemanager_ptr = rm
+
+    fdoms = FailoverDomains()
+    self.failoverdomains_ptr = fdoms
+    rm.addChild(fdoms)
+
+    rcs = Resources()
+    rm.addChild(rcs)
+    self.resources_ptr = rcs
+
+    self.isModified = False
+
+    return obj_tree
+
+
+  ##Because fence devices are declared in a separate XML section
+  ##in conf file, agent types for fence instances must be done in
+  ##a separate pass, after the DOM is completely built. This method
+  ##sets the agent type for each fence instance.
+  def resolve_fence_instance_types(self):
+    fds = self.getFenceDevices()
+    agent_hash = {}
+    for fd in fds:
+      agent = fd.getAttribute("agent")
+      if agent is not None:
+        agent_hash[fd.getName()] = agent
+
+    nodes = self.getNodes()
+    for node in nodes:
+      levels = node.getFenceLevels()
+      for level in levels:
+        children = level.getChildren()
+        for child in children:
+          child.setAgentType(agent_hash[child.getName()])
+
+  ##This method builds RefObject containers for appropriate
+  ##entities after the object tree is built.
+  def resolve_references(self):
+    reset_list_sentinel = True
+    while(reset_list_sentinel is True):
+      reset_list_sentinel = False
+      resource_children = self.resourcemanager_ptr.getChildren()
+      for r_child in resource_children:
+        if r_child.getTagName() == SERVICE:
+         reset_list_sentinel = self.find_references(r_child)
+         if reset_list_sentinel is True:
+           break
+
+  def find_references(self, entity, parent=None):
+    result = False
+    if (entity.getAttribute("ref") is not None) and (entity.isRefObject() is False):
+      result = self.transform_reference(entity, parent)
+      return result
+
+    children = entity.getChildren()
+    if len(children) > 0:
+      for child in children:
+        result = self.find_references(child, entity)
+        if result is True:
+          return result
+
+    return result
+
+  def transform_reference(self, entity, parent):
+    result = False
+    #This entity has a "ref" attr...need to walk through resources list
+    #and look for a match
+    recs = self.resources_ptr.getChildren()
+    for rec in recs:
+      if rec.getTagName() == entity.getTagName():
+        if entity.getTagName() == "ip":
+          if entity.getAttribute("ref") == rec.getAttribute("address"):
+            rf = RefObject(rec)
+            kids = entity.getChildren()
+            for kid in kids:
+              rf.addChild(kid)
+            result = True
+            break
+        else:
+          if entity.getAttribute("ref") == rec.getName():
+            rf = RefObject(rec)
+            kids = entity.getChildren()
+            for kid in kids:
+              rf.addChild(kid)
+            result = True
+            break
+
+    if result is False:
+      return result
+
+    if parent is None:  #Must be a service
+      self.resourcemanager_ptr.addChild(rf)
+      self.resourcemanager_ptr.removeChild(entity)
+      return True
+    else:
+      parent.addChild(rf)
+      parent.removeChild(entity)
+      return True
+
+  def exportModelAsString(self):
+    if self.perform_final_check() is False: # failed
+      return None
+
+    #check for dual power fences
+    self.dual_power_fence_check()
+    self.restore_unusual_items()
+
+    try:
+      doc = minidom.Document()
+      self.object_tree.generateXML(doc)
+      strbuf = doc.toprettyxml()
+
+      self.isModified = False
+
+      ##Need to restore model
+      self.parent = doc
+
+      self.object_tree = self.buildModel(None)
+      self.check_empty_ptrs()
+      self.check_fence_daemon()
+      self.resolve_fence_instance_types()
+      self.purgePCDuplicates()
+      self.resolve_references()
+      self.check_for_multicast()
+
+    finally:
+      pass
+      #dual_power_fence_check() adds extra
+      #fence instance entries for dual power controllers
+      #These must be removed from the tree before the UI
+      #can be used
+      #self.purgePCDuplicates()
+
+    return strbuf
+
+  def restore_unusual_items(self):
+    for item in self.unusual_items:
+      duplicate = False
+      kids = item[0].getChildren()
+      for kid in kids:
+        if kid == item[1]:
+          duplicate = True
+          break
+      if duplicate is True:
+        continue
+      else:
+        item[0].addChild(item[1])
+
+  def check_for_nodeids(self):
+    nodes = self.getNodes()
+    for node in nodes:
+      if node.getAttribute('nodeid') is None:
+        new_id = self.getUniqueNodeID()
+        node.addAttribute('nodeid', new_id)
+
+  def getUniqueNodeID(self):
+    nodes = self.getNodes()
+    total_nodes = len(nodes)
+    dex_list = list()
+    for nd_idx in range (1, (total_nodes + 3)):
+      dex_list.append(str(nd_idx))
+
+    for dex in dex_list:
+      found = False
+      for node in nodes:
+        ndid = node.getAttribute('nodeid')
+        if ndid is not None:
+          if ndid == dex:
+            found = True
+            break
+        else:
+          continue
+
+      if found is True:
+        continue
+      else:
+        return dex
+
+  def setIsVirtualized(self, isVirtualized):
+    if isVirtualized is None:
+      self.isVirtualized = False
+    else:
+      self.isVirtualized = isVirtualized
+
+  def getIsVirtualized(self):
+    return self.isVirtualized
+
+  def getNodes(self):
+    #Find the clusternodes obj and return get_children
+    return self.clusternodes_ptr.getChildren()
+
+  def getNodeNames(self):
+    return map(lambda x: x.getName(), self.clusternodes_ptr.getChildren())
+
+  def getNodeNameById(self, node_id):
+    return filter(lambda x: x.getAttribute('nodeid') == node_id, self.clusternodes_ptr.getChildren())[0].getName()
+
+  def addNode(self, clusternode):
+    self.clusternodes_ptr.addChild(clusternode)
+    if self.usesMulticast is True:
+      mcast = Multicast()
+      mcast.addAttribute("addr", self.mcast_address)
+      mcast.addAttribute("interface", "eth0")  #eth0 is the default
+      clusternode.addChild(mcast)
+    self.isModified = True
+
+  def deleteNode(self, clusternode):
+    #1) delete node
+    #2) delete failoverdomainnodes with same name
+    #3) delete lockserver nodes if GULM
+
+    name = clusternode.getName()
+
+    self.clusternodes_ptr.removeChild(clusternode)
+
+    found_one = True
+
+    while found_one is True:
+      found_one = False
+      fdoms = self.getFailoverDomains()
+      for fdom in fdoms:
+        children = fdom.getChildren()
+        for child in children:
+          if child.getName() == name:
+            fdom.removeChild(child)
+            found_one = True
+            break
+
+      lock_type = self.getLockType()
+      if lock_type == GULM_TYPE:
+        if self.isNodeLockserver(clusternode.getName()) is True:
+          self.removeLockserver(clusternode)
+
+    self.isModified = True
+
+  def retrieveNodeByName(self, name):
+    ret = filter(lambda x: x.getName() == name, self.clusternodes_ptr.getChildren())
+    if len(ret) != 1:
+      raise KeyError, name
+    return ret[0]
+
+  def deleteNodeByName(self, name):
+    return self.deleteNode(self.retrieveNodeByName(name))
+
+  def retrieveServiceByName(self, name):
+    svcs = self.getServices()
+    for svc in svcs:
+      if svc.getName() == name:
+        return svc
+
+    raise KeyError, 'Couldn\'t find service name %s in current list' % name
+
+  def retrieveVMsByName(self, name):
+    vms = self.getVMs()
+    for v in vms:
+      if v.getName() == name:
+        return v
+
+    raise KeyError, 'Couldn\'t find VM name %s in current list' % name
+
+  def del_totem(self):
+    if self.TOTEM_ptr is not None:
+      self.cluster_ptr.removeChild(self.TOTEM_ptr)
+      self.TOTEM_ptr = None
+
+  def add_totem(self, obj):
+    self.del_totem()
+    if self.TOTEM_ptr is None:
+      self.cluster_ptr.addChild(obj)
+      self.TOTEM_ptr = obj
+
+  def hasFenceXVM(self):
+    return self.fence_xvmd_ptr is not None
+
+  # Right now the fence_xvmd tag is empty, but allow the object
+  # to be passed in case attributes are added in the future.
+  def addFenceXVM(self, obj):
+    if self.fence_xvmd_ptr is not None:
+      self.cluster_ptr.removeChild(self.fence_xvmd_ptr)
+    self.cluster_ptr.addChild(obj)
+    self.fence_xvmd_ptr = obj
+
+  def delFenceXVM(self):
+    if self.fence_xvmd_ptr is not None:
+      self.cluster_ptr.removeChild(self.fence_xvmd_ptr)
+      self.fence_xvmd_ptr = None
+
+  def getFenceDevices(self):
+    if self.fencedevices_ptr is None:
+      return list()
+    else:
+      return self.fencedevices_ptr.getChildren()
+
+  def getFenceDevicePtr(self):
+    return self.fencedevices_ptr
+
+  def getFailoverDomains(self):
+    if self.failoverdomains_ptr is None:
+      return list()
+    else:
+      return self.failoverdomains_ptr.getChildren()
+
+  def getFailoverDomainPtr(self):
+    return self.failoverdomains_ptr
+
+  def getFailoverDomainByName(self, fdom_name):
+    fdoms = self.getFailoverDomains()
+    for i in fdoms:
+      if i.getName() == fdom_name:
+        return i
+    return None
+
+  def getFailoverDomainsForNode(self, nodename):
+    matches = list()
+    faildoms = self.getFailoverDomains()
+    for fdom in faildoms:
+      fdnodes = fdom.getChildren()
+      for node in fdnodes:
+        if node.getName().encode('ascii', 'ignore') == nodename:
+          matches.append(fdom)
+          break
+
+    return matches
+
+  def addNodeToFailoverDomain(self, node, fd):
+    fdoms = self.getFailoverDomains()
+    for fdom in fdoms:
+      if fdom.getName().encode('ascii', 'ignore') == fd:
+        kids = fdom.getChildren()
+        newnode = FailoverDomainNode()
+        if len(kids) != 0: #Use an existing node as a baseline...
+          attrs = kids[0].getAttributes()
+          kees = attrs.keys()
+          for k in kees:
+            newnode.addAttribute(k, attrs[k])
+            newnode.addAttribute("name", node)
+        else:
+          newnode.addAttribute("name", node)
+        fdom.addChild(newnode)
+        return
+
+    return
+
+  def removeNodeFromFailoverDomain(self, node, fd):
+    fdoms = self.getFailoverDomains()
+    for fdom in fdoms:
+      if fdom.getName().encode('ascii', 'ignore') == fd:
+        kids = fdom.getChildren()
+        for kid in kids:
+          if kid.getName().encode('ascii', 'ignore') == node:
+            fdom.removeChild(kid)
+            return
+
+    return
+
+  def isMulticast(self):
+    return self.usesMulticast
+
+  def check_for_multicast(self):
+    if self.usesMulticast is True:
+      #set mcast address
+      children = self.CMAN_ptr.getChildren()
+      for child in children:
+        if child.getTagName() == MCAST_STR:
+          addr = child.getAttribute("addr")
+          if addr is not None:
+            self.mcast_address = addr
+            return
+          else:  #What a mess! a multicast tag, but no addr attribute
+            self.mcast_address = ""
+            return
+
+  def getMcastAddr(self):
+    return self.mcast_address
+
+  def isQuorumd(self):
+    return self.usesQuorumd
+
+  def getQuorumdPtr(self):
+    return self.quorumd_ptr
+
+  def check_empty_ptrs(self):
+    if self.resourcemanager_ptr is None:
+      rm = Rm()
+      self.cluster_ptr.addChild(rm)
+      self.resourcemanager_ptr = rm
+
+    if self.failoverdomains_ptr is None:
+      fdoms = FailoverDomains()
+      self.resourcemanager_ptr.addChild(fdoms)
+      self.failoverdomains_ptr = fdoms
+
+    if self.fencedevices_ptr is None:
+      fds = FenceDevices()
+      self.cluster_ptr.addChild(fds)
+      self.fencedevices_ptr = fds
+
+    if self.resources_ptr is None:
+      rcs = Resources()
+      self.resourcemanager_ptr.addChild(rcs)
+      self.resources_ptr = rcs
+
+    if self.GULM_ptr is None and self.fence_daemon_ptr is None:
+      fdp = FenceDaemon()
+      self.cluster_ptr.addChild(fdp)
+      self.fence_daemon_ptr = fdp
+
+  def getServices(self):
+    rg_list = list()
+    if self.resourcemanager_ptr is not None:
+      kids = self.resourcemanager_ptr.getChildren()
+      for kid in kids:
+        if kid.getTagName() == SERVICE:
+          rg_list.append(kid)
+
+    return rg_list
+
+  def getService(self, svcname):
+    services = self.getServices()
+    for service in services:
+      if service.getName() == svcname:
+        return service
+
+    return None
+
+  def getVMs(self):
+    rg_list = list()
+    if self.resourcemanager_ptr is not None:
+      kids = self.resourcemanager_ptr.getChildren()
+      for kid in kids:
+        if kid.getTagName() == VM:
+          rg_list.append(kid)
+
+    return rg_list
+
+  def deleteService(self, service):
+    if self.resourcemanager_ptr is not None:
+      kids = self.resourcemanager_ptr.getChildren()
+      for kid in kids:
+        if kid.getName() == service:
+          self.resourcemanager_ptr.removeChild(kid)
+          break
+
+  def getResources(self):
+    if self.resources_ptr is not None:
+      return self.resources_ptr.getChildren()
+    else:
+      return list()
+
+  def getResourcesPtr(self):
+    return self.resources_ptr
+
+  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 deleteResource(self, name):
+    for i in self.resources_ptr.getChildren():
+      if i.getName() == name:
+        self.resources_ptr.removeChild(i)
+        return i
+    raise KeyError, name
+
+  def getClusterNodesPtr(self):
+    return self.clusternodes_ptr
+
+  def getClusterPtr(self):
+    return self.cluster_ptr
+
+  def getClusterName(self):
+    return self.getClusterPtr().getName()
+
+  def getClusterAlias(self):
+    return self.getClusterPtr().getAlias()
+
+  def getGULMPtr(self):
+    return self.GULM_ptr
+
+  def getCMANPtr(self):
+    return self.CMAN_ptr
+
+  def addTotemPtr(self):
+    cp = self.getClusterPtr()
+    totem = Totem()
+    cp.addChild(totem)
+    return totem
+
+  def getTotemPtr(self):
+    return self.TOTEM_ptr
+
+  def getLockServer(self, name):
+    children = self.GULM_ptr.getChildren()
+    for child in children:
+      if child.getName() == name:
+        return child
+
+    return None
+
+  def getLockType(self):
+    return self.lock_type
+
+  def isNodeLockserver(self, name):
+    gptr = self.getGULMPtr()
+    if gptr is None:  #Obviously not GULM
+      return False
+    children = gptr.getChildren()
+    for child in children:
+      if child.getName() == name:
+        return True
+
+    return False
+
+  def removeLockserver(self, clusternode):
+    gptr = self.getGULMPtr()
+    if gptr is None:  #Obviously not GULM
+      return
+    children = gptr.getChildren()
+    for child in children:
+      if child.getName() == clusternode.getName():
+        gptr.removeChild(child)
+        break  #Only one will be found
+
+    self.isModified = True
+
+  def switch_lockservers(self):
+    #first get what type of locking is currently in place
+    if self.lock_type == DLM_TYPE:
+      #remove <cman>
+      self.cluster_ptr.removeChild(self.CMAN_ptr)
+      if self.TOTEM_ptr is not None:
+        self.del_totem()
+      self.CMAN_ptr = None
+
+      #add gulm tag
+      gulm = Gulm()
+      self.GULM_ptr = gulm
+      self.cluster_ptr.addChild(gulm)
+
+      #check for multicast
+      #if multicast, remove <multicast> from each node
+      #remove votes attr from each node
+      nodes = self.getNodes()
+      for node in nodes:
+        if self.usesMulticast is True:
+          mnode = node.getMulticastNode()
+          if mnode is not None:
+            node.removeChild(mnode)
+        node.removeAttribute('votes')
+
+      self.usesMulticast = None
+      self.mcast_address = None
+
+      #reset self.lock_type
+      self.lock_type = GULM_TYPE
+
+      #make the first node a lockserver
+      nodes = self.getNodes()
+      for node in nodes:
+        ls = Lockserver()
+        ls.addAttribute('name', node.getName())
+        self.GULM_ptr.addChild(ls)
+        break
+
+
+      #set modified
+      self.isModified = True
+
+    else:
+      #remove <gulm> tag
+      children = self.cluster_ptr.getChildren()
+      for child in children:
+        if child.getTagName() == "gulm":
+          self.cluster_ptr.removeChild(child)
+          break
+
+      #set gulm pointer to None
+      self.GULM_ptr = None
+
+      #add <cman> tag
+      cman = Cman()
+      self.CMAN_ptr = cman
+      self.cluster_ptr.addChild(cman)
+
+      #reset self.lock_type
+      self.lock_type = DLM_TYPE
+
+      #give each node a vote of 1
+      nds = self.getNodes()
+      for nd in nds:
+        nd.addAttribute('votes', '1')
+
+      #set modified
+      self.isModified = True
+
+  def swap_multicast_state(self, address=None):
+    if self.usesMulticast is True:
+      #First, eliminate <multicast> tag
+      if self.CMAN_ptr is not None:
+        children = self.CMAN_ptr.getChildren()
+        if len(children) > 0:
+          for child in children:
+            if child.getTagName() == MCAST_STR:
+              self.CMAN_ptr.removeChild(child)
+              break
+      found_one = True
+      while found_one is True:
+        found_one = False
+        nodes = self.clusternodes_ptr.getChildren()
+        for node in nodes:
+          node_children = node.getChildren()
+          for node_child in node_children:
+            if node_child.getTagName() == MCAST_STR:
+              node.removeChild(node_child)
+              found_one = True
+              break
+          if found_one is True:
+            break
+
+      self.usesMulticast = False
+      self.mcast_address = None
+      self.isModified = True
+
+
+    else:
+      if self.CMAN_ptr is not None:
+        mcast = Multicast()
+        mcast.addAttribute("addr", address)
+        self.CMAN_ptr.addChild(mcast)
+
+      has_one = False
+      nodes = self.getNodes()
+      for node in nodes:
+        has_one = False
+        node_children = node.getChildren()
+        for node_child in node_children:
+          if node_child.getTagName() == MCAST_STR:
+            has_one = True
+            break
+        if has_one is False:
+          mcast = Multicast()
+          mcast.addAttribute("addr", address)
+          mcast.addAttribute("interface", "eth0")
+          node.addChild(mcast)
+
+      self.mcast_address = address
+      self.usesMulticast = True
+      self.isModified = True
+
+
+
+  def check_fence_daemon(self):
+    if self.GULM_ptr is None and self.fence_daemon_ptr is None:
+      self.fence_daemon_ptr = FenceDaemon()
+      self.cluster_ptr.addChild(self.fence_daemon_ptr)
+
+  def getFenceDaemonPtr(self):
+    return self.fence_daemon_ptr
+
+  def isFileModified(self):
+    return self.isModified
+
+  def setModified(self, modified=None):
+    if modified is None:
+      self.isModified = True
+    else:
+      self.isModified = modified
+
+  def rectifyNewNodenameWithFaildoms(self, oldname, newname):
+    fdoms = self.getFailoverDomains()
+    for fdom in fdoms:
+      children = fdom.getChildren() #These are failoverdomainnodes...
+      for child in children:
+        if child.getName().strip() == oldname:
+          child.addAttribute("name", newname)
+
+  ###This method runs through ALL fences (Device objs) and changes name attr
+  ###to new name
+  def rectifyNewFencedevicenameWithFences(self, oldname, newname):
+    nodes = self.getNodes()
+    for node in nodes:
+      levels = node.getFenceLevels()
+      for level in levels:
+        fences = level.getChildren()
+        for fence in fences:
+          if fence.getName() == oldname:
+            fence.addAttribute("name", newname)
+
+  ###Method for removing fence instances if a fence device
+  ###has been deleted from the configuration
+  def removeFenceInstancesForFenceDevice(self, name):
+    nodes = self.getNodes()
+    for node in nodes:
+      levels = node.getFenceLevels()
+      for level in levels:
+        fences = level.getChildren()
+        kill_list = list()
+        for fence in fences:
+          if fence.getName() == name:
+            kill_list.append(fence)
+        for victim in kill_list:
+          level.removeChild(victim)
+
+  def removeReferences(self, tagobj):
+    self.__removeReferences(tagobj, self.cluster_ptr)
+  def __removeReferences(self, tagobj, level):
+    for t in level.getChildren()[:]:
+      if t.isRefObject():
+        if t.getObj() == tagobj:
+          level.removeChild(t)
+          continue
+      self.__removeReferences(tagobj, t)
+
+  def updateReferences(self):
+    self.__updateReferences(self.cluster_ptr)
+  def __updateReferences(self, level):
+    for t in level.getChildren():
+      if t.isRefObject():
+        t.setRef(t.getObj().getName())
+      self.__updateReferences(t)
+
+  def perform_final_check(self):
+    if self.check_gulm_count() is False:
+      return False
+    self.check_two_node()
+
+    #add more checks
+
+    return True
+
+  def check_gulm_count(self):
+    if self.getLockType() == GULM_TYPE:
+      gulm_count = len(self.getGULMPtr().getChildren())
+      if not (gulm_count in (1, 3, 5)):
+        return False
+    return True
+
+  def check_two_node(self):
+    if self.getLockType() == DLM_TYPE and self.quorumd_ptr is None:
+      clusternodes_count = len(self.clusternodes_ptr.getChildren())
+      #Make certain that there is a cman tag in the file
+      #If missing, it will not hurt to add it here
+      if self.CMAN_ptr is None:
+        cman = Cman()
+        self.cluster_ptr.addChild(cman)
+        self.CMAN_ptr = cman
+      if clusternodes_count == 2:
+        self.CMAN_ptr.addAttribute('two_node', '1')
+        self.CMAN_ptr.addAttribute('expected_votes', '1')
+      else:
+        if self.CMAN_ptr.getAttribute('expected_votes') in ('0', '1'):
+          self.CMAN_ptr.removeAttribute('expected_votes')
+        self.CMAN_ptr.removeAttribute('two_node')
+
+  def dual_power_fence_check(self):
+    #if 2 or more power controllers reside in the same fence level,
+    #duplicate entries must be made for every controller with an
+    #attribute for option set first for off, then for on.
+
+    #for every node:
+      #for every fence level:
+        #examine every fence
+        #If fence is of power type, add to 'found' list for that level
+        #If 'found' list is longer than 1, write out extra objs
+    nodes = self.getNodes()
+    for node in nodes:
+      levels = node.getFenceLevels()
+      for level in levels:
+        kids = level.getChildren()
+        l = list()
+        for kid in kids:
+          if kid.hasNativeOptionSet() == True:
+            continue
+          if kid.isPowerController() is True:
+            l.append(kid)
+        if len(l) > 1:  #Means we found multiple PCs in the same level
+          for fence in l:
+            fence.addAttribute("option", "off")
+          for fence in l:
+            if fence.getAttribute("option") == "off":
+              d = Device()
+              d.setAgentType(fence.getAgentType())
+              attrs = fence.getAttributes()
+              kees = attrs.keys()
+              for k in kees:
+                d.addAttribute(k, attrs[k])
+              d.addAttribute("option", "on")
+              level.addChild(d)
+
+  def purgePCDuplicates(self):
+    found_one = True
+    while found_one is True:
+      found_one = False
+      nodes = self.getNodes()
+      for node in nodes:
+        levels = node.getFenceLevels()
+        for level in levels:
+          kids = level.getChildren()
+          for kid in kids: #kids are actual fence instance objects
+            #Need to pass over this device if:
+            ##1) It is not a power controller, or
+            ##2) It had an initial option attr when the model was constructed
+            if not kid.isPowerController():
+              continue
+            if kid.hasNativeOptionSet():
+              continue
+            res = kid.getAttribute("option")
+            if res is not None:
+              if res == "off":
+                kid.removeAttribute("option")
+              else:
+                level.removeChild(kid)
+                found_one = True
+                break
+        if found_one is True:
+          break
+
+  def searchObjectTree(self, tagtype):
+    objlist = list()
+    self.object_tree.searchTree(objlist, tagtype)
+
+    return objlist
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/Multicast.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/Multicast.py
+++ -	2007-08-09 21:32:49.403560000 +0000
@@ -0,0 +1,15 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from TagObject import TagObject
+
+TAG_NAME = "multicast"
+
+class Multicast(TagObject):
+  def __init__(self):
+    TagObject.__init__(self)
+    self.TAG_NAME = TAG_NAME 
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/MySQL.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/MySQL.py
+++ -	2007-08-09 21:32:49.511935000 +0000
@@ -0,0 +1,18 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from BaseResource import BaseResource
+from gettext import gettext as _
+
+TAG_NAME = 'mysql'
+RESOURCE_TYPE = _('MySQL Server')
+
+class MySQL(BaseResource):
+  def __init__(self):
+    BaseResource.__init__(self)
+    self.TAG_NAME = TAG_NAME
+    self.resource_type = RESOURCE_TYPE
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/NFSClient.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/NFSClient.py
+++ -	2007-08-09 21:32:49.625116000 +0000
@@ -0,0 +1,22 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from BaseResource import BaseResource
+from gettext import gettext as _
+
+TAG_NAME = 'nfsclient'
+RESOURCE_TYPE = _('NFS Client')
+
+DENY_ALL_CHILDREN = True
+
+class NFSClient(BaseResource):
+  def __init__(self):
+    BaseResource.__init__(self)
+    self.TAG_NAME = TAG_NAME
+    self.resource_type = RESOURCE_TYPE
+    self.addAttribute('name', ' ')
+    self.deny_all_children = DENY_ALL_CHILDREN
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/NFSExport.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/NFSExport.py
+++ -	2007-08-09 21:32:49.768820000 +0000
@@ -0,0 +1,18 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from BaseResource import BaseResource
+from gettext import gettext as _
+
+TAG_NAME = 'nfsexport'
+RESOURCE_TYPE = _('NFS Export')
+
+class NFSExport(BaseResource):
+  def __init__(self):
+    BaseResource.__init__(self)
+    self.TAG_NAME = TAG_NAME
+    self.resource_type = RESOURCE_TYPE
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/Netfs.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/Netfs.py
+++ -	2007-08-09 21:32:49.895154000 +0000
@@ -0,0 +1,18 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from BaseResource import BaseResource
+from gettext import gettext as _
+
+TAG_NAME = 'netfs'
+RESOURCE_TYPE = _('NFS Mount')
+
+class Netfs(BaseResource):
+  def __init__(self):
+    BaseResource.__init__(self)
+    self.TAG_NAME = TAG_NAME
+    self.resource_type = RESOURCE_TYPE
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/OpenLDAP.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/OpenLDAP.py
+++ -	2007-08-09 21:32:50.010502000 +0000
@@ -0,0 +1,18 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from BaseResource import BaseResource
+from gettext import gettext as _
+
+TAG_NAME = 'openldap'
+RESOURCE_TYPE = _('Open LDAP Server')
+
+class OpenLDAP(BaseResource):
+  def __init__(self):
+    BaseResource.__init__(self)
+    self.TAG_NAME = TAG_NAME
+    self.resource_type = RESOURCE_TYPE
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/Postgres8.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/Postgres8.py
+++ -	2007-08-09 21:32:50.126038000 +0000
@@ -0,0 +1,18 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from BaseResource import BaseResource
+from gettext import gettext as _
+
+TAG_NAME = 'postgres-8'
+RESOURCE_TYPE = _('PostgreSQL 8 Server')
+
+class Postgres8(BaseResource):
+  def __init__(self):
+    BaseResource.__init__(self)
+    self.TAG_NAME = TAG_NAME
+    self.resource_type = RESOURCE_TYPE
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/QuorumD.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/QuorumD.py
+++ -	2007-08-09 21:32:50.231444000 +0000
@@ -0,0 +1,15 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from TagObject import TagObject
+
+TAG_NAME = "quorumd"
+
+class QuorumD(TagObject):
+  def __init__(self):
+    TagObject.__init__(self)
+    self.TAG_NAME = TAG_NAME
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/RefObject.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/RefObject.py
+++ -	2007-08-09 21:32:50.332459000 +0000
@@ -0,0 +1,38 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from TagObject import TagObject
+
+TAG_NAME = "ref"
+
+class RefObject(TagObject):
+  def __init__(self, obj):
+    TagObject.__init__(self)
+    self.obj_ptr = obj
+    self.TAG_NAME = self.obj_ptr.getTagName()
+    if self.TAG_NAME == "ip":
+      self.addAttribute("ref", self.obj_ptr.getAttribute("address"))
+    else:
+      self.addAttribute("ref", self.obj_ptr.getName())
+
+  def getObj(self):
+    return self.obj_ptr
+
+  def setRef(self, attr):
+    self.addAttribute("ref", attr)
+
+  def isRefObject(self):
+    return True
+
+  def getName(self):
+    try:
+      return self.attr_hash["ref"]
+    except KeyError, e:
+      return ""
+
+  def isDenyAll(self):
+    return self.obj_ptr.isDenyAll()
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/Resources.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/Resources.py
+++ -	2007-08-09 21:32:50.433447000 +0000
@@ -0,0 +1,15 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from TagObject import TagObject
+
+TAG_NAME = "resources"
+
+class Resources(TagObject):
+  def __init__(self):
+    TagObject.__init__(self)
+    self.TAG_NAME = TAG_NAME
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/Rm.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/Rm.py
+++ -	2007-08-09 21:32:50.792435000 +0000
@@ -0,0 +1,15 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from TagObject import TagObject
+
+TAG_NAME = "rm"
+
+class Rm(TagObject):
+  def __init__(self):
+    TagObject.__init__(self)
+    self.TAG_NAME = TAG_NAME 
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/SAPDatabase.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/SAPDatabase.py
+++ -	2007-08-09 21:32:51.263433000 +0000
@@ -0,0 +1,24 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from BaseResource import BaseResource
+from gettext import gettext as _
+
+TAG_NAME = 'SAPDatabase'
+RESOURCE_TYPE = _('SAP Database')
+
+class SAPDatabase(BaseResource):
+  def __init__(self):
+    BaseResource.__init__(self)
+    self.TAG_NAME = TAG_NAME
+    self.resource_type = RESOURCE_TYPE
+
+  def getName(self):
+    try:
+      return self.attr_hash['SID']
+    except KeyError, e:
+      return ''
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/SAPInstance.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/SAPInstance.py
+++ -	2007-08-09 21:32:52.039435000 +0000
@@ -0,0 +1,25 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from BaseResource import BaseResource
+from gettext import gettext as _
+
+TAG_NAME = 'SAPInstance'
+RESOURCE_TYPE = _('SAP Instance')
+
+class SAPInstance(BaseResource):
+  def __init__(self):
+    BaseResource.__init__(self)
+    self.TAG_NAME = TAG_NAME
+    self.resource_type = RESOURCE_TYPE
+
+  def getName(self):
+    try:
+      return self.attr_hash['InstanceName']
+    except KeyError, e:
+      return ''
+
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/Samba.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/Samba.py
+++ -	2007-08-09 21:32:52.873384000 +0000
@@ -0,0 +1,18 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from BaseResource import BaseResource
+from gettext import gettext as _
+
+TAG_NAME = 'smb'
+RESOURCE_TYPE = _('Samba Service')
+
+class Samba(BaseResource):
+  def __init__(self):
+    BaseResource.__init__(self)
+    self.TAG_NAME = TAG_NAME
+    self.resource_type = RESOURCE_TYPE
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/Script.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/Script.py
+++ -	2007-08-09 21:32:53.802554000 +0000
@@ -0,0 +1,18 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from BaseResource import BaseResource
+from gettext import gettext as _
+
+TAG_NAME = 'script'
+RESOURCE_TYPE = _('Script')
+
+class Script(BaseResource):
+  def __init__(self):
+    BaseResource.__init__(self)
+    self.TAG_NAME = TAG_NAME
+    self.resource_type = RESOURCE_TYPE
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/Service.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/Service.py
+++ -	2007-08-09 21:32:54.044713000 +0000
@@ -0,0 +1,17 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from TagObject import TagObject
+
+TAG_NAME = "service"
+
+class Service(TagObject):
+  def __init__(self):
+    TagObject.__init__(self)
+    self.TAG_NAME = TAG_NAME
+    # Set autostart by default
+    self.addAttribute('autostart', '1')
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/TagObject.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/TagObject.py
+++ -	2007-08-09 21:32:54.223579000 +0000
@@ -0,0 +1,83 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+TAG_NAME = "document"
+
+class TagObject:
+  def __init__(self, tagname=None):
+    self.attr_hash = {}
+    self.children = list()
+    if tagname is None:
+      self.TAG_NAME = TAG_NAME
+    else:
+      self.TAG_NAME = tagname
+
+  def addChild(self, child):
+    self.children.append(child)
+
+  def removeChild(self, child):
+    self.children.remove(child)
+
+  def addAttribute(self, name, value):
+    self.attr_hash[name] = value
+
+  def removeAttribute(self, key):
+    try:
+      del(self.attr_hash[key])
+    except KeyError, e:
+      return False
+
+    return True
+
+  def generateXML(self, doc, parent=None):
+    tag = doc.createElement(self.TAG_NAME)
+    if parent is None:
+      parent = doc
+    parent.appendChild(tag)
+    self.exportAttributes(tag)
+    if len(self.children) > 0:
+      for child in self.children:
+        if child is not None:
+          child.generateXML(doc, tag)
+
+  def exportAttributes(self, tag):
+    attrs = self.attr_hash.keys()
+    for attr in attrs:
+      tag.setAttribute(attr, self.attr_hash[attr])
+
+  def getAttributes(self):
+    return self.attr_hash
+
+  def getAttribute(self, kee):
+    try:
+      return self.attr_hash[kee]
+    except KeyError, e:
+      return None
+
+  def getChildren(self):
+    return self.children
+
+  def getName(self):
+    try:
+      return self.attr_hash["name"]
+    except KeyError, e:
+      return ""
+
+  def getTagName(self):
+    return self.TAG_NAME
+
+  def isRefObject(self):
+    return False
+
+  def searchTree(self, objlist, tagtype):
+    if self.TAG_NAME == tagtype:
+      objlist.append(self)
+    if len(self.children) > 0:
+      for child in self.children:
+        if child is None:
+          continue
+        child.searchTree(objlist, tagtype)
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/Tomcat5.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/Tomcat5.py
+++ -	2007-08-09 21:32:54.329664000 +0000
@@ -0,0 +1,18 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from BaseResource import BaseResource
+from gettext import gettext as _
+
+TAG_NAME = 'tomcat-5'
+RESOURCE_TYPE = _('Tomcat 5 Server')
+
+class Tomcat5(BaseResource):
+  def __init__(self):
+    BaseResource.__init__(self)
+    self.TAG_NAME = TAG_NAME
+    self.resource_type = RESOURCE_TYPE
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/Totem.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/Totem.py
+++ -	2007-08-09 21:32:54.432887000 +0000
@@ -0,0 +1,15 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from TagObject import TagObject
+
+TAG_NAME = 'totem'
+
+class Totem(TagObject):
+  def __init__(self):
+    TagObject.__init__(self)
+    self.TAG_NAME = TAG_NAME 
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/Vm.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/Vm.py
+++ -	2007-08-09 21:32:54.536829000 +0000
@@ -0,0 +1,17 @@
+# Copyright (C) 2006-2007 Red Hat, Inc.
+#
+# This program is free software; you can redistribute
+# it and/or modify it under the terms of version 2 of the
+# GNU General Public License as published by the
+# Free Software Foundation.
+
+from TagObject import TagObject
+
+TAG_NAME = "vm"
+
+class Vm(TagObject):
+  def __init__(self):
+    TagObject.__init__(self)
+    self.TAG_NAME = TAG_NAME
+    # Set autostart by default
+    self.addAttribute('autostart', '1')
/cvs/cluster/conga/luci/site/luci/Extensions/ClusterModel/__init__.py,v  -->  standard output
revision 1.2.2.1
--- conga/luci/site/luci/Extensions/ClusterModel/__init__.py
+++ -	2007-08-09 21:32:54.660709000 +0000
@@ -0,0 +1 @@
+# empty




More information about the Cluster-devel mailing list