- Timestamp:
- Nov 10, 2010 4:40:54 PM (14 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master
- Children:
- 549830d
- Parents:
- b4778de
- Location:
- fedd/federation
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/emulab_access.py
rb4778de r814b5e5 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") 75 76 self.xmlrpc_cert = config.get("access", "xmlrpc_cert") 76 77 self.xmlrpc_certpw = config.get("access", "xmlrpc_certpw") -
fedd/federation/experiment_control.py
rb4778de r814b5e5 1834 1834 # Now get access to the dynamic testbeds (those added above) 1835 1835 for tb in [ t for t in topo if t not in allocated]: 1836 self.get_access(tb, None, tbparams, access_user, masters )1836 self.get_access(tb, None, tbparams, access_user, masters, tbmap) 1837 1837 allocated[tb] = 1 1838 1838 store_keys = topo[tb].get_attribute('store_keys') -
fedd/federation/experiment_partition.py
rb4778de r814b5e5 66 66 """ 67 67 seer_master = None 68 for m in masters.values():68 for k, m in masters.items(): 69 69 for s in m: 70 if s.name == ' SEER':71 seer_master = m70 if s.name == 'seer': 71 seer_master = k 72 72 break 73 73 if seer_master: break … … 284 284 285 285 seer_master = None 286 for m in masters.values():286 for k, m in masters.items(): 287 287 for s in m: 288 if s.name == ' SEER':289 seer_master = m288 if s.name == 'seer': 289 seer_master = k 290 290 break 291 291 if seer_master: break -
fedd/federation/protogeni_access.py
rb4778de r814b5e5 344 344 self.d[self.current_key] = { 345 345 'hostname': attrs.get('hostname', None), 346 'interfaces': { } 346 'interfaces': { }, 347 'mac': { } 347 348 } 348 349 elif name == 'interface' and self.current_key: … … 350 351 [attrs.get('virtual_id','')] = \ 351 352 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] = mac 352 360 # When a node is finished, clear current_key 353 361 def end_element(self, name): … … 652 660 653 661 ifconfig = "/sbin/ifconfig" 662 findif = '/usr/local/etc/emulab/findif' 654 663 stage_file = stage_file_type(user, self.staging_host, stagingdir) 655 664 pname = node.get('hostname', None) … … 666 675 if not i.get_attribute('portal')]: 667 676 pinf = node['interfaces'].get(i.name, None) 677 pmac = node['mac'].get(i.name, None) 668 678 addr = i.get_attribute('ip4_address') 669 679 netmask = i.get_attribute('ip4_netmask') or '255.255.255.0' 670 if pinf and addr: 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 671 685 print >>script, \ 672 "%s %s%s netmask %s" % \673 (ifconfig, pinf, addr, netmask)686 "%s `%s %s` %s netmask %s" % \ 687 (ifconfig, findif, pmac, addr, netmask) 674 688 else: 675 689 self.log.error("Missing interface or address for %s" \ … … 997 1011 certfile, certpw) 998 1012 999 if not ctxt: return False 1013 if not ctxt: return False, {} 1000 1014 1001 1015 self.set_up_staging_filespace(segment_commands, user, host, stagingdir) … … 1023 1037 user, host, "%s/%s" % (stagingdir, f)): 1024 1038 self.log.error("Scp failed") 1025 return False 1039 return False, {} 1026 1040 1027 1041 … … 1032 1046 self.log.error('Sliver failed to start on ProtoGENI') 1033 1047 self.delete_slice(segment_commands, slice_cred, slice_urn, ctxt) 1034 return False 1048 return False, {} 1035 1049 elif status == 'timeout': 1036 1050 self.log.error('Sliver failed to start on ProtoGENI (timeout)') 1037 1051 self.delete_slice(segment_commands, slice_cred, slice_urn, ctxt) 1038 return False 1052 return False, {} 1039 1053 else: 1040 1054 # All good: save ProtoGENI info in shared state … … 1397 1411 param = { 1398 1412 'credential': cred, 1399 'hrn': name, 1400 'type': 'Slice', 1401 } 1402 slice = segment_commands.slice_authority_call('Resolve', 1403 param, ctxt) 1404 uuid = slice.get('uuid', None) 1405 if uuid == None: 1406 sys.exit('No uuid for %s' % slicename) 1407 1408 print 'Calling GetCredential (uuid)' 1409 param = { 1410 'credential': cred, 1411 'uuid': uuid, 1413 'urn': slice_urn, 1412 1414 'type': 'Slice', 1413 1415 } … … 1419 1421 return None 1420 1422 try: 1421 print 'Calling RenewSlice (CM)'1422 1423 param = { 1423 1424 'credentials': [new_scred,], -
fedd/federation/remote_service.py
rb4778de r814b5e5 502 502 'desc': e.fault.string or "Something Weird" } 503 503 if ee: 504 raise service_error(ee['code'], ee['desc']) 504 raise service_error(ee.get('code', 'no code'), 505 ee.get('desc','no desc')) 505 506 else: 506 507 raise service_error(service_error.internal,
Note: See TracChangeset
for help on using the changeset viewer.