[Cluster-devel] conga/luci/site/luci/Extensions ricci_bridge.py
rmccabe at sourceware.org
rmccabe at sourceware.org
Mon Nov 20 23:30:47 UTC 2006
CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL5
Changes by: rmccabe at sourceware.org 2006-11-20 23:30:47
Modified files:
luci/site/luci/Extensions: ricci_bridge.py
Log message:
return either true, false or none, depending on whether the node is virtual, not
virtual, or we're unable to determine whether it's virtual, respectively
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ricci_bridge.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.30.2.8&r2=1.30.2.9
--- conga/luci/site/luci/Extensions/ricci_bridge.py 2006/11/16 20:22:17 1.30.2.8
+++ conga/luci/site/luci/Extensions/ricci_bridge.py 2006/11/20 23:30:47 1.30.2.9
@@ -503,6 +503,15 @@
ricci_xml = rc.batch_run(batch_str)
return batchAttemptResult(ricci_xml)
+def nodeIsVirtual(rc):
+ batch_str = '<module name="cluster"><request API_version="1.0"><function_call name="virt_guest"/></request></module>'
+
+ ricci_xml = rc.batch_run(batch_str, async=False)
+ if not ricci_xml or not ricci_xml.firstChild:
+ luci_log.debug_verbose('no ricci_xml in nodeIsVirtual')
+ return None
+ return ricci_xml.firstChild
+
def getDaemonStates(rc, dlist):
batch_str = '<module name="service"><request API_version="1.0"><function_call name="query"><var mutable="false" name="search" type="list_xml">'
More information about the Cluster-devel
mailing list