From: jparsons@sourceware.org <jparsons@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci/site/luci/Extensions Cluster.py Mod ...
Date: 16 Oct 2006 20:24:29 -0000 [thread overview]
Message-ID: <20061016202429.9427.qmail@sourceware.org> (raw)
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 = {}
next reply other threads:[~2006-10-16 20:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-16 20:24 jparsons [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-10-16 20:46 [Cluster-devel] conga/luci/site/luci/Extensions Cluster.py Mod 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=20061016202429.9427.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.