13.6. Listing network interfaces of virtual machines¶
GET /servers/{server_id}/os-interface
List network interfaces that are attached to the given virtual machine.
Source: https://docs.openstack.org/api-ref/compute/?expanded=list-port-interfaces-detail
13.6.1. Request¶
Name | In | Type | Description |
---|---|---|---|
server_id |
path | string | The UUID of the server. |
13.6.1.1. Examples¶
List all network interfaces that are attached to a VM with the specified ID.
# curl -ks -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \
https://<node_IP_addr>:8774/v2.1/b906404c55bb44729da99987536ac5bc/servers/0785ee80-1eca-426b-b8c4-5b499fc7f614/os-interface
13.6.2. Response¶
Name | In | Type | Description |
---|---|---|---|
interfaceAttachments |
body | array | List of the interface attachments. |
port_state |
body | string | The port state. |
fixed_ips |
body | array | Fixed IP addresses with subnet IDs. |
subnet_id |
body | string | The UUID of the subnet. |
ip_address |
body | string | The IP address. |
port_id |
body | string | The port ID. |
net_id |
body | string | The network ID. |
mac_addr |
body | string | The MAC address. |
tag |
body | string | The device tag applied to the virtual network interface or New in version 2.70 |
13.6.2.1. Status codes¶
13.6.2.1.1. Success¶
Code | Reason |
---|---|
200 - OK |
Request was successful. |
13.6.2.1.2. Error¶
Code | Reason |
---|---|
401 - Unauthorized |
User must authenticate before making a request. |
403 - Forbidden |
Policy does not allow current user to do this operation. |
404 - Not Found |
The requested resource could not be found. |
13.6.2.2. Example¶
{
"interfaceAttachments": [
{
"port_state": "ACTIVE",
"fixed_ips": [
{
"subnet_id": "d52aa9f4-6a4b-4268-a71d-1a50f9b60aa9",
"ip_address": "10.136.18.138"
}
],
"port_id": "bfc3228d-384e-4864-a583-54157225a4ef",
"net_id": "a1d8d6ae-c89d-4307-8a0c-3cc2ee55d7e3",
"mac_addr": "fa:16:3e:3b:0b:c3"
},
{
"port_state": "ACTIVE",
"fixed_ips": [
{
"subnet_id": "470526d3-ea5a-48fb-81ac-20273f005f61",
"ip_address": "192.168.128.10"
}
],
"port_id": "ff9edb95-611f-4969-b98a-498f77c0326a",
"net_id": "0bb6b7a7-da8d-432c-b8d5-12139f7924d1",
"mac_addr": "fa:16:3e:8d:73:9f"
}
]
}
Version 5.0.0 — Feb 01, 2022