ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CRAB/python/SchedulerGlite.py
(Generate patch)

Comparing COMP/CRAB/python/SchedulerGlite.py (file contents):
Revision 1.73 by spiga, Thu Jan 14 10:24:17 2010 UTC vs.
Revision 1.78.2.1 by farinafa, Tue Apr 20 16:03:31 2010 UTC

# Line 8 | Line 8 | __version__ = "$Revision$"
8   from SchedulerGrid import SchedulerGrid
9   from crab_exceptions import *
10   from crab_util import *
11 from GliteConfig import *
11   import EdgLoggingInfo
12   import common
13   from WMCore.SiteScreening.BlackWhiteListParser import CEBlackWhiteListParser
# Line 44 | Line 43 | class SchedulerGlite(SchedulerGrid):
43  
44  
45      def rb_configure(self, RB):
46 +        url ='http://cmsdoc.cern.ch/cms/LCG/crab/config/'
47 +        from Downloader import Downloader
48 +        import httplib
49 +        common.logger.debug('Downloading config files for WMS: '+url)
50          ## 25-Jun-2009 SL: patch to use Cream enabled WMS
51          if ( self.cfg_params.get('GRID.use_cream',None) ):
52              RB='CREAM'
53          if not RB: return None
51        glite_config = None
54          rb_param_file = None
55 +        configFileName = 'glite_wms_'+str(RB)+'.conf'
56  
57 <        gliteConfig = GliteConfig(RB)
58 <        glite_config = gliteConfig.config()
57 >        results = Downloader(url)
58 >        try:
59 >            gliteConfig  = results.filePath(configFileName)
60 >        except httplib.HTTPException, ex:
61 >            raise CrabException( "Problem getting RB config file: %s, reason:"%(configFileName, ex) )
62  
63 <        if (glite_config ):
64 <            rb_param_file = glite_config
63 >        if (gliteConfig ):
64 >            rb_param_file = gliteConfig
65          return rb_param_file
66  
67      def ce_list(self):
# Line 233 | Line 239 | class SchedulerGlite(SchedulerGrid):
239  
240          txt += '}\n'
241          return txt
242 +
243 +    def listMatch(self, dest, full):
244 +        matching='fast'
245 +        
246 +        if self.boss().schedulerConfig['name'] == 'SchedulerGLite' :
247 +            taskId=common._db.getTask()
248 +            req=str(self.sched_parameter(1,taskId))
249 +            sites = self.boss().schedSession().matchResources(taskId, requirements=req)
250 +        else :
251 +            sites = SchedulerGrid.listMatch(self, dest, full)
252 +            
253 +        if full == True: matching='full'
254 +        common.logger.debug("list of available site ( "+str(matching) +" matching ) : "+str(sites))
255 +        
256 +        return sites

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines