Changes between Version 14 and Version 15 of FeddPluginCalls


Ignore:
Timestamp:
Jul 16, 2012 3:12:28 PM (12 years ago)
Author:
faber
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FeddPluginCalls

    v14 v15  
    138138That is done in all the existing plug-in code.  The various plug-ins walk, alter, and write topologies in several ways, and that code is a good guide to them.  The [source:fedd/federation/topdl.py topdl source] is also available.
    139139
    140 The connection information explains how the connectivity is established between the sub-experiments.  Now there are two ways to establish connections - ssh tunnels and direct transit connections.  The ssh connection implies a portal in this experiment (it will be in the topology description) that will connect to the peer.  Generally the port on which to communicate will be a parameter as it is here.  Parameters are set using the SetValue interface, which is demonstrated in most existing plug-ins.
     140The connection information explains how the connectivity is established between the sub-experiments.  Now there are two ways to establish connections - ssh tunnels and direct transit connections.  The ssh connection implies a portal in this experiment (it will be in the topology description) that will connect to the peer.  Generally the port on which to communicate will be a parameter as it is here.  Parameters are set using the !SetValue interface, which is demonstrated in most existing plug-ins.
     141
     142There are a few conventional parameters:
     143
     144 '''peer'''::
     145  The DNS name or IP address of the other side of the connection
     146 '''ssh_port'''::
     147  The port to contact ssh on the peer
     148 '''vlan_id'''::
     149  For federants that are connected to transit federants, e.g., dragon, this is the VLAN ID to use in the connection
     150
     151For most federants the {{{import_store_info}}} member of {{{federation/access.py}}} will import the necessary parameters correctly.  For those outputting values, the {{{export_store_info}}} member of {{{federation/emulab_access.py}}} is a good starting point.
    141152
    142153A plug-in should export its connection parameters as soon as it can determine them, and import connection parameters as late as it can in the experiment creation process.
     
    214225{{{allocID}}} identifies either the allocation to release or that has been released.
    215226
     227== Using !SetValue and !GetValue ==
     228
     229The experiment controller acts as an exchange point where access controllers can exchange information they need to interconnect.  Specifically the parameters in the connection structures of a !StartSegment request are exchanged through the experiment controller.
     230
     231A !SetValue request has the form:
     232
     233{{{
     234request = {
     235    'name': key_from_connection_parameter,
     236    'value': value_to_set,
     237}
     238}}}
     239
     240Values are strings and the name is a unique key (generated by the experiment controller) that identifies the variable.  Access is contolled for each variable.
     241
     242The response is
     243{{{
     244request = {
     245    'name': key_from_connection_parameter,
     246    'value': value_set,
     247    'proof': An_ABAC_proof_of_access
     248}
     249}}}
     250
     251!GetValue requests are similarly formatted:
     252
     253{{{
     254request = {
     255    'name': key_from_connection_parameter,
     256    # If wait is true, the call will block until some access controller has set the value
     257    'wait': boolean,
     258}
     259}}}
     260
     261and the response is
     262
     263{{{
     264response = {
     265    'name': key_from_connection_parameter,
     266    # This is optional.  If wait was not set in the request and the value is unset, this field will not be in the response
     267    'value': value,
     268    'proof': An_ABAC_proof_of_access
     269}
     270}}}
     271
     272Requesting !GetValue with the {{{wait}}} parameter set blocks the caller until the value is set.  Commonly, access controllers will set their output parameters using multiple SetValue calls and then wait for values from others using blocking !GetValue calls.
     273
    216274== Next ==
    217275