Changeset 66bb590 for fedd/federation/client_lib.py
- Timestamp:
- Dec 10, 2010 9:03:35 AM (13 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master
- Children:
- 52b6ebc
- Parents:
- 913dc7a (diff), 8d5394e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/client_lib.py
r8d5394e r66bb590 10 10 11 11 from fedid import fedid 12 from util import fedd_ssl_context 12 from util import fedd_ssl_context, file_expanding_opts 13 13 from remote_service import service_caller 14 14 from service_error import service_error … … 17 17 18 18 19 class client_opts( OptionParser):19 class client_opts(file_expanding_opts): 20 20 """ 21 21 Standatd set of options that all clients talking to fedd can probably use. 22 22 Client code usually specializes this. 23 23 """ 24 24 25 def __init__(self): 25 OptionParser.__init__(self, usage="%prog [opts] (--help for details)", 26 file_expanding_opts.__init__(self, 27 usage="%prog [opts] (--help for details)", 26 28 version="0.1") 27 29 28 self.add_option("--cert", action="store", dest="cert", 30 self.add_option("--cert", action="callback", dest="cert", 31 callback=self.expand_file, 29 32 type="string", help="my certificate file") 30 self.add_option("--abac", action="store", dest="abac_dir", 31 type="string", help="Directory with abac certs") 33 self.add_option("--abac", action="callback", dest="abac_dir", 34 callback=self.expand_file, 35 type="string", default=os.path.expanduser('~/.abac'), 36 help="Directory with abac certs") 37 self.add_option('--no_abac', action='store_const', const=None, 38 dest='abac_dir', help='Do not use abac authorization') 32 39 self.add_option( "--debug", action="count", dest="debug", 33 40 default=0, help="Set debug. Repeat for more information") … … 35 42 dest="serialize_only", default=False, 36 43 help="Print the SOAP request that would be sent and exit") 37 self.add_option("--trusted", action="store", dest="trusted", 44 self.add_option("--trusted", action="callback", dest="trusted", 45 callback=self.expand_file, 38 46 type="string", help="Trusted certificates (required)") 39 47 self.add_option("--url", action="store", dest="url", … … 98 106 ''' 99 107 rv = [ ] 100 if dir :108 if dir and os.path.isdir(dir): 101 109 for fn in ["%s/%s" % (dir, p) for p in os.listdir(dir) \ 102 110 if os.path.isfile("%s/%s" % (dir,p))]:
Note: See TracChangeset
for help on using the changeset viewer.