* [Cluster-devel] conga/luci/site/luci Extensions/conga_constant ...
@ 2007-01-08 15:29 rmccabe
0 siblings, 0 replies; 3+ messages in thread
From: rmccabe @ 2007-01-08 15:29 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL5
Changes by: rmccabe at sourceware.org 2007-01-08 15:29:10
Modified files:
luci/site/luci/Extensions: conga_constants.py
luci/site/luci/etc: zope.conf.in
Log message:
turn off debug mode. resolves bz212448
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/conga_constants.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.19.2.4&r2=1.19.2.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/etc/zope.conf.in.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1&r2=1.1.2.1
--- conga/luci/site/luci/Extensions/conga_constants.py 2006/12/22 17:50:16 1.19.2.4
+++ conga/luci/site/luci/Extensions/conga_constants.py 2007/01/08 15:29:09 1.19.2.5
@@ -149,5 +149,5 @@
PLONE_ROOT = 'luci'
-LUCI_DEBUG_MODE = 1
-LUCI_DEBUG_VERBOSITY = 2
+LUCI_DEBUG_MODE = 0
+LUCI_DEBUG_VERBOSITY = 0
--- conga/luci/site/luci/etc/zope.conf.in 2006/07/24 20:17:02 1.1
+++ conga/luci/site/luci/etc/zope.conf.in 2007/01/08 15:29:10 1.1.2.1
@@ -137,7 +137,7 @@
# Example:
#
# debug-mode on
-debug-mode on
+debug-mode off
# Directive: effective-user
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Cluster-devel] conga/luci/site/luci Extensions/conga_constant ...
@ 2007-03-01 0:39 rmccabe
0 siblings, 0 replies; 3+ messages in thread
From: rmccabe @ 2007-03-01 0:39 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL4
Changes by: rmccabe at sourceware.org 2007-03-01 00:39:18
Modified files:
luci/site/luci/Extensions: conga_constants.py ricci_bridge.py
luci/site/luci/etc: zope.conf.in
Log message:
Turn debug mode off
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/conga_constants.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.36&r2=1.36.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ricci_bridge.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.56.2.2&r2=1.56.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/etc/zope.conf.in.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1&r2=1.1.4.1
--- conga/luci/site/luci/Extensions/conga_constants.py 2007/02/01 20:49:08 1.36
+++ conga/luci/site/luci/Extensions/conga_constants.py 2007/03/01 00:39:18 1.36.2.1
@@ -151,5 +151,5 @@
PLONE_ROOT = 'luci'
-LUCI_DEBUG_MODE = 1
-LUCI_DEBUG_VERBOSITY = 2
+LUCI_DEBUG_MODE = 0
+LUCI_DEBUG_VERBOSITY = 0
--- conga/luci/site/luci/Extensions/ricci_bridge.py 2007/02/22 20:52:07 1.56.2.2
+++ conga/luci/site/luci/Extensions/ricci_bridge.py 2007/03/01 00:39:18 1.56.2.3
@@ -486,6 +486,85 @@
ricci_xml = rc.batch_run(batch_str)
return batchAttemptResult(ricci_xml)
+def svc_manage(rc, hostname, servicename, op):
+ svc_func = None
+
+ doc = minidom.Document()
+ elem = doc.createElement('result')
+ elem.setAttribute('success', '0')
+
+ if not servicename:
+ elem.setAttribute('service', 'No service name was specified.')
+ elem.setAttribute('message', 'No service name was specified.')
+
+ if not op:
+ elem.setAttribute('operation', 'No operation was specified.')
+ elem.setAttribute('message', 'No operation was specified.')
+
+ if not servicename or not op:
+ doc.appendChild(elem)
+ return doc
+
+ elem.setAttribute('service', servicename)
+ elem.setAttribute('operation', op)
+ elem.setAttribute('hostname', hostname)
+
+ try:
+ op = op.strip().lower()
+ if op == 'restart' or op == 'start' or op == 'stop':
+ svc_func = op
+ else:
+ raise Exception, op
+ except Exception, e:
+ elem.setAttribute('message', 'Unknown operation: %s' % str(e))
+ doc.appendChild(elem)
+ return doc
+
+ batch_str = '<module name="service"><request API_version="1.0"><function_call name="%s"><var mutable="false" name="services" type="list_xml"><service name="%s"/></var></function_call></request></module>' % (svc_func, servicename)
+
+ ricci_xml = rc.batch_run(batch_str, async=False)
+ if not ricci_xml or not ricci_xml.firstChild:
+ elem.setAttribute('message', 'operation failed')
+ doc.appendChild(elem)
+ return doc
+
+ try:
+ mod_elem = ricci_xml.getElementsByTagName('module')
+ status_code = int(mod_elem[0].getAttribute('status'))
+ if status_code == 0:
+ var_elem = mod_elem[0].getElementsByTagName('var')
+ for i in var_elem:
+ name = i.getAttribute('name').lower()
+ if name == 'success':
+ success = i.getAttribute('value').lower()
+ if success == 'true':
+ elem.setAttribute('success', '1')
+ elem.setAttribute('message', 'success')
+ else:
+ elem.setAttribute('message', 'operation failed')
+ break
+ else:
+ err_msg = mod_elem[0].childNodes[1].getAttribute('description')
+ elem.setAttribute('message', err_msg)
+ except Exception, e:
+ elem.setAttribute('message', 'operation failed')
+
+ doc.appendChild(elem)
+ return doc
+
+def list_services(rc):
+ batch_str = '<module name="service"><request API_version="1.0"><function_call name="list"><var mutable="false" name="description" type="boolean" value="true"/></function_call></request></module>'
+ ricci_xml = rc.batch_run(batch_str, async=False)
+ if not ricci_xml or not ricci_xml.firstChild:
+ luci_log.debug_verbose('LS0: None returned')
+ return None
+ try:
+ service_tags = ricci_xml.getElementsByTagName('service')
+ return service_tags
+ except Exception, e:
+ luci_log.debug_verbose('LS1: %s' % str(e))
+ return None
+
def nodeIsVirtual(rc):
batch_str = '<module name="cluster"><request API_version="1.0"><function_call name="virt_guest"/></request></module>'
--- conga/luci/site/luci/etc/zope.conf.in 2006/07/24 20:17:02 1.1
+++ conga/luci/site/luci/etc/zope.conf.in 2007/03/01 00:39:18 1.1.4.1
@@ -137,7 +137,7 @@
# Example:
#
# debug-mode on
-debug-mode on
+debug-mode off
# Directive: effective-user
^ permalink raw reply [flat|nested] 3+ messages in thread* [Cluster-devel] conga/luci/site/luci Extensions/conga_constant ...
@ 2007-03-15 16:50 rmccabe
0 siblings, 0 replies; 3+ messages in thread
From: rmccabe @ 2007-03-15 16:50 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2007-03-15 16:50:34
Modified files:
luci/site/luci/Extensions: conga_constants.py
luci/site/luci/etc: zope.conf.in
Log message:
Turn off debugging by default
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/conga_constants.py.diff?cvsroot=cluster&r1=1.38&r2=1.39
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/etc/zope.conf.in.diff?cvsroot=cluster&r1=1.1&r2=1.2
--- conga/luci/site/luci/Extensions/conga_constants.py 2007/03/12 04:25:41 1.38
+++ conga/luci/site/luci/Extensions/conga_constants.py 2007/03/15 16:50:33 1.39
@@ -154,5 +154,5 @@
PLONE_ROOT = 'luci'
-LUCI_DEBUG_MODE = 1
-LUCI_DEBUG_VERBOSITY = 2
+LUCI_DEBUG_MODE = 0
+LUCI_DEBUG_VERBOSITY = 0
--- conga/luci/site/luci/etc/zope.conf.in 2006/07/24 20:17:02 1.1
+++ conga/luci/site/luci/etc/zope.conf.in 2007/03/15 16:50:33 1.2
@@ -137,7 +137,7 @@
# Example:
#
# debug-mode on
-debug-mode on
+debug-mode off
# Directive: effective-user
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-03-15 16:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-08 15:29 [Cluster-devel] conga/luci/site/luci Extensions/conga_constant rmccabe
-- strict thread matches above, loose matches on Subject: below --
2007-03-01 0:39 rmccabe
2007-03-15 16:50 rmccabe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).