Skip to contentSkip to conversation

conga/luci/site/luci/Extensions cluster_adapte ...

Cluster-devel [email protected] 1 participant 1 message Aug 13, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Changes by: jparsons at sourceware.org 2006-08-13 14:48:37

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

Log message:
Better node info look

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.44&r2=1.45
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/conga_constants.py.diff?cvsroot=cluster&r1=1.7&r2=1.8

luci/site/luci/Extensions/cluster_adapters.py +8 -3
@@ -1560,10 +1560,15 @@
     cfgurl = baseurl + "?" + PAGETYPE + "=" + NODE_CONFIG + "&" + CLUNAME + "=" + clustername + "&nodename=" + name
     map['configurl'] = cfgurl
     map['fenceurl'] = cfgurl + "#fence"
-    if item['online'] == "true":
-      map['status'] = "online"
+    if item['clustered'] == "true":
+      map['status'] = NODE_ACTIVE
+      map['status_str'] = NODE_ACTIVE_STR
+    elif item['online'] == "false":
+      map['status'] = NODE_UNKNOWN
+      map['status_str'] = NODE_UNKNOWN_STR
     else:
-      map['status'] = "offline"
+      map['status'] = NODE_INACTIVE
+      map['status_str'] = NODE_INACTIVE_STR
     #figure out current services running on this node
     svc_dict_list = list()
     for svc in svclist:
luci/site/luci/Extensions/conga_constants.py +3 -0
@@ -65,3 +65,6 @@
 NODE_ACTIVE="0"
 NODE_INACTIVE="1"
 NODE_UNKNOWN="2"
+NODE_ACTIVE_STR="Cluster Member"
+NODE_INACTIVE_ST="Not a Cluster Member"
+NODE_UNKNOWN_STR="Unknown State"