61 |
|
#print msg |
62 |
|
raise CrabException(msg) |
63 |
|
|
64 |
+ |
|
65 |
+ |
def getReplicasBulk(self,fileblocks): |
66 |
+ |
""" |
67 |
+ |
query DLS to get replicas |
68 |
+ |
""" |
69 |
+ |
## |
70 |
+ |
try: |
71 |
+ |
entryList=self.api.getLocations(fileblocks,longList=True) |
72 |
+ |
except dlsApi.DlsApiError, inst: |
73 |
+ |
raise DLSNoReplicas(fileblocks) |
74 |
+ |
results = {} |
75 |
+ |
for entry in entryList: |
76 |
+ |
ListSites=[] |
77 |
+ |
for loc in entry.locations: |
78 |
+ |
ListSites.append(str(loc.host)) |
79 |
+ |
if len(ListSites)<=0: |
80 |
+ |
raise DLSNoReplicas(fileblocks) |
81 |
+ |
results[entry.fileBlock.name]=ListSites |
82 |
+ |
|
83 |
+ |
return results |
84 |
|
# #################################### |
85 |
|
def getReplicas(self,fileblocks): |
86 |
|
""" |