Changeset 06cc65b for fedd/federation/access.py
- Timestamp:
- May 28, 2010 2:23:12 AM (14 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
- Children:
- 5bf359d
- Parents:
- d6990a4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/access.py
rd6990a4 r06cc65b 205 205 f = open(self.state_filename, 'w') 206 206 pickle.dump(self.state, f) 207 self.log.debug("Wrote state to %s" % self.state_filename) 207 208 except EnvironmentError, e: 208 209 self.log.error("Can't write file %s: %s" % \ … … 224 225 f = open(self.state_filename, "r") 225 226 self.state = pickle.load(f) 226 227 self.log.debug("[read_state]: Read state from %s" % \ 228 self.state_filename) 227 229 except EnvironmentError, e: 228 230 self.log.warning(("[read_state]: No saved state: " +\ … … 236 238 "Unpickling failed: %s") % e) 237 239 238 self.log.debug("[read_state]: Read state from %s" % \239 self.state_filename)240 241 self.allocation = self.state['allocation']242 self.projects = self.state['projects']243 self.keys = self.state['keys']244 self.types = self.state['types']245 246 # Add the ownership attributes to the authorizer. Note that the247 # indices of the allocation dict are strings, but the attributes are248 # fedids, so there is a conversion.249 for k in self.allocation.keys():250 for o in self.allocation[k].get('owners', []):251 self.auth.set_attribute(o, fedid(hexstr=k))252 if self.allocation[k].has_key('userconfig'):253 sfid = self.allocation[k]['userconfig']254 fid = fedid(hexstr=sfid)255 self.auth.set_attribute(fid, "/%s" % sfid)256 240 257 241
Note: See TracChangeset
for help on using the changeset viewer.