Changeset 5b19c3a for fedd


Ignore:
Timestamp:
Nov 11, 2010 8:59:19 AM (14 years ago)
Author:
Ted Faber <faber@…>
Branches:
version-3.01
Parents:
807b5ca
Message:

This rolls back the 3.01 branch to the original 3.01 state. I erroneously kept the changes between 3.01 and 3.02 in this branch. With the new branch created, this restores the 3.01 tag's correctness.

Location:
fedd/federation
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/emulab_access.py

    r807b5ca r5b19c3a  
    7373        self.ssh_port = config.get("access","ssh_port") or "22"
    7474        self.boss = config.get("access", "boss")
    75         self.ops = config.get("access", "ops")
    7675        self.xmlrpc_cert = config.get("access", "xmlrpc_cert")
    7776        self.xmlrpc_certpw = config.get("access", "xmlrpc_certpw")
  • fedd/federation/experiment_control.py

    r807b5ca r5b19c3a  
    18011801            # Now get access to the dynamic testbeds (those added above)
    18021802            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)
    18041804                allocated[tb] = 1
    18051805                store_keys = topo[tb].get_attribute('store_keys')
  • fedd/federation/experiment_partition.py

    r807b5ca r5b19c3a  
    6666        """
    6767        seer_master = None
    68         for k, m in masters.items():
     68        for m in masters.values():
    6969            for s in m:
    70                 if s.name == 'seer':
    71                     seer_master = k
     70                if s.name == 'SEER':
     71                    seer_master = m
    7272                    break
    7373            if seer_master: break
     
    284284
    285285        seer_master = None
    286         for k, m in masters.items():
     286        for m in masters.values():
    287287            for s in m:
    288                 if s.name == 'seer':
    289                     seer_master = k
     288                if s.name == 'SEER':
     289                    seer_master = m
    290290                    break
    291291            if seer_master: break
  • fedd/federation/protogeni_access.py

    r807b5ca r5b19c3a  
    344344                        self.d[self.current_key] = {
    345345                                'hostname': attrs.get('hostname', None),
    346                                 'interfaces': { },
    347                                 'mac': { }
     346                                'interfaces': { }
    348347                                }
    349348                elif name == 'interface' and self.current_key:
     
    351350                            [attrs.get('virtual_id','')] = \
    352351                            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
    360352            #  When a node is finished, clear current_key
    361353            def end_element(self, name):
     
    660652
    661653        ifconfig = "/sbin/ifconfig"
    662         findif = '/usr/local/etc/emulab/findif'
    663654        stage_file = stage_file_type(user, self.staging_host, stagingdir)
    664655        pname = node.get('hostname', None)
     
    675666                    if not i.get_attribute('portal')]:
    676667                pinf = node['interfaces'].get(i.name, None)
    677                 pmac = node['mac'].get(i.name, None)
    678668                addr = i.get_attribute('ip4_address')
    679669                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:
    685671                    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)
    688674                else:
    689675                    self.log.error("Missing interface or address for %s" \
     
    944930                    "ProtoGENI: %s %s" % (e.code, e))
    945931
    946         return (slice_urn, slice_cred, manifest, rspec)
     932        return (slice_urn, slice_cred, manifest)
    947933
    948934    def wait_for_slice(self, segment_commands, slice_cred, slice_urn, ctxt,
     
    1011997                certfile, certpw)
    1012998
    1013         if not ctxt: return False, {}
     999        if not ctxt: return False
    10141000
    10151001        self.set_up_staging_filespace(segment_commands, user, host, stagingdir)
    10161002        slicename = self.get_free_slicename(segment_commands, user, gcred, ctxt)
    10171003        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(
    10191005                segment_commands, slicename, rspec, gcred, ctxt)
    10201006
     
    10371023                                user, host, "%s/%s" % (stagingdir, f)):
    10381024                            self.log.error("Scp failed")
    1039                             return False, {}
     1025                            return False
    10401026
    10411027
     
    10461032            self.log.error('Sliver failed to start on ProtoGENI')
    10471033            self.delete_slice(segment_commands, slice_cred, slice_urn, ctxt)
    1048             return False, {}
     1034            return False
    10491035        elif status == 'timeout':
    10501036            self.log.error('Sliver failed to start on ProtoGENI (timeout)')
    10511037            self.delete_slice(segment_commands, slice_cred, slice_urn, ctxt)
    1052             return False, {}
     1038            return False
    10531039        else:
    10541040            # All good: save ProtoGENI info in shared state
     
    10581044            self.allocation[aid]['slice_credential'] = slice_cred
    10591045            self.allocation[aid]['manifest'] = manifest
    1060             self.allocation[aid]['rspec'] = rspec
    10611046            self.allocation[aid]['certfile'] = certfile
    10621047            self.allocation[aid]['certpw'] = certpw
     
    14111396            param = {
    14121397                    '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,
    14141411                    'type': 'Slice',
    14151412                    }
     
    14211418            return None
    14221419        try:
     1420            print 'Calling RenewSlice (CM)'
    14231421            param = {
    14241422                    'credentials': [new_scred,],
  • fedd/federation/remote_service.py

    r807b5ca r5b19c3a  
    502502                            'desc': e.fault.string or "Something Weird" }
    503503                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'])
    506505                else:
    507506                    raise service_error(service_error.internal,
Note: See TracChangeset for help on using the changeset viewer.