• Bare Metal Server

bms
  1. Help Center
  2. Bare Metal Server
  3. API Reference
  4. API
  5. BMS NIC Management (Native OpenStack APIs)
  6. Querying NIC Information About a Specified BMS (Native OpenStack API)

Querying NIC Information About a Specified BMS (Native OpenStack API)

Function

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

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.

server_id

Yes

Specifies the BMS ID.

id

Yes

Specifies the ID of the NIC.

Request Message

N/A

Response Message

  • Response parameters

    Parameter

    Type

    Description

    interfaceAttachment

    Dictionary data structure [1]

    Specifies information about BMS NICs.

    [1] interfaceAttachment field data structure description

    Parameter

    Type

    Description

    port_state

    String

    Specifies the NIC port status.

    fixed_ips

    List data structure [2]

    Specifies the NIC IP address.

    net_id

    String

    Specifies the ID of the network to which the NIC port belongs.

    port_id

    String

    Specifies the ID of the NIC port.

    mac_addr

    String

    Specifies the MAC address of the NIC.

    [2] fixed_ips field data structure description

    Parameter

    Type

    Description

    subnet_id

    String

    Specifies the ID of the subnet used by the NIC.

    ip_address

    String

    Specifies the NIC IP address.

  • Example response
    {
        "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

See section Common Returned Values.