wiki:AaronHelsinger/GAPI_AM_API_DRAFT/MethodSignatures

Version 11 (modified by Aaron Helsinger, 12 years ago) (diff)

--

GENI Aggregate Manager API Draft Revisions Method Signatures Summary

This page documents the DRAFT GENI Aggregate Manager API full method signatures, if all proposed revisions are adopted. This includes proposals that have already been adopted, and others still under discussion.

The current officially adopted version of the API is 2 and is documented on the main API page.

The current adopted or proposed changes for the AM API, whose impacts are reflected here, are documented on the AM API Draft wiki page.

For a summary of the Aggregate Manager API, typical workflow, common concepts, arguments, and returns, see this sub page.

If the generally agreed-upon change sets listed here are adopted, the final method signatures will be as follows:

GetVersion

Query static configuration information about this aggregate manager implementation, such as API and RSpec versions supported.

struct GetVersion([optional: struct options])

The options argument may be omitted entirely by clients.

Return struct:

      {
        int geni_api;
        struct geni_api_versions {
             URL <this API version #>; # value is a URL, name is a number
             [optional: other supported API versions and the URLs where they run]
        }
        array geni_request_rspec_versions of {
             string type;
             string version;
             string schema;
             string namespace;
             array extensions of string;
        };
        array geni_ad_rspec_versions of {
             string type;
             string version;
             string schema;
             string namespace;
             array extensions of string;
        };
        array geni_credential_types of {
             string geni_type <case insensitive>;
             string geni_version <containing an integer>;
       };
    }

ListResources

Retrieve RSpecs listing resources at this aggregate, an Advertisement RSpec of available resources.

struct ListResources(struct credentials[], struct options)

Where options include:

{
  boolean geni_available <optional>;
  boolean geni_compressed <optional>;
  struct geni_rspec_version {
    string type;
    string version;
  };
}

Note that all options may be omitted by the client, exception geni_rspec_version which is required. The aggregate must honor all supplied options.

credentials is the standard argument defined above.

Return: A geni.rspec advertisment RSpec.

Describe

AKA ListResources when supplied a slice URN.

Retrieve a manifest describing the resources contained by the entities named, e.g. a single slice or a set of the slivers in a slice.

struct Describe(string urns[], struct credentials[], struct options[])

Where options include:

{
  boolean geni_compressed <optional>;
  struct geni_rspec_version {
    string type;
    string version;
  };
}

Note that all options may be omitted by the client, exception geni_rspec_version which is required. The aggregate must honor all supplied options.

credentials is the standard argument defined elsewhere.

Note that the manifest RSpec for allocated slivers may contain less detail than for provisioned slivers.

Return struct:

{
   geni_rspec: <geni.rspec, Manifest - may be empty though)>
   geni_urn: <string slice urn, as requested>
   geni_slivers: [
               {
                  geni_sliver_urn: <string sliver urn>
                  geni_expires: <dateTime.rfc3339 allocation expiration string, as in geni_expires from SliversStatus>,
                  geni_allocation_status: <string sliver state - allocated or ?? >,
                  geni_operational_status: <string sliver operational state>
               },
               ...
         ]
}

Aggregates are expected to combine the manifests of all requested slivers into a single manifest RSpec. Note that a manifest returned here for only some of the slivers in a slice at this aggregate, may contain references to resources not described in this manifest (they are in other slivers). As a result, such manifests may not be directly usable as a subsequent request.

Allocate

AKA CreateSlivers() Request resources described by the given request RSpec to be allocated to the given slice. On success, one or more slivers are allocated, containing resources satisfying the request, and assigned to the given slice. The manifest RSpec describing those resources is returned.

struct Allocate(string slice_urn,
                    struct credentials[],
                    geni.rspec rspec,
                    struct options)

credentials is the standard argument defined above.

Options include:

{
  [optional geni_end_time: <dateTime.rfc3339>]
}

Return struct:

{
 geni_rspec: <geni.rspec manifest>,
 geni_slivers: [
        {
                  geni_sliver_urn: <string sliver urn>
                  geni_expires: <dateTime.rfc3339 allocation expiration string, as in geni_expires from SliversStatus>,
                  geni_allocation_status: <string sliver state - allocated or ?? >
        },
        ...
    ]
}

The manifest is a manifest of only newly allocated slivers.

Renew

AKA RenewSliver() or RenewAllocated Request that the named slivers be renewed, with their expiration extended. If possible, the aggregate should extend the slivers to the requested expiration time, or to a sooner time if policy limits apply. This method applies to slivers that are geni_allocated or to slivers that are geni_provisioned, though different policies may apply to slivers in the different states, resulting in much shorter max expiration times for geni_allocated slivers.

struct Renew(string urns[],
                    struct credentials[],
                    dateTime.rfc3339 expiration_time, 
                    struct options)

credentials is the standard argument defined above.

Options include geni_best_effort

Return list of structs:

[
  {
   geni_sliver_urn: <string>,
   geni_allocation_status: <string>,
   geni_operational_status: <string>,
   geni_expires: <dateTime.rfc3339 when the sliver expires from its current state>,
  },
  ...
]

UpdateAllocations

AKA UpdateAllocated() This method modifies a set of allocated slivers in place. The existing reservations are not lost if the newly requested allocations cannot be satisfied by the aggregate.

Details are suppressed pending agreement on this method.

Provision

AKA ProvisionSlivers() Request that the named geni_allocated slivers be made geni_provisioned, instantiating or otherwise realizing the resources, such that they have a valid geni_operational_status and may possibly be made geni_ready for experimenter use.

struct Provision(string urns[], struct credentials[],  
                                   struct options)

credentials is the standard argument defined above.

Options include:

  • geni_best_effort
  • geni_end_time
  • struct geni_users[]

Return struct:

  geni_rspec: <geni.rspec, RSpec manifest>,
  geni_slivers: 
  [
    {
     geni_sliver_urn: <string>,
     geni_allocation_status: <string>,
     geni_operational_status: <string>,
     geni_expires <dateTime.rfc3339 when the sliver expires from its current state>,
    },
    ...
  ],

FIXME: Is the returned manifest only for newly provisioned slivers? Or all slivers at this AM for this slice?

UpdateSlivers

AKA Update() This method requests a modification to 1 or more provisioned slivers. The slivers end up in a new geni_allocated+geni_provisioned state.

Details are suppressed pending agreement on this method.

Status

AKA SliverStatus Retrieve status information about the named slivers. This should be relatively dynamic data, not descriptive data as returned in the manifest RSpec.

struct Status(string urns[], struct credentials[], struct options)

credentials is the standard argument defined above.

Return:

{
  geni_urn: <slice URN>
  geni_slivers: [ 
                    { geni_sliver_urn: <sliver URN>
                      geni_allocation_status: <string, eg provisioned>
                      geni_operational_status: <string, eg ready>
                      geni_expires: <dateTime.rfc3339 of individual sliver expiration>
                      geni_error: <string, eg ''>,
                     },
                    { geni_sliver_urn: <sliver URN>
                      geni_allocation_status: <string, eg provisioned>
                      geni_operational_status: <string, eg ready>
                      geni_expires: <dateTime.rfc3339 of individual sliver expiration>
                      geni_error: <string, eg ''>,
                      }
                  ]
}

PerformOperationalAction

Perform the named operational action on the named slivers, possibly changing the geni_operational_status of the named slivers.

struct PerformOperationalAction (string urns[], struct credentials[], string action, 
                                                    struct options={})

credentials is the standard argument defined above.

Options include: geni_best_effort

Return list of structs:

[ {
        geni_sliver_urn : <string>,
        geni_allocation_status: <string, eg provisioned>
        geni_operational_status : <string>,
        geni_expires: <dateTime.rfc3339 of individual sliver expiration>
        }, 
        ... 
]
;

Delete

AKA DeleteSliver Delete the named slivers, making them geni_unallocated. Resources are de-provisioned. No further AM API operations may be performed on slivers that have been deleted.

struct Delete(string urns, struct credentials[], struct options)

credentials is the standard argument defined above.

Options include: geni_best_effort

Return list of structs:

[
  {
   geni_sliver_urn: <string>,
   geni_allocation_status: <string>,
   geni_expires: <dateTime.rfc3339 when the sliver expires from its current state>,
  },
  ...
]

Shutdown

Perform an emergency shutdown on the slice at this aggregate. Resources should be taken offline, such that experimenter access (on both the control and data plane) is cut off. No further actions on the slice should be possible at this aggregate, until an un-specified operator action restores the slice.

struct Shutdown(string slice_urn, struct credentials[], struct options)

credentials is the standard argument defined above.

Return: XML-RPC boolean