Changes between Version 19 and Version 20 of GAPI_AM_API_V3
- Timestamp:
- 05/16/12 12:50:07 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GAPI_AM_API_V3
v19 v20 25 25 * Latest: 3 - Documented here. [wiki:GAPI_AM_API_V3_DELTAS Changes since version 2] include: 26 26 * All new method names 27 * Change Set D:Addressable slivers: the ability to add or delete resources from an existing slice reservation at a single aggregate28 * Change Set F3:New sliver allocation states & methods.27 * Addressable slivers: the ability to add or delete resources from an existing slice reservation at a single aggregate 28 * New sliver allocation states & methods. 29 29 * Including a cheap 'allocated' state, that tools can use to negotiate resource reservations, and coordinate resource reservations among multiple aggregates (necessary for VLAN stitching) 30 * Change Sets F4&5:Operational states, and a way for aggregates to advertise resource specific operational states and methods in the Ad RSpec.31 * Change Set G:Generalized credential argument, allowing aggregates to accept and tools to supply credentials of alternate types32 * Change Set I:Return sliver expiration in most method returns33 * Change Set I:Specify SSH node login information in a standard RSpec extension34 * Change Set K:Standardize certificate contents, specifically including a UUID and email address with particular semantics35 * Change Set K:Standardize slice and user name character and length restrictions36 * Change Set M:Split !ListResources in two: !ListResources for Ad RSpecs, and Describe for a slice' manifest RSpec30 * Operational states, and a way for aggregates to advertise resource specific operational states and methods in the Ad RSpec. 31 * Generalized credential argument, allowing aggregates to accept and tools to supply credentials of alternate types 32 * Return sliver expiration in most method returns 33 * Specify SSH node login information in a standard RSpec extension 34 * Standardize certificate contents, specifically including a UUID and email address with particular semantics 35 * Standardize slice and user name character and length restrictions 36 * Split !ListResources in two: !ListResources for Ad RSpecs, and Describe for a slice' manifest RSpec 37 37 38 38 * Previous: 2 - Documented on [wiki:GAPI_AM_API_V2 the v2 page]. Changes since v1 include: … … 52 52 53 53 == API Overview == 54 The GENI Aggregate Manager API is the control plane interface by which experimenter s discover, reserve and control resources at resource providers. It does not include resource specific interactions, application level interactions, or monitoring and management functions.54 The GENI Aggregate Manager API is the control plane interface by which experimenter tools discover, reserve and control resources at resource providers. It does not include resource specific interactions, application level interactions, or monitoring and management functions. 55 55 56 56 === API Protocols and Data Structures === … … 64 64 === Using the GENI AM API === 65 65 66 Clients (experimenters ) use the AM API to discover resources (`ListResources`), request resources (`Allocate`), provision reserved resources (`Provision`), start resources (`PerformOperationalAction`), check the status of resources as they are started (`Status`), extend their reservation (`Renew`), and then return the resources when done (`Delete`). Client tools may use `GetVersion` to ensure aggregates speak a compatible version of the AM API and known formats for RSpecs. Administrators may call `Shutdown` to stop the resources of a slice at this aggregate, perhaps if that slice is misbehaving.66 Clients (experimenters via their tools) use the AM API to discover resources (`ListResources`), request resources (`Allocate`), provision reserved resources (`Provision`), start resources (`PerformOperationalAction`), check the status of resources as they are started (`Status`), extend their reservation (`Renew`), and then return the resources when done (`Delete`). Client tools may use `GetVersion` to ensure aggregates speak a compatible version of the AM API and known formats for RSpecs. Administrators may call `Shutdown` to stop the resources of a slice at this aggregate, perhaps if that slice is misbehaving. 67 67 68 68 `ListResources` returns to the client an advertisement RSpec - a detailed listing of the resources available at that aggregate. From this information, the experimenter may determine which resources to reserve for their use. The RSpec should also have enough information to help the experimenter set the initial configuration for their resources. 69 69 70 Once the experimenter has selected the resources they want and how to configure them, they produce a request RSpec, detailing the resources they want and how they should be configured. They separately contact their slice authority to obtain a slice credential (or set of credentials), granting them rights to reserve resources for that slice. The experimenter then calls `Allocate` on this API, passing in both the slice credential and the request RSpec. The aggregate then attempts to satisfy the experimenter's resource request. If the aggregate can satisfy the request, the aggregate reserves the resources for the experimenter. The resources have not been provisioned yet, giving the experimenter a chance to verify the reservation, or check for corresponding resource availability in another aggregate. If it is acceptable, the experimenter calls `Provision` to set up the resources. The aggregate then starts the process of instantiating the resources and configuring them as requested in the request RSpec. Once that process has started, the `Provision` call returns with a manifest RSpec, listing the resources as reserved and initially configured for the experimenter. 71 72 The experimenter can then poll the aggregate manager to watch as the resources are configured and become ready for use, by calling `Status`, looking for an operational state other than `geni_pending_allocation`. A given aggregate and sliver type may use a different set of states once provisioning is complete, and further operational actions are possible - see the AM's Ad RSpec. In many cases, this indication comes with a `geni_operational_state` value of `geni_notready`. Once the resources are ready for use, the experimenter will typically call `PerformOperationalAction(geni_start)` to start the resources (e.g. boot a machine). The experimenter will also call `Renew` to request that their reservation lasts as long as they require the resources for. When the experimenter is done using the resources, they call `Delete` to end their reservation. The aggregate then stops and clears the resources, freeing them for use by other clients. 70 Once the experimenter has selected the resources they want and how to configure them, they produce a request RSpec, detailing the resources they want and how they should be configured. They separately contact their slice authority to obtain a slice credential (or set of credentials), granting them rights to reserve resources for that slice. The experimenter then uses their tool and calls `Allocate` on this API, passing in both the slice credential and the request RSpec. The aggregate then attempts to satisfy the experimenter's resource request. If the aggregate can satisfy the request, the aggregate reserves the resources for the experimenter. The resources have not been provisioned yet, giving the experimenter a chance to verify the reservation, or check for corresponding resource availability in another aggregate. If it is acceptable, the experimenter (via their tool) calls `Provision` to set up the resources. The aggregate then starts the process of instantiating the resources and configuring them as requested in the request RSpec. Once that process has started, the `Provision` call returns with a manifest RSpec, listing the resources as reserved and initially configured for the experimenter. 71 72 The experimenter tool can then poll the aggregate manager to watch as the resources are configured and become ready for use, by calling `Status`, looking for an operational state other than `geni_pending_allocation`. The actual operational state that the sliver will change to depends on the sliver and aggregate type. 73 Operational states are sliver type and aggregate specific, and defined in the aggregate's advertisement RSpec. In many cases, the aggregate indicates that the sliver is ready with a `geni_operational_state` value of `geni_notready`. Once the resources are ready for use, the experimenter tool will typically call `PerformOperationalAction(geni_start)` to start the resources (e.g. boot a machine). The experimenter (or their tool) will also call `Renew` to request that their reservation lasts as long as they require the resources for. When the experimenter is done using the resources, they call `Delete` to end their reservation. The aggregate then stops and clears the resources, freeing them for use by other clients. 73 74 74 75 Typical client work flow: … … 85 86 * Return is a manifest RSpec describing the reserved resources, plus any instantiation-specific configuration information 86 87 6. {{{Status(<slice URN or sliver URNs>, <slice credential>, {})}}} to check that resources are provisioned (e.g. look for operational state `geni_notready`. 87 7. {{{PerformOperationalAction(<slice URN>, <slice credential>, geni_start, {})}}}:88 7. {{{PerformOperationalAction(<slice URN>, <slice credential>, "geni_start", {})}}}: 88 89 * Aggregate starts resources 89 90 8. {{{Status(<slice URN or sliver URNs>, <slice credential>, {})}}} to check that resources have started 90 9. {{{Renew(<slice URN or sliver URNs>, <slice credential>, newtime, {})}}} to extend reservation91 9. {{{Renew(<slice URN or sliver URNs>, <slice credential>, <newtime>, {})}}} to extend reservation 91 92 10. <Experimenter uses resources> 92 93 11. {{{Delete(<slice URN or sliver URNs>, <slice credential>, {})}}} when done 93 94 94 95 === Changes from AM API v2 === 95 This version of the AM API includes multiplechanges since version 2 of the AM API. For experimenters, a few things are worth noting:96 This version of the AM API includes substantial changes since version 2 of the AM API. For experimenters, a few things are worth noting: 96 97 - The old `CreateSliver` operation has now been broken into 3 steps: 97 98 - `Allocate` to reserve the resources … … 105 106 - SSH login names and keys should be available in manifest RSpecs in a standard format. 106 107 - Slice name restrictions have been codified and standardized. 107 - Slice names are <=19 characters, only alphanumeric plus hyphen (no hyphen in first character): `'^[a-zA-Z0-9][-a-zA-Z0-9] +$'`108 - Slice names are <=19 characters, only alphanumeric plus hyphen (no hyphen in first character): `'^[a-zA-Z0-9][-a-zA-Z0-9]\{0,18\}$'` 108 109 109 110 Tool developers should also be aware: 110 111 - The `credentials` argument to methods is now a struct, including a type and version for each credential. AMs should advertise which credential types they accept. SAs should advertise which type they provide. 111 - Aggregates may have their own operational states and actions. The AdRSpec should define these, probably by `sliver_type`.112 - Aggregates may have their own operational states and actions. The advertisement RSpec should define these, probably by `sliver_type`. 112 113 113 114 ----- 114 115 == !GetVersion == 115 116 Query static configuration information about this aggregate manager implementation, such as API and RSpec versions supported. 116 117 The !GetVersion operation is similar to ProtoGENI's [http://www.protogeni.net/trac/protogeni/wiki/ComponentManagerAPIV2#GetVersion GetVersion] operation. The [http://svn.planet-lab.org/attachment/wiki/WikiStart/sfa.pdf SFA] specification does not include this operation.118 117 119 118 {{{ … … 201 200 Note that all options may be omitted by the client, except `geni_rspec_version` which is required. 202 201 203 Return: 202 Return: On success, the value field of the [wiki:GAPI_AM_API_V3/CommonConcepts#ReturnStruct return struct] will contain: 204 203 A `geni.rspec` advertisment RSpec. For details on RSpecs, see [wiki:GAPI_AM_API_V3/CommonConcepts#RSpecs the Common Concepts page]. 205 204 … … 236 235 This method is part of what !ListResources used to do, and is similar to ProtoGENI [http://www.protogeni.net/trac/protogeni/wiki/ComponentManagerAPIV2#Resolve Resolve]. 237 236 238 Return struct:237 Return: On success, the `value` field of the [wiki:GAPI_AM_API_V3/CommonConcepts#ReturnStruct return struct] will contain at struct: 239 238 {{{ 240 239 { … … 268 267 `Allocate` is an all or nothing request: if the aggregate cannot completely satisfy the request RSpec, it should fail the request entirely. 269 268 270 This method is part of what was previously known as !CreateSliver.269 This method is the first part of what was previously known as !CreateSliver. 271 270 272 271 {{{ … … 277 276 }}} 278 277 279 This is the first part of what !CreateSliver used to do. The next part is now done by `Provision`.278 This is the first part of what !CreateSliver used to do. The second part is now done by `Provision`, and the final part is done by `PerformOperationalAction`. 280 279 281 280 This operation is similar to ProtoGENI's [http://www.protogeni.net/trac/protogeni/wiki/ComponentManagerAPIV2#GetTicket GetTicket] operation. 282 281 283 Return struct:282 Return: On success, the `value` field of the [wiki:GAPI_AM_API_V3/CommonConcepts#ReturnStruct return struct] will contain a struct: 284 283 {{{ 285 284 { … … 324 323 This operation used to be called !RenewSliver. Use `Renew(<slice_urn>)` to get the equivalent functionality. 325 324 326 This operation is similar to ProtoGENI's [http://www.protogeni.net/trac/protogeni/wiki/ComponentManagerAPIV2#RenewSlice RenewSlice] operation.327 328 325 Options include {{{geni_best_effort}}}, specifying whether the client prefers all included slivers to be renewed or none, or wants a partial success if possible. See the Common Concepts page under [wiki:GAPI_AM_API_V3/CommonConcepts#geni_best_effort geni_best_effort] and [wiki:GAPI_AM_API_V3/CommonConcepts#OperationsonIndividualSlivers Operations on Individual Slivers]. 329 326 330 When `Renew` is called with `geni_best_effort` false, the entire method will fail if any requested sliver cannot be renewed to the requested time, and all slivers will keep their original expiration time. When `Renew` is called with `geni_best_effort` true, some sliver may fail to be renewed. In this case, the allocation state and expiration times do not change. `geni_error` may optionally be returned by the aggregate to explain this failure.327 When `Renew` is called with `geni_best_effort` false, the entire method will fail (return non-zero code) if any requested sliver cannot be renewed to the requested time, and all slivers will keep their original expiration time. When `Renew` is called with `geni_best_effort` true, some sliver may fail to be renewed. In this case, the allocation state and expiration times do not change. `geni_error` may optionally be returned by the aggregate to explain this failure. 331 328 332 329 Arguments: … … 335 332 See the Common Concepts page for details on the [wiki:GAPI_AM_API_V3/CommonConcepts#urns urns] and [wiki:GAPI_AM_API_V3/CommonConcepts#credentials credentials] arguments. 336 333 337 Return value isa list of structs:334 Return: On success, the `value` field of the [wiki:GAPI_AM_API_V3/CommonConcepts#ReturnStruct return struct] will contain a list of structs: 338 335 {{{ 339 336 [ … … 349 346 }}} 350 347 351 Attempting to Renew an unknown sliver will result in an error. Attempting to Renew a previously deleted or expired sliver may result in an error - the aggregate may have forgotten about it entirely. Attempting to Renewa slice with no current slivers at this aggregate may return an empty list of slivers, or may return a list of previous slivers that have since been deleted.348 Attempting to `Renew` an unknown sliver will result in an error (non zero `geni_code`). Attempting to `Renew` a previously deleted or expired sliver may result in an error - the aggregate may have forgotten about it entirely. Attempting to `Renew` a slice with no current slivers at this aggregate may return an empty list of slivers, or may return a list of previous slivers that have since been deleted. 352 349 353 350 It is legal to attempt to renew a sliver to a sooner expiration time than the sliver was previously due to expire. Not all aggregates will support this however. … … 375 372 - {{{geni_best_effort}}} 376 373 377 Return struct:374 Return: On success, the `value` field of the [wiki:GAPI_AM_API_V3/CommonConcepts#ReturnStruct return struct] will contain a struct: 378 375 {{{ 379 376 { … … 413 410 - `struct geni_users[]`: Resource login information. See [wiki:GAPI_AM_API_V3/CommonConcepts#geni_users the Common Concepts page]. 414 411 415 Return struct:412 Return: On success, the `value` field of the [wiki:GAPI_AM_API_V3/CommonConcepts#ReturnStruct return struct] will contain a struct: 416 413 {{{ 417 414 geni_rspec: <geni.rspec, RSpec manifest>, … … 460 457 - `struct geni_users[]`: Resource login information. See [wiki:GAPI_AM_API_V3/CommonConcepts#geni_users the Common Concepts page]. 461 458 462 Return struct:459 Return: On success, the `value` field of the [wiki:GAPI_AM_API_V3/CommonConcepts#ReturnStruct return struct] will contain a struct: 463 460 {{{ 464 461 { … … 491 488 This operation used to be called !SliverStatus in earlier versions of the AM API. `geni_slivers` has replaced `geni_resources` and `geni_sliver_urn` replaces `geni_urn`. `geni_status` is replaced with 2 fields, `geni_allocation_status` and `geni_operational_status`. 492 489 493 This operation is similar to ProtoGENI's [http://www.protogeni.net/trac/protogeni/wiki/ComponentManagerAPIV2#SliverStatus,WaitForStatus SliverStatus] operation. The [http://svn.planet-lab.org/attachment/wiki/WikiStart/sfa.pdf SFA] specification does not include this operation.494 495 490 This method has no required options. 496 491 497 Return `value` isa struct:492 Return: On success, the `value` field of the [wiki:GAPI_AM_API_V3/CommonConcepts#ReturnStruct return struct] will contain a struct: 498 493 {{{ 499 494 { … … 532 527 This operation is similar to ProtoGENI functions like `StartSliver`, `StopSliver`, and `RestartSliver` in the [http://www.protogeni.net/trac/protogeni/wiki/ComponentManagerAPIV2 PG CMv2 API]. 533 528 534 Aggregate Managers SHOULD return an error code of `13` (`UNSUPPORTED`) if they do not support a given action for a given resource. An AM SHOULD constrain actions based on the current operational state of the resource. This is a fast synchronous operation, and MAY start long-running sliver transitions whose status can be queried using `Status`. This method should only be called, and is only valid, when the sliver is fully allocated (allocation state is not `geni_pending_allocation`). 529 Aggregate Managers SHOULD return an error code of `13` (`UNSUPPORTED`) if they do not support a given `action` for a given resource. An AM SHOULD constrain actions based on the current operational state of the resource. This is a fast synchronous operation, and MAY start long-running sliver transitions whose status can be queried using `Status`. This method should only be called, and is only valid, when the sliver is fully allocated (allocation state is not `geni_pending_allocation`). 530 531 While the `action` argument may be aggregate and sliver type specific (none are required for all aggregates and sliver types), this API does define three common actions that AMs should support if possible: `geni_start`, `geni_stop`, and `geni_restart`. Calling `PerformOperationalAction` with the action`geni_start` corresponds to the final part of what !CreateSliver did in AM API v2. For more information, see the Common Concepts page section on wiki:GAPI_AM_API_V3/CommonConcepts#SliverOperationalActions operational actions]. 535 532 536 533 Options include: {{{geni_best_effort}}}. Default is false (action applies to all slivers equally or none). 537 534 538 Return value isa list of structs:535 Return: On success, the `value` field of the [wiki:GAPI_AM_API_V3/CommonConcepts#ReturnStruct return struct] will contain a list of structs: 539 536 {{{ 540 537 [ { … … 566 563 Options include: {{{geni_best_effort}}} 567 564 568 Return `value` isa list of structs:565 Return: On success, the `value` field of the [wiki:GAPI_AM_API_V3/CommonConcepts#ReturnStruct return struct] will contain a list of structs: 569 566 {{{ 570 567 [ … … 596 593 No options are required. 597 594 598 Return: XML-RPC boolean, indicating whether the resources associated with this reservation were successfully shut down to a state suitable for forensics. Return should be true, or else an error should be returned.595 Return: On success, the `value` field of the [wiki:GAPI_AM_API_V3/CommonConcepts#ReturnStruct return struct] will contain: XML-RPC boolean, indicating whether the resources associated with this reservation were successfully shut down to a state suitable for forensics. Return should be true, or else an error should be returned. 599 596 600 597 If the given slice has no resources locally, or was previously `Shutdown`, return shall be true, indicating the slice is shut down.