Changeset 1e7f268


Ignore:
Timestamp:
May 14, 2010 3:10:15 AM (15 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
Children:
822fd49
Parents:
22c88c9
Message:

Make computers single named

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/experiment_control.py

    r22c88c9 r1e7f268  
    13831383                            "%s" % ip_addr(int(netmask))))
    13841384
    1385                 hname = i.element.name[0]
     1385                hname = i.element.name
    13861386                if ifs.has_key(hname):
    13871387                    hosts.append("%s\t%s-%s %s-%d" % \
  • fedd/federation/experiment_partition.py

    r22c88c9 r1e7f268  
    333333                        'type': 'transit',
    334334                        'member': [ {
    335                             'element': i.element.name[0],
     335                            'element': i.element.name,
    336336                            'interface': i.name
    337337                            } for i in s.interfaces \
  • fedd/federation/topdl.py

    r22c88c9 r1e7f268  
    255255
    256256class Computer(base):
    257     def __init__(self, name=[], cpu=[], os=[], software=[], storage=[],
     257    def __init__(self, name=, cpu=[], os=[], software=[], storage=[],
    258258            interface=[], attribute=[]):
    259259        def assign_element(i):
    260260            i.element = self
    261261
    262         self.name = self.make_list(name)
     262        self.name = name
    263263        self.cpu = [ self.init_class(CPU, c)  for c in self.make_list(cpu) ]
    264264        self.os = [ self.init_class(OperatingSystem, c) \
     
    276276    def clone(self):
    277277        # Copy the list of names
    278         return Computer(name=[ n for n in self.name ],
     278        return Computer(name=self.name,
    279279                cpu=[x.clone() for x in self.cpu],
    280280                os=[x.clone() for x in self.os],
     
    642642                add = True
    643643            if gw and add:
    644                 s = "%s ${%s}\n" % (cmd, to_tcl_name(e.name[0]))
     644                s = "%s ${%s}\n" % (cmd, to_tcl_name(e.name))
    645645        return s
    646646    return rv
     
    652652            gw = e.get_attribute('portal')
    653653            if gw:
    654                 s = "tb-set-node-os ${%s} %s\n" % (to_tcl_name(e.name[0]), image)
     654                s = "tb-set-node-os ${%s} %s\n" % (to_tcl_name(e.name), image)
    655655        return s
    656656    return rv
     
    662662            gw = e.get_attribute('portal')
    663663            if gw:
    664                 s = "tb-set-hardware ${%s} %s\n" % (to_tcl_name(e.name[0]), type)
     664                s = "tb-set-hardware ${%s} %s\n" % (to_tcl_name(e.name), type)
    665665        return s
    666666    return rv
     
    678678        tarfiles = ""
    679679        if isinstance(e, Computer):
    680             name = to_tcl_name(e.name[0])
     680            name = to_tcl_name(e.name)
    681681            out += "set %s [$ns node]\n" % name
    682682            if e.os and len(e.os) == 1:
     
    792792
    793793    for e in [e for e in t.elements if isinstance(e, Computer)]:
    794         name = e.name[0]
     794        name = e.name
    795795        virt_type = e.get_attribute("virtualization_type") or "emulab-vnode"
    796796        exclusive = e.get_attribute("exclusive") or "1"
  • wsdl/topdl.xsd

    r22c88c9 r1e7f268  
    184184    </xsd:annotation>
    185185    <xsd:sequence>
    186       <xsd:element name="name" type="xsd:string" minOccurs="0"
    187         maxOccurs="unbounded"/>
     186      <xsd:element name="name" type="xsd:string"/>
    188187      <xsd:element name="cpu" type="tns:cpuType"
    189188        minOccurs="0" maxOccurs="unbounded"/>
Note: See TracChangeset for help on using the changeset viewer.