axis_examplecompt_changesinfo-opsversion-1.30version-2.00version-3.01version-3.02
Last change
on this file since 72ed6e4 was
72ed6e4,
checked in by Ted Faber <faber@…>, 16 years ago
|
refactor configuration parsing to make code extensions more modular
|
-
Property mode set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | #!/usr/local/bin/python |
---|
2 | |
---|
3 | from fedd_access import * |
---|
4 | from fedd_experiment_control import * |
---|
5 | |
---|
6 | class fedd_deter_impl: |
---|
7 | """ |
---|
8 | The implementation of access control based on mapping users to projects. |
---|
9 | |
---|
10 | Users can be mapped to existing projects or have projects created |
---|
11 | dynamically. This implements both direct requests and proxies. |
---|
12 | """ |
---|
13 | # Used by the SOAP caller |
---|
14 | soap_namespaces = ('http://www.isi.edu/faber/fedd.wsdl', |
---|
15 | 'http://www.isi.edu/faber/fedd_internal.wsdl') |
---|
16 | |
---|
17 | def __init__(self, config=None): |
---|
18 | """ |
---|
19 | Initializer. Parses a configuration if one is given. |
---|
20 | """ |
---|
21 | self.soap_services = { } |
---|
22 | self.xmlrpc_services = { } |
---|
23 | |
---|
24 | if config: |
---|
25 | self.cert_file = config.get("globals", "cert_file"); |
---|
26 | self.cert_pwd = config.get("globals", "cert_pwd"); |
---|
27 | self.trusted_certs = config.get("globals", "trusted_certs"); |
---|
28 | |
---|
29 | if config.has_section("access"): |
---|
30 | self.access = fedd_access(config) |
---|
31 | self.soap_services.update(self.access.soap_services) |
---|
32 | self.xmlrpc_services.update(self.access.xmlrpc_services) |
---|
33 | |
---|
34 | if config.has_section("experiment_control"): |
---|
35 | self.experiment = fedd_experiment_control_local(config) |
---|
36 | self.soap_services.update(self.experiment.soap_services) |
---|
37 | self.xmlrpc_services.update(self.experiment.xmlrpc_services) |
---|
38 | |
---|
39 | def new_feddservice(config): |
---|
40 | return fedd_deter_impl(config) |
---|
Note: See
TracBrowser
for help on using the repository browser.