Changeset cdb62d9 for fedd/federation
- Timestamp:
- Jul 30, 2009 6:41:05 PM (15 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-2.00, version-3.01, version-3.02
- Children:
- df783c1
- Parents:
- eec716b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/topdl.py
reec716b rcdb62d9 128 128 def __init__(self, substrate, capacity=None, latency=None, attribute=[], 129 129 element=None): 130 if isinstance(substrate, basestring): 131 self.substrate = [ substrate ] 132 else: 133 self.substrate = substrate 130 self.substrate = self.make_list(substrate) 134 131 self.capacity = self.init_class(Capacity, capacity) 135 132 self.latency = self.init_class(Latency, latency) … … 150 147 151 148 class Computer(base): 152 def __init__(self, cpu=[], os=[], software=[], storage=[], interface=[],153 attribute=[]):149 def __init__(self, name=[], cpu=[], os=[], software=[], storage=[], 150 interface=[], attribute=[]): 154 151 def assign_element(i): 155 152 i.element = self 156 153 154 self.name = self.make_list(name) 157 155 self.cpu = [ self.init_class(CPU, c) for c in self.make_list(cpu) ] 158 156 self.os = [ self.init_class(OperatingSystem, c) \ … … 182 180 if self.attribute: 183 181 rv['attribute'] = [ i.to_dict() for i in self.attribute ] 184 return rv182 return { 'computer': rv } 185 183 186 184 class Other(base):
Note: See TracChangeset
for help on using the changeset viewer.