All of lore.kernel.org
 help / color / mirror / Atom feed
From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci/site/luci/Extensions ricci_bridge.py
Date: 1 Mar 2007 00:40:53 -0000	[thread overview]
Message-ID: <20070301004053.5852.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	RHEL4
Changes by:	rmccabe at sourceware.org	2007-03-01 00:40:53

Modified files:
	luci/site/luci/Extensions: ricci_bridge.py 

Log message:
	Revert services patch from HEAD

Patches:
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.3&r2=1.56.2.4

--- conga/luci/site/luci/Extensions/ricci_bridge.py	2007/03/01 00:39:18	1.56.2.3
+++ conga/luci/site/luci/Extensions/ricci_bridge.py	2007/03/01 00:40:53	1.56.2.4
@@ -486,85 +486,6 @@
 	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>'
 



             reply	other threads:[~2007-03-01  0:40 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-01  0:40 rmccabe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-03-21 17:18 [Cluster-devel] conga/luci/site/luci/Extensions ricci_bridge.py rmccabe
2007-03-21 17:16 rmccabe
2007-03-21 17:14 rmccabe
2006-12-12 19:03 rmccabe
2006-12-10 19:19 rmccabe
2006-11-20 23:36 rmccabe
2006-11-20 23:30 rmccabe
2006-11-20 23:30 rmccabe
2006-11-16 20:22 rmccabe
2006-11-16 20:20 rmccabe
2006-10-31 13:51 rmccabe
2006-10-25 16:01 rmccabe
2006-10-25 16:00 rmccabe
2006-10-23 19:31 jparsons
2006-10-23 19:24 jparsons
2006-10-16 20:56 rmccabe
2006-10-16 14:56 rmccabe
2006-10-12 22:41 rmccabe
2006-10-12 21:57 rmccabe
2006-10-09 20:17 rmccabe
2006-08-14 16:01 jparsons
2006-08-12 17:59 jparsons
2006-07-31 22:16 jparsons
2006-07-31 21:18 kupcevic
2006-07-31 18:55 jparsons
2006-07-28 19:46 jparsons
2006-07-27 14:24 jparsons
2006-07-19 22:50 rmccabe
2006-07-19 21:02 rmccabe
2006-07-17 21:58 jparsons

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070301004053.5852.qmail@sourceware.org \
    --to=rmccabe@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.