10 |
|
|
11 |
|
class SchedulerGlite(SchedulerEdg): |
12 |
|
def __init__(self): |
13 |
< |
SchedulerEdg.__init__(self) |
13 |
> |
SchedulerEdg.__init__(self) |
14 |
> |
|
15 |
|
def sched_parameter(self): |
16 |
|
""" |
17 |
|
Returns file with requirements and scheduler-specific parameters |
77 |
|
param_file = open(common.work_space.shareDir()+'/'+self.param, 'w') |
78 |
|
|
79 |
|
itr4=self.findSites_(first[i]) |
80 |
< |
if (itr4 != []): |
81 |
< |
req1=[] |
82 |
< |
j = 0 |
83 |
< |
concString = '||' |
84 |
< |
for arg in itr4: |
85 |
< |
print "ITR: ", arg |
86 |
< |
############# |
87 |
< |
# MC Changed matching syntax to avoid gang matching |
88 |
< |
############# |
89 |
< |
req1.append(' Member("'+arg+'" , other.GlueCESEBindGroupSEUniqueID) ') |
90 |
< |
param_file.write('Requirements = ' + req + " && (" + concString.join(req1) + ');\n') |
80 |
> |
req1=[] |
81 |
> |
j = 0 |
82 |
> |
concString = '||' |
83 |
> |
for arg in itr4: |
84 |
> |
############# |
85 |
> |
# MC Changed matching syntax to avoid gang matching |
86 |
> |
############# |
87 |
> |
req1.append(' Member("'+arg+'" , other.GlueCESEBindGroupSEUniqueID) ') |
88 |
> |
if len(req1): req = req + " && (" + concString.join(req1) + ')' |
89 |
> |
req = req + ';\n' |
90 |
> |
param_file.write('Requirements = ' + req ) |
91 |
|
|
92 |
|
if (self.edg_config and self.edg_config_vo != ''): |
93 |
|
param_file.write('RBconfig = "'+self.edg_config+'";\n') |
239 |
|
return cmd_out |
240 |
|
|
241 |
|
def findSites_(self, n): |
241 |
– |
itr4 =[] |
242 |
|
sites = common.jobDB.destination(n) |
243 |
< |
if len(sites)>0 and sites[0]=="Any": |
244 |
< |
return itr4 |
245 |
< |
if sites != [""]: |
246 |
< |
return sites |
243 |
> |
if len(sites)>0 and sites[0]=="": |
244 |
> |
return [] |
245 |
> |
return sites |