Changes between Version 6 and Version 7 of TopdlLibrary


Ignore:
Timestamp:
Oct 5, 2012 3:48:39 PM (12 years ago)
Author:
faber
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TopdlLibrary

    v6 v7  
    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#SubstrateObject 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 exception to this is the [TopdlLibrary#SubstrateClass Substrate object]'s {{{interfaces}}} member.
    7878
    7979== Topdl Class Features ==
     
    8282
    8383 {{{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.
    8585   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.
    8686 {{{get_attribute(self, key)}}}::
     
    106106   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.
    107107 {{{attribute}}}:::
    108    A list of [TopdlLibrary#AttributeObject Attribute 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.
    109109 {{{version}}}::
    110110   The version of topdl that this object encodes. 
     
    118118}}}
    119119
    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#InterfaceObject Interface objects].  If there are inconsistencies, it raises a {{{topdl.ConsistencyError}}} with more detail in the message.
     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#InterfaceClass Interface objects].  If there are inconsistencies, it raises a {{{topdl.ConsistencyError}}} with more detail in the message.
    121121
    122122{{{incorporate_elements()}}} is called by the {{{Topology}}} constructor as well and that constructor may throw the same exceptions.
     
    130130   The unique name of the computer in the topology, a string.  Other names may be assigned in the {{{localname}}} attribute.
    131131 {{{cpu}}}::
    132    A list of [TopdlLibrary#CPUObject CPU 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.
    133133 {{{software}}}::
    134    A list of [TopdlLibrary#SoftwareObject Software 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.
    135135 {{{storage}}}::
    136     A list of [TopdlLibrary#StorageObject 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.
     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.
    137137 {{{interface}}}::
    138    A list of [TopdlLibrary#InterfaceObject 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.
     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.
    139139 {{{attribute}}}::
    140    A list of [TopdlLibrary#AttributeObject Attribute 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.
    141141 {{{localname}}}::
    142142   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.
     
    150150     * "failed" - an allocation of resources has failed - generally not applied to Computers
    151151 {{{service}}}::
    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.
     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.
    153153 {{{operation}}}::
    154154   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.
     
    158158A {{{Computer}}} should only be an element of one {{{Topology}}}.  Use {{{clone()}}} to avoid this.
    159159
    160 == Substrate Object ==
     160== Substrate Class ==
    161161
    162162The {{{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.
     
    167167   A string, the unique name of the substrate.
    168168 {{{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.
    170170 {{{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.
    172172 {{{attribute}}}::
    173    A list of [TopdlLibrary#AttributeObject Attribute 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.
    174174 {{{localname}}}::
    175175   A list of strings giving alternative names for the object.  The list may be empty, meaning no such alternatives exist.
     
    183183     * "failed" - an allocation of resources has failed - generally not applied to Substrates
    184184 {{{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.
     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.
    186186 {{{operation}}}::
    187187   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.
    188188 {{{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.'''
     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.'''
    190190
    191191Other than {{{interfaces}}}, the constructor takes the member names as parameters.  Only the {{{name}}} is required.