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

Comparing COMP/CRAB/python/DLSInfo.py (file contents):
Revision 1.29 by spiga, Wed Jan 7 15:24:30 2009 UTC vs.
Revision 1.36 by spiga, Wed Feb 10 21:35:34 2010 UTC

# Line 39 | Line 39 | class DLSInfo:
39          self.cfg_params = cfg_params
40          self.showCAF = False
41          self.showProd = False
42 <
42 >        self.subscribed = False    
43 >        subscribed =int(self.cfg_params.get('CMSSW.subscribed', 0))  
44 >        if subscribed == 1: self.subscribed = True
45          showProd = int(self.cfg_params.get('CMSSW.show_prod', 0))
46          if showProd == 1: self.showProd = True
47  
# Line 47 | Line 49 | class DLSInfo:
49          global_url="http://cmsdbsprod.cern.ch/cms_dbs_prod_global/servlet/DBSServlet"
50          caf_url = "http://cmsdbsprod.cern.ch/cms_dbs_caf_analysis_01/servlet/DBSServlet"
51          dbs_url_map  =   {'glite':    global_url,
50                          'glitecoll':global_url,\
52                            'condor':   global_url,\
53                            'condor_g': global_url,\
54                            'glidein':  global_url,\
55                            'lsf':      global_url,\
56                            'caf':      caf_url,\
57 <                          'sge':      global_url
57 >                          'sge':      global_url,\
58 >                          'arc':      global_url,\
59 >                          'pbs':      global_url
60                            }
61          dbs_url_default = dbs_url_map[(common.scheduler.name()).lower()]
62  
# Line 66 | Line 69 | class DLSInfo:
69          else:
70              msg = "DLS type %s not among the supported DLS ( DLS_TYPE_DLI and DLS_TYPE_MYSQL ) "%type
71              raise CrabException(msg)
72 <        common.logger.debug(5,"DLS interface: %s Server %s"%(type,endpoint))      
72 >        common.logger.debug("DLS interface: %s Server %s"%(type,endpoint))      
73          try:
74              self.api = dlsClient.getDlsApi(dls_type=type,dls_endpoint=endpoint)
75          except dlsApi.DlsApiError, inst:
# Line 80 | Line 83 | class DLSInfo:
83          """              
84          ##
85          try:
86 <            entryList=self.api.getLocations(fileblocks,longList=True,showCAF=self.showCAF,showProd=self.showProd)
86 >            entryList=self.api.getLocations(fileblocks,longList=True,showCAF=self.showCAF,showProd=self.showProd,subscribed=self.subscribed)
87          except dlsApi.DlsApiError, inst:
88              raise DLSNoReplicas(fileblocks)
89          results = {}
# Line 101 | Line 104 | class DLSInfo:
104          """
105          ##
106          try:
107 <            entryList=self.api.getLocations([fileblocks],showCAF=self.showCAF)
107 >            entryList=self.api.getLocations([fileblocks],showCAF=self.showCAF,subscribed=self.subscribed)
108          except dlsApi.DlsApiError, inst:
109              raise DLSNoReplicas(fileblocks)
110  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines