• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Nova
  5. Network Information
  6. Querying Network Information

Querying Network Information

Function Description

This interface is used to query the network information of an ECS.

Interface Format

Method

URI

Description

GET

/v2/{tenant_id}/servers/{server_id}/ips

/v2.1/{tenant_id}/servers/{server_id}/ips

Queries the network information 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

addresses

Dict

Yes

Specifies the network information of an ECS.

addresses parameter description

Parameter

Type

Mandatory

Description

Name of the network where the ECS accesses

List(Dict)

No

Specifies the network where the ECS accesses. For details about the network, see the following table.

Details of the network that the ECS belongs to

Attribute

Type

CRUD

Default Value

Restriction

Description

version

Int

R

N/A

4 or 6

Specifies the IP address version, IPv4 or IPv6.

addr

String

R

N/A

IP address format

Specifies the IP address.

Request Example

GET /v2/9c53a566cb3443ab910cf0daebca90c4/servers/ce12b6d7-694b-4ead-bb63-4e984c4c1973/ips

GET /v2.1/9c53a566cb3443ab910cf0daebca90c4/servers/ce12b6d7-694b-4ead-bb63-4e984c4c1973/ips

Response Example

{
    "addresses": {
        "demo_net": [{
            "version": 4,
            "addr": "10.0.0.4"
        },
        {
            "version": 4,
            "addr": "192.150.73.132"
        }],
        "private_net": [{
            "version": 4,
            "addr": "10.176.42.16"
        },
        {
            "version": 6,
            "addr": "::babe:10.176.42.16"
        }]
    }
}

Returned Values

For details, see section General Request Returned Values.

Error Code

Table 1 Task error code

Error Code

Description

404

Instance does not exist.

This error code indicates that the specified ECS does not exist.