Changeset c5869ef


Ignore:
Timestamp:
May 26, 2010 3:18:49 AM (14 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
Children:
cf00ddd
Parents:
fefa026
Message:

checkpoint and debugging

Location:
fedd/federation
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/emulab_access.py

    rfefa026 rc5869ef  
    17131713                    debug=self.create_debug, log=alloc_log)
    17141714            rv = starter(self, ename, proj, user, expfile, tmpdir)
     1715            rvtopo = topo.clone()
     1716
    17151717            # Copy the assigned names into the return topology
    1716             rvtopo = topo.clone()
    1717             for e in [ e for e in rvtopo.elements \
    1718                    if isinstance(e, topdl.Computer)]:
    1719                 for n in e.name:
    1720                     if n in starter.node:
    1721                         e.set_attribute('hostname', "%s%s" % \
    1722                                 (starter.node[n], self.domain))
     1718            embedding = [ ]
     1719            for n in starter.node:
     1720                embedding.append({
     1721                    'toponame': n,
     1722                    'physname': ["%s%s" %  (starter.node[n], self.domain)],
     1723                    })
     1724
     1725
    17231726        except service_error, e:
    17241727            err = e
     
    17521755                        'topdldescription': rvtopo.to_dict()
    17531756                        }
     1757                    'embedding': embedding
    17541758                    }
    17551759            retval = copy.copy(self.allocation[aid]['started'])
  • fedd/federation/experiment_control.py

    rfefa026 rc5869ef  
    10171017            self.node = { }
    10181018
     1019        #def make_map(self, resp):
     1020            #if 'segmentdescription' in resp and \
     1021                    #'topdldescription' in resp['segmentdescription']:
     1022                #top = topdl.Topology(\
     1023                        #**resp['segmentdescription']['topdldescription'])
     1024                #for e in [e for e in top.elements \
     1025                        #if isinstance(e, topdl.Computer)]:
     1026                    #hn = e.get_attribute('hostname')
     1027                    #if hn:
     1028                        #for n in e.name:
     1029                            #self.node[n] = hn
     1030
    10191031        def make_map(self, resp):
    1020             if 'segmentdescription' in resp and \
    1021                     'topdldescription' in resp['segmentdescription']:
    1022                 top = topdl.Topology(\
    1023                         **resp['segmentdescription']['topdldescription'])
    1024                 for e in [e for e in top.elements \
    1025                         if isinstance(e, topdl.Computer)]:
    1026                     hn = e.get_attribute('hostname')
    1027                     if hn:
    1028                         for n in e.name:
    1029                             self.node[n] = hn
     1032            for e in resp.get('embedding', []):
     1033                if 'toponame' in e and 'physname' in e:
     1034                    self.node[e['toponame']] = e['physname'][0]
    10301035
    10311036        def __call__(self, uri, aid, topo, masters, attrs=None, connInfo=None):
     
    12261231            for s in starters:
    12271232                node.update(s.node)
    1228             # Assigng the mapping as a hostname attribute
     1233            # Assign the mapping as a hostname attribute
    12291234            for e in [ e for e in top.elements \
    12301235                    if isinstance(e, topdl.Computer)]:
  • fedd/federation/protogeni_access.py

    rfefa026 rc5869ef  
    10991099            # Copy the assigned names into the return topology
    11001100            rvtopo = topo.clone()
    1101             for e in [ e for e in rvtopo.elements \
    1102                    if isinstance(e, topdl.Computer)]:
    1103                 for n in e.name:
    1104                     if n in starter.node:
    1105                         e.set_attribute('hostname', starter.node[n])
     1101            for e in rvtopo.elements:
     1102                if isinstance(e, topdl.Computer) and e.get_attribute('testbed'):
     1103                    myname = e.get_attribute('testbed')
     1104                    break
     1105            else: myname = None
     1106
     1107            embedding = [ ]
     1108            for n in starter.node:
     1109                embedding.append({
     1110                    'toponame': n,
     1111                    'physname': ["%s%s" %  (starter.node[n], self.domain)],
     1112                    })
     1113
    11061114        except service_error, e:
    11071115            err = e
     
    11341142                    'segmentdescription': {
    11351143                        'topdldescription': rvtopo.to_dict() }
     1144                    'embedding': embedding,
    11361145                    }
    11371146            self.write_state()
Note: See TracChangeset for help on using the changeset viewer.