Attach Tape Link to Partition

The Attach Tape Link to Partition operation attaches a tape link to a partition.

HTTP method and URI

POST /api/partitions/{partition-id}/operations/attach-tape-link

In this request, the URI variable {partition-id} is the object ID of the partition.

Request body contents

Name Type Rqd/Opt Description
tape-link-uri String/ URI Required The canonical URI of the Tape Link object to be attached to the partition.

Description

The Attach Tape Link to Partition operation attaches the tape link to the partition specified by the {partition-id} portion of the request URI.

On successful execution, the tape link gets associated with the partition.

The virtual tape resources are created immediately on the storage ports depending on the status of the unassigned worldwide port names of the tape link. If the status of the worldwide port name is "validated", a previously verified storage port is used to create the virtual tape resource. If the status of the worldwide port name is "not-validated", a virtual tape resource is created without a storage port. In that case, a storage port is assigned to the virtual tape resource later, when DPM successfully verifies connectivity to the defined storage volumes on storage ports.

If this operation changes the value of any property for which property-change notifications are due, those notifications are emitted asynchronously to this operation.

This operation enables the operating system in the partition to access the tape library defined in the tape link, through the virtual tape resources that are assigned to storage ports. The operating system may not be able to access all the volumes defined in the tape link, until the fulfillment state of the tape link is "complete".

The URI path must designate an existing Partition object and the API user must have object-access permission to it. In addition, tape-link-uri field in the request body must designate an existing Tape Link object and the API user must have object-access permission to that tape link.

If either of these conditions are not met, status code 404 (Not Found) is returned. In addition, the API user must have action/task permissions to Partition Details task; otherwise, status code 403 (Forbidden) is returned. If the request body is not valid, status code 400 (Bad Request) is returned with a reason code indicating the validation error encountered.

If the partition is in any of the transitional states ("starting" or "stopping") or if the CPC is not in a valid state, 409 (Conflict) status code is returned. If the partition does not have the "dpm-fcp-tape-management" feature enabled or if the fulfillment state of the tape link is "incomplete", a 409 (Conflict) status code is returned.

Authorization requirements

This operation has the following authorization requirements:
  • Object-access permission to the Partition object designated by {partition-id}.
  • Object-access permission to the Tape Link object designated by the tape-link-uri field.
  • Action/task permission to the Partition Details task.

HTTP status and reason codes

On success, HTTP status code 204 (No Content) is returned and no response body is provided.

The following HTTP status codes are returned for the indicated errors, and the response body is a standard error response body providing the reason code indicated and associated error message.

Table 1. Attach Tape Link to Partition: HTTP status and reason codes
HTTP error status code Reason code Description
400 (Bad Request) Various Errors were detected during common request validation. See Common request validation reason codes for a list of the possible reason codes.
403 (Forbidden) 1 The API user does not have the required permission for this operation.
404 (Not Found) 1 The object ID in the URI {partition-id} does not designate an existing partition object, or the API user does not have object-access permission to the partition.
2 The object ID in the tape link URI in request body field tape-link-uri does not designate an existing Tape Link object, or the API user does not have object-access permission to that tape link.
409 (Conflict) 1 Partition status is not valid to perform the operation.
2 Partition object with ID {partition-id} was busy performing some other operation.
6 The state of the CPC hosting the partition is not valid to perform the operation (must be in one of the following states: "active", "service-required", "degraded", or "exceptions".)
13 The operation is not supported when the "dpm-fcp-tape-management" feature is not enabled on the partition.
118 The tape link specified by tape-link-uri is already attached to the partition.
119 The tape link specified by tape-link-uri is already attached to the number of partitions specified in its max-partitions property.
124 The tape link object designated by tape-link-uri was busy performing some other operation.
503 (Service Unavailable) 1 The request could not be processed because the HMC is not currently communicating with an SE needed to perform the requested operation.

Additional standard status and reason codes can be returned, as described in Invoking API operations.

Example HTTP interaction

Figure 1. Attach Tape Link to Partition: Request
POST /api/partitions/f1ff01b6-4f65-11eb-b6ac-fa163ed4d903/operations/attach-tape-link HTTP/1.1
x-api-session: 4b353i6srgy8fv19s5z3izi2rplfh9zu9z0tkxz8l3a2wr1r43
content-type: application/json
content-length: 73
{
   "tape-link-uri":"/api/tape-links/43750b00-4f64-11eb-b10a-fa163ed4d903"
}
Figure 2. Attach Tape Link to Partition: Response
204 No Content
server: Hardware management console API web server / 2.0
cache-control: no-cache
date: Tue, 05 Jan 2021 14:59:02 GMT

<No response body>