Attach NIC to virtual server

Description

Attaches an NIC to the specified virtual server.

The NIC number is set by assigning an available sequential number starting from 0

(for example: if the NIC numbers are 0,2 and an NIC is attached, NIC numbers become 0,1,2, and if NIC numbers are 0,1,2 and an NIC is attached, NIC numbers become 0,1,2,3).

Snapshots of the virtual server must be deleted before performing this operation.

Request

Header

Content-Type: application/x-www-form-urlencoded

Accept: application/xml

X-Auth-Token: Keystone token (*1)

X-VA-Project-Id: ID of the project that owns the resource (*2)

X-VA-Domain-Id: ID of the domain that owns the resource (*2)

*1: The scope specified for the token is ignored when this API is executed by the system administrator.

*2: Mandatory when this API is executed by the system administrator. ignored when executed by other users.

Method

PUT

Path

/l_servers/virtualServerResourceId/attach

Query

n/a

Body

Argument name Description
type Specify "nic".
network_rid Resource ID of the network to which the NIC will be connected
ip_address IP address assigned to the NIC (optional)

If omitted, an address will be assigned automatically.

Response

Status code

202 Accepted

Body

Task information