Changeset 1e7f268 for fedd/federation
- Timestamp:
- May 14, 2010 3:10:15 AM (15 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
- Children:
- 822fd49
- Parents:
- 22c88c9
- Location:
- fedd/federation
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/experiment_control.py
r22c88c9 r1e7f268 1383 1383 "%s" % ip_addr(int(netmask)))) 1384 1384 1385 hname = i.element.name [0]1385 hname = i.element.name 1386 1386 if ifs.has_key(hname): 1387 1387 hosts.append("%s\t%s-%s %s-%d" % \ -
fedd/federation/experiment_partition.py
r22c88c9 r1e7f268 333 333 'type': 'transit', 334 334 'member': [ { 335 'element': i.element.name [0],335 'element': i.element.name, 336 336 'interface': i.name 337 337 } for i in s.interfaces \ -
fedd/federation/topdl.py
r22c88c9 r1e7f268 255 255 256 256 class Computer(base): 257 def __init__(self, name= [], cpu=[], os=[], software=[], storage=[],257 def __init__(self, name=, cpu=[], os=[], software=[], storage=[], 258 258 interface=[], attribute=[]): 259 259 def assign_element(i): 260 260 i.element = self 261 261 262 self.name = self.make_list(name)262 self.name = name 263 263 self.cpu = [ self.init_class(CPU, c) for c in self.make_list(cpu) ] 264 264 self.os = [ self.init_class(OperatingSystem, c) \ … … 276 276 def clone(self): 277 277 # Copy the list of names 278 return Computer(name= [ n for n in self.name ],278 return Computer(name=self.name, 279 279 cpu=[x.clone() for x in self.cpu], 280 280 os=[x.clone() for x in self.os], … … 642 642 add = True 643 643 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)) 645 645 return s 646 646 return rv … … 652 652 gw = e.get_attribute('portal') 653 653 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) 655 655 return s 656 656 return rv … … 662 662 gw = e.get_attribute('portal') 663 663 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) 665 665 return s 666 666 return rv … … 678 678 tarfiles = "" 679 679 if isinstance(e, Computer): 680 name = to_tcl_name(e.name [0])680 name = to_tcl_name(e.name) 681 681 out += "set %s [$ns node]\n" % name 682 682 if e.os and len(e.os) == 1: … … 792 792 793 793 for e in [e for e in t.elements if isinstance(e, Computer)]: 794 name = e.name [0]794 name = e.name 795 795 virt_type = e.get_attribute("virtualization_type") or "emulab-vnode" 796 796 exclusive = e.get_attribute("exclusive") or "1"
Note: See TracChangeset
for help on using the changeset viewer.