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.23 by spiga, Mon Sep 8 18:20:57 2008 UTC vs.
Revision 1.24 by spiga, Tue Nov 18 11:06:20 2008 UTC

# Line 61 | Line 61 | class DLSInfo:
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          """

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines