Changeset f81aba7 for fedd


Ignore:
Timestamp:
Mar 4, 2010 3:17:27 PM (15 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
Children:
6280b1f
Parents:
632dd59
Message:

MOre ProtoGENI accomodations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/topdl.py

    r632dd59 rf81aba7  
    797797        slots = e.get_attribute("slots") or "1";
    798798        startup = e.get_attribute("startup")
    799         tarfiles = " ".join([ "%s %s" % (s.install, s.location) \
    800                 for s in e.software if s.location and s.install ])
     799        # XXX: unreliable on ProtoGENI 20100303
     800        #tarfiles = " ".join([ "%s %s" % (s.install, s.location) \
     801        #       for s in e.software if s.location and s.install ])
    801802
    802803        extras = ""
    803804        if startup: extras += '\t\tstartup_command="%s"\n' % startup
    804         if tarfiles: extras +='\t\ttarfiles="%s"\n' % tarfiles
     805        #if tarfiles: extras +='\t\ttarfiles="%s"\n' % tarfiles
    805806        out += '\t<node virtual_id="%s"\n\t\tvirtualization_type="%s"\n' % \
    806807                (name, virt_type)
     
    817818
    818819    for i, s in enumerate(t.substrates):
    819         out += '\t<link virtual_id="%s" link_type="ethernet">\n'
     820        if len(s.interfaces) == 0:
     821            continue
     822        out += '\t<link virtual_id="%s" link_type="ethernet">\n' % s.name
    820823        if s.capacity and s.capacity.kind == "max":
    821             out += '\t\t<bandwidth>%f</bandwidth>\n' % s.capacity.rate
     824            bwout = True
     825            out += '\t\t<bandwidth>%d</bandwidth>\n' % s.capacity.rate
     826        else:
     827            bwout = False
    822828        if s.latency and s.latency.kind == "max":
    823             out += '\t\t<latency>%f</latency>\n' % s.latency.time
     829            out += '\t\t<latency>%d</latency>\n' % s.latency.time
     830        elif bwout:
     831            out += '\t\t<latency>0</latency>\n'
    824832        for ii in s.interfaces:
    825833            out += ('\t\t<interface_ref virtual_node_id="%s" ' + \
Note: See TracChangeset for help on using the changeset viewer.