source: fedd/fedd_deter_impl.py @ f8b118e

axis_examplecompt_changesinfo-opsversion-1.30version-2.00version-3.01version-3.02
Last change on this file since f8b118e was f4f4117, checked in by Ted Faber <faber@…>, 16 years ago

add remote splitter interface

  • Property mode set to 100644
File size: 1.6 KB
RevLine 
[19cc408]1#!/usr/local/bin/python
2
[f4f4117]3from fedd_access import fedd_access
4from fedd_experiment_control import fedd_experiment_control_local
5from fedd_split import fedd_split_local
[19cc408]6
7class fedd_deter_impl:
8    """
9    The implementation of access control based on mapping users to projects.
10
11    Users can be mapped to existing projects or have projects created
12    dynamically.  This implements both direct requests and proxies.
13    """
14    # Used by the SOAP caller
15    soap_namespaces = ('http://www.isi.edu/faber/fedd.wsdl',
16            'http://www.isi.edu/faber/fedd_internal.wsdl')
17
[72ed6e4]18    def __init__(self, config=None):
[19cc408]19        """
20        Initializer.  Parses a configuration if one is given.
21        """
[72ed6e4]22        self.soap_services = { }
23        self.xmlrpc_services = { }
24
25        if config:
26            self.cert_file = config.get("globals", "cert_file");
27            self.cert_pwd = config.get("globals", "cert_pwd");
28            self.trusted_certs = config.get("globals", "trusted_certs");
29
30            if config.has_section("access"):
31                self.access = fedd_access(config)
32                self.soap_services.update(self.access.soap_services) 
33                self.xmlrpc_services.update(self.access.xmlrpc_services) 
34
35            if config.has_section("experiment_control"):
36                self.experiment = fedd_experiment_control_local(config)
37                self.soap_services.update(self.experiment.soap_services) 
38                self.xmlrpc_services.update(self.experiment.xmlrpc_services) 
39
[f4f4117]40            if config.has_section("splitter"):
41                self.splitter = fedd_split_local(config)
42                self.soap_services.update(self.splitter.soap_services) 
43                self.xmlrpc_services.update(self.splitter.xmlrpc_services) 
44
[72ed6e4]45def new_feddservice(config):
46    return fedd_deter_impl(config)
Note: See TracBrowser for help on using the repository browser.