56 |
|
concString = '&&' |
57 |
|
for ce in ce_white_list: |
58 |
|
tmpCe.append('RegExp("' + string.strip(ce) + '", other.GlueCEUniqueId)') |
59 |
< |
if len(tmpCe): req = req + " && (" + concString.join(tmpCe) + ") " |
59 |
> |
### MATTY' FIX: if more then one CE: && -> || |
60 |
> |
#print "list CE: " + str(tmpCe) |
61 |
> |
if len(tmpCe) == 1: |
62 |
> |
req += " && (" + concString.join(tmpCe) + ") " |
63 |
> |
elif len(tmpCe) > 1: |
64 |
> |
firstCE = 0 |
65 |
> |
for reqTemp in tmpCe: |
66 |
> |
#print reqTemp |
67 |
> |
if firstCE == 0: |
68 |
> |
#print "adding: "+str(" && ( (" + reqTemp + ") ") |
69 |
> |
req += " && ( (" + reqTemp + ") " |
70 |
> |
firstCE = 1 |
71 |
> |
elif firstCE > 0: |
72 |
> |
#print "adding: "+str(" || (" + reqTemp + ") ") |
73 |
> |
req += " || (" + reqTemp + ") " |
74 |
> |
if firstCE > 0: |
75 |
> |
req += ") " |
76 |
> |
## old code |
77 |
> |
# if len(tmpCe): req = req + " && (" + concString.join(tmpCe) + ") " |
78 |
|
|
79 |
|
if self.EDG_ce_black_list: |
80 |
|
ce_black_list = string.split(self.EDG_ce_black_list,',') |
152 |
|
txt += ' echo "middleware =$middleware" \n' |
153 |
|
txt += 'elif [ $GRID3_APP_DIR ]; then\n' |
154 |
|
txt += ' middleware=OSG \n' |
155 |
< |
txt += ' echo "SyncCE=`echo $EDG_WL_LOG_DESTINATION`" | tee -a $RUNTIME_AREA/$repo \n' |
155 |
> |
txt += ' if [ $GLOBUS_GRAM_JOB_CONTACT ]; then \n' |
156 |
> |
txt += ' SyncCE=`echo "https://cmsgrid02.hep.wisc.edu:59387/11075/1191845762/" | cut -d: -f2 | sed \'s/\/\///\'`;\n' |
157 |
> |
txt += ' echo "SyncCE=$SyncCE" | tee -a $RUNTIME_AREA/$repo ;\n' |
158 |
> |
txt += ' else\n' |
159 |
> |
txt += ' echo "not reporting SyncCE";\n' |
160 |
> |
txt += ' fi\n'; |
161 |
|
txt += ' echo "GridFlavour=`echo $middleware`" | tee -a $RUNTIME_AREA/$repo \n' |
162 |
|
txt += ' echo "middleware =$middleware" \n' |
163 |
|
txt += 'elif [ $OSG_APP ]; then \n' |
164 |
|
txt += ' middleware=OSG \n' |
165 |
< |
txt += ' echo "SyncCE=`echo $EDG_WL_LOG_DESTINATION`" | tee -a $RUNTIME_AREA/$repo \n' |
165 |
> |
txt += ' if [ $GLOBUS_GRAM_JOB_CONTACT ]; then \n' |
166 |
> |
txt += ' SyncCE=`echo "https://cmsgrid02.hep.wisc.edu:59387/11075/1191845762/" | cut -d: -f2 | sed \'s/\/\///\'`;\n' |
167 |
> |
txt += ' echo "SyncCE=$SyncCE" | tee -a $RUNTIME_AREA/$repo ;\n' |
168 |
> |
txt += ' else\n' |
169 |
> |
txt += ' echo "not reporting SyncCE";\n' |
170 |
> |
txt += ' fi\n'; |
171 |
|
txt += ' echo "GridFlavour=`echo $middleware`" | tee -a $RUNTIME_AREA/$repo \n' |
172 |
|
txt += ' echo "middleware =$middleware" \n' |
173 |
|
txt += 'else \n' |
200 |
|
|
201 |
|
txt += 'export VO='+self.VO+'\n' |
202 |
|
### some line for LFC catalog setting |
203 |
< |
txt += 'if [ $middleware == LCG ]; then \n' |
204 |
< |
txt += ' if [[ $LCG_CATALOG_TYPE != \''+self.lcg_catalog_type+'\' ]]; then\n' |
205 |
< |
txt += ' export LCG_CATALOG_TYPE='+self.lcg_catalog_type+'\n' |
206 |
< |
txt += ' fi\n' |
207 |
< |
txt += ' if [[ $LFC_HOST != \''+self.lfc_host+'\' ]]; then\n' |
208 |
< |
txt += ' export LFC_HOST='+self.lfc_host+'\n' |
209 |
< |
txt += ' fi\n' |
210 |
< |
txt += ' if [[ $LFC_HOME != \''+self.lfc_home+'\' ]]; then\n' |
211 |
< |
txt += ' export LFC_HOME='+self.lfc_home+'\n' |
212 |
< |
txt += ' fi\n' |
213 |
< |
txt += 'elif [ $middleware == OSG ]; then\n' |
214 |
< |
txt += ' echo "LFC catalog setting to be implemented for OSG"\n' |
215 |
< |
txt += 'fi\n' |
203 |
> |
#txt += 'if [ $middleware == LCG ]; then \n' |
204 |
> |
#txt += ' if [[ $LCG_CATALOG_TYPE != \''+self.lcg_catalog_type+'\' ]]; then\n' |
205 |
> |
#txt += ' export LCG_CATALOG_TYPE='+self.lcg_catalog_type+'\n' |
206 |
> |
#txt += ' fi\n' |
207 |
> |
#txt += ' if [[ $LFC_HOST != \''+self.lfc_host+'\' ]]; then\n' |
208 |
> |
#txt += ' export LFC_HOST='+self.lfc_host+'\n' |
209 |
> |
#txt += ' fi\n' |
210 |
> |
#txt += ' if [[ $LFC_HOME != \''+self.lfc_home+'\' ]]; then\n' |
211 |
> |
#txt += ' export LFC_HOME='+self.lfc_home+'\n' |
212 |
> |
#txt += ' fi\n' |
213 |
> |
#txt += 'elif [ $middleware == OSG ]; then\n' |
214 |
> |
#txt += ' echo "LFC catalog setting to be implemented for OSG"\n' |
215 |
> |
#txt += 'fi\n' |
216 |
|
##### |
217 |
< |
if int(self.register_data) == 1: |
218 |
< |
txt += 'if [ $middleware == LCG ]; then \n' |
219 |
< |
txt += ' export LFN='+self.LFN+'\n' |
220 |
< |
txt += ' lfc-ls $LFN\n' |
221 |
< |
txt += ' result=$?\n' |
222 |
< |
txt += ' echo $result\n' |
223 |
< |
### creation of LFN dir in LFC catalog, under /grid/cms dir |
224 |
< |
txt += ' if [ $result != 0 ]; then\n' |
225 |
< |
txt += ' lfc-mkdir $LFN\n' |
226 |
< |
txt += ' result=$?\n' |
227 |
< |
txt += ' echo $result\n' |
228 |
< |
txt += ' fi\n' |
229 |
< |
txt += 'elif [ $middleware == OSG ]; then\n' |
230 |
< |
txt += ' echo " Files registration to be implemented for OSG"\n' |
231 |
< |
txt += 'fi\n' |
232 |
< |
txt += '\n' |
233 |
< |
|
234 |
< |
if self.VO: |
235 |
< |
txt += 'export VO='+self.VO+'\n' |
236 |
< |
if self.LFN: |
237 |
< |
txt += 'if [ $middleware == LCG ]; then \n' |
238 |
< |
txt += ' export LFN='+self.LFN+'\n' |
239 |
< |
txt += 'fi\n' |
212 |
< |
txt += '\n' |
217 |
> |
#if int(self.register_data) == 1: |
218 |
> |
# txt += 'if [ $middleware == LCG ]; then \n' |
219 |
> |
# txt += ' export LFN='+self.LFN+'\n' |
220 |
> |
# txt += ' lfc-ls $LFN\n' |
221 |
> |
# txt += ' result=$?\n' |
222 |
> |
# txt += ' echo $result\n' |
223 |
> |
# ### creation of LFN dir in LFC catalog, under /grid/cms dir |
224 |
> |
# txt += ' if [ $result != 0 ]; then\n' |
225 |
> |
# txt += ' lfc-mkdir $LFN\n' |
226 |
> |
# txt += ' result=$?\n' |
227 |
> |
# txt += ' echo $result\n' |
228 |
> |
# txt += ' fi\n' |
229 |
> |
# txt += 'elif [ $middleware == OSG ]; then\n' |
230 |
> |
# txt += ' echo " Files registration to be implemented for OSG"\n' |
231 |
> |
# txt += 'fi\n' |
232 |
> |
# txt += '\n' |
233 |
> |
# if self.VO: |
234 |
> |
# txt += 'export VO='+self.VO+'\n' |
235 |
> |
# if self.LFN: |
236 |
> |
# txt += 'if [ $middleware == LCG ]; then \n' |
237 |
> |
# txt += ' export LFN='+self.LFN+'\n' |
238 |
> |
# txt += 'fi\n' |
239 |
> |
# txt += '\n' |
240 |
|
|
241 |
|
txt += 'if [ $middleware == LCG ]; then\n' |
242 |
|
txt += ' CloseCEs=`glite-brokerinfo getCE`\n' |
295 |
|
|
296 |
|
def submitTout(self, list): |
297 |
|
return 180 |
271 |
– |
|