source: fedd/fedd_deter_impl.py @ 11a08b0

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

refactoring

  • Property mode set to 100644
File size: 1.4 KB
RevLine 
[19cc408]1#!/usr/local/bin/python
2
3from fedd_access import *
4from fedd_experiment_control import *
5from fedd_config_file import *
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
18    def __init__(self, config_path=None):
19        """
20        Initializer.  Parses a configuration if one is given.
21        """
22        if config_path:
23            self.soap_methods = { }
24            self.xmlrpc_methods = { }
25            config = config_file(config_path)
26
27            self.cert_file = config.cert_file;
28            self.cert_pwd = config.cert_pwd;
29            self.trusted_certs = config.trusted_certs;
30
31            self.access = fedd_access(config)
32            self.experiment = fedd_experiment_control_local(config)
33
34            self.soap_methods.update(self.access.get_soap_services()) 
35            self.soap_methods.update(self.experiment.get_soap_services()) 
36
37            self.xmlrpc_methods.update(self.access.get_xmlrpc_services()) 
38            self.xmlrpc_methods.update(self.experiment.get_xmlrpc_services()) 
39
40    def get_soap_services(self):
41        return self.soap_methods
42
43    def get_xmlrpc_services(self):
44        return self.xmlrpc_methods
45
46def new_feddservice(configfile):
47    return fedd_deter_impl(configfile)
Note: See TracBrowser for help on using the repository browser.