#!/usr/local/bin/python from fedd_access import * from fedd_experiment_control import * from fedd_config_file import * class fedd_deter_impl: """ The implementation of access control based on mapping users to projects. Users can be mapped to existing projects or have projects created dynamically. This implements both direct requests and proxies. """ # Used by the SOAP caller soap_namespaces = ('http://www.isi.edu/faber/fedd.wsdl', 'http://www.isi.edu/faber/fedd_internal.wsdl') def __init__(self, config_path=None): """ Initializer. Parses a configuration if one is given. """ if config_path: self.soap_methods = { } self.xmlrpc_methods = { } config = config_file(config_path) self.cert_file = config.cert_file; self.cert_pwd = config.cert_pwd; self.trusted_certs = config.trusted_certs; self.access = fedd_access(config) self.experiment = fedd_experiment_control_local(config) self.soap_methods.update(self.access.get_soap_services()) self.soap_methods.update(self.experiment.get_soap_services()) self.xmlrpc_methods.update(self.access.get_xmlrpc_services()) self.xmlrpc_methods.update(self.experiment.get_xmlrpc_services()) def get_soap_services(self): return self.soap_methods def get_xmlrpc_services(self): return self.xmlrpc_methods def new_feddservice(configfile): return fedd_deter_impl(configfile)