Changeset 62f3dd9 for fedd/access_to_abac.py
- Timestamp:
- Dec 10, 2010 9:00:16 AM (13 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master
- Children:
- 913dc7a
- Parents:
- fbee30a
- git-author:
- Ted Faber <faber@…> (12/09/10 11:41:45)
- git-committer:
- Ted Faber <faber@…> (12/10/10 09:00:16)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/access_to_abac.py
rfbee30a r62f3dd9 12 12 from federation.fedid import fedid 13 13 from federation.authorizer import abac_authorizer 14 from federation.util import abac_split_cert, abac_pem_type 14 from federation.util import abac_split_cert, abac_pem_type, file_expanding_opts 15 15 16 16 … … 224 224 225 225 226 class access_opts( OptionParser):226 class access_opts(file_expanding_opts): 227 227 ''' 228 228 Parse the options for this program. Most are straightforward, but the … … 247 247 248 248 def __init__(self): 249 OptionParser.__init__(self, usage='%prog [opts] file [...]')249 file_expanding_opts.__init__(self, usage='%prog [opts] file [...]') 250 250 self.add_option('--cert', dest='cert', default=None, 251 type='str', action='callback', callback=self.expand_file, 251 252 help='my fedid as an X.509 certificate') 252 253 self.add_option('--key', dest='key', default=None, 254 type='str', action='callback', callback=self.expand_file, 253 255 help='key for the certificate') 254 256 self.add_option('--dir', dest='dir', default=None, 257 type='str', action='callback', callback=self.expand_file, 255 258 help='Output directory for credentials') 256 259 self.add_option('--type', action='callback', nargs=1, type='str', … … 263 266 default=False, 264 267 help='Do not print credential to local attribute map') 265 self.add_option('--create -creds', action='store_true',268 self.add_option('--create_creds', action='store_true', 266 269 dest='create_creds', default=False, 267 270 help='create credentials for rules. Requires ' + \ 268 271 '--cert, --key, and --dir to be given.') 269 272 self.add_option('--file', dest='file', default=None, 273 type='str', action='callback', callback=self.expand_file, 270 274 help='Access DB to parse. If this is present, ' + \ 271 275 'omit the positional filename') 272 276 self.add_option('--mapfile', dest='map', default=None, 277 type='str', action='callback', callback=self.expand_file, 273 278 help='File for the attribute to local authorization data') 274 279 self.add_option('--no-delegate', action='store_false', dest='delegate',
Note: See TracChangeset
for help on using the changeset viewer.