Changes between Initial Version and Version 1 of DRAFT_GAPI_AM_API_V2_DETAILS


Ignore:
Timestamp:
12/02/11 17:45:00 (12 years ago)
Author:
Aaron Helsinger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DRAFT_GAPI_AM_API_V2_DETAILS

    v1 v1  
     1[[PageOutline]]
     2= GENI Aggregate Manager API Version 2 Details =
     3
     4The GENI Aggregate Manager API allows aggregates to advertise resources and to allocate resources to Slices in the form of Slivers. A Sliver is the set of resources allocated by one Aggregate to one Slice.
     5
     6This page provides details on GENI AM API Version '''2'''.
     7
     8For an overview of this version of the AM API, see the [wiki:SW_AMAPI_V2_Take2 API Version 2 overview page].
     9
     10See Also:
     11 * [wiki:DRAFT_GAPI_AM_API_V2 API Version 2 overview page]
     12 * [wiki:GeniApi GENI API] implementation status
     13 * [wiki:GeniApiCredentials GENI credentials] for authorization
     14 * [wiki:GeniApiCertificates GENI certificates] for authentication. The GENI AM API uses XML-RPC over SSL with client authentication using certificates.
     15 * [wiki:DRAFT_GAPI_AM_API_ISSUES Open issues with this API]
     16 * [wiki:DRAFT_GAPI_AM_API_DRAFT Draft API Revisions] proposed for the next version of this API
     17
     18== !GetVersion Details ==
     19Get static version and configuration information about this aggregate.
     20{{{
     21struct GetVersion([optional: struct options])
     22}}}
     23
     24For a summary of the method signature and return, see the [wiki:DRAFT_GAPI_AM_API_V2#GetVersion AM API overview page].
     25
     26A sample minimal !GetVersion return:
     27{{{
     28{
     29  geni_api = 2 # This is AM API v2
     30  code = {
     31       geni_code = 0 # Success
     32       # am_type and am_code are optional. Leaving them out.
     33         }
     34  value =
     35      {
     36        geni_api = 2 # Match above
     37        geni_api_versions = {
     38             2 = <This server's AM API absolute URL>
     39             # optional: 1 = <Some other URL for talking AM API v1 to the same aggregate
     40             }
     41        geni_request_rspec_versions = [{
     42             type = "GENI"
     43             version = "3"
     44             schema = "http://www.geni.net/resources/rspec/3/request.xsd"
     45             namespace = "http://www.geni.net/resources/rspec/3"
     46             extensions = ["http://hpn.east.isi.edu/rspec/ext/stitch/0.1/stitch-schema.xsd", <other URLs here>]
     47        }]
     48        geni_ad_rspec_versions = [{
     49             type = "GENI"
     50             version = "3"
     51             schema = "http://www.geni.net/resources/rspec/3/ad.xsd"
     52             namespace = "http://www.geni.net/resources/rspec/3"
     53             extensions = ["http://hpn.east.isi.edu/rspec/ext/stitch/0.1/stitch-schema.xsd", <other URLs here>]
     54        }]
     55      }
     56  output = <None>
     57}
     58}}}
     59
     60=== Arguments ===
     61  `options`::
     62     [#Options A struct with particular semantics described below].  For this method only, this argument is optional. Aggregates should [#DocumentingAggregateAdditions document new options arguments].
     63
     64=== Return ===
     65!GetVersion returns the version of the Aggregate Manager API running locally, the RSpec schemas supported, and the URLs where versions of the AM API are running. The return is an XML-RPC struct whose members are described below.
     66
     67 `geni_api`::
     68    An integer indicating the revision of the Aggregate Manager API that an aggregate supports. This page documents version 2 of the API. This value is duplicated here and within the {{{value}}} return struct for backwards compatibility with AM API v1 clients.
     69
     70{{{code}}}, {{{value}}}, and {{{output}}} together provide the [#ReturnStruct standard return from all AM API methods], which has a specific [#ReturnStruct structure and semantics described below], including specifics of the {{{code}}} and {{{output}}} members.
     71
     72  `value`::
     73       For !GetVersion, {{{value}}} is an XML-RPC struct containing the actual return for the method. On success, this is required. Optional (and not defined) on failure or error.
     74{{{
     75      {
     76        int geni_api;
     77        struct geni_api_versions {
     78             URL <this API version #>;
     79             [optional: other supported API versions and the URLs where they run]
     80             }
     81        array geni_request_rspec_versions of {
     82             string type;
     83             string version;
     84             string schema;
     85             string namespace;
     86             array extensions of string;
     87        };
     88        array geni_ad_rspec_versions of {
     89             string type;
     90             string version;
     91             string schema;
     92             string namespace;
     93             array extensions of string;
     94        };
     95      }
     96}}}
     97
     98==== !GetVersion return codes ====
     99Aggregates shall return consistent values for {{{geni_code}}} as described here. Success is always indicated using a {{{geni_code}}} value of {{{0}}}. On error, return the appropriate GENI error code in {{{geni_code}}}, as listed in this table. These error codes are part of a [#ReturnStruct larger set of codes with specific meanings required by this API, described below].
     100
     101|| '''''Error''''' || '''''Condition''''' ||
     102|| `ERROR`         || Internal error ||
     103|| `SERVERERROR`   || Server error ||
     104|| `BUSY`          || Server busy; try again later ||
     105
     106==== Members of the !GetVersion {{{value}}} return struct ====
     107As elsewhere, implementations can add additional members to the return struct (at the top-level or within the {{{value}}} return) as desired. The prefix {{{geni_}}} is reserved for members that are part of this API specification. Implementations should choose an appropriate prefix to avoid conflicts. Aggregates should [#DocumentingAggregateAdditions document any additional return values].
     108
     109 `geni_api`::
     110    An integer indicating the revision of the Aggregate Manager API that an aggregate supports. This page documents version 2 of the API.
     111
     112 `geni_api_versions`::
     113    An XML-RPC struct indicating the versions of the Aggregate Manager API supported at this aggregate, and the URLs at which those API versions can be contacted. This element is required, and shall include at least 1 entry indicating the local aggregate manager URL and the version of the API supported at that URL. Aggregates supporting multiple versions of the Aggregate Manager API should [#SupportingMultipleAPIVersions conform to the guidelines specified below].
     114{{{
     115geni_api_versions: an XML-RPC struct containing 1+ entries of:
     116  Name: Integer - supported GENI AM API version
     117  Value: String - Absolute URL to the XML-RPC server implementing that version of the GENI AM API
     118}}}
     119
     120 `geni_request_rspec_versions`::
     121    An array of data structures indicating the RSpec types accepted by this AM in a request. The [#RSpecs contract for RSpec versions is described with links to further reading below].
     122
     123 `geni_ad_rspec_versions`::
     124    An array of data structures indicating what types of RSpec advertisements may be produced by this AM in !ListResources.
     125
     126{{{geni_request_rspec_versions}}} and {{{geni_ad_rspec_versions}}} refer to the RSpec formats supported at this aggregate. The [#RSpecs contract for RSpec versions is described with links to further reading below].
     127 
     128
     129Elements used within {{{geni_request_rspec_versions}}} and {{{geni_ad_rspec_versions}}}:
     130 `type`, `version`::
     131   Two ''case-insensitive'' strings which together comprise the type of RSpec. The RSpec `type` should be one of "geni", "protogeni", "sfa", "orca", "openflow", or "orbit". `version` should be a type-specific version identifier as specified by the appropriate control framework. The "geni" type is reserved for GENI standard format RSpecs, following the schemas hosted at http://www.geni.net/resources/rspec.
     132
     133 `schema`::
     134   An optional URL pointing to a schema which can be used to verify the given type of RSpec.
     135
     136 `namespace`::
     137   An optional XML namespace which the RSpec of the given type belongs to.
     138
     139 `extensions`::
     140   An array of aggregate-specific strings denoting which extensions are supported. In the case of GENI standard RSpecs, these are XML namespaces which denote the extension as a whole.
     141
     142-----
     143== !ListResources Details ==
     144List the resources at this aggregate in an RSpec: may be all resources, only those available for reservation, or only those already reserved for the given slice.
     145{{{
     146struct ListResources(string credentials[], struct options)
     147}}}
     148
     149For a summary of the method signature and return, see the [wiki:DRAFT_GAPI_AM_API_V2#ListResources AM API overview page].
     150
     151=== Arguments ===
     152
     153 `credentials[]`::
     154   [#CredentialsArgument An array of credentials with particular semantics]. 
     155
     156 `options`::
     157    An [http://www.xmlrpc.com/spec XML-RPC] struct containing members indicating the set of resources that the caller is interested in, or the format of the result. [#Options Semantics of this argument are described below].  Aggregates should [#DocumentingAggregateAdditions document new options arguments].
     158
     159The following members are available for use in the {{{options}}} parameter. All aggregate managers are required to implement these options.
     160
     161{{{
     162{
     163  boolean geni_available;
     164  boolean geni_compressed;
     165  string geni_slice_urn;
     166  struct geni_rspec_version {
     167    string type;
     168    string version;
     169  };
     170}
     171}}}
     172
     173 `geni_available`::
     174    Optional. An [http://www.xmlrpc.com/spec XML-RPC] boolean value indicating whether the caller is interested in all resources or available resources. If this value is {{{true}}}, the result should contain only available resources. If this value is {{{false}}} or unspecified, both available and allocated resources should be returned. The Aggregate Manager is free to limit visibility of certain resources based on the {{{credentials}}} parameter.
     175
     176 `geni_compressed`::
     177    Optional. An [http://www.xmlrpc.com/spec XML-RPC] boolean value indicating whether the caller would like the result to be compressed. If the value is {{{true}}}, the returned resource list will be compressed according to [http://www.ietf.org/rfc/rfc1950.txt RFC 1950]. If the value is {{{false}}} or unspecified, the return will be text.
     178
     179 `geni_slice_urn`::
     180    Optional. An [http://www.xmlrpc.com/spec XML-RPC] string indicating that the caller is interested in the set of resources allocated to the slice named by this URN. If no resources are allocated to the indicated slice by this aggregate, an empty RSpec should be returned -- aggregates should NOT return an error. For details on GENI AM API URN identifiers, see the [wiki:GeniApiIdentifiers GENI wiki page].
     181
     182 `geni_rspec_version`::
     183    Required. An [http://www.xmlrpc.com/spec XML-RPC] struct indicating the type and version of Advertisement or Manifest RSpec to return. The struct contains 2 members, {{{type}}} and {{{version}}}. {{{type}}} and {{{version}}} are ''case-insensitive'' strings, matching those in {{{geni_ad_rspec_versions}}} as returned by !GetVersion at this aggregate. This option is ''required'', and aggregates are expected to return a {{{geni_code}}} of {{{1}}} ('Bad Arguments') if it is missing. Aggregates should return a {{{geni_code}}} of {{{4}}} ({{{BADVERSION}}}) if the requested RSpec version is not one advertised in !GetVersion as supported. The [#RSpecs contract for RSpec versions is described with links to further reading below].
     184
     185
     186=== Return ===
     187!ListResources returns an RSpec listing and describing resources at this aggregate. Depending on the arguments, this may be all local resources, only available local resources, or a manifest of resources reserved for a particular slice.
     188
     189!ListResources returns the [#ReturnStruct standard return from all AM API methods], which has a specific [#ReturnStruct structure and semantics described below], including specific requirements for the {{{code}}} and {{{output}}} members.
     190
     191
     192  `value`::
     193     !ListResources returns an RSpec in GENI standard schema. The [#RSpecs contract for RSpec versions is described with links to further reading below].
     194 
     195     The return value is an RSpec in text format if {{{geni_compressed}}} is unspecified or set to {{{false}}}. The return value will be a base 64 encoded string if {{{geni_compressed}}} is specified and set to {{{true}}}.
     196
     197    The returned Rspec will be an Advertisement RSpec when no {{{geni_slice_urn}}} option is supplied. When a valid {{{geni_slice_urn}}} option is supplied, the returned RSpec will be a Manifest RSpec of the type corresponding to {{{geni_rspec_version}}}, but in manifest format.
     198
     199    If the aggregate cannot support the requested {{{type}}}/{{{version}}} (that pair is not listed in {{{geni_ad_rspec_versions}}}), then the aggregate returns an error ({{{geni_code}}}) of {{{4}}} ({{{BADVERSION}}}), and the {{{value}}} is not defined.
     200
     201==== !ListResources return codes ====
     202On error, return the appropriate GENI error code in {{{geni_code}}}, as listed in this table. These error codes are part of a [#ReturnStruct larger set of codes with specific meanings required by this API, described below].
     203
     204|| '''''Error''''' || '''''Condition''''' ||
     205|| `BADARGS`       || One of the required arguments is badly formed or missing ||
     206|| `FORBIDDEN`     || Credential does not grant permission to the slice ||
     207|| `BUSY`          || Slice is temporarily locked, try again later ||
     208|| `BUSY`          || Server is temporarily busy, try again later ||
     209|| `ERROR`         || Internal error ||
     210|| `SERVERERROR`   || Server error ||
     211|| `UNAVAILABLE`   || Unavailable (eg server in lockdown) ||
     212|| `EXPIRED`       || Slice expired ||
     213|| `BADVERSION`    || Bad Version of RSpec requested ||
     214
     215-----
     216
     217== !CreateSliver Details ==
     218Reserve the resources described in the given RSpec for the given slice, returning a manifest RSpec of what has been reserved.
     219{{{
     220struct CreateSliver(string slice_urn,
     221                    string credentials[],
     222                    string rspec,
     223                    struct users[],
     224                    struct options)
     225}}}
     226For a summary of the method signature and return, see the [wiki:DRAFT_GAPI_AM_API_V2#CreateSliver AM API overview page].
     227
     228=== Arguments ===
     229 `slice_urn`::
     230   The URN of the slice to which the resources specified in {{{rspec}}} will be allocated. For details on GENI AM API URN identifiers, see the [wiki:GeniApiIdentifiers GENI wiki page].
     231
     232 `credentials`::
     233   [#CredentialsArgument An array of credentials with particular semantics]. Aggregates should ensure that the expiration time of the reservation does not exceed the expiration time of the slice credential used to perform this operation.
     234
     235 `rspec`::
     236    An RSpec matching the [http://www.protogeni.net/trac/protogeni/wiki/RSpec GENI standard] request RSpec [http://www.geni.net/resources/rspec/3/request.xsd schema] containing the resources that the caller is requesting for allocation to the slice specified in {{{slice_urn}}}. These are expected to be consistent with the resources returned by a previous invocation of [wiki:DRAFT_GAPI_AM_API_V2#ListResources ListResources]. If this RSpec is in a format not listed as supported by !GetVersion, then the aggregate will return an error of {{{BADVERSION}}} ({{{4}}}).
     237
     238  `users`::
     239  An array of user structs, which contain information about the users that might login to the sliver that the AM needs to know about. Each struct must include the key 'keys', which is an array of strings and can be empty. The struct must also include the key 'urn', which is the user’s URN string. The users array can be empty. For example:
     240{{{
     241[
     242  {
     243    urn: urn:publicid:IDN+geni.net:gcf+user+alice
     244    keys: [<ssh key>, <ssh key>]
     245  },
     246  {
     247    urn: urn:publicid:IDN+geni.net:gcf+user+bob
     248    keys: [<ssh key>]
     249  }
     250]
     251}}}
     252
     253  `options`::
     254    [#Options A struct with particular semantics described below]. Aggregates should [#DocumentingAggregateAdditions document new options arguments].
     255
     256=== Return ===
     257!CreateSliver reserves the requested resources if possible. The aggregate then (asynchronously) starts those resources. The !CreateSliver method returns a manifest RSpec.
     258
     259!CreateSliver returns the [#ReturnStruct standard return from all AM API methods], which has a specific [#ReturnStruct structure and semantics described below], including specific requirements for the {{{code}}} and {{{output}}} members.
     260
     261  `value`::
     262 The return value is an RSpec matching the [http://www.protogeni.net/trac/protogeni/wiki/RSpec GENI standard] manifest RSpec [http://www.geni.net/resources/rspec/3/manifest.xsd schema] listing and describing the resources that were allocated to the slice. The result RSpec may contain additional information about the allocated resources, such as specific resource identifiers and addresses. This RSpec should include a listing of the specific resources used to satisfy the reservation, and details on the configuration and address of these resources, to the extent that this information is known when completing the reservation and before the resources are fully instantiated. Such information which changes as the resources are made available for use (started) or such information which is only known when the resources have fully started, may be returned later by !SliverStatus.  Note that aggregates are expected to preserve in the manifest any extensions supplied in the request RSpec which they do not understand.
     263
     264If an Aggregate advertises a {{{type}}}/{{{version}}} pair in its {{{geni_request_rspec_versions}}} as returned by !GetVersion, then it promises to correctly honor a !CreateSliver call containing a request RSpec in the given format, and then to return a Manifest RSpec in the corresponding format (ie a GENI v3 standard request is answered with a GENI v3 manifest).
     265
     266The [#RSpecs contract for RSpec versions is described with links to further reading below].
     267
     268
     269==== !CreateSliver return codes ====
     270On error, return the appropriate GENI error code in {{{geni_code}}}, as listed in this table. These error codes are part of a [#ReturnStruct larger set of codes with specific meanings required by this API, described below].
     271
     272|| '''''Error''''' || '''''Condition''''' ||
     273|| `BADARGS`       || One of the required arguments is missing or badly formed ||
     274|| `FORBIDDEN`     || Credential does not grant permission to the slice ||
     275|| `FORBIDDEN`     || Slice has been shutdown by the Clearinghouse ||
     276|| `UNAVAILABLE`   || AM is temporarily not allowing external users to create slices ||
     277|| `ERROR`         || Internal error ||
     278|| `SERVERERROR`   || Server error ||
     279|| `BUSY`          || Server is temporarily busy, try again later ||
     280|| `BADVERSION`    || Bad Version of RSpec requested ||
     281
     282-----
     283== !DeleteSliver Details ==
     284Delete the reservation for this slice.
     285{{{
     286struct DeleteSliver(string slice_urn, string credentials[], struct options)
     287}}}
     288For a summary of the method signature and return, see the [wiki:DRAFT_GAPI_AM_API_V2#DeleteSliver AM API overview page].
     289
     290=== Arguments ===
     291 `slice_urn`::
     292   The URN of the slice whose sliver should be deleted. For details on GENI AM API URN identifiers, see the [wiki:GeniApiIdentifiers GENI wiki page].
     293
     294 `credentials`::
     295   [#CredentialsArgument An array of credentials with particular semantics].
     296
     297  `options`::
     298    [#Options A struct with particular semantics described below].  Aggregates should [#DocumentingAggregateAdditions document new options arguments].
     299
     300=== Return ===
     301!DeleteSliver stops all the slice's resources and removes the reservation. It returns {{{true}}} or {{{false}}} indicating whether it did this successfully. This API does not specify the state of the resources on error or failure.
     302
     303!DeleteSliver returns the [#ReturnStruct standard return from all AM API methods], which has a specific [#ReturnStruct structure and semantics described below], including specific requirements for the {{{code}}} and {{{output}}} members.
     304
     305
     306  `value`::
     307     Returns {{{true}}} on success and {{{false}}} on failure. {{{true}}} means all resources associated with this slice have been stopped and de-allocated. Behavior on {{{false}}} is not specified.
     308
     309==== !DeleteSliver return codes ====
     310On error, return the appropriate GENI error code in {{{geni_code}}}, as listed in this table. These error codes are part of a [#ReturnStruct larger set of codes with specific meanings required by this API, described below].
     311
     312|| '''''Error''''' || '''''Condition''''' ||
     313|| `BADARGS`       || One of the required arguments is badly formed or missing ||
     314|| `SEARCHFAILED`  || Slice does not exist at this AM ||
     315|| `FORBIDDEN`     || Credential does not grant permission to the slice ||
     316|| `BUSY`          || Slice is temporarily locked, try again later ||
     317|| `BUSY`          || Server is temporarily busy, try again later ||
     318|| `ERROR`         || Internal error ||
     319|| `SERVERERROR`   || Server error ||
     320|| `EXPIRED`       || Sliver(s) already expired and gone ||
     321-----
     322== !SliverStatus Details ==
     323Get the status of the reservation for this slice at this aggregate.
     324{{{
     325struct SliverStatus(string slice_urn, string credentials[], struct options)
     326}}}
     327For a summary of the method signature and return, see the [wiki:DRAFT_GAPI_AM_API_V2#SliverStatus AM API overview page].
     328
     329=== Arguments ===
     330 `slice_urn`::
     331   The URN of the slice for which the sliver status is requested. For details on GENI AM API URN identifiers, see the [wiki:GeniApiIdentifiers GENI wiki page].
     332
     333 `credentials`::
     334   [#CredentialsArgument An array of credentials with particular semantics].
     335
     336  `options`::
     337    [#Options A struct with particular semantics described below]. Aggregates should [#DocumentingAggregateAdditions document new options arguments].
     338=== Return ===
     339Return the status of the overall reservation, and of each addressable resource within the reservation. Additionally, provide any other aggregate or resource specific dynamic state or configuration information necessary for client use of the reserved resources.
     340
     341!SliverStatus returns the [#ReturnStruct standard return from all AM API methods], which has a specific [#ReturnStruct structure and semantics described below], including specific requirements for the {{{code}}} and {{{output}}} members.
     342
     343
     344  `value`::
     345    Returns an XML-RPC struct upon successful completion. The struct is of the following form:
     346
     347{{{
     348{
     349  geni_urn: <sliver URN>
     350  geni_status: ready
     351  geni_resources: [ { geni_urn: <resource URN>
     352                      geni_status: ready
     353                      geni_error: ''},
     354                    { geni_urn: <resource URN>
     355                      geni_status: ready
     356                      geni_error: ''}
     357                  ]
     358}
     359}}}
     360
     361==== !SliverStatus return codes ====
     362On error, return the appropriate GENI error code in {{{geni_code}}}, as listed in this table. These error codes are part of a [#ReturnStruct larger set of codes with specific meanings required by this API, described below].
     363
     364|| '''''Error''''' || '''''Condition''''' ||
     365|| `BADARGS`       || One of the required arguments is badly formed or missing ||
     366|| `SEARCHFAILED`  || Slice does not exist at this AM ||
     367|| `FORBIDDEN`     || Credential does not grant permission to the slice ||
     368|| `BUSY`          || Slice is temporarily locked, try again later ||
     369|| `BUSY`          || Server is temporarily busy, try again later ||
     370|| `ERROR`         || Internal error ||
     371|| `SERVERERROR`   || Server error ||
     372|| `UNAVAILABLE`   || Unavailable (eg server in lockdown) ||
     373|| `EXPIRED`       || Slivers expired ||
     374
     375==== Members of the !SliverStatus {{{value}}} return struct ====
     376
     377As elsewhere, implementations can add additional members to the return struct as desired to provide aggregate or resource specific status information. Specifically, information on accessing the resources, and expiration times for reservations might be returned. The prefix {{{geni_}}} is reserved for members that are part of this API specification. Implementations should choose an appropriate prefix to avoid conflicts. Aggregates should [#DocumentingAggregateAdditions document any additional return values].
     378
     379The top level members of the returned {{{value}}} struct pertain to the sliver as a whole. These members are:
     380
     381 `geni_urn`::
     382    The URN of the sliver as a string. This is the ''sliver'' and not the ''slice'', and should be selected by the aggregate manager. For details on GENI AM API URN identifiers, see the [wiki:GeniApiIdentifiers GENI wiki page].
     383
     384 `geni_status`::
     385    A string indicating the status of the sliver. Possible values are: {{{configuring}}}, {{{ready}}}, {{{failed}}}, and {{{unknown}}}. {{{configuring}}} indicates that at least one resource is being configured and none have failed. {{{ready}}} indicates that all resources in the sliver are ready. {{{failed}}} indicates that at least one resource in the sliver has failed. {{{unknown}}} indicates that the state of the sliver is not one of the known states. More detailed information can be found in the value of the {{{geni_resources}}} member.
     386
     387 `geni_resources`::
     388    An array of structs. Each struct in the array gives the status of one resource in the sliver. The members of these structs are described below.
     389
     390The members of the {{{geni_resources}}} struct(s) are as follows:
     391
     392 `geni_urn`::
     393    The URN of the resource as a string. This is specific to the ''sliver'', and should be selected by the aggregate manager to allow status reporting and control at the finest level supported at that aggregate. It may be a sliver URN if there is only 1 resource in the sliver.
     394
     395 `geni_status`::
     396    A string indicating the status of the resource. Possible values are: {{{configuring}}}, {{{ready}}}, {{{failed}}}, and {{{unknown}}}. {{{configuring}}} indicates that the resource is being configured and is not yet ready for use. {{{ready}}} indicates that the resource is ready. {{{failed}}} indicates that the resource has failed. {{{unknown}}} indicates that the state of the resource is not one of the known states.
     397
     398 `geni_error`::
     399    A free form string. The aggregate manager should set this to a string that could be presented to a researcher to give more detailed information about the state of the resource if its status is {{{failed}}}.
     400
     401-----
     402== !RenewSliver Details ==
     403Renew the reservation for resources in this slice.
     404{{{
     405struct RenewSliver(string slice_urn,
     406                    string credentials[],
     407                    string expiration_time,
     408                    struct options)
     409}}}
     410For a summary of the method signature and return, see the [wiki:DRAFT_GAPI_AM_API_V2#RenewSliver AM API overview page].
     411
     412=== Arguments ===
     413
     414 `slice_urn`::
     415   The URN of the slice that is to have its sliver renewed. For details on GENI AM API URN identifiers, see the [wiki:GeniApiIdentifiers GENI wiki page].
     416
     417 `credentials`::
     418   [#CredentialsArgument An array of credentials with particular semantics].
     419
     420 `expiration_time`::
     421    A string in [http://tools.ietf.org/html/rfc3339 RFC 3339] format indicating the new reservation expiration date and time desired by the caller. Note that these times, per the RFC, must be in or relative to UTC. This time must be less than or equal to the slice duration in the slice credential. In other words, at least one supplied (slice) credential must still be valid at the desired new expiration time for this call to succeed.
     422
     423  `options`::
     424    [#Options A struct with particular semantics described below]. Aggregates should [#DocumentingAggregateAdditions document new options arguments].
     425
     426=== Return ===
     427Return {{{true}}} or {{{false}}} indicating whether the reservation was successfully extended to the requested date and time.
     428
     429!RenewSliver returns the [#ReturnStruct standard return from all AM API methods], which has a specific [#ReturnStruct structure and semantics described below], including specific requirements for the {{{code}}} and {{{output}}} members.
     430
     431
     432  `value`::
     433     Returns {{{true}}} on successful completion, {{{false}}} otherwise. {{{false}}} means the reservation expires at the previous time. It is assumed that the caller will have already extended the lifetime of the slice credential with the appropriate slice authority prior to calling !RenewSliver.
     434
     435==== !RenewSliver return codes ====
     436On error, return the appropriate GENI error code in {{{geni_code}}}, as listed in this table. These error codes are part of a [#ReturnStruct larger set of codes with specific meanings required by this API, described below].
     437
     438|| '''''Error''''' || '''''Condition''''' ||
     439|| `BADARGS`       || One of the required arguments is badly formed or missing ||
     440|| `SEARCHFAILED`  || Slice does not exist at this AM ||
     441|| `FORBIDDEN`     || Credential does not grant permission to the slice ||
     442|| `BUSY`          || Slice is temporarily locked, try again later ||
     443|| `BUSY`          || Server is temporarily busy, try again later ||
     444|| `ERROR`         || Internal error ||
     445|| `SERVERERROR`   || Server error ||
     446|| `EXPIRED`       || Resources already expired ||
     447
     448-----
     449== Shutdown Details ==
     450Perform an emergency shutdown of the resources in a slice at this aggregate.
     451{{{
     452struct Shutdown(string slice_urn, string credentials[], struct options)
     453}}}
     454For a summary of the method signature and return, see the [wiki:DRAFT_GAPI_AM_API_V2#Shutdown AM API overview page].
     455
     456=== Arguments ===
     457
     458 `slice_urn`::
     459   The URN of the slice that is to have its sliver shut down. For details on GENI AM API URN identifiers, see the [wiki:GeniApiIdentifiers GENI wiki page].
     460
     461 `credentials`::
     462   [#CredentialsArgument An array of credentials with particular semantics].
     463
     464  `options`::
     465    [#Options A struct with particular semantics described below]. Aggregates should [#DocumentingAggregateAdditions document new options arguments].
     466
     467=== Return ===
     468Returns a boolean indicating whether the resources associated with this reservation were successfully shut down to a state suitable for forensics.
     469
     470Shutdown returns the [#ReturnStruct standard return from all AM API methods], which has a specific [#ReturnStruct structure and semantics described below], including specific requirements for the {{{code}}} and {{{output}}} members.
     471
     472  `value`::
     473     Returns {{{true}}} on success, {{{false}}} otherwise. On success, the resources should no longer be accessible to the client nor in a running state. On failure, state is indeterminate.
     474
     475
     476==== Shutdown return codes ====
     477On error, return the appropriate GENI error code in {{{geni_code}}}, as listed in this table. These error codes are part of a [#ReturnStruct larger set of codes with specific meanings required by this API, described below].
     478
     479|| '''''Error''''' || '''''Condition''''' ||
     480|| `BADARGS`       || One of the required arguments is badly formed or missing ||
     481|| `SEARCHFAILED`  || Slice does not exist at this AM ||
     482|| `FORBIDDEN`     || Credential does not grant permission to the slice ||
     483|| `ERROR`         || Internal error ||
     484|| `SERVERERROR`   || Server error ||
     485|| `EXPIRED`       || Slice expired ||
     486|| `INPROGRESS`    || Shutdown in progress ||
     487
     488Note: Aggregates should not return {{{BUSY}}}: this is a time critical operation that should succeed if possible.
     489-----
     490== RSpecs ==
     491
     492At GEC10 [wiki:GEC10RSpec the GENI community agreed] that GENI RSpecs would be in what was the [http://www.protogeni.net/trac/protogeni/wiki/RSpec ProtoGENI v2 format] and is now known as GENI v3. Aggregates are free to use an alternate format internally, but must accept and produce compliant RSpecs on demand. Note that individual aggregates may use RSpec extensions to describe custom resources or properties of resources. For RSpec extension information, see the ProtoGENI [http://www.protogeni.net/trac/protogeni/wiki/RSpecExtensions2 wiki].
     493
     494For more information:
     495 * [http://www.geni.net/resources/rspec/3 Official GENI v3 RSpec schemas]
     496 * [http://www.protogeni.net/trac/protogeni/wiki/RSpec GENI standard (was ProtoGENI v2) format]
     497 * [http://www.protogeni.net/trac/protogeni/wiki/RSpecExtensions2 RSpec extension information]
     498 * [http://www.protogeni.net/trac/protogeni/wiki/RSpecSchema2 RSpec schemas listing]
     499
     500The Aggregate Manager API requires this contract:
     501Aggregates advertise the {{{type}}} and {{{version}}} of RSpec formats that they support. If available, they specify the {{{schema}}}, {{{namespace}}} and {{{extensions}}} combination which is the authoritative definition of that format. Clients of the API should understand that combination in order to know how to understand the resources available at that aggregate.
     502
     503If an aggregate advertises a particular {{{type}}}/{{{version}}} (optionally defined with a combination of {{{schema}}}, {{{namespace}}} and {{{extensions}}}) in the {{{geni_ad_rspec_versions}}} attribute of !GetVersion, then it promises to send a correct Advertisement RSpec in response to a !ListResources call which supplies a {{{geni_rspec_version}}} option containing that {{{type}}}/{{{version}}}. ({{{geni_rspec_version}}} is a {{{struct}}} with 2 members, {{{type}}} and {{{version}}}. {{{type}}} and {{{version}}} are ''case-insensitive'' strings, matching those in {{{geni_ad_rspec_versions}}}).
     504
     505If an Aggregate advertises a particular {{{type}}}/{{{version}}} (optionally defined with a combination of {{{schema}}}, {{{namespace}}} and {{{extensions}}}) in the {{{geni_request_rspec_versions}}} attribute of !GetVersion then it promises to correctly honor a !CreateSliver call containing a request RSpec in the given format, and then to return a Manifest RSpec in the corresponding format (i.e. a GENI format request is answered with a GENI format manifest). The aggregate also promises to send a correctly formatted Manifest RSpec in response to a !ListResources call which supplies a valid {{{geni_slice_urn}}} option and an {{{geni_rspec_version}}} option containing that supported {{{type}}}/{{{version}}}.
     506
     507-----
     508== {{{credentials}}} Argument ==
     509 `credentials`::
     510   An array of credentials. At least one credential must be a valid slice credential for the slice specified in {{{slice_urn}}} if that is an argument, or a valid administrative credential with sufficient privileges. Credentials must be valid (signed by a valid GENI certificate authority either directly or by chain, not expired, and grant privileges to the client identified by the SSL client certificate). Each method requires specific privileges, which must be granted by the provided credentials. Note that the semantics of this argument is not clear: most implementations require a single credential to provide all needed privileges. Alternative interpretations might, for example, accumulate privileges from each valid credential to determine overall caller permissions. For details on GENI AM API format credentials, see [wiki:GeniApiCredentials the GENI wiki].
     511
     512-----
     513== {{{options}}} ==
     514 `options`::
     515     An XML-RPC struct. For !GetVersion only, this argument is optional. In all other methods, it is required. Only !ListResources has required entries in the {{{options}}} struct. Aggregates are compliant with this API change by accepting this argument. Aggregates may accept entries to this struct. Aggregates should not ''require'' any new options to any method - they should always have a reasonable default for any such option. Aggregates should [#DocumentingAggregateAdditions document new options arguments]. The prefix {{{geni_}}} is reserved for members that are part of this API specification. Implementations should choose an appropriate prefix to avoid conflicts.
     516
     517-----
     518== Return Struct ==
     519
     520{{{code}}}, {{{value}}}, and {{{output}}} together provide the standard return from all AM API methods.
     521
     522  `code`::
     523    A struct indicating the success or failure of this call at the Aggregate Manager. It consists of 1 required field and 2 optional fields.
     524{{{
     525  struct code = {
     526       int geni_code;
     527       [optional: string am_type;]
     528       [optional: int am_code;]
     529         }
     530}}}
     531
     532  `value`::
     533     Method-specific. Required on success. Optional on error.
     534
     535  `output`::
     536     On failure or error, this is required. Optional on success. This is an XML-RPC string with a human readable message explaining the result. Specifically, this might include an error string, a stacktrace, or other useful messages to help the experimenter resolve or report the failure or error. It is not defined on success, though aggregates are free to use it.
     537
     538Implementations can add additional members to the return struct as desired. The prefix {{{geni_}}} is reserved for members that are part of this API specification. Implementations should choose an appropriate prefix to avoid conflicts. Aggregates should [#DocumentingAggregateAdditions document any additional return values].
     539
     540
     541Aggregates shall return consistent values for {{{geni_code}}} as described here. Aggregates wishing to be more specific may use the {{{am_type}}} and {{{am_code}}} values.
     542
     543Success is always indicated using a {{{geni_code}}} value of {{{0}}}.
     544
     545On one of the error or failure cases listed in the table below, aggregates shall return the indicated error code.
     546
     547
     548=== Elements in {{{code}}} ===
     549 `geni_code`::
     550    An integer supplying the GENI standard return code indicating the success or failure of this call. Error codes are standardized and defined [attachment:geni-error-codes.xml in the attached XML document]. Codes may be negative. A success return is defined as {{{geni_code}}} of {{{0}}}.
     551
     552 `am_type`::
     553    Optional. A (case insensitive) string indicating the type of Aggregate Manager running locally. When an aggregate wants to return an aggregate specific return code in the {{{am_code}}} field, they supply an {{{am_type}}} to qualify the kind of aggregate specific return code they are supplying. This is the namespace of the aggregate specific return code. This field is optional: aggregates are not required to supply an aggregate specific return code, and clients need not look at it. This code further qualifies the kind of error or success that the aggregate is returning, as primarily defined by the value of {{{geni_code}}}. Standard values for {{{am_type}}} are defined [attachment:geni-am-types.xml in the attached XML document].
     554 
     555 `am_code`::
     556    An integer supplying the more specific return code, relative to the aggregate type specified in {{{am_type}}}. This integer may be negative. Aggregates should document these codes publicly. This API does not specify how or where that documentation should be provided.
     557
     558Aggregates are encouraged to use {{{code}}} values and {{{output}}} messages that help experimenters and tools distinguish between bad input, other experimenter error, temporary server errors, or server bugs.
     559
     560GENI standard error codes are documented in the [attachment:geni-error-codes.xml attached XML document], and listed below.
     561
     562|| 0    || SUCCESS      || "Success" ||
     563|| 1    || BADARGS      || "Bad Arguments: malformed arguments" ||
     564|| 2    || ERROR        || "Error (other)" ||
     565|| 3    || FORBIDDEN    || "Operation Forbidden: eg supplied credentials do not provide sufficient privileges (on given slice)" ||
     566|| 4    || BADVERSION   || "Bad Version (eg of RSpec)" ||
     567|| 5    || SERVERERROR  || "Server Error" ||
     568|| 6    || TOOBIG       || "Too Big (eg request RSpec)" ||
     569|| 7    || REFUSED      || "Operation Refused" ||
     570|| 8    || TIMEDOUT     || "Operation Timed Out" ||
     571|| 9    || DBERROR      || "Database Error" ||
     572|| 10   || RPCERROR     || "RPC Error" ||
     573|| 11   || UNAVAILABLE  || "Unavailable (eg server in lockdown)" ||
     574|| 12   || SEARCHFAILED         || "Search Failed (eg for slice)" ||
     575|| 13   || UNSUPPORTED  || "Operation Unsupported" ||
     576|| 14   || BUSY         || "Busy (resource, slice, or server); try again later" ||
     577|| 15   || EXPIRED      || "Expired (eg slice)" ||
     578|| 16   || INPROGRESS   || "In Progress" ||
     579|| 17   || ALREADYEXISTS        || "Already Exists (eg the slice}" ||
     580
     581Aggregates are similarly encouraged to provide hints on how to fix bad requests using the {{{value}}} entry to experimenters on error or failures. For example, a failed !RenewSliver call that failed because you are not allowed to renew your sliver that far in the future, might return a new date string in the {{{value}}} field that would be allowed. Similarly, a failed !CreateSliver call might return a modified request RSpec in the {{{value}}} field.
     582
     583Note that a malformed XML-RPC request should still raise an XML-RPC Fault, and other Faults dictated by the XML-RPC specification should still be raised.  Aggregates should avoid raising an error (XML-RPC Fault) for application layer errors or any other cases where the XML-RPC specification does not require a Fault, but rather should attempt to return this struct, providing any error messages and stack traces in the {{{output}}} field or other additional fields.
     584
     585-----
     586== Documenting Aggregate Additions ==
     587
     588Aggregates are free to add additional return values or input {{{options}}} to support aggregate or resource specific functionality, or to innovate within the bounds of the AM API. Aggregates are encouraged to document any such new return values which they return or {{{options}}} arguments, to bootstrap coordination with clients, and provide documentation for human experimenters. One way to provide partial documentation, is to implement [http://xmlrpc-c.sourceforge.net/introspection.html XML-RPC introspection]. Through the use of method help, aggregates can provide human readable text describing return values. Alternatively or additionally, aggregates may document return values as part of their return from !GetVersion. This API does not specify the format for advertising those extra return values in !GetVersion.
     589
     590-----
     591== Supporting Multiple API Versions ==
     592
     593Aggregates are free to support multiple versions of the AM API. They do so by providing different URLs for each version of the API that they support. Aggregates should have a 'default' URL (the one typically advertised). That version runs whichever version of the API the server chooses (could be the latest, could be something else.)
     594
     595Aggregates running multiple versions of the API must advertise the URLs and versions of the API supported using the new !GetVersion return as part of the {{{value}}} entry:
     596{{{
     597geni_api_versions: an XML-RPC struct containing 1+ entries of:
     598  Name: Integer - supported GENI AM API version
     599  Value: String - URL to the XML-RPC server implementing that version of the GENI AM API
     600}}}
     601
     602For example
     603{{{
     604geni_api_versions: {
     605  1: <URL>,
     606  2: <Local URL, as this is API version 2>,
     607   ...
     608}
     609}}}
     610
     611The entries indicate versions of the API that are supported, and URLs are absolute URLs where that version of the API is supported.