Changeset 0ea11af for fedd/fedd_access.py
- Timestamp:
- Oct 9, 2008 2:08:28 PM (16 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-1.30, version-2.00, version-3.01, version-3.02
- Children:
- 0b466d1
- Parents:
- 11a08b0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/fedd_access.py
r11a08b0 r0ea11af 24 24 import logging 25 25 26 27 # Make log messages disappear if noone configures a fedd logger 26 28 class nullHandler(logging.Handler): 27 29 def emit(self, record): pass … … 95 97 self.dynamic_projects_cert_pwd) 96 98 97 98 if config.dynamic_projects_url == None: 99 self.allocate_project = \ 100 fedd_allocate_project_local(config.dynamic_projects, 101 config.dynamic_projects_url, proj_certs) 102 else: 103 self.allocate_project = \ 104 fedd_allocate_project_remote(config.dynamic_projects, 105 config.dynamic_projects_url, proj_certs) 106 107 self.soap_handlers = {\ 99 self.soap_services = {\ 108 100 'RequestAccess': make_soap_handler(\ 109 101 RequestAccessRequestMessage.typecode,\ … … 111 103 "RequestAccessResponseBody")\ 112 104 } 113 self.xmlrpc_ handlers = {\105 self.xmlrpc_services = {\ 114 106 'RequestAccess': make_xmlrpc_handler(\ 115 107 self.RequestAccess, "RequestAccessResponseBody")\ 116 108 } 109 110 111 if config.dynamic_projects_url == None: 112 self.allocate_project = \ 113 fedd_allocate_project_local(config.dynamic_projects, 114 config.dynamic_projects_url, proj_certs) 115 else: 116 self.allocate_project = \ 117 fedd_allocate_project_remote(config.dynamic_projects, 118 config.dynamic_projects_url, proj_certs) 119 120 # If the project allocator exports services, put them in this object's 121 # maps so that classes that instantiate this can call the services. 122 self.soap_services.update(self.allocate_project.soap_services) 123 self.xmlrpc_services.update(self.allocate_project.xmlrpc_services) 117 124 118 125 def dump_state(self): … … 393 400 394 401 def RequestAccess(self, req, fid): 395 402 """ 403 Handle the access request. Proxy if not for us. 404 405 Parse out the fields and make the allocations or rejections if for us, 406 otherwise, assuming we're willing to proxy, proxy the request out. 407 """ 408 409 # The dance to get into the request body 396 410 if req.has_key('RequestAccessRequestBody'): 397 411 req = req['RequestAccessRequestBody'] … … 488 502 489 503 def get_soap_services(self): 490 return self.soap_ handlers504 return self.soap_services 491 505 492 506 def get_xmlrpc_services(self): 493 return self.xmlrpc_ handlers494 507 return self.xmlrpc_services 508
Note: See TracChangeset
for help on using the changeset viewer.