From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 19 Jun 2006 17:10:32 -0000 Subject: [Cluster-devel] conga/luci/site/luci/Extensions ricci_communic ... Message-ID: <20060619171032.5272.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 Changes by: rmccabe at sourceware.org 2006-06-19 17:10:29 Modified files: luci/site/luci/Extensions: ricci_communicator.py Log message: add an unauth class method instead of doing it in external code Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ricci_communicator.py.diff?cvsroot=cluster&r1=1.1&r2=1.2 --- conga/luci/site/luci/Extensions/ricci_communicator.py 2006/05/30 20:17:21 1.1 +++ conga/luci/site/luci/Extensions/ricci_communicator.py 2006/06/19 17:10:29 1.2 @@ -69,8 +69,17 @@ self.__authed = resp.firstChild.getAttribute('authenticated') == 'true' return self.authed() - - + + def unauth(self): + doc = minidom.Document() + ricci = doc.createElement('ricci') + ricci.setAttribute('version', '1.0') + ricci.setAttribute('function', 'authenticate') + doc.appendChild(ricci) + self.__send(doc) + resp = self.__receive() + return resp.firstChild.getAttribute('success') + def process_batch(self, batch_xml, async=False): if not self.authed(): raise 'not authenticated'