#!/usr/local/bin/python from fedd_access import * from fedd_experiment_control 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=None): """ Initializer. Parses a configuration if one is given. """ self.soap_services = { } self.xmlrpc_services = { } if config: self.cert_file = config.get("globals", "cert_file"); self.cert_pwd = config.get("globals", "cert_pwd"); self.trusted_certs = config.get("globals", "trusted_certs"); if config.has_section("access"): self.access = fedd_access(config) self.soap_services.update(self.access.soap_services) self.xmlrpc_services.update(self.access.xmlrpc_services) if config.has_section("experiment_control"): self.experiment = fedd_experiment_control_local(config) self.soap_services.update(self.experiment.soap_services) self.xmlrpc_services.update(self.experiment.xmlrpc_services) def new_feddservice(config): return fedd_deter_impl(config)