- Timestamp:
- Nov 21, 2008 5:50:25 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:
- 0b123ff
- Parents:
- a94cb0a
- Location:
- fedd
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/fedd_access.py
ra94cb0a r5576a47 557 557 restricted = None 558 558 ap = None 559 560 # If this is a request to export a project and the access project 561 # is not the project to export, access denied. 562 if req.has_key('exportProject'): 563 ep = unpack_id(req['exportProject']) 564 if ep != found[0].name: 565 raise service_error(service_error.access, 566 "Cannot export %s" % ep) 559 567 560 568 # Check for access to restricted nodes -
fedd/fedd_client.py
ra94cb0a r5576a47 109 109 self.add_option("-f", "--file", dest="file", 110 110 help="experiment description file") 111 self.add_option("-p", "--project", action="store", dest="project", 112 type="string", 113 help="Project to export from master") 111 114 if add_key_callback: 112 115 self.add_option("-k", "--sshKey", action="callback", type="string", … … 493 496 parser.error("--trusted is required") 494 497 498 if not opts.project : 499 parser.error('--project is required') 500 495 501 if opts.debug > 0: opts.tracefile=sys.stderr 496 502 … … 531 537 'experimentdescription': { 'ns2description': exp_desc }, 532 538 'master': opts.master, 539 'exportProject': { 'localname': opts.project }, 533 540 'user' : [ {\ 534 541 'userID': pack_id(user), \ -
fedd/fedd_experiment_control.py
ra94cb0a r5576a47 781 781 else: return None 782 782 783 def get_access(self, tb, nodes, user, tbparam ):783 def get_access(self, tb, nodes, user, tbparam, master, export_project): 784 784 """ 785 785 Get access to testbed through fedd and set the parameters for that tb … … 811 811 'serviceAccess' : [ { 'sshPubkey' : self.ssh_pubkey } ] 812 812 } 813 813 814 if tb == master: 815 # NB, the export_project parameter is a dict that includes 816 # the type 817 req['exportProject'] = export_project 818 814 819 # node resources if any 815 820 if nodes != None and len(nodes) > 0: … … 1001 1006 self.get_access = get_access 1002 1007 1003 def __call__(self, line, user, tbparams ):1008 def __call__(self, line, user, tbparams, master, export_project): 1004 1009 # Testbed access parameters 1005 1010 if not self.in_allbeds: … … 1015 1020 nodes = line.split('|') 1016 1021 tb = nodes.pop(0) 1017 self.get_access(tb, nodes, user, tbparams) 1022 self.get_access(tb, nodes, user, tbparams, master, 1023 export_project) 1018 1024 return True 1019 1025 … … 1402 1408 1403 1409 master = req.get('master', None) 1404 if master == None:1410 if not master: 1405 1411 raise service_error(service_error.req, "No master testbed label") 1412 export_project = req.get('exportProject', None) 1413 if not export_project: 1414 raise service_error(service_error.req, "No export project") 1406 1415 1407 1416 if self.splitter_url: … … 1445 1454 if parse_current_testbed(line, master, allocated, tbparams): 1446 1455 continue 1447 elif parse_allbeds(line, user, tbparams ):1456 elif parse_allbeds(line, user, tbparams, master, export_project): 1448 1457 continue 1449 1458 elif parse_gateways(line, allocated, tbparams): -
fedd/fedd_types.xsd
ra94cb0a r5576a47 374 374 <xsd:element name="serviceAccess" type="tns:accessType" minOccurs="1" 375 375 maxOccurs="unbounded"/> 376 <xsd:element name="exportProject" type="tns:IDType" 377 minOccurs="0" maxOccurs="1"/> 376 378 <xsd:element name="allocID" type="tns:IDType"/> 377 379 <xsd:element name="when" type="xsd:dateTime" minOccurs="0" maxOccurs="1"/> … … 441 443 type="tns:experimentDescriptionType"/> 442 444 <xsd:element name="master" type="xsd:string"/> 445 <xsd:element name='exportProject' type="tns:IDType"/> 443 446 <xsd:element name="experimentID" type="tns:IDType" minOccurs="0" 444 447 maxOccurs="1"/>
Note: See TracChangeset
for help on using the changeset viewer.