conga/luci/site/luci/Extensions cluster_adapte ...
CVSROOT: /cvs/cluster
Module name: conga
Changes by: jparsons at sourceware.org 2006-08-16 16:10:13
Modified files:
luci/site/luci/Extensions: cluster_adapters.py
Log message:
os and virt specialization
luci/site/luci/Extensions/cluster_adapters.py +35 -0
@@ -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']