38 |
|
def __init__(self, type, cfg_params): |
39 |
|
self.cfg_params = cfg_params |
40 |
|
self.showCAF = False |
41 |
+ |
self.showProd = False |
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 |
|
|
48 |
|
phedexURL='http://cmsweb.cern.ch/phedex/datasvc/xml/prod/' |
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, |
52 |
+ |
'glite_slc5':global_url,\ |
53 |
|
'glitecoll':global_url,\ |
54 |
|
'condor': global_url,\ |
55 |
|
'condor_g': global_url,\ |
56 |
|
'glidein': global_url,\ |
57 |
|
'lsf': global_url,\ |
58 |
|
'caf': caf_url,\ |
59 |
< |
'sge': global_url |
59 |
> |
'sge': global_url,\ |
60 |
> |
'arc': global_url,\ |
61 |
> |
'pbs': global_url |
62 |
|
} |
63 |
|
dbs_url_default = dbs_url_map[(common.scheduler.name()).lower()] |
64 |
|
|
71 |
|
else: |
72 |
|
msg = "DLS type %s not among the supported DLS ( DLS_TYPE_DLI and DLS_TYPE_MYSQL ) "%type |
73 |
|
raise CrabException(msg) |
74 |
< |
common.logger.debug(5,"DLS interface: %s Server %s"%(type,endpoint)) |
74 |
> |
common.logger.debug("DLS interface: %s Server %s"%(type,endpoint)) |
75 |
|
try: |
76 |
|
self.api = dlsClient.getDlsApi(dls_type=type,dls_endpoint=endpoint) |
77 |
|
except dlsApi.DlsApiError, inst: |
78 |
|
msg = "Error when binding the DLS interface: %s Server %s"%(str(inst),endpoint) |
79 |
|
#print msg |
80 |
|
raise CrabException(msg) |
72 |
– |
|
81 |
|
|
82 |
|
def getReplicasBulk(self,fileblocks): |
83 |
|
""" |
85 |
|
""" |
86 |
|
## |
87 |
|
try: |
88 |
< |
entryList=self.api.getLocations(fileblocks,longList=True,showCAF=self.showCAF) |
88 |
> |
entryList=self.api.getLocations(fileblocks,longList=True,showCAF=self.showCAF,showProd=self.showProd,subscribed=self.subscribed) |
89 |
|
except dlsApi.DlsApiError, inst: |
90 |
|
raise DLSNoReplicas(fileblocks) |
91 |
|
results = {} |
106 |
|
""" |
107 |
|
## |
108 |
|
try: |
109 |
< |
entryList=self.api.getLocations([fileblocks],showCAF=self.showCAF) |
109 |
> |
entryList=self.api.getLocations([fileblocks],showCAF=self.showCAF,subscribed=self.subscribed) |
110 |
|
except dlsApi.DlsApiError, inst: |
111 |
|
raise DLSNoReplicas(fileblocks) |
112 |
|
|