source: cows_wps/trunk/cows_wps/utils/create_process_config.py @ 5615

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/cows_wps/trunk/cows_wps/utils/create_process_config.py@5615
Revision 5615, 1.2 KB checked in by spascoe, 12 years ago (diff)

COWS WPS package copied from
 http://proj.badc.rl.ac.uk/svn/dcip/cows-wps/trunk.

This is a stripped down version of the DDP WPS. Some features are
removed and others have been deactivated until we reimplement them in a
more generic way.

Line 
1from cows_wps.utils.parse_wps_config import wps_config_dict
2from cows_wps.utils.parse_outputs_rules import outputs_rules_config_dict
3from cows_wps.utils.parse_capabilities_config import caps_config_dict
4
5from cows_wps.model.process_dir import processDirManager
6
7import copy
8
9def createProcessConfig(identifier):
10       
11    proc_conf = {}
12   
13    proc_conf['identifier'] = identifier
14   
15    proc_conf['Capabilities'] = caps_config_dict[identifier]
16
17    proc_conf['compression_ratios'] = outputs_rules_config_dict["compression_ratios"]
18   
19    volume_rules = outputs_rules_config_dict["volume_rules"]
20    proc_conf['max_file_volume'] = str(volume_rules["max_file_volume"])
21    proc_conf['max_request_volume'] = str(volume_rules["max_request_volume"])
22   
23    valuesToCopy = ['max_len_metadata_line', 
24                    'notify_email_from', 'mailhost',
25                    'ukcp_helpdesk_url','ui_url_to_jobs_page',
26                    ]
27   
28    for key in valuesToCopy:
29        proc_conf[key] = wps_config_dict[key]
30       
31    optionalValuesToCopy = ['test_email_sending','test_email_output']
32   
33    for key in optionalValuesToCopy:
34        if wps_config_dict.has_key(key):
35            proc_conf[key] = wps_config_dict[key]   
36   
37    return proc_conf
Note: See TracBrowser for help on using the repository browser.