• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Nova
  5. Interfaces
  6. Querying an NIC List

Querying an NIC List

Function Description

This interface is used to query the NICs of an ECS.

Interface Format

Method

URI

Description

GET

/v2/{tenant_id}/servers/{server_id}/os-interface

/v2.1/{tenant_id}/servers/{server_id}/os-interface

Queries the NICs of an ECS.

NOTE:

Pagination query is not supported.

Restrictions

N/A

Expanded Interface

N/A

Request Parameter

N/A

Response Parameter

Parameter

Type

Mandatory

Description

interfaceAttachments

List(Dict)

Yes

NIC attachment information.

interfaceAttachments parameter description

Parameter

Type

Mandatory

Description

port_state

String

Yes

Specifies the port status.

fixed_ips

Dict

Yes

Specifies IP address information, including the subnet ID and IP address.

mac_addr

String

Yes

Specifies the MAC address.

net_id

UUID

Yes

Network ID

port_id

UUID

Yes

Port ID

Request Example

GET /v2/b23b579f08c84228b9b4673c46f0c442/servers/f6c61c09-c754-4874-9371-c19db89678a5/os-interface

GET /v2.1/b23b579f08c84228b9b4673c46f0c442/servers/f6c61c09-c754-4874-9371-c19db89678a5/os-interface

Response Example

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

Returned Values

For details, see section General Request Returned Values.

Error Code

For details, see section General Request Returned Values.