conga/luci cluster/form-macros cluster/resourc ...
CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL4
Changes by: rmccabe at sourceware.org 2007-02-16 02:12:46
Modified files:
luci/cluster : form-macros resource-form-macros
resource_form_handlers.js
luci/site/luci/Extensions: ModelBuilder.py cluster_adapters.py
Added files:
luci/site/luci/Extensions: LVM.py Totem.py
Log message:
- Add support for the <totem> tag
- Add support for the LVM resource agent
- Fixes for the other new resource agents
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.176.2.10&r2=1.176.2.11
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/resource-form-macros.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.31.2.1&r2=1.31.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/resource_form_handlers.js.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.29.2.1&r2=1.29.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LVM.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/Totem.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
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.3&r2=1.19.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.227.2.7&r2=1.227.2.8
luci/cluster/form-macros +14 -0
@@ -755,6 +755,16 @@ <tr class="systemsTable"> <td class="systemsTable"> + <a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#send_join', 55, 65);">Maximum time to wait before sending a join message</a> (ms) + </td> + <td class="systemsTable"> + <input type="text" size="10" name="send_join" + tal:attributes="value string:0" /> + </td> + </tr> + + <tr class="systemsTable"> + <td class="systemsTable"> <a class="cluster_help" href="javascript:popup_window('/luci/doc/config_rhel5#consensus', 55, 65);">Consensus Timeout</a> (ms) </td> <td class="systemsTable">
@@ -4296,6 +4306,10 @@ <div metal:use-macro="here/resource-form-macros/macros/mysql_macro" /> </tal:block> + <tal:block tal:condition="python: type == 'lvm'"> + <div metal:use-macro="here/resource-form-macros/macros/lvm_macro" /> + </tal:block> + <tal:block tal:condition="python: type == 'postgres-8'"> <div metal:use-macro="here/resource-form-macros/macros/postgres-8_macro" /> </tal:block>
luci/cluster/resource-form-macros +108 -29
290 lines not on this page · raw message
luci/cluster/resource_form_handlers.js +6 -0
@@ -118,6 +118,11 @@ return (errors); } +function validate_lvm(form) { + var errors = new Array(); + return (errors); +} + function validate_openldap(form) { var errors = new Array(); return (errors);
@@ -258,6 +263,7 @@ form_validators['postgres-8'] = validate_postgres8; form_validators['openldap'] = validate_openldap; form_validators['mysql'] = validate_mysql; +form_validators['lvm'] = validate_lvm; function check_form(form) { var valfn = form_validators[form.type.value];
/cvs/cluster/conga/luci/site/luci/Extensions/LVM.py,v --> standard output revision 1.1.2.1
- renamed from luci/site/luci/Extensions/LVM.py +15 -0
@@ -0,0 +1,15 @@ +import string +from TagObject import TagObject +from BaseResource import BaseResource + +import gettext +_ = gettext.gettext + +TAG_NAME = "lvm" +RESOURCE_TYPE = _("LVM") + +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/Totem.py,v --> standard output revision 1.1.2.1
- renamed from luci/site/luci/Extensions/Totem.py +9 -0
@@ -0,0 +1,9 @@ +import string +from TagObject import TagObject + +TAG_NAME = "totem" + +class Totem(TagObject): + def __init__(self): + TagObject.__init__(self) + self.TAG_NAME = TAG_NAME
luci/site/luci/Extensions/ModelBuilder.py +37 -0
@@ -17,6 +17,7 @@ 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
@@ -25,6 +26,12 @@ 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 Multicast import Multicast from FenceDaemon import FenceDaemon from FenceXVMd import FenceXVMd
@@ -52,6 +59,7 @@ 'fencedevices':FenceDevices, 'method':Method, 'cman':Cman, + 'totem':Totem, 'gulm':Gulm, 'lockserver':Lockserver, 'rm':Rm,
@@ -65,6 +73,12 @@ '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,
@@ -91,6 +105,7 @@ GULM_TAG_STR="gulm" MCAST_STR="multicast" CMAN_PTR_STR="cman" +TOTEM_PTR_STR="totem" QUORUMD_PTR_STR="quorumd" ###-----------------------------------
@@ -113,6 +128,7 @@ 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
@@ -219,6 +235,8 @@ 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:
@@ -597,6 +615,17 @@ raise GeneralError('FATAL',"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
@@ -796,6 +825,12 @@ def getGULMPtr(self): return self.GULM_ptr + def getCMANPtr(self): + return self.CMAN_ptr + + def getTotemPtr(self): + return self.TOTEM_ptr + def getLockServer(self, name): children = self.GULM_ptr.getChildren() for child in children:
@@ -839,6 +874,8 @@ 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
luci/site/luci/Extensions/cluster_adapters.py +459 -11
540 lines not on this page · raw message