def modifySchema(helper, user, group, oldworkflow): #for (key, value) in helper.data.request.schema.dictionary_whole_tree_().iteritems(): for (key, value) in helper.data.request.schema.dictionary_().iteritems(): #print key, value if key == 'ProcConfigCacheID': schema['ConfigCacheID'] = value elif key=='RequestSizeEvents': schema['RequestSizeEvents'] = value #schema['RequestNumEvents'] = int(value) elif key=='Requestor': schema['Requestor']=user elif key=='Group': schema['Group']=group elif key=='BlockWhitelist': schema['BlockWhitelist']=unprocessedBlocks.getListUnprocessedBlocks(url, oldworkflow) elif value != None: schema[key] = value return schema
def modifySchema(helper, user, group, oldworkflow): #for (key, value) in helper.data.request.schema.dictionary_whole_tree_().iteritems(): for (key, value) in helper.data.request.schema.dictionary_().iteritems(): #print key, value if key == 'ProcConfigCacheID': schema['ConfigCacheID'] = value elif key == 'RequestSizeEvents': schema['RequestSizeEvents'] = value #schema['RequestNumEvents'] = int(value) elif key == 'Requestor': schema['Requestor'] = user elif key == 'Group': schema['Group'] = group elif key == 'BlockWhitelist': schema[ 'BlockWhitelist'] = unprocessedBlocks.getListUnprocessedBlocks( url, oldworkflow) elif value != None: schema[key] = value return schema
def retrieveSchema(workflowName, user, group ): specURL = os.path.join(reqmgrCouchURL, workflowName, "spec") helper = WMWorkloadHelper() #print " retrieving original workflow...", helper.load(specURL) #print "done." schema = {} #for (key, value) in helper.data.request.schema.dictionary_whole_tree_().iteritems(): for (key, value) in helper.data.request.schema.dictionary_().iteritems(): #print key, value if key == 'ProcConfigCacheID': schema['ConfigCacheID'] = value elif key=='RequestSizeEvents': schema['RequestSizeEvents'] = value #schema['RequestNumEvents'] = int(value) elif key=='Requestor': schema['Requestor']=user elif key=='Group': schema['Group']=group elif key=='BlockWhitelist': schema['BlockWhitelist']=unprocessedBlocks.getListUnprocessedBlocks(url, workflowName) elif value != None: schema[key] = value return schema