Changes between Version 2 and Version 3 of FeddPluginCalls


Ignore:
Timestamp:
Jun 29, 2010 6:23:54 AM (14 years ago)
Author:
faber
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FeddPluginCalls

    v2 v3  
    33Access controllers respond to a series of standard calls from the experiment controller to create local allocations. These are described in conceptual detail [FeddPluginArchitecture elsewhere on this site] and in a [http://groups.geni.net/geni/attachment/wiki/TIEDProtoGENIPlugin/TIED_CF_plugin_design_spec_v1.0.pdf document about the design of the ProtoGENI plug-in].  This section discussed the calls and their encoding for developers interested in reading and extending existing plug-in code.
    44
    5 The interfaces are all described in xsd and SOAP, and these are easy enough to convert into python data structures [SoapToPython once you know how].
     5The interfaces are all described in xsd and SOAP, and these are easy enough to convert into python data structures [SoapToPython once you know how].  Below we describe the semantics of each call, and the tools available to plug-in writers to assist in implementation.  These tools are available when plug-ins derive from [source:fedd/trunk/federation/access.py federation.access], as [source:fedd/trunk/federation/skeleton_access.py federation.skeleton_access] is.
     6
     7== Initialization ==
     8
     9This is not an interface from the experiment controller, but we discuss it to mention the tools available for implementors.  These include routines to save state and interpret the standard parts of the [FeddDatabases#AccessComponentAccessDB access database], including specializing for testbed dependent data.  The method {{{read_access(file, local_info_parser)}}} takes the file to read and a function that takes the string following the access attribute and returns the local testbed attributes, stored into the self.access dict, keyed by the [FeddAbout#GlobalIdentifiers:Three-levelNames three-name] being authorized.  The {{{___init___()}}} routine of source:fedd/trunk/federation/skeleton_access.py federation.skeleton_access] includes an example of this.
     10
     11In addition, the initializer of the [source:fedd/trunk/federation/access.py federation.access] base class parses standard parameters from {{{[access]}}} section from the configuration file.  The fields and corresponding class instance attributes are:
     12
     13 '''cert_file'''::
     14  The certificate file that contains the [FeddAbout#GlobalIdentifiers:Fedids fedid] that identifies this access controller.  It is stored in {{{self.cert_file}}}.
     15 '''cert_pw'''::
     16  Password for the certificate file, if any.  Stored in {{{self.cert_pw}}}.
     17 '''trusted_certs'''::
     18  Certificates used to validate the signatures of other fedd principals.  Generally unused.  Stored in {{{self.trusted_certs}}}.
     19
     20Those first three attributes are initialized by the {{{[access]}}} section, if given, or {{{[globals]}}}, if not.
     21 '''access_state'''::
     22  The file storing persistent state.  Stored in {{{self.state_file}}}.
     23 '''certdir'''::
     24  Directory to store local certificates for allocations in.  Stored in {{{self.certdir}}}.
     25 '''project_priority'''::
     26  Affects the standard access lookup routines by preferring matches on project if true.  Stored in {{{self.project_priority}}}, though most implementations will not need to access it.
     27 '''create_debug'''::
     28  Intended to keep the plug-in from making any persistent changes to the facility.  Plug-in writers are expected to honor it.  It is stored in {{{self.create_debug}}}.
     29 '''leave_tmpfiles'''::
     30  Intended to tell the plug-in not to delete temporary files.  Plug-in writers are expected to honor it.  Stored in {{{self.cleanup}}}, negated; that is if '''leave_tempfiles''' is false in the configuration {{{self.cleanup}}} is true.  {{{self.cleanup}}} defaults to true.
     31 '''type'''::
     32  Distinguishes between sub-types of the plug-in.  Stored in {{{self.access_type}}}; semantics are up to the plug-in writer.
     33 '''log_level'''::
     34  The level of log entries to pass to the logger.  Any of the values in [http://docs.python.org/library/logging.html the standard python logging choices] are acceptable.  It is only stored as internal state of {{{self.log}}}, a logger allocated by the initializer.
     35
     36Finally, the default initializer allocates a Lock to be acquired when accessing persistent state and reads that state from {{{self.state_file}}}.
     37