Changeset d69ce97
- Timestamp:
- Nov 12, 2010 8:44:51 AM (14 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master
- Children:
- 403a5ba
- Parents:
- 9ecda47
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/topdl.py
r9ecda47 rd69ce97 532 532 533 533 class Topology(base): 534 version = "1.0" 534 535 @staticmethod 535 536 def init_element(e): … … 554 555 return e 555 556 556 def __init__(self, substrates=[], elements=[], attribute=[]): 557 def __init__(self, substrates=[], elements=[], attribute=[], 558 version=None): 559 560 if version is None: self.version = Topology.version 561 else: self.version = version 562 557 563 self.substrates = [ self.init_class(Substrate, s) \ 558 564 for s in self.make_list(substrates) ] … … 619 625 return Topology(substrates=[s.clone() for s in self.substrates], 620 626 elements=[e.clone() for e in self.elements], 621 attribute=[a.clone() for a in self.attribute]) 627 attribute=[a.clone() for a in self.attribute], 628 version=self.version) 622 629 623 630 … … 628 635 def to_dict(self): 629 636 rv = { } 637 rv['version'] = self.version 630 638 if self.substrates: 631 639 rv['substrates'] = [ s.to_dict() for s in self.substrates ] … … 637 645 638 646 def to_xml(self): 639 rv = " "647 rv = "<version>%s</version>" % escape(self.version) 640 648 if self.substrates: 641 649 rv += join(["<substrates>%s</substrates>" % s.to_xml() \ -
wsdl/topdl.xsd
r9ecda47 rd69ce97 269 269 </xsd:annotation> 270 270 <xsd:sequence> 271 <xsd:element name="version" type="xsd:string"/> 271 272 <xsd:element name="substrates" type="tns:substrateType" 272 273 minOccurs="0" maxOccurs="unbounded" />
Note: See TracChangeset
for help on using the changeset viewer.