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): |
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 |
|
|
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 |
|
|