Delete NIC

The Delete NIC operation deletes an existing NIC objects that is designated by its element ID and the object ID of the owning partition. For a Partition on a CPC with API feature dpm-hipersockets-partition-link-management available, this operation should not be used for NICs of type "iqd" because such NICs are managed via Partition Links of type hipersockets. Therefore, deleting such a NIC object should be done by sending a corresponding request to the Modify Partition Link operation. [Updated by feature dpm-hipersockets-partition-link-management]

HTTP method and URI

DELETE /api/partitions/{partition-id}/nics/{nic-id}

URI variables:

Name Type Description
{partition-id} String Object ID of the Partition object.
{nic-id} String Element ID of the NIC.

Description

This operation deletes the specified NIC. Upon success, an Inventory Change notification is emitted asynchronously to this operation.

To delete a NIC of type "iqd" owned by a Partition on a CPC with API feature dpm-hipersockets-partition-link-management available, using the Modify Partition Link operation is preferred over Delete NIC, because such NICs are managed via Partition Links. Although Modify Partition Link is preferred in this scenario, the Delete NIC operation can still be used to delete NICs with type "iqd" owned by a Partition on a CPC with API feature dpm-hipersockets-partition-link-management available. In that case the HMC essentially converts the Delete NIC operation into a corresponding Modify Partition Link operation and processes it in a synchronous fashion. The changes in the underlying implementation are transparent to the user for successful invocations of the operation. In case of failures, see Table 7 for more information. [Updated by feature dpm-hipersockets-partition-link-management]

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

A 404 (Not Found) status code is returned if the request URI does not designate an existing NIC element of an existing partition, or if the API user does not have object-access permission to that partition. If the API user doesn't have action/task permission to Partition Details task, 403 (Forbidden) status code is returned. If the partition is in one of the transitional states ("starting" or "stopping"), or if the CPC is not in a valid state, 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 owning Partition Link object when the NIC element designated by {nic-id} is of type "iqd" and the Partition exists on a CPC with API feature dpm-hipersockets-partition-link-management available. [Updated by feature dpm-hipersockets-partition-link-management]
  • Action/task permission to the Partition Details task.
  • Action/task permission to the Partition Link Details task when the NIC element designated by {nic-id} is of type "iqd" and the Partition exists on a CPC with API feature dpm-hipersockets-partition-link-management available. [Updated by feature dpm-hipersockets-partition-link-management]

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. Delete NIC: 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 designated an existing Partition object, or the API user does not have object-access permission to it.
5 The request URI does not designate an existing NIC of an existing partition.
409 (Conflict) 1 Partition status is not valid to perform the operation.
2 Partition object with ID {partition-id} was busy and request timed out.
6 The state of the CPC hosting the partition is not valid to perform the operation (must be one of the following states: "active", "service-required", "degraded", or "exceptions".)
8 NIC cannot be deleted as it is set as the partition's boot device.
10 The operation cannot be performed because the affected SE is in the process of being shut down.
100 NIC cannot be deleted as it is the last SSC Management NIC (ssc-management-nic is true) on an active partition.
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.

As outlined above, when deleting a NIC of type "iqd" owned by a Partition on a CPC with API feature dpm-hipersockets-partition-link-management available, a corresponding Modify Partition Link operation is performed. Certain HTTP status and reason codes are reported from both operations, therefore it is recommended to consult the response body details in case of failures. [Updated by feature dpm-hipersockets-partition-link-management]

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

Example HTTP interaction

Figure 1. Delete NIC: Request
DELETE /api/partitions/b4c4bf9e-97e0-11e5-9d1f-020000000192/nics/eb6887e4-97e8-
   11e5-9d1f-020000000192 HTTP/1.1
x-api-session: 4qhwaoj0lyleh8l57e0z8znsnpphgelqnatcpe5pu5cjk69qeg
Figure 2. Delete NIC: Response
204 No Content
server: zSeries management console API web server / 2.0
cache-control: no-cache
date: Tue, 01 Dec 2015 05:21:30 GMT
<No response body>