Changes between Version 8 and Version 9 of TopdlLibrary


Ignore:
Timestamp:
Oct 5, 2012 4:29:13 PM (7 years ago)
Author:
faber
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TopdlLibrary

    v8 v9  
    7575That is, inner class parameters can be specified using dicts directly, and a top level dict can user the standard ** operator.
    7676
    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.
     77All topdl class constructors take the member names as parameters, and should be called using named parameters, as above.  The only exceptions to this is the [TopdlLibrary#SubstrateClass Substrate object]'s {{{interfaces}}} member and the [TopdlLibrary#InterfaceClass Interface object]'s {{{subs}}} member.  An Interface's {{{element}}} member can be specified, but generally is not.
    7878
    7979== Topdl Class Features ==
     
    193193Because the enclosing {{{Topology}}} object maintains the {{{interfaces}}} member, it is dangerous to have the same {{{Substrate}}} object in more than one {{{Topology}}}.  Use the {{{clone()}}} method to avoid this.
    194194
     195== Interface Class ==
     196
     197This class defines the attachment of an entity, e.g., a [TopdlLibrary#ComputerClass Computer], to a [TopdlLibrary#SubstrateClass Substrate].  As with Substrates and entities, each Interface should be attached to only one entity and be unique across a [TopdlLibrary#Topology Topology].  An Interface has the following members:
     198
     199 {{{substrate}}}::
     200  A list of strings, each naming a substrate to which this interface is connected.  The list must have at least one entry.
     201 {{{capacity}}}::
     202  A [TopdlLibrary#CapacityObject Capacity object] indicating the communications capacity of the interface.  It may be None to use the substrate default.
     203 {{{latency}}}::
     204  A [TopdlLibrary#LatencyObject Latency object] indicating the communications delay of the interface.  It may be None to use the substrate default.
     205 {{{attribute}}}::
     206   A list of [TopdlLibrary#AttributeClass Attribute objects] that are attached to the interface.  The list may be empty.
     207 {{{element}}}::
     208   The entity to which this interface is attached.  It may be a [TopdlLibrary#ComputerClass Computer object], [TopdlLibrary#TestbedClass Testbed object], [TopdlLibrary#SegmentClass Segment object], or [TopdlLibrary#OtherClass Other object].  This is generally managed by the {{{Topology}}} holding the entity and substrate with which the {{{Interface}}} is attached.  It is wise to treat the field as read-only and valid only after a {{{Topology}}} has called {{{incorporate_elements()}}}.
     209 {{{subs}}}::
     210   A list of [TopdlLibrary#SubstrateClass Substrates] to which the interface is attached.  It '''cannot ''' be set through the constructor. This is generally managed by the {{{Topology}}} holding the entity and substrate with which the {{{Interface}}} is attached.  It is wise to treat the field as read-only and valid only after a {{{Topology}}} has called {{{incorporate_elements()}}}.
     211
     212The constructor takes all the member names '''except subs''' as parameters.  Most programs will not need to use {{{element}}} as a parameter to the constructor, either.
     213
     214== Attribute Class ==
     215
     216An attribute is a user-defined annotation of one of the other classes: a key/value pair.  An attribute has the following members:
     217
     218 {{{attribute}}}::
     219  A string, the key used to find the attribute.
     220 {{{value}}}::
     221  A string, the value
     222
     223While attributes can be manipulated directly liek any of the other topdl classes, it is most common to use the [Topdl#TopdlClassFeatures attribute manipulation functions] of the annotated class to access them.
     224
     225Should a program need to call the constructor, it takes the member names as named parameters.
     226
    195227== CPU Class ==
    196228
     
    200232  A string indicating the type of CPU.  These are not yet standardized, but common formats like "i686" or "amd64" are used.
    201233 {{{attribute}}}::
    202    A list of [TopdlLibrary#AttributeClass Attribute objects] that are attached to the substrate.  The list may be empty.
     234   A list of [TopdlLibrary#AttributeClass Attribute objects] that are attached to the CPU.  The list may be empty.
    203235
    204236The constructor takes the member names as named parameters.
     
    216248 {{{distributionversion}}}::
    217249  A string that for operating systems that characterize OS distribution independently of kernel or base system, names the version of the distribution in use, e.g., 12.04 for Ubuntu. This may be None, indicating no information or preference.
     250 {{{attribute}}}::
     251   A list of [TopdlLibrary#AttributeClass Attribute objects] that are attached to the operating system.  The list may be empty.
     252
    218253
    219254The constructor takes the member names as parameters.  Note that all the members may be None, but an empty {{{!OperatingSystem}}} object is not very useful.  The flexibility is there to allow specifying an operating system version without a distribution or a distribution without a base version.