From: jparsons@sourceware.org <jparsons@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci/site/luci/Extensions ModelBuilder.py
Date: 20 Jul 2006 21:36:34 -0000 [thread overview]
Message-ID: <20060720213634.19280.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: conga
Changes by: jparsons at sourceware.org 2006-07-20 21:36:34
Modified files:
luci/site/luci/Extensions: ModelBuilder.py
Log message:
Added support for new conf tags. also added new method to export the model as a string.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ModelBuilder.py.diff?cvsroot=cluster&r1=1.2&r2=1.3
--- conga/luci/site/luci/Extensions/ModelBuilder.py 2006/05/31 17:58:53 1.2
+++ conga/luci/site/luci/Extensions/ModelBuilder.py 2006/07/20 21:36:34 1.3
@@ -24,6 +24,7 @@
from NFSClient import NFSClient
from NFSExport import NFSExport
from Fs import Fs
+from Samba import Samba
from Multicast import Multicast
from FenceDaemon import FenceDaemon
from Netfs import Netfs
@@ -36,6 +37,8 @@
from FailoverDomains import FailoverDomains
from FailoverDomainNode import FailoverDomainNode
from Rm import Rm
+from Quorumd import Quorumd
+from Heuristic import Heuristic
from CommandHandler import CommandHandler
from CommandError import CommandError
from GeneralError import GeneralError
@@ -52,6 +55,8 @@
'gulm':Gulm,
'lockserver':Lockserver,
'rm':Rm,
+ 'quorumd':Quorumd,
+ 'heuristic':Heuristic,
'service':Service,
'xenvm':Xenvm,
'resources':Resources,
@@ -60,6 +65,7 @@
'failoverdomainnode':FailoverDomainNode,
'ip':Ip,
'fs':Fs,
+ 'smb':Samba,
'fence_daemon':FenceDaemon,
'multicast':Multicast,
'clusterfs':Clusterfs,
@@ -83,6 +89,7 @@
GULM_TAG_STR="gulm"
MCAST_STR="multicast"
CMAN_PTR_STR="cman"
+QUORUMD_PTR_STR="quorumd"
###-----------------------------------
@@ -112,6 +119,8 @@
self.fence_daemon_ptr = None
self.command_handler = CommandHandler()
self.isModified = False
+ self.quorumd_ptr = None
+ self.isQuorumd = False
if mcast_addr == None:
self.usesMulticast = False
else:
@@ -183,6 +192,9 @@
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.isQuorumd = True
elif parent_node.nodeName == GULM_TAG_STR:
self.GULM_ptr = new_object
self.lock_type = GULM_TYPE
@@ -402,6 +414,30 @@
return True
+ def exportModelAsString(self, strbuf):
+ if self.perform_final_check() == False: # failed
+ return False
+
+ #check for dual power fences
+ self.dual_power_fence_check()
+
+ try:
+
+ doc = minidom.Document()
+ self.object_tree.generateXML(doc)
+ strbuf = doc.toprettyxml()
+
+ self.isModified = False
+
+ finally:
+ #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 True
+
def has_filepath(self):
if self.filename == None:
return False
next reply other threads:[~2006-07-20 21:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-20 21:36 jparsons [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-08-09 21:49 [Cluster-devel] conga/luci/site/luci/Extensions ModelBuilder.py jparsons
2007-01-10 19:11 jparsons
2007-01-10 19:26 jparsons
2007-01-15 21:29 jparsons
2007-01-15 21:29 jparsons
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060720213634.19280.qmail@sourceware.org \
--to=jparsons@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.