Changes between Version 6 and Version 7 of TopdlLibrary
- Timestamp:
- Oct 5, 2012 3:48:39 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TopdlLibrary
v6 v7 75 75 That is, inner class parameters can be specified using dicts directly, and a top level dict can user the standard ** operator. 76 76 77 All topdl class constructors take the member names as parameters, and should be called using named parameters, as above. The only exception to this is the [TopdlLibrary#Substrate ObjectSubstrate object]'s {{{interfaces}}} member.77 All topdl class constructors take the member names as parameters, and should be called using named parameters, as above. The only exception to this is the [TopdlLibrary#SubstrateClass Substrate object]'s {{{interfaces}}} member. 78 78 79 79 == Topdl Class Features == … … 82 82 83 83 {{{set_attribute(self, key, value)}}}:: 84 Attach an user-defined attribute with the given key and value to this object; value and key are strings. The method includes a key/value pair (encoded as an [TopdlLibrary#Attribute attribute object]) into the {{{attribute}}} member of the object. If an attribute with the given key exists, it is overwritten.84 Attach an user-defined attribute with the given key and value to this object; value and key are strings. The method includes a key/value pair (encoded as an [TopdlLibrary#AttributeClass attribute object]) into the {{{attribute}}} member of the object. If an attribute with the given key exists, it is overwritten. 85 85 This method accesses the attribute member of the given object, not any named members. Objects that do not have an {{{attribute}}} member silently discard the operation. 86 86 {{{get_attribute(self, key)}}}:: … … 106 106 A list of entities make up the network. These can be of any [TopdlLibrary#ComputerClass Computer objects], [TopdlLibrary#TestbedClass Testbed objects], [TopdlLibrary#SegmentClass Segment objects], or [TopdlLibrary#OtherClass Other objects]. The list may be empty indicating no elements are in the topology. 107 107 {{{attribute}}}::: 108 A list of [TopdlLibrary#Attribute ObjectAttribute objects] that are attached to the machine. The list may be empty.108 A list of [TopdlLibrary#AttributeClass Attribute objects] that are attached to the machine. The list may be empty. 109 109 {{{version}}}:: 110 110 The version of topdl that this object encodes. … … 118 118 }}} 119 119 120 That member sanity checks the substrates to make sure they are uniquely named, assigns names to any interfaces without them, and connects the {{{element}}} members of the [TopdlLibrary#Interface ObjectInterface objects]. If there are inconsistencies, it raises a {{{topdl.ConsistencyError}}} with more detail in the message.120 That member sanity checks the substrates to make sure they are uniquely named, assigns names to any interfaces without them, and connects the {{{element}}} members of the [TopdlLibrary#InterfaceClass Interface objects]. If there are inconsistencies, it raises a {{{topdl.ConsistencyError}}} with more detail in the message. 121 121 122 122 {{{incorporate_elements()}}} is called by the {{{Topology}}} constructor as well and that constructor may throw the same exceptions. … … 130 130 The unique name of the computer in the topology, a string. Other names may be assigned in the {{{localname}}} attribute. 131 131 {{{cpu}}}:: 132 A list of [TopdlLibrary#CPU ObjectCPU objects] that describe the CPUs of the machine. The list may be empty, meaning no CPU requirements or information are present.132 A list of [TopdlLibrary#CPUClass CPU objects] that describe the CPUs of the machine. The list may be empty, meaning no CPU requirements or information are present. 133 133 {{{software}}}:: 134 A list of [TopdlLibrary#Software ObjectSoftware objects] that describe the software to install. The list may be empty, meaning no software is to be installed.134 A list of [TopdlLibrary#SoftwareClass Software objects] that describe the software to install. The list may be empty, meaning no software is to be installed. 135 135 {{{storage}}}:: 136 A list of [TopdlLibrary#Storage ObjectStorage objects] that describe the storage present the machine. Storage objects can describe memory or persistent storage requirements. The list may be empty, meaning no storage requirements or information are present.136 A list of [TopdlLibrary#StorageClass Storage objects] that describe the storage present the machine. Storage objects can describe memory or persistent storage requirements. The list may be empty, meaning no storage requirements or information are present. 137 137 {{{interface}}}:: 138 A list of [TopdlLibrary#Interface ObjectInterface objects] that describe connections of the Computer to communications substrates. The list may be empty, meaning that the computer is not connected to any substrates.138 A list of [TopdlLibrary#InterfaceClass Interface objects] that describe connections of the Computer to communications substrates. The list may be empty, meaning that the computer is not connected to any substrates. 139 139 {{{attribute}}}:: 140 A list of [TopdlLibrary#Attribute ObjectAttribute objects] that are attached to the machine. The list may be empty.140 A list of [TopdlLibrary#AttributeClass Attribute objects] that are attached to the machine. The list may be empty. 141 141 {{{localname}}}:: 142 142 A list of strings giving alternative names for the object. When a machine is allocated to a testbed the DNS names assigned to the machine are given as {{{localname}}}s. The list may be empty, meaning no such alternatives exist. … … 150 150 * "failed" - an allocation of resources has failed - generally not applied to Computers 151 151 {{{service}}}:: 152 A list of [TopdlLibrary#Service ObjectService objects] that describe the services this machine uses or supplies. These are generally used by the federation system, and their definition is somewhat in flux. The list may be empty.152 A list of [TopdlLibrary#ServiceClass Service objects] that describe the services this machine uses or supplies. These are generally used by the federation system, and their definition is somewhat in flux. The list may be empty. 153 153 {{{operation}}}:: 154 154 A list of strings that describe the valid operations on the machine. These are generally used by the federation system, and their definition is somewhat in flux.The list may be empty. … … 158 158 A {{{Computer}}} should only be an element of one {{{Topology}}}. Use {{{clone()}}} to avoid this. 159 159 160 == Substrate Object==160 == Substrate Class == 161 161 162 162 The {{{Substrate}}} object represents a communication substrate. The elements that have interfaces connected to a substrate can communicate with one another. A {{{Substrate}}} may include default parameters for the latency and capacity of the communication channel. … … 167 167 A string, the unique name of the substrate. 168 168 {{{capacity}}:: 169 A [TopdlLibrary#Capacity Capacity object] that gives the default capacity of the substrate. It may be None, incdicating that there is no default.169 A [TopdlLibrary#CapacityClass Capacity object] that gives the default capacity of the substrate. It may be None, incdicating that there is no default. 170 170 {{{latency}}:: 171 A [TopdlLibrary#Latency Latency object] that gives the default latency of the substrate. It may be None, incdicating that there is no default.171 A [TopdlLibrary#LatencyClass Latency object] that gives the default latency of the substrate. It may be None, incdicating that there is no default. 172 172 {{{attribute}}}:: 173 A list of [TopdlLibrary#Attribute ObjectAttribute objects] that are attached to the substrate. The list may be empty.173 A list of [TopdlLibrary#AttributeClass Attribute objects] that are attached to the substrate. The list may be empty. 174 174 {{{localname}}}:: 175 175 A list of strings giving alternative names for the object. The list may be empty, meaning no such alternatives exist. … … 183 183 * "failed" - an allocation of resources has failed - generally not applied to Substrates 184 184 {{{service}}}:: 185 A list of [TopdlLibrary#Service ObjectService objects] that describe the services this substrate uses or supplies. These are generally used by the federation system, and their definition is somewhat in flux. The list may be empty.185 A list of [TopdlLibrary#ServiceClass Service objects] that describe the services this substrate uses or supplies. These are generally used by the federation system, and their definition is somewhat in flux. The list may be empty. 186 186 {{{operation}}}:: 187 187 A list of strings that describe the valid operations on the substrate. These are generally used by the federation system, and their definition is somewhat in flux.The list may be empty. 188 188 {{{interfaces}}}:: 189 A list of [TopdlLibrary#Interface Object Interface objects] connected to this substrate. The list may be empty, meaning that the substrate is not connected to any elements. This field is maintained by the [TopdlLibrary#TopologyObjectTopology object] holding this Substrate object. '''It is not a parameter to the constructor.'''189 A list of [TopdlLibrary#InterfaceClass Interface objects] connected to this substrate. The list may be empty, meaning that the substrate is not connected to any elements. This field is maintained by the [TopdlLibrary#TopologyClass Topology object] holding this Substrate object. '''It is not a parameter to the constructor.''' 190 190 191 191 Other than {{{interfaces}}}, the constructor takes the member names as parameters. Only the {{{name}}} is required.