if not opts.group is "user": j.setJobGroup(str(opts.type)) j.setInputSandbox(input_sandbox_files) # all input files in the sandbox j.setOutputSandbox(output_sandbox_files) j.setCPUTime(opts.cpu) if not opts.site is None: j.setDestination(opts.site.split(",")) #can also be a list if not opts.bannedSites is None: j.setBannedSites(opts.bannedSites.split(",")) if not opts.release is None: tag = opts.release cl = SoftwareTagClient() result = cl.getSitesForTag(tag, 'Valid') # keyword doesn't work there. if not result['OK']: gLogger.error("*ERROR* Could not get sites for Tag %s" % tag, result['Message']) dexit(1) sites = result['Value'] j.setDestination(sites) # new feature: add xrootd-keytab file to input list. this one resides on SE input_stage_files = [] if pipeline: xrd_keytab = op.getValue("Pipeline/XrdKey", None) if not xrd_keytab: gLogger.notice("*DEBUG* adding XrdKey file %s to input" % xrd_keytab) input_stage_files.append(xrd_keytab)
j.setName(opts.name) j.setInputSandbox(input_sandbox_files) # all input files in the sandbox j.setOutputSandbox(output_sandbox_files) j.setCPUTime(opts.cpu) if not opts.site is None: j.setDestination(opts.site.split(","))#can also be a list if not opts.bannedSites is None: j.setBannedSites(opts.bannedSites.split(",")) if not opts.release is None: tag = opts.release cl = SoftwareTagClient() result = cl.getSitesForTag(tag,'Valid') # keyword doesn't work there. if not result['OK']: gLogger.error("*ERROR* Could not get sites for Tag %s"%tag,result['Message']) dexit(1) sites = result[ 'Value' ] j.setDestination(sites) if not opts.stagein is None: input_stage_files = [] # we do add. input staging files = opts.stagein.split(",") for f in files: if f.startswith("LFN"): input_stage_files.append(f) else: input_stage_files+=extract_file(f)
from DIRAC.ConfigurationSystem.Client.Helpers.Resources import getQueues sw = SoftwareTagClient() mytag = 'SomeTag' mysite = 'LCG.LAL.fr' #This is what the siteadmin does res = sw.addTagAtSite(mytag, mysite) if not res['OK']: gLogger.error(res['Message']) dexit(1) else: gLogger.notice("Added %s to %s" % (mytag, mysite)) #This is the most common Call from Clients res = sw.getSitesForTag(mytag) if not res['OK']: gLogger.error(res['Message']) else: gLogger.notice("Sites: ", res['Value']) #Get the tags with valid status res = sw.getTagsWithStatus("New") if not res['OK']: gLogger.error(res['Message']) else: gLogger.notice("Found the tags:",res['Value']) #Get tags with f****d up status res = sw.getTagsWithStatus("NewSomething") if not res['OK']:
from DIRAC.ConfigurationSystem.Client.Helpers.Resources import getQueues sw = SoftwareTagClient() mytag = 'SomeTag' mysite = 'LCG.LAL.fr' #This is what the siteadmin does res = sw.addTagAtSite(mytag, mysite) if not res['OK']: gLogger.error(res['Message']) dexit(1) else: gLogger.notice("Added %s to %s" % (mytag, mysite)) #This is the most common Call from Clients res = sw.getSitesForTag(mytag) if not res['OK']: gLogger.error(res['Message']) else: gLogger.notice("Sites: ", res['Value']) #Get the tags with valid status res = sw.getTagsWithStatus("New") if not res['OK']: gLogger.error(res['Message']) else: gLogger.notice("Found the tags:", res['Value']) #Get tags with f****d up status res = sw.getTagsWithStatus("NewSomething") if not res['OK']: