[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] conga/luci/site/luci/Extensions cluster_adapte ...



CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	jparsons sourceware org	2006-08-16 16:10:13

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

Log message:
	os and virt specialization

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

--- conga/luci/site/luci/Extensions/cluster_adapters.py	2006/08/14 15:12:56	1.53
+++ conga/luci/site/luci/Extensions/cluster_adapters.py	2006/08/16 16:10:13	1.54
@@ -3,6 +3,7 @@
 import AccessControl
 from conga_constants import *
 from ricci_bridge import *
+from ricci_communicator import *
 import time
 import Products.ManagedSystem
 from Ip import Ip
@@ -1091,6 +1092,31 @@
 
   response = req.RESPONSE
   response.redirect(req['HTTP_REFERER'] + "&busyfirst=true")
+
+def getFdomsInfo(self, modelb, request):
+  map = {}
+  fdoms = modelb.getFailoverDomains()
+  svcs = modelb.getServices()
+  for fdom in fdoms:
+    fdom_map = {}
+    fdom_map['name'] = fdom.getName()
+    ordered_attr = fdom.getAttribute('ordered')
+    restricted_attr = fdom.getAttribute('restricted')
+    if ordered_attr != None and (ordered_attr == "true" or ordered_attr == "1"):
+      fdom_map['ordered'] = True
+    else:
+      fdom_map['ordered'] = False
+    if restricted_attr != None and (restricted_attr == "true" or restricted_attr == "1"):
+      fdom_map['restricted'] = True
+    else:
+      fdom_map['restricted'] = False
+    nodes = fdom.getChildren()
+    for node in nodes:
+      nodesmap = {}
+      nodesmap['nodename'] = node.getName() 
+      priority_attr =  node.getAttribute('priority')
+      if priority_attr != None:
+        nodesmap['priority'] = 
  
 def processClusterProps(self, ricci_agent, request):
   #First, retrieve cluster.conf from session
@@ -1695,6 +1721,15 @@
       return map
   return map
 
+def getClusterOS(self, ragent, request):
+  clustername = request['clustername']
+  ricci_agent = resolve_nodename(clustername, ragent)
+  rc = ricci_communicator(ricci_agent)
+  map = {}
+  map['os'] = rc.getOS()
+  map['isVirtualized'] = False
+  return map
+
 def getResourcesInfo(modelb, request):
   resList = list()
   baseurl = request['URL']


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]