Changeset 9e5e251 for fedd


Ignore:
Timestamp:
Mar 5, 2012 4:40:35 PM (8 years ago)
Author:
Ted Faber <faber@…>
Branches:
compt_changes, master
Children:
a3b31ed
Parents:
6527d60
Message:

Actually annotate substrates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/experiment_control.py

    r6527d60 r9e5e251  
    825825            self.response = None
    826826            self.node = { }
     827            self.subs = { }
    827828            self.proof = None
    828829
     
    839840                if isinstance(e, topdl.Computer):
    840841                    self.node[e.name] = e
     842            for s in top.substrates:
     843                self.subs[s.name] = s
    841844
    842845        def __call__(self, uri, aid, topo, masters, attrs=None, connInfo=None):
     
    10421045                        if ne.os: merge_oses(ne, e)
    10431046                        break
     1047        # Annotate substrates
     1048        for s in top.substrates:
     1049            for d in data:
     1050                ss = d.subs.get(s.name, None)
     1051                if ss is not None:
     1052                    if ss.capacity is not None:
     1053                        s.capacity = ss.capacity
     1054                    if s.latency is not None:
     1055                        s.latency = ss.latency
    10441056
    10451057
Note: See TracChangeset for help on using the changeset viewer.