| 125 | |
| 126 | == Interfaces == |
| 127 | |
| 128 | This section discusses the encodeing of a view used for exchange and the interfaces to the Descartes interface that are relevant to manipulating topology views. |
| 129 | |
| 130 | The exact format of these interfaces - the XSD defining the exchange format and RPC calls - are still in a bit of flux. |
| 131 | |
| 132 | === View Exchange Format (topdl v2) === |
| 133 | |
| 134 | When passing views from researchers to the testbed or from the testbed to a reseacrher Descartes uses an XML format based on [http://fedd.deterlab.net/wiki/TopDl topdl]. This document defines version 2 of topdl that supports regions. There are a few other changes mentioned here. |
| 135 | |
| 136 | A topdl topology element consists of 4 sections |
| 137 | |
| 138 | * Substrates |
| 139 | * Elements |
| 140 | * Fragments |
| 141 | * Name maps |
| 142 | |
| 143 | The substrates and elements sections are exactly as defined in [http://fedd.deterlab.net/wiki/TopDl topdl v1], except that regions are allowed as elements. A region includes a name and the fragment name that it expands to. The fragment name is either the name of a fragment in the fragments section, or a name that can be used to request the fragment from the testbed. |
| 144 | |
| 145 | The fragments section contains fragment objects that are composed of elements and substrates. These may be referenced by region objects in the main topology or by region elements in fragements. |
| 146 | |
| 147 | The name maps are a set of mappings, keyed by the pathname of a region. Each includes |
| 148 | |
| 149 | * the region interface to fragment element mapping |
| 150 | * a fragment element or substrate name to global name mapping |
| 151 | * a description of the region |
| 152 | |
| 153 | XSD for this format is forthcoming. |
| 154 | |
| 155 | === Topology Calls to the Experiment API === |
| 156 | |
| 157 | Researchers interested inworking with experiment topologies can make the following calls on the Experiment API. |
| 158 | |
| 159 | * getViews(ExperimentName) |
| 160 | |
| 161 | ExperimentName is a string returned from viewExperiments. Returns a list of string pairs, the first being the name of a topology view and the second being a short description of the view. |
| 162 | |
| 163 | * getTopology(ExperimentName, ViewName) |
| 164 | |
| 165 | ExperimentName is a string from viewExperiments, and ViewName is a string from getViews. Returns a topdl v2 file containing the initial topology. |
| 166 | |
| 167 | * getFragment(ExperimentName, ViewName, FragmentName) |
| 168 | |
| 169 | ExperimentName is a string from viewExperiments, and ViewName is a string from getViews. Returns a topdl v2 file without elements or substrates, but with at least the requested fragment. It may also include other fragments and name maps. |
| 170 | |
| 171 | * addView(ExperimentName, ViewName, topdl) |
| 172 | |
| 173 | ExperimentName is the name of an existing experiment, from viewExperiments, and topdl is a new view of that experiment. If the testbed can determine that the view describes the same topology as the experiment currently has, the new view will be added with viewName as the name. If the topology does not match, or the testbed cannot determine that it does so, an error will be returned. Topdl is a the new view encoded in topdl. There will be a version of this that can retrieve the topdl from a URL as well. |
| 174 | |
| 175 | * removeView(ExperimentName, ViewName) |
| 176 | |
| 177 | ExperimentName is a string from viewExperiments, and ViewName is a string from getViews. Remove the given view from the experiment. Will fail if the view is the last one. |
| 178 | |