* [Cluster-devel] conga/luci/site/luci/Extensions Cluster.py Mod ...
@ 2006-10-16 20:24 jparsons
0 siblings, 0 replies; 2+ messages in thread
From: jparsons @ 2006-10-16 20:24 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: conga
Changes by: jparsons at sourceware.org 2006-10-16 20:24:28
Modified files:
luci/site/luci/Extensions: Cluster.py ModelBuilder.py
cluster_adapters.py
Log message:
Xenvm details
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/Cluster.py.diff?cvsroot=cluster&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ModelBuilder.py.diff?cvsroot=cluster&r1=1.6&r2=1.7
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.117&r2=1.118
--- conga/luci/site/luci/Extensions/Cluster.py 2006/07/24 14:44:47 1.2
+++ conga/luci/site/luci/Extensions/Cluster.py 2006/10/16 20:24:28 1.3
@@ -3,14 +3,24 @@
TAG_NAME = "cluster"
-CLUSTER_NAME = "Cluster Name: %s"
+CLUSTER_NAME_ALIAS = "Cluster Name: %s"
+ACTUAL_CLUSTER_NAME = "Actual Cluster Name: %s"
+ACTUAL_CLUSTER_NAME_DESC = "The Actual Cluster Name should be used for storage configuration, such as making a clustered file system"
CLUSTER_POPULATION = "Number of Members: %d"
DLM_TYPE = "Locking Type: Distributed"
GULM_TYPE = "Locking Type: GuLM"
LOCKSERVER = "Lock Server:"
CONFIG_VERSION = "Config Version"
MCAST_MODE = "Cluster Manager using Multicast Mode. \n Multicast Address: %s"
-
+
+#Quorum disk attributes
+QD_INTERVAL=_("Interval: %s")
+QD_TKO=_("TKO Value: %s")
+QD_VOTES=_("Votes: %s")
+QD_MIN_SCORE=_("Minimum Score: %s")
+QD_DEVICE=_("Device: %s")
+QD_LABEL=_("Label: %s")
+
class Cluster(TagObject):
def __init__(self):
TagObject.__init__(self)
@@ -27,7 +37,10 @@
isMulticast = False
mcast_address = ""
- stringbuf = CLUSTER_NAME % self.getAttribute("name") + "\n"
+ stringbuf = CLUSTER_NAME_ALIAS % self.getAlias() + "\n"
+
+ stringbuf = stringbuf + ACTUAL_CLUSTER_NAME % self.getAttribute("name") + "\n"
+ stringbuf = stringbuf + ACTUAL_CLUSTER_NAME_DESC + "\n"
stringbuf = stringbuf + CONFIG_VERSION + ": " + self.getConfigVersion() + "\n"
@@ -104,6 +117,24 @@
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 addAttribute(self, name, value):
# if name == "config_version":
# cfg = self.getAttribute("config_version")
@@ -132,6 +163,9 @@
if child == None:
continue
child.generateXML(doc, tag)
+
+ def getNameAlias(self):
+ return self.getAlias()
def getAlias(self):
#returns None if no alias set
--- conga/luci/site/luci/Extensions/ModelBuilder.py 2006/10/06 21:08:54 1.6
+++ conga/luci/site/luci/Extensions/ModelBuilder.py 2006/10/16 20:24:28 1.7
@@ -31,13 +31,14 @@
from Clusterfs import Clusterfs
from Resources import Resources
from Service import Service
+from QuorumD import QuorumD
+from Heuristic import Heuristic
from Xenvm import Xenvm
from RefObject import RefObject
from FailoverDomain import FailoverDomain
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
@@ -55,8 +56,6 @@
'gulm':Gulm,
'lockserver':Lockserver,
'rm':Rm,
- 'quorumd':Quorumd,
- 'heuristic':Heuristic,
'service':Service,
'xenvm':Xenvm,
'resources':Resources,
@@ -70,6 +69,8 @@
'multicast':Multicast,
'clusterfs':Clusterfs,
'netfs':Netfs,
+ 'quorumd':QuorumD,
+ 'heuristic':Heuristic,
'script':Script,
'nfsexport':NFSExport,
'nfsclient':NFSClient,
@@ -121,6 +122,7 @@
self.isModified = False
self.quorumd_ptr = None
self.usesQuorumd = False
+ self.isVirtualized = False
if mcast_addr == None:
self.usesMulticast = False
else:
@@ -449,6 +451,15 @@
def isClusterMember(self):
return self.command_handler.isClusterMember()
+
+ def setIsVirtualized(isVirtualized):
+ if isVirtualized == 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
--- conga/luci/site/luci/Extensions/cluster_adapters.py 2006/10/16 19:49:09 1.117
+++ conga/luci/site/luci/Extensions/cluster_adapters.py 2006/10/16 20:24:28 1.118
@@ -2500,6 +2500,42 @@
return getNodeLogs(rc)
+def processXenVM(self, req):
+ model = req.SESSION.get('model')
+ isNew = False
+ try:
+ xenvmname = req ['servicename']
+ except KeyError, e:
+ isNew = True
+
+ if isNew == True:
+ xvm = Xenvm()
+ xvm.addAttribute("name", req.form['xenvmname'])
+ xvm.addAttribute("path", req.form['xenvmpath'])
+ rmptr = model.getResourceManagerPtr()
+ rmptr.addChild(xvm)
+ else:
+ xvm = model.retrieveXenVMsByName(self, xenvmname)
+ xvm.addAttribute("name", req.form['xenvmname'])
+ xvm.addAttribute("path", req.form['xenvmpath'])
+
+ stringbuf = ""
+ model.exportModelAsString(stringbuf)
+ setClusterConf(stringbuf)
+
+
+
+
+def getXenVMInfo(self, model, request):
+ try:
+ xenvmname = request['servicename']
+ except KeyError, e:
+ return {}
+
+ xenvm = model.retrieveXenVMsByName(xenvmname)
+ map = xenvm.getAttributes()
+ return map
+
def isClusterBusy(self, req):
items = None
map = {}
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Cluster-devel] conga/luci/site/luci/Extensions Cluster.py Mod ...
@ 2006-10-16 20:46 jparsons
0 siblings, 0 replies; 2+ messages in thread
From: jparsons @ 2006-10-16 20:46 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: conga
Changes by: jparsons at sourceware.org 2006-10-16 20:46:55
Modified files:
luci/site/luci/Extensions: Cluster.py ModelBuilder.py
Log message:
Loose ends...
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/Cluster.py.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ModelBuilder.py.diff?cvsroot=cluster&r1=1.7&r2=1.8
--- conga/luci/site/luci/Extensions/Cluster.py 2006/10/16 20:24:28 1.3
+++ conga/luci/site/luci/Extensions/Cluster.py 2006/10/16 20:46:55 1.4
@@ -14,12 +14,12 @@
MCAST_MODE = "Cluster Manager using Multicast Mode. \n Multicast Address: %s"
#Quorum disk attributes
-QD_INTERVAL=_("Interval: %s")
-QD_TKO=_("TKO Value: %s")
-QD_VOTES=_("Votes: %s")
-QD_MIN_SCORE=_("Minimum Score: %s")
-QD_DEVICE=_("Device: %s")
-QD_LABEL=_("Label: %s")
+QD_INTERVAL=("Interval: %s")
+QD_TKO=("TKO Value: %s")
+QD_VOTES=("Votes: %s")
+QD_MIN_SCORE=("Minimum Score: %s")
+QD_DEVICE=("Device: %s")
+QD_LABEL=("Label: %s")
class Cluster(TagObject):
def __init__(self):
--- conga/luci/site/luci/Extensions/ModelBuilder.py 2006/10/16 20:24:28 1.7
+++ conga/luci/site/luci/Extensions/ModelBuilder.py 2006/10/16 20:46:55 1.8
@@ -452,7 +452,7 @@
def isClusterMember(self):
return self.command_handler.isClusterMember()
- def setIsVirtualized(isVirtualized):
+ def setIsVirtualized(self,isVirtualized):
if isVirtualized == None:
self.isVirtualized = False
else:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-10-16 20:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-16 20:46 [Cluster-devel] conga/luci/site/luci/Extensions Cluster.py Mod jparsons
-- strict thread matches above, loose matches on Subject: below --
2006-10-16 20:24 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).