Querying Information About BMS NICs (Native OpenStack API)
Function
This API is used to query information about BMS NICs, such as the MAC addresses and private IP addresses.
URI
GET /v2.1/{project_id}/servers/{server_id}/os-interface
Table 1 lists the parameters.
|
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 using the Querying BMSs (Native OpenStack API) API. |
Request Message
Response Message
- Response parameters
Parameter
Type
Description
interfaceAttachments
Array of objects
Specifies information about NICs of the BMS. For details, see Table 2.
Table 2 interfaceAttachments 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 NIC private IP address. 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.
- Example response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
{ "interfaceAttachments": [ { "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
|
Returned Values |
Description |
|---|---|
|
200 |
The server has successfully processed the request. |
For details about other returned values, see Status Codes.
Error Codes
See Error Codes.
Last Article: BMS NIC Management
Next Article: Querying Information About a Specified BMS NIC (Native OpenStack API)
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.