From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 20 Nov 2006 23:30:47 -0000 Subject: [Cluster-devel] conga/luci/site/luci/Extensions ricci_bridge.py Message-ID: <20061120233047.16062.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 = '' + + 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 = ''