Version 2 (modified by 13 years ago) (diff) | ,
---|
Methods if minimal AM API v3 is adopted
If the 'minimal' AM API v3 set of change sets is adopted, the AM API methods will be as follows:
GetVersion
struct GetVersion([optional: struct options])
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; }; }
ListResources
struct ListResources(string credentials[], struct options)
Where options include:
{ boolean geni_available; boolean geni_compressed; string geni_slice_urn; struct geni_rspec_version { string type; string version; }; }
Return: rspec (ad or Manifest)
CreateSlivers
struct CreateSlivers(string slice_urn, string credentials[], string rspec, struct users[], struct options)
Options include:
{ boolean geni_donotstart (optional) }
Return struct:
{ string rspec=<manifest>, geni_expires=<RFC3339 sliver expiration, as in geni_expires from SliversStatus>, string geni_status=<sliver state - allocated or changing or ready>, <others that are AM specific> }
RenewSlivers
struct RenewSlivers(string slice_urn, string credentials[], string expiration_time, struct options)
Return: boolean
SliversStatus
struct SliversStatus(string slice_urn, string credentials[], struct options)
Return:
{ string geni_urn: <sliver URN> string geni_status: <ready or changing or allocated...> geni_expires: <datetime of expiration> struct geni_resources: [ { geni_urn: <resource URN> geni_status: ready geni_error: ''}, { geni_urn: <resource URN> geni_status: ready geni_error: ''} ] }
Where for individual resources this block may be returned:
'users' => [{'urn' => $user1_urn. 'login' => $login, 'protocol' => [ssh, or ?], 'port' => [22 or ?], 'keys' => [...] }, {'urn' => $user2_urn. 'login' => $login, 'protocol' => [ssh, or ?], 'port' => [22 or ?], 'keys' => [...] } ]
StartSlivers
struct StartSlivers(string slice_urn, string credentials[], struct options)
Return: boolean
DeleteSlivers
struct DeleteSlivers(string slice_urn, string credentials[], struct options)
Return: boolean
Shutdown
struct Shutdown(string slice_urn, string credentials[], struct options)
Return: boolean