- Timestamp:
- Sep 21, 2010 3:12:16 PM (14 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master
- Children:
- 3bf0b3c
- Parents:
- 87807f42
- Location:
- fedd
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/fedd_create.py
r87807f42 r5d854e1 84 84 85 85 86 cert, fid = wrangle_standard_options(opts)86 cert, fid, url = wrangle_standard_options(opts) 87 87 88 88 if opts.file: … … 127 127 try: 128 128 resp_dict = do_rpc(msg, 129 opts.url, opts.transport, cert, opts.trusted,129 url, opts.transport, cert, opts.trusted, 130 130 serialize_only=opts.serialize_only, 131 131 tracefile=opts.tracefile, … … 166 166 try: 167 167 resp_dict = do_rpc(msg, 168 opts.url, opts.transport, cert, opts.trusted,168 url, opts.transport, cert, opts.trusted, 169 169 serialize_only=opts.serialize_only, 170 170 tracefile=opts.tracefile, -
fedd/fedd_ftopo.py
r87807f42 r5d854e1 19 19 (opts, args) = parser.parse_args() 20 20 try: 21 cert, fid = wrangle_standard_options(opts)21 cert, fid, url = wrangle_standard_options(opts) 22 22 except RuntimeError, e: 23 23 sys.exit("%s" % e) … … 36 36 try: 37 37 resp_dict = do_rpc(req, 38 opts.url, opts.transport, cert, opts.trusted,38 url, opts.transport, cert, opts.trusted, 39 39 serialize_only=opts.serialize_only, 40 40 tracefile=opts.tracefile, -
fedd/fedd_image.py
r87807f42 r5d854e1 181 181 raise RuntimeError("Bad response. %s" % e.message) 182 182 183 def get_experiment_topo(opts, cert ):183 def get_experiment_topo(opts, cert, url): 184 184 """ 185 185 Get the topology of an existing experiment from a running fedd. That is, … … 204 204 req = { 'experiment': exp_id } 205 205 resp_dict = do_rpc(req, 206 opts.url, opts.transport, cert, opts.trusted,206 url, opts.transport, cert, opts.trusted, 207 207 serialize_only=opts.serialize_only, 208 208 tracefile=opts.tracefile, … … 211 211 return extract_topo_from_message(resp_dict, opts.serialize_only) 212 212 213 def get_file_topo(opts, cert ):213 def get_file_topo(opts, cert, url): 214 214 """ 215 215 Parse a topology file or convert an ns2 file into a topdl.Topology. XML … … 238 238 if opts.debug > 1: print >>sys.stderr, msg 239 239 resp_dict = do_rpc(msg, 240 opts.url, opts.transport, cert, opts.trusted,240 url, opts.transport, cert, opts.trusted, 241 241 serialize_only=opts.serialize_only, 242 242 tracefile=opts.tracefile, … … 252 252 # not be a big deal. It's checked if needed below 253 253 try: 254 cert, fid = wrangle_standard_options(opts)254 cert, fid, url = wrangle_standard_options(opts) 255 255 except RuntimeError, e: 256 256 cert = None … … 285 285 sys.exit("Couldn't find an identity certificate, RPC (Info) needed.") 286 286 try: 287 top = get_experiment_topo(opts, cert )287 top = get_experiment_topo(opts, cert, url) 288 288 except RPCException, e: 289 289 exit_with_fault(e) … … 296 296 % opts.file 297 297 try: 298 top = get_file_topo(opts, cert )298 top = get_file_topo(opts, cert, url) 299 299 except RPCException, e: 300 300 print >>sys.stderr, "Cannot extract a topology from %s" % opts.file -
fedd/fedd_info.py
r87807f42 r5d854e1 22 22 parser = exp_data_opts() 23 23 (opts, args) = parser.parse_args() 24 cert, fid = wrangle_standard_options(opts)24 cert, fid, url = wrangle_standard_options(opts) 25 25 26 26 if opts.exp_name and opts.exp_certfile: … … 37 37 try: 38 38 resp_dict = do_rpc(req, 39 opts.url, opts.transport, cert, opts.trusted,39 url, opts.transport, cert, opts.trusted, 40 40 serialize_only=opts.serialize_only, 41 41 tracefile=opts.tracefile, -
fedd/fedd_multiinfo.py
r87807f42 r5d854e1 25 25 parser = exp_data_opts() 26 26 (opts, args) = parser.parse_args() 27 cert, fid = wrangle_standard_options(opts)27 cert, fid, url = wrangle_standard_options(opts) 28 28 29 29 try: 30 30 resp_dict = do_rpc({ }, 31 opts.url, opts.transport, cert, opts.trusted,31 url, opts.transport, cert, opts.trusted, 32 32 serialize_only=opts.serialize_only, 33 33 tracefile=opts.tracefile, -
fedd/fedd_multistatus.py
r87807f42 r5d854e1 9 9 parser = client_opts() 10 10 (opts, args) = parser.parse_args() 11 cert, fid = wrangle_standard_options(opts)11 cert, fid, url = wrangle_standard_options(opts) 12 12 13 13 try: 14 14 resp_dict = do_rpc({ }, 15 opts.url, opts.transport, cert, opts.trusted,15 url, opts.transport, cert, opts.trusted, 16 16 serialize_only=opts.serialize_only, 17 17 tracefile=opts.tracefile, -
fedd/fedd_new.py
r87807f42 r5d854e1 19 19 (opts, args) = parser.parse_args() 20 20 21 cert, fid = wrangle_standard_options(opts)21 cert, fid, url = wrangle_standard_options(opts) 22 22 23 23 out_certfile = opts.out_certfile … … 32 32 try: 33 33 resp_dict = do_rpc(msg, 34 opts.url, opts.transport, cert, opts.trusted,34 url, opts.transport, cert, opts.trusted, 35 35 serialize_only=opts.serialize_only, 36 36 tracefile=opts.tracefile, -
fedd/fedd_ns2topdl.py
r87807f42 r5d854e1 19 19 (opts, args) = parser.parse_args() 20 20 21 cert, fid = wrangle_standard_options(opts)21 cert, fid, url = wrangle_standard_options(opts) 22 22 23 23 if opts.file: … … 35 35 try: 36 36 resp_dict = do_rpc(msg, 37 opts.url, opts.transport, cert, opts.trusted,37 url, opts.transport, cert, opts.trusted, 38 38 serialize_only=opts.serialize_only, 39 39 tracefile=opts.tracefile, -
fedd/fedd_spewlog.py
r87807f42 r5d854e1 25 25 (opts, args) = parser.parse_args() 26 26 27 cert, fid = wrangle_standard_options(opts)27 cert, fid, url = wrangle_standard_options(opts) 28 28 29 29 if opts.exp_name and opts.exp_certfile: … … 53 53 try: 54 54 resp_dict = do_rpc(req, 55 opts.url, opts.transport, cert, opts.trusted,55 url, opts.transport, cert, opts.trusted, 56 56 serialize_only=opts.serialize_only, 57 57 tracefile=opts.tracefile, -
fedd/fedd_terminate.py
r87807f42 r5d854e1 27 27 parser = terminate_opts() 28 28 (opts, args) = parser.parse_args() 29 cert, fid = wrangle_standard_options(opts)29 cert, fid, url = wrangle_standard_options(opts) 30 30 31 31 if opts.exp_name and opts.exp_certfile: … … 54 54 try: 55 55 resp_dict = do_rpc(req, 56 opts.url, opts.transport, cert, opts.trusted,56 url, opts.transport, cert, opts.trusted, 57 57 serialize_only=opts.serialize_only, 58 58 tracefile=opts.tracefile, -
fedd/federation/client_lib.py
r87807f42 r5d854e1 33 33 type="string", help="Trusted certificates (required)") 34 34 self.add_option("--url", action="store", dest="url", 35 type="string",default="https://localhost:23235", 36 help="URL to connect to (default %default)") 35 type="string",default=None, help="URL to connect to") 37 36 self.add_option("--transport", action="store", type="choice", 38 37 choices=("xmlrpc", "soap"), default="soap", … … 90 89 and if the debug level is set, set the tracefile attribute as well. If any 91 90 of these tests fail, raise a RuntimeError. Otherwise return the 92 certificate file and the dedid. 93 """ 91 certificate file, the fedid, and the fedd url. 92 """ 93 default_url="https://localhost:23235" 94 94 95 if opts.debug > 0: opts.tracefile=sys.stderr 95 96 … … 110 111 raise RuntimeError("Cannot read certificate (%s)" % cert) 111 112 112 return (cert, fid) 113 if opts.url: url = opts.url 114 elif 'FEDD_URL' in os.environ: url = os.environ['FEDD_URL'] 115 else: url = default_url 116 117 118 return (cert, fid, url) 113 119 114 120 def save_certfile(out_certfile, ea):
Note: See TracChangeset
for help on using the changeset viewer.