Delete the named slivers, making them :unallocated. Resources are stopped if necessary, and both de-provisioned and de-allocated. No further AM API operations may be performed on slivers that have been deleted.
Delete(string urns[], struct credentials[], struct options)
As described here, the :single_allocation return from [GetVersion] advertises whether or not a client may invoke this method on only some of the slivers in a given :allocation_state in a given slice (default is false - the client may operate on only some of the slivers in a given state).
Delete the given slivers, stopping any running resources and freeing the reservation. This method applies to slivers in any state.
As with the [Allocate] method, some aggregates may not support deleting only some slivers.
See the urns argument for details.
The standard authorization argument. See the Credentials section.
A struct containing optional arguments, indexed by name. See General Options Argument Section.
See :best_effort option for details.
This operation should generally succeed for a valid sliver, despite the :best_effort option. However, when :best_effort is supplied and is false, and an aggregate cannot delete all the named slivers, no slivers are deleted.
XML-RPC type |
struct |
See the sliver info list return for details.
On success, the value field of the return struct will contain a list of structs:
XML-RPC type |
[
{
":sliver_urn": <string>,
":allocation_status": <string>,
":expires": <string.dateTime.rfc3339: when the sliver expires from its current state>,
(optional) ":error" : <string: indicating any AM failure deleting the sliver. The field may be omitted but may not be null/None>
},
...
]
Note that this method should return a struct for each deleted sliver, with the URN of the deleted sliver, the allocation state :unallocated, and the time when the sliver was previously set to expire. This method may also return an empty list, if no slivers are at this aggregate in the specified slice.
Note that aggregates will automatically delete slivers whose expiration time is reached.
Expired, deleted and unknown slivers, or slices without valid slivers, will cause this call to return SEARCHFAILED. See the urns argument for more details on this error code and return value.
The Delete call can return the usual error codes: BADARGS, ERROR, SERVERERROR and UNAVAILABLE. See Error Codes for general errors.
Additionally, the Delete call can return the following error codes:
FORBIDDEN |
Credential does not grant permission to a slice or sliver specified in the urns argument. Or the slice has been shut down. |
EXPIRED |
The slice and/or sliver has already expired. |
SEARCHFAILED |
The slice or sliver does not exist at this AM. |
BUSY |
Slice or sliver is temporarily locked, try again later |