Changeset cdb62d9


Ignore:
Timestamp:
Jul 30, 2009 6:41:05 PM (15 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-2.00, version-3.01, version-3.02
Children:
df783c1
Parents:
eec716b
Message:

add computer name & rate info, small tweaks

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/topdl.py

    reec716b rcdb62d9  
    128128    def __init__(self, substrate, capacity=None, latency=None, attribute=[],
    129129            element=None):
    130         if isinstance(substrate, basestring):
    131             self.substrate = [ substrate ]
    132         else:
    133             self.substrate = substrate
     130        self.substrate = self.make_list(substrate)
    134131        self.capacity = self.init_class(Capacity, capacity)
    135132        self.latency = self.init_class(Latency, latency)
     
    150147
    151148class 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=[]):
    154151        def assign_element(i):
    155152            i.element = self
    156153
     154        self.name = self.make_list(name)
    157155        self.cpu = [ self.init_class(CPU, c)  for c in self.make_list(cpu) ]
    158156        self.os = [ self.init_class(OperatingSystem, c) \
     
    182180        if self.attribute:
    183181            rv['attribute'] = [ i.to_dict() for i in self.attribute ]
    184         return rv
     182        return { 'computer': rv }
    185183
    186184class Other(base):
  • wsdl/topdl.xsd

    reec716b rcdb62d9  
    3636        A strawman network capacity description for access negotiation.
    3737        This will come to include more and more interesting parameters.
     38        Rate in kb/s.
    3839      </xsd:documentation>
    3940    </xsd:annotation>
     
    178179    </xsd:annotation>
    179180    <xsd:sequence>
     181      <xsd:element name="name" type="xsd:string" minOccurs="0"
     182        maxOccurs="unbounded"/>
    180183      <xsd:element name="cpu" type="tns:cpuType"
    181184        minOccurs="0" maxOccurs="unbounded"/>
Note: See TracChangeset for help on using the changeset viewer.