Changeset 1b376ca for fedd/federation/access.py
- Timestamp:
- Dec 3, 2008 10:12:13 PM (15 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-1.30, version-2.00, version-3.01, version-3.02
- Children:
- c8853fd
- Parents:
- dceeef9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/access.py
rdceeef9 r1b376ca 541 541 """ 542 542 543 def gateway_hardware(h): 544 if h == 'GWTYPE': return self.attrs.get('connectorType', 'GWTYPE') 545 else: return h 546 543 547 # The dance to get into the request body 544 548 if req.has_key('RequestAccessRequestBody'): … … 567 571 if req.has_key('resources') and req['resources'].has_key('node'): 568 572 resources = req['resources'] 569 restricted = [ tfor n in resources['node'] \573 restricted = [ gateway_hardware(t) for n in resources['node'] \ 570 574 if n.has_key('hardware') \ 571 575 for t in n['hardware'] \ 572 if t in self.restricted ] 576 if gateway_hardware(t) \ 577 in self.restricted ] 573 578 inaccessible = [ t for t in restricted \ 574 579 if t not in found[0].node_types] … … 611 616 if restricted != None and len(restricted) > 0: 612 617 preq['AllocateProjectRequestBody']['resources'] = \ 613 [ {'node': { 'hardware' : [ h ] }} \614 for h in restricted ] 618 {'node': [ { 'hardware' : [ h ] } \ 619 for h in restricted ] } 615 620 ap = self.allocate_project.dynamic_project(preq) 616 621 else: … … 636 641 if restricted != None and len(restricted) > 0: 637 642 preq['StaticProjectRequestBody']['resources'] = \ 638 [ {'node': { 'hardware' : [ h ] }} \639 for h in restricted ] 643 {'node': [ { 'hardware' : [ h ] } \ 644 for h in restricted ] } 640 645 ap = self.allocate_project.static_project(preq) 641 646 else:
Note: See TracChangeset
for help on using the changeset viewer.