else: print "ERROR could not assign",wfo.name else: pass print "Assignment summary:" print "Assigned",n_assigned print "Stalled",n_stalled if __name__=="__main__": url = 'cmsweb.cern.ch' parser = optparse.OptionParser() parser.add_option('-t','--test', help='Only test the assignment',action='store_true',dest='test',default=False) parser.add_option('-r', '--restrict', help='Only assign workflows for site with input',default=False, action="store_true",dest='restrict') parser.add_option('--go',help="Overrides the campaign go",default=False,action='store_true') parser.add_option('--team',help="Specify the agent to use",default='production') parser.add_option('--primary_aaa',help="Force to use the secondary location restriction, if any, and use the full site whitelist initially provided to run that type of wf",default=False, action='store_true') for key in reqMgrClient.assignWorkflow.keys: parser.add_option('--%s'%key,help="%s Parameter of request manager assignment interface"%key, default=None) (options,args) = parser.parse_args() spec=None if len(args)!=0: spec = args[0] assignor(url,spec, options=options) if not spec: htmlor() pass
'--setstatus', help="What status to set locally", default="considered") parser.add_option('-u', '--user', help="What user to fetch workflow from", default="pdmvserv") parser.add_option( '-r', '--replace', help="the workflow name that should be used for replacement", default=None) parser.add_option('--user_relval', help="The user that can inject workflows for relvals", default=None) parser.add_option( '--user_storeresults', help="The user that can inject workflows for store results", default=None) parser.add_option('--no_convert', help="Prevent the conversion to stepchain", default=False) (options, args) = parser.parse_args() spec = None if len(args) != 0: spec = args[0] injector(url, options, spec) if not spec and do_html_in_each_module: htmlor()