Changes between Version 5 and Version 6 of TopdlLibrary


Ignore:
Timestamp:
Oct 5, 2012 3:43:23 PM (7 years ago)
Author:
faber
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TopdlLibrary

    v5 v6  
    7373}}}
    7474
    75 That is, inner class parameters can be specified using dicts directly, and a top level dict can user the standard ** operator
     75That is, inner class parameters can be specified using dicts directly, and a top level dict can user the standard ** operator.
     76
     77All 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#SubstrateObject Substrate object]'s {{{interfaces}}} member.
    7678
    7779== Topdl Class Features ==
     
    100102
    101103 {{{substrates}}}::
    102    A list of [TopdlLibrary#SubstrateClass Substrate objects]
     104   A list of [TopdlLibrary#SubstrateClass Substrate objects] that contain the substrates of the topology.  The list may be empty indicating no communcations are possible.
     105 {{{elements}}}::
     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 {{{attribute}}}:::
     108   A list of [TopdlLibrary#AttributeObject Attribute objects] that are attached to the machine.  The list may be empty.
     109 {{{version}}}::
     110   The version of topdl that this object encodes. 
     111
     112As usual, the constructor takes the member names as parameter names.
     113
     114One useful specialized member is:
     115
     116{{{
     117incorporate_elements(self)
     118}}}
     119
     120That 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#InterfaceObject Interface objects].  If there are inconsistencies, it raises a {{{topdl.ConsistencyError}}} with more detail in the message.
     121
     122{{{incorporate_elements()}}} is called by the {{{Topology}}} constructor as well and that constructor may throw the same exceptions.
    103123
    104124== Computer Class ==
     
    122142   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.
    123143 {{{status}}}::
    124    A string indicating the current status of the Computer (if any).  Valid values are
     144   A string indicating the current status of the Computer (if any).  It may also be None, indicating no status is reported.  Valid values are
    125145     * "empty" - no allocation of resources has been attempted - generally not applied to Computers
    126146     * "active" - Computer is functioning as part of an experiment
     
    130150     * "failed" - an allocation of resources has failed - generally not applied to Computers
    131151 {{{service}}}::
    132    A list of [TopdlLibrary#ServiceObject Service objects] that describe the services this machine uses or supplies of the machine.  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#ServiceObject 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.
    133153 {{{operation}}}::
    134154   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.
     
    136156The constructor takes the member names as parameters.  Only {{{name}}} is required.
    137157
     158A {{{Computer}}} should only be an element of one {{{Topology}}}.  Use {{{clone()}}} to avoid this.
     159
     160== Substrate Object ==
     161
     162The {{{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.
     163
     164The members are:
     165
     166 {{{name}}}::
     167   A string, the unique name of the substrate.
     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.
     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.
     172 {{{attribute}}}::
     173   A list of [TopdlLibrary#AttributeObject Attribute objects] that are attached to the substrate.  The list may be empty.
     174 {{{localname}}}::
     175   A list of strings giving alternative names for the object.  The list may be empty, meaning no such alternatives exist.
     176 {{{status}}}::
     177   A string indicating the current status of the Computer (if any).  It may also be None, indicating no status is reported. Valid values are
     178     * "empty" - no allocation of resources has been attempted - generally not applied to Substrates
     179     * "active" - Substrate is functioning as part of an experiment
     180     * "inactive" - Substrate is allocated, but not functioning
     181     * "starting" - Substrate is transitioning from "inactive" to "active"
     182     * "terminating" - Substrate is transitioning from "active" to "inactive"
     183     * "failed" - an allocation of resources has failed - generally not applied to Substrates
     184 {{{service}}}::
     185   A list of [TopdlLibrary#ServiceObject 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 {{{operation}}}::
     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 {{{interfaces}}}::
     189   A list of [TopdlLibrary#InterfaceObject 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#TopologyObject Topology object] holding this Substrate object.  '''It is not a parameter to the constructor.'''
     190
     191Other than {{{interfaces}}}, the constructor takes the member names as parameters.  Only the {{{name}}} is required.
     192
     193Because 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.
    138194
    139195