[Gug-cvs] gug/gug/cli clgr.py,1.50,1.51
Status: Planning
Brought to you by:
szferi
From: Nagy Z. <zs...@us...> - 2007-05-07 13:28:38
|
Update of /cvsroot/gug/gug/gug/cli In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv3105/gug/cli Modified Files: clgr.py Log Message: HTTP BaseAuth Index: clgr.py =================================================================== RCS file: /cvsroot/gug/gug/gug/cli/clgr.py,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** clgr.py 30 Apr 2007 22:01:43 -0000 1.50 --- clgr.py 7 May 2007 13:28:37 -0000 1.51 *************** *** 30,33 **** --- 30,34 ---- clientkey = clienttls.get('KeyFile',None) clientcert = clienttls.get('CertFile',None) + self.username = config.get_content('/ClientConfig/UserName', [None])[0] if clientkey and clientcert: set_tls(clientkey,clientcert) *************** *** 190,193 **** --- 191,196 ---- continue proxy = get_working_client(urls) + if self.username: + proxy._set_auth(self.username,'') host = self._ip(meta) try: *************** *** 268,274 **** else: if show_owner: print self._make_status_owner_row('...'+grid_id.split('/')[1][:6]+'...', \ ! re.findall('CN=([^/]*)',actmetadata.get('owner','Unknown'))[0], \ ! state, jobname, jc_name) else: print self._make_status_row('...'+grid_id.split('/')[1][:6]+'...', state, jobname, jc_name) --- 271,280 ---- else: if show_owner: + owner = actmetadata.get('owner','Unknown') + cn = re.findall('CN=([^/]*)',owner) + if cn: + owner = cn[0] print self._make_status_owner_row('...'+grid_id.split('/')[1][:6]+'...', \ ! owner, state, jobname, jc_name) else: print self._make_status_row('...'+grid_id.split('/')[1][:6]+'...', state, jobname, jc_name) *************** *** 390,393 **** --- 396,402 ---- for job in jobs: sched = self._scheduler() + if self.username: + print self.username + sched._set_auth(self.username,'') print 'submit',job['name'],'...' storageid = mkuid() *************** *** 487,490 **** --- 496,501 ---- continue proxy = get_client(url) + if self.username: + proxy._set_auth(self.username,'') jsdls = self._create_dict_from_jsdls(\ proxy.GetActivityJSDLDocuments(grid_ids)) *************** *** 553,556 **** --- 564,569 ---- continue proxy = get_client(url) + if self.username: + proxy._set_auth(self.username,'') if jobnames or shortids: grid_ids = [] |