• No results found

2. Compute API v2 extensions

2.4. Flavor Extra Specs

2.4.3. Create flavor extra specs

Method URI Description

POST /v2/{tenant_id}/fla-

vors/{flavor_id}/os-extra_specs

Creates extra-specs or keys for the specified flavor.

Normal response codes: 200

2.4.3.1. Request

This table shows the URI parameters for the create flavor extra specs request:

Name Type Description

{tenant_id} String The ID for the tenant or account in a multi-tenancy cloud. {flavor_id} String The ID of the flavor of interest to you.

This table shows the body parameters for the create flavor extra specs request:

Name Type Description

extra_specs List

(Optional)

The list of flavor extra specs.

sw:wrs:guest:heartbeat Boolean

(Optional)

Indicates whether or not the guest applications running in the virtual machine make use of the Heartbeat client API.

sw:wrs:srv_grp_messaging Boolean

(Optional)

Indicates whether or not the guest applications running in the virtual machine make use of the Server-Group Messaging client API.

hw:wrs:shared_vcpu Integer

(Optional)

Indicates the vCPU of the guest virtual machine that will be scheduled to run on a shared CPU of the host. Note, this can be specified even if hw:cpu_policy is set to dedicated; allowing the guest application to use dedicated cores exclusively for its high-load tasks, but use a shared core for its low-load (e.g. management type) tasks.

hw:wrs:vcpu:scheduler String

(Optional)

Indicates the linux scheduler policy and priority for the non-boot vCPUs of the guest. The parameter allows you to specify individual values for each of the vCPUs independently.

This parameter accepts a semicolon-separated list of scheduler:priority:vcpus values as follows:

• scheduler

The scheduler policy. One of other, fifo, or rr to indicate non re- al-time, FIFO, and Round Robin policies respectively.

• priority

The real-time scheduler priority. A value between 1 and 99. • vcpus

A list of virtual CPUs as a comma-separated list (1,2,3) or a range specification (1-3). Virtual CPU number 0 refers to the boot virtual CPU and therefore cannot be used.

hw:wrs:min_vcpus Integer

(Optional)

Indicates the minimum number of vCPUs for the virtual machine. The value must be between one and the number of VCPUs in the flavor of the virtual machine. If this extra_spec is specified then the server is as- sumed to support vCPU scaling.

32

Name Type Description

aggregate_instance_extra_specs:localstorageBoolean

(Optional)

Indicates whether or not the virtual machine should be run on a com- pute node that can provide local storage for the virtual machine.

hw:numa_node:{guest-nu- ma-node}

Integer (Optional)

Indicates the mapping between a virtual machine virtual numa node and the host physical numa node.

hw:cpu_model String

(Optional)

Indicates the particular cpu model required by the virtual machine; i.e. in order to access the required advanced CPU features such as SSE4.2, AES and/or AVX. The valid values are: default (QEMU Virtual Proces-

sor), Nehalem (Intel Core i7 9xx (Nehalem Class Core i7)), Westmere

(Intel Westmere E56xx/L56xx (Nehalem-C)), SandyBridge (Inel Xeon

E312xx (Sandy Bridge)), Haswell (Intel Core Processor (Haswell).

Example 2.14. Create flavor extra specs: JSON request

{

"extra_specs": {

"sw:wrs:guest:heartbeat": "True", }

}

This operation does not accept a request body.

2.4.3.2. Response

This table shows the body parameters for the create flavor extra specs response:

Name Type Description

sw:wrs:guest:heartbeat Boolean

(Optional)

Indicates whether or not the guest applications running in the virtual machine make use of the Heartbeat client API.

sw:wrs:srv_grp_messaging Boolean

(Optional)

Indicates whether or not the guest applications running in the virtual machine make use of the Server-Group Messaging client API.

hw:wrs:shared_vcpu Integer

(Optional)

Indicates the vCPU of the guest virtual machine that will be scheduled to run on a shared CPU of the host. Note, this can be specified even if hw:cpu_policy is set to dedicated; allowing the guest application to use dedicated cores exclusively for its high-load tasks, but use a shared core for its low-load (e.g. management type) tasks.

hw:wrs:vcpu:scheduler String

(Optional)

Indicates the linux scheduler policy and priority for the non-boot vCPUs of the guest. The parameter allows you to specify individual values for each of the vCPUs independently.

This parameter accepts a semicolon-separated list of scheduler:priority:vcpus values as follows:

• scheduler

The scheduler policy. One of other, fifo, or rr to indicate non re- al-time, FIFO, and Round Robin policies respectively.

• priority

The real-time scheduler priority. A value between 1 and 99. • vcpus

A list of virtual CPUs as a comma-separated list (1,2,3) or a range specification (1-3). Virtual CPU number 0 refers to the boot virtual CPU and therefore cannot be used.

Name Type Description

hw:wrs:min_vcpus Integer

(Optional)

Indicates the minimum number of vCPUs for the virtual machine. The value must be between one and the number of VCPUs in the flavor of the virtual machine. If this extra_spec is specified then the server is as- sumed to support vCPU scaling.

aggregate_instance_extra_specs:localstorageBoolean

(Optional)

Indicates whether or not the virtual machine should be run on a com- pute node that can provide local storage for the virtual machine.

hw:numa_node:{guest-nu- ma-node}

Integer (Optional)

Indicates the mapping between a virtual machine virtual numa node and the host physical numa node.

hw:cpu_model String

(Optional)

Indicates the particular cpu model required by the virtual machine; i.e. in order to access the required advanced CPU features such as SSE4.2, AES and/or AVX. The valid values are: default (QEMU Virtual Proces-

sor), Nehalem (Intel Core i7 9xx (Nehalem Class Core i7)), Westmere

(Intel Westmere E56xx/L56xx (Nehalem-C)), SandyBridge (Inel Xeon

E312xx (Sandy Bridge)), Haswell (Intel Core Processor (Haswell).

Example 2.15. Create flavor extra specs: JSON response

{

"extra_specs": {

"sw:wrs:guest:heartbeat": "True", }

}

34

Related documents