Querying BMS Flavors (Native OpenStack API)

Function

This API is used to query BMS flavors.

Constraints

The flavors you obtained using this API are all the flavors in the system. The flavors whose names starting with physical are BMS flavors and can be used to create BMSs.

URI

GET /v2.1/{project_id}/flavors/detail{?minDisk={minDisk}&minRam={minRam}&sort_key={sort_key}&sort_dir={sort_dir}}

Table 1 lists the parameters.

Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Specifies the project ID.

For how to obtain the project ID, see Obtaining Required Information.

Table 2 lists the optional parameters that can be used to query BMS flavors.

Table 2 Optional parameters

Parameter

Mandatory

Type

Description

minDisk

No

String

Specifies the minimum disk size in GB. Only the BMSs with a disk size greater than or equal to the minimum size can be queried.

minRam

No

String

Specifies the minimum memory size in MB. Only the BMSs with the memory size greater than or equal to the minimum size can be queried.

sort_key

No

String

Specifies the sorting field. The default value is flavorid. The value of this parameter can also be name, memory_mb, vcpus, root_gb, or flavorid.

sort_dir

No

String

Specifies the sorting of BMS flavors.

The value can be asc or desc, and is asc by default.

Request

Response

Returned Values

Normal values

Returned Values

Description

200

The request has been successfully processed.

For details about other returned values, see Status Codes.

Error Codes

See Error Codes.