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

Comparing COMP/CRAB/python/PubDBInfo.py (file contents):
Revision 1.2 by slacapra, Tue Aug 23 10:59:02 2005 UTC vs.
Revision 1.3 by slacapra, Thu Oct 13 13:01:57 2005 UTC

# Line 29 | Line 29 | class PubDBInfoResult:
29   class PubDBInfo:
30    def __init__(self, pubdburl, Collections):
31           self.Collections= Collections
32 +         self.PrimaryCollID=string.split(Collections,'-')[0]
33           self.PubDBurl_ = pubdburl
33         #self.PubDBInfophp_ = 'pubdb-get-analisys-info.php'
34           self.PubDBInfophp_ = 'pubdb-get-analysisinfo.php'
35           self.protocolPrio_ = ['http', 'rfio', 'mysql' , 'gridftp']
36         #self.protocolPrio_ = ['http', 'mysql' , 'rfio' , 'gridftp']
36  
37    ##########################################################################  
38    def GetPubDBInfo(self):
# Line 71 | Line 70 | class PubDBInfo:
70          collmap={}
71          for k in catalogues.keys():
72             CollId=catalogues[k]['CollectionId']
73 +           ## get also the collection type
74 +           CollType=catalogues[k]['CollectionType']
75 +           ## set primary collection flag
76 +           PrimaryCollFlag=0
77 +           if ( CollId == self.PrimaryCollID ) : PrimaryCollFlag=1
78             colllist=[]
79             #print ">>> Catalogues for Collection: "+CollId+"\n"
80            
# Line 122 | Line 126 | class PubDBInfo:
126                       #print "----------------------------------"
127  
128                       ## fill a catlogue entry
129 <                     acatalogue=catalogEntryNew(FileType,ValidationStatus,ContactString,ContactProtocol,CatalogueType,SE,CElist,TotalEvents,FirstRun+'-'+LastRun,Variables)          
129 > #                     acatalogue=catalogEntryNew(FileType,ValidationStatus,ContactString,ContactProtocol,CatalogueType,SE,CElist,TotalEvents,FirstRun+'-'+LastRun,Variables)          
130 >                     ## store collection type and primarycollection flag
131 >                     acatalogue=catalogEntryNew(CollType,PrimaryCollFlag,FileType,ValidationStatus,ContactString,ContactProtocol,CatalogueType,SE,CElist,TotalEvents,FirstRun+'-'+LastRun,Variables)
132 >
133                       ## list the catalogues belonging to a given collection
134                       colllist.append(acatalogue)
135                      

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines