- Timestamp:
- Nov 11, 2010 8:59:19 AM (14 years ago)
- Branches:
- version-3.01
- Parents:
- 807b5ca
- Location:
- fedd/federation
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/emulab_access.py
r807b5ca r5b19c3a 73 73 self.ssh_port = config.get("access","ssh_port") or "22" 74 74 self.boss = config.get("access", "boss") 75 self.ops = config.get("access", "ops")76 75 self.xmlrpc_cert = config.get("access", "xmlrpc_cert") 77 76 self.xmlrpc_certpw = config.get("access", "xmlrpc_certpw") -
fedd/federation/experiment_control.py
r807b5ca r5b19c3a 1801 1801 # Now get access to the dynamic testbeds (those added above) 1802 1802 for tb in [ t for t in topo if t not in allocated]: 1803 self.get_access(tb, None, tbparams, access_user, masters , tbmap)1803 self.get_access(tb, None, tbparams, access_user, masters) 1804 1804 allocated[tb] = 1 1805 1805 store_keys = topo[tb].get_attribute('store_keys') -
fedd/federation/experiment_partition.py
r807b5ca r5b19c3a 66 66 """ 67 67 seer_master = None 68 for k, m in masters.items():68 for m in masters.values(): 69 69 for s in m: 70 if s.name == ' seer':71 seer_master = k70 if s.name == 'SEER': 71 seer_master = m 72 72 break 73 73 if seer_master: break … … 284 284 285 285 seer_master = None 286 for k, m in masters.items():286 for m in masters.values(): 287 287 for s in m: 288 if s.name == ' seer':289 seer_master = k288 if s.name == 'SEER': 289 seer_master = m 290 290 break 291 291 if seer_master: break -
fedd/federation/protogeni_access.py
r807b5ca r5b19c3a 344 344 self.d[self.current_key] = { 345 345 'hostname': attrs.get('hostname', None), 346 'interfaces': { }, 347 'mac': { } 346 'interfaces': { } 348 347 } 349 348 elif name == 'interface' and self.current_key: … … 351 350 [attrs.get('virtual_id','')] = \ 352 351 attrs.get('component_id', None) 353 elif name == 'interface_ref':354 # Collect mac address information from an interface_ref.355 # These appear after the node info has been parsed.356 nid = attrs.get('virtual_node_id', None)357 ifid = attrs.get('virtual_interface_id', None)358 mac = attrs.get('MAC', None)359 self.d[nid]['mac'][ifid] = mac360 352 # When a node is finished, clear current_key 361 353 def end_element(self, name): … … 660 652 661 653 ifconfig = "/sbin/ifconfig" 662 findif = '/usr/local/etc/emulab/findif'663 654 stage_file = stage_file_type(user, self.staging_host, stagingdir) 664 655 pname = node.get('hostname', None) … … 675 666 if not i.get_attribute('portal')]: 676 667 pinf = node['interfaces'].get(i.name, None) 677 pmac = node['mac'].get(i.name, None)678 668 addr = i.get_attribute('ip4_address') 679 669 netmask = i.get_attribute('ip4_netmask') or '255.255.255.0' 680 # The interface names in manifests are not to be trusted, so we 681 # find the interface to configure using the local node's script 682 # to match mac address to interface name. 683 if pinf and addr and pmac: 684 print >>script, '# %s' % pinf 670 if pinf and addr: 685 671 print >>script, \ 686 "%s `%s %s`%s netmask %s" % \687 (ifconfig, findif, pmac, addr, netmask)672 "%s %s %s netmask %s" % \ 673 (ifconfig, pinf, addr, netmask) 688 674 else: 689 675 self.log.error("Missing interface or address for %s" \ … … 944 930 "ProtoGENI: %s %s" % (e.code, e)) 945 931 946 return (slice_urn, slice_cred, manifest , rspec)932 return (slice_urn, slice_cred, manifest) 947 933 948 934 def wait_for_slice(self, segment_commands, slice_cred, slice_urn, ctxt, … … 1011 997 certfile, certpw) 1012 998 1013 if not ctxt: return False , {}999 if not ctxt: return False 1014 1000 1015 1001 self.set_up_staging_filespace(segment_commands, user, host, stagingdir) 1016 1002 slicename = self.get_free_slicename(segment_commands, user, gcred, ctxt) 1017 1003 self.log.info("Creating %s" % slicename) 1018 slice_urn, slice_cred, manifest , rpsec= self.allocate_slice(1004 slice_urn, slice_cred, manifest = self.allocate_slice( 1019 1005 segment_commands, slicename, rspec, gcred, ctxt) 1020 1006 … … 1037 1023 user, host, "%s/%s" % (stagingdir, f)): 1038 1024 self.log.error("Scp failed") 1039 return False , {}1025 return False 1040 1026 1041 1027 … … 1046 1032 self.log.error('Sliver failed to start on ProtoGENI') 1047 1033 self.delete_slice(segment_commands, slice_cred, slice_urn, ctxt) 1048 return False , {}1034 return False 1049 1035 elif status == 'timeout': 1050 1036 self.log.error('Sliver failed to start on ProtoGENI (timeout)') 1051 1037 self.delete_slice(segment_commands, slice_cred, slice_urn, ctxt) 1052 return False , {}1038 return False 1053 1039 else: 1054 1040 # All good: save ProtoGENI info in shared state … … 1058 1044 self.allocation[aid]['slice_credential'] = slice_cred 1059 1045 self.allocation[aid]['manifest'] = manifest 1060 self.allocation[aid]['rspec'] = rspec1061 1046 self.allocation[aid]['certfile'] = certfile 1062 1047 self.allocation[aid]['certpw'] = certpw … … 1411 1396 param = { 1412 1397 'credential': cred, 1413 'urn': slice_urn, 1398 'hrn': name, 1399 'type': 'Slice', 1400 } 1401 slice = segment_commands.slice_authority_call('Resolve', 1402 param, ctxt) 1403 uuid = slice.get('uuid', None) 1404 if uuid == None: 1405 sys.exit('No uuid for %s' % slicename) 1406 1407 print 'Calling GetCredential (uuid)' 1408 param = { 1409 'credential': cred, 1410 'uuid': uuid, 1414 1411 'type': 'Slice', 1415 1412 } … … 1421 1418 return None 1422 1419 try: 1420 print 'Calling RenewSlice (CM)' 1423 1421 param = { 1424 1422 'credentials': [new_scred,], -
fedd/federation/remote_service.py
r807b5ca r5b19c3a 502 502 'desc': e.fault.string or "Something Weird" } 503 503 if ee: 504 raise service_error(ee.get('code', 'no code'), 505 ee.get('desc','no desc')) 504 raise service_error(ee['code'], ee['desc']) 506 505 else: 507 506 raise service_error(service_error.internal,
Note: See TracChangeset
for help on using the changeset viewer.