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.26 by spiga, Fri Dec 5 10:42:27 2008 UTC vs.
Revision 1.31.2.1 by spiga, Tue Sep 22 22:03:55 2009 UTC

# Line 38 | Line 38 | class DLSInfo:
38      def __init__(self, type, cfg_params):
39          self.cfg_params = cfg_params
40          self.showCAF = False
41 +        self.showProd = False
42 +        subscribed =int(self.cfg_params.get('CMSSW.subscribed', 0))  
43 +        if subscribed == 1: self.subscribed = True
44 +        showProd = int(self.cfg_params.get('CMSSW.show_prod', 0))
45 +        if showProd == 1: self.showProd = True
46  
47          phedexURL='http://cmsweb.cern.ch/phedex/datasvc/xml/prod/'
48          global_url="http://cmsdbsprod.cern.ch/cms_dbs_prod_global/servlet/DBSServlet"
# Line 49 | Line 54 | class DLSInfo:
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                            }
60          dbs_url_default = dbs_url_map[(common.scheduler.name()).lower()]
61  
# Line 62 | Line 68 | class DLSInfo:
68          else:
69              msg = "DLS type %s not among the supported DLS ( DLS_TYPE_DLI and DLS_TYPE_MYSQL ) "%type
70              raise CrabException(msg)
71 <        common.logger.debug(5,"DLS interface: %s Server %s"%(type,endpoint))      
71 >        common.logger.debug("DLS interface: %s Server %s"%(type,endpoint))      
72          try:
73              self.api = dlsClient.getDlsApi(dls_type=type,dls_endpoint=endpoint)
74          except dlsApi.DlsApiError, inst:
75              msg = "Error when binding the DLS interface: %s  Server %s"%(str(inst),endpoint)
76              #print msg
77              raise CrabException(msg)
72
78  
79      def getReplicasBulk(self,fileblocks):
80          """
81 <        query DLS to g    et replicas
81 >        query DLS to get replicas
82          """              
83          ##
84          try:
85 <            entryList=self.api.getLocations(fileblocks,longList=True,showCAF=self.showCAF)
85 >            entryList=self.api.getLocations(fileblocks,longList=True,showCAF=self.showCAF,showProd=self.showProd,subscribed=self.subscribed)
86          except dlsApi.DlsApiError, inst:
87              raise DLSNoReplicas(fileblocks)
88          results = {}
# Line 98 | Line 103 | class DLSInfo:
103          """
104          ##
105          try:
106 <            entryList=self.api.getLocations([fileblocks],showCAF=self.showCAF)
106 >            entryList=self.api.getLocations([fileblocks],showCAF=self.showCAF,subscribed=self.subscribed)
107          except dlsApi.DlsApiError, inst:
108              raise DLSNoReplicas(fileblocks)
109  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines