Help Center/ Bare Metal Server/ API Reference/ Historical APIs/ BMS NIC Management (OpenStack Nova APIs)/ Querying Information About a Specified BMS NIC (Discarded)
Updated on 2024-10-22 GMT+08:00

Querying Information About a Specified BMS NIC (Discarded)

Function

This API is used to query information about a specified BMS NIC based on the NIC ID.

This API has been discarded. Use the API in Querying NICs Bound to a BMS.

URI

GET /v2.1/{project_id}/servers/{server_id}/os-interface/{id}

Table 1 lists the parameters.

Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Specifies the project ID.

For details about how to obtain the project ID, see Obtaining a Project ID.

server_id

Yes

Specifies the BMS ID.

You can obtain the BMS ID from the BMS console or by calling the Querying BMSs (Discarded).

id

Yes

Specifies the NIC ID.

You can obtain the NIC ID from the NICs tab page on the BMS details page or by calling the Querying Information About BMS NICs (Discarded) API. (The NIC ID is the value of port_id).

Request Parameters

None

Example Request

Querying information about a NIC (ID: ce531f90-199f-48c0-816c-13e38010b442) bound to a BMS (ID: 95bf2490-5428-432c-ad9b-5e3406f869dd)
1
GET https://{ECS Endpoint}/v2.1/c685484a8cc2416b97260938705deb65/servers/95bf2490-5428-432c-ad9b-5e3406f869dd/os-interface/ce531f90-199f-48c0-816c-13e38010b442

Response Parameters

Parameter

Type

Description

interfaceAttachment

Object

Specifies information about the specified BMS NIC. For details, see Table 2.

Table 2 interfaceAttachment field data structure description

Parameter

Type

Description

port_state

String

Specifies the status of the NIC port. The value can be ACTIVE, BUILD, or DOWN.

fixed_ips

Array of objects

Specifies the IP addresses of NICs. For details, see Table 3.

net_id

String

Specifies the ID of the subnet (network_id) to which the NIC ports belong.

port_id

String

Specifies the ID of the NIC port.

mac_addr

String

Specifies the MAC address of the NIC.

Table 3 fixed_ips field data structure description

Parameter

Type

Description

subnet_id

String

Specifies the ID of the subnet (subnet_id) corresponding to the private IP address of the NIC.

ip_address

String

Specifies the NIC IP address.

Example Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
{
    "interfaceAttachment": {
        "port_state": "ACTIVE",
        "fixed_ips": [
{
                "subnet_id": "f8a6e8f8-c2ec-497c-9f23-da9616de54ef",
                "ip_address": "192.168.1.3"
                    }
            ], 
        "net_id": "3cb9bc59-5699-4588-a4b1-b87f96708bc6",
        "port_id": "ce531f90-199f-48c0-816c-13e38010b442",
        "mac_addr": "fa:16:3e:4c:2c:30"
                    }
                    }

Returned Values

Normal values

Returned Values

Description

200

The request has been successfully processed.

For details about other returned values, see Status Codes.

Error Codes

See Error Codes.