Changeset c3d5d53
- Timestamp:
- Dec 4, 2008 10:18:51 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:
- f005e44
- Parents:
- 416292f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/allocate_project.py
r416292f rc3d5d53 12 12 from util import * 13 13 from fedid import fedid 14 from fixed_resource import read_key_db, read_project_db, read_user_db15 14 from remote_service import xmlrpc_handler, soap_handler, service_caller 16 15 from service_error import service_error … … 110 109 111 110 112 fixed_key_db = config.get("allocate", "fixed_keys", None)113 fixed_project_db = config.get("allocate", "fixed_projects", None)114 fixed_user_db = config.get("allocate", "fixed_users", None)115 self.fixed_keys = set()116 self.fixed_projects = set()117 self.fixed_users = set()118 119 # initialize the fixed resource sets120 for db, rset, fcn in (\121 (fixed_key_db, self.fixed_keys, read_key_db), \122 (fixed_project_db, self.fixed_projects, read_project_db),123 (fixed_user_db, self.fixed_users, read_user_db)):124 if db:125 try:126 rset.update(fcn(db))127 except:128 self.log.debug("Can't read resources from %s" % db)129 130 111 # Internal services are SOAP only 131 112 self.soap_services = {\ … … 632 613 Remove user keys from users and delete dynamic projects. 633 614 634 Only keys not in the set of fixed keys are deleted.and there are615 Only keys this service created are deleted and there are 635 616 similar protections for projects. 636 617 """ … … 765 746 self.url = config.get("allocate", "uri", "") 766 747 748 # Keep cert file and password coming from the same source 767 749 self.cert_file = config.get("allocate", "cert_file", None) 768 self.cert_pwd = config.get("allocate", "cert_pwd", None) 769 self.trusted_certs = config.get("allocate", "trusted_certs", None) 770 771 # Certs are promoted from the generic to the specific, so without a if 772 # no dynamic project certificates, then proxy certs are used, and if 773 # none of those the main certs. 774 775 if config.has_option("globals", "proxy_cert_file"): 776 if not self.cert_file: 777 self.cert_file = config.get("globals", "proxy_cert_file") 778 if config.has_option("globals", "proxy_cert_pwd"): 779 self.cert_pwd = config.get("globals", "proxy_cert_pwd") 780 781 if config.has_option("globals", "proxy_trusted_certs") and \ 782 not self.trusted_certs: 783 self.trusted_certs = \ 784 config.get("globals", "proxy_trusted_certs") 785 786 if config.has_option("globals", "cert_file"): 787 has_pwd = config.has_option("globals", "cert_pwd") 788 if not self.cert_file: 789 self.cert_file = config.get("globals", "cert_file") 790 if has_pwd: 791 self.cert_pwd = config.get("globals", "cert_pwd") 792 793 if config.get("globals", "trusted_certs") and not self.trusted_certs: 794 self.trusted_certs = \ 795 config.get("globals", "trusted_certs") 750 if self.cert_file: 751 self.cert_pwd = config.get("allocate", "cert_pwd", None) 752 else: 753 self.cert_file = config.get("globals", "cert_file", None) 754 self.cert_pwd = config.get("globals", "cert_pwd", None) 755 756 self.trusted_certs = config.get("allocate", "trusted_certs", None) or \ 757 config.get("globals", "trusted_certs") 796 758 797 759 self.soap_services = { }
Note: See TracChangeset
for help on using the changeset viewer.