Changeset 934dd99 for fedd


Ignore:
Timestamp:
Apr 13, 2012 6:10:09 PM (8 years ago)
Author:
Ted Faber <faber@…>
Branches:
compt_changes, master
Children:
b035f90
Parents:
9c3e77f
Message:

Merge information from testbed objects into experiment descriptiuon

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/experiment_control.py

    r9c3e77f r934dd99  
    759759            self.node = { }
    760760            self.subs = { }
     761            self.tb = { }
    761762            self.proof = None
    762763
     
    773774                if isinstance(e, topdl.Computer):
    774775                    self.node[e.name] = e
     776                elif isinstance(e, topdl.Testbed):
     777                    self.tb[e.uri] = e
    775778            for s in top.substrates:
    776779                self.subs[s.name] = s
     
    978981                        if ne.os: merge_oses(ne, e)
    979982                        break
     983            elif isinstance(e,topdl.Testbed):
     984                for s in data:
     985                    ne = s.tb.get(e.uri, None)
     986                    if ne is not None:
     987                        add_new_names(ne.localname, e.localname)
     988                        add_new_names(ne.operation, e.operation)
     989                        merge_services(ne, e)
     990                        for a in ne.attribute:
     991                            e.set_attribute(a.attribute, a.value)
    980992        # Annotate substrates
    981993        for s in top.substrates:
Note: See TracChangeset for help on using the changeset viewer.