cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] conga/luci/site/luci/Extensions ModelBuilder.py
@ 2007-01-10 19:26 jparsons
  0 siblings, 0 replies; 6+ messages in thread
From: jparsons @ 2007-01-10 19:26 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	RHEL5
Changes by:	jparsons at sourceware.org	2007-01-10 19:26:56

Modified files:
	luci/site/luci/Extensions: ModelBuilder.py 

Log message:
	part of bz212021 for two-node case

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ModelBuilder.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.8.2.3&r2=1.8.2.4

--- conga/luci/site/luci/Extensions/ModelBuilder.py	2006/12/22 17:50:16	1.8.2.3
+++ conga/luci/site/luci/Extensions/ModelBuilder.py	2007/01/10 19:26:56	1.8.2.4
@@ -965,8 +965,14 @@
     return True
 
   def check_two_node(self):
-    if self.getLockType() == DLM_TYPE:
+    if self.getLockType() == DLM_TYPE and self.quorumd_ptr == 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 == 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')



^ permalink raw reply	[flat|nested] 6+ messages in thread
* [Cluster-devel] conga/luci/site/luci/Extensions ModelBuilder.py
@ 2007-01-15 21:29 jparsons
  0 siblings, 0 replies; 6+ messages in thread
From: jparsons @ 2007-01-15 21:29 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	jparsons at sourceware.org	2007-01-15 21:29:53

Modified files:
	luci/site/luci/Extensions: ModelBuilder.py 

Log message:
	fix indent type from bz212021 checkin

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ModelBuilder.py.diff?cvsroot=cluster&r1=1.13&r2=1.14

--- conga/luci/site/luci/Extensions/ModelBuilder.py	2007/01/10 21:36:09	1.13
+++ conga/luci/site/luci/Extensions/ModelBuilder.py	2007/01/15 21:29:53	1.14
@@ -1042,9 +1042,9 @@
       #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 == None:
-      cman = Cman()
-      self.cluster_ptr.addChild(cman)
-      self.CMAN_ptr = cman
+        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')



^ permalink raw reply	[flat|nested] 6+ messages in thread
* [Cluster-devel] conga/luci/site/luci/Extensions ModelBuilder.py
@ 2007-01-15 21:29 jparsons
  0 siblings, 0 replies; 6+ messages in thread
From: jparsons @ 2007-01-15 21:29 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	RHEL5
Changes by:	jparsons at sourceware.org	2007-01-15 21:29:09

Modified files:
	luci/site/luci/Extensions: ModelBuilder.py 

Log message:
	fix indent type from bz212021 checkin

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ModelBuilder.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.8.2.5&r2=1.8.2.6

--- conga/luci/site/luci/Extensions/ModelBuilder.py	2007/01/10 21:48:26	1.8.2.5
+++ conga/luci/site/luci/Extensions/ModelBuilder.py	2007/01/15 21:29:09	1.8.2.6
@@ -1042,9 +1042,9 @@
       #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 == None:
-      cman = Cman()
-      self.cluster_ptr.addChild(cman)
-      self.CMAN_ptr = cman
+        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')



^ permalink raw reply	[flat|nested] 6+ messages in thread
* [Cluster-devel] conga/luci/site/luci/Extensions ModelBuilder.py
@ 2007-01-10 19:11 jparsons
  0 siblings, 0 replies; 6+ messages in thread
From: jparsons @ 2007-01-10 19:11 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	jparsons at sourceware.org	2007-01-10 19:11:17

Modified files:
	luci/site/luci/Extensions: ModelBuilder.py 

Log message:
	two-node quorumd check

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ModelBuilder.py.diff?cvsroot=cluster&r1=1.11&r2=1.12

--- conga/luci/site/luci/Extensions/ModelBuilder.py	2006/12/20 20:24:27	1.11
+++ conga/luci/site/luci/Extensions/ModelBuilder.py	2007/01/10 19:11:16	1.12
@@ -965,8 +965,14 @@
     return True
 
   def check_two_node(self):
-    if self.getLockType() == DLM_TYPE:
+    if self.getLockType() == DLM_TYPE and self.quorumd_ptr == 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 == 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')



^ permalink raw reply	[flat|nested] 6+ messages in thread
* [Cluster-devel] conga/luci/site/luci/Extensions ModelBuilder.py
@ 2006-08-09 21:49 jparsons
  0 siblings, 0 replies; 6+ messages in thread
From: jparsons @ 2006-08-09 21:49 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	jparsons at sourceware.org	2006-08-09 21:49:30

Modified files:
	luci/site/luci/Extensions: ModelBuilder.py 

Log message:
	Support for service info hash

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ModelBuilder.py.diff?cvsroot=cluster&r1=1.4&r2=1.5

--- conga/luci/site/luci/Extensions/ModelBuilder.py	2006/07/24 19:39:06	1.4
+++ conga/luci/site/luci/Extensions/ModelBuilder.py	2006/08/09 21:49:30	1.5
@@ -638,6 +638,14 @@
           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 getXENVMs(self):
     rg_list = list()



^ permalink raw reply	[flat|nested] 6+ messages in thread
* [Cluster-devel] conga/luci/site/luci/Extensions ModelBuilder.py
@ 2006-07-20 21:36 jparsons
  0 siblings, 0 replies; 6+ messages in thread
From: jparsons @ 2006-07-20 21:36 UTC (permalink / raw)
  To: cluster-devel.redhat.com

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-01-15 21:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-10 19:26 [Cluster-devel] conga/luci/site/luci/Extensions ModelBuilder.py jparsons
  -- strict thread matches above, loose matches on Subject: below --
2007-01-15 21:29 jparsons
2007-01-15 21:29 jparsons
2007-01-10 19:11 jparsons
2006-08-09 21:49 jparsons
2006-07-20 21:36 jparsons

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).