コード例 #1
0
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
コード例 #2
0
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
コード例 #3
0
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