Command Line Reference

resource class create

Create a new resource class.

This command requires at least –os-placement-api-version 1.2.

openstack resource class create <name>
name

Name of the resource class

This command is provided by the osc-placement plugin.

resource class delete

Delete the resource class identified by {name}.

Only custom resource classes can be deleted.

This command requires at least –os-placement-api-version 1.2.

openstack resource class delete <name>
name

Name of the resource class

This command is provided by the osc-placement plugin.

resource class list

Return a list of all resource classes.

This command requires at least –os-placement-api-version 1.2.

openstack resource class list
    [-f {csv,json,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--noindent]
    [--quote {all,minimal,none,nonnumeric}]
    [--sort-column SORT_COLUMN]
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

--max-width <integer>

Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. Implied if –max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

--noindent

whether to disable indenting the JSON

--quote <QUOTE_MODE>

when to include quotes, defaults to nonnumeric

--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

This command is provided by the osc-placement plugin.

resource class show

Return a representation of the resource class identified by {name}.

This command requires at least –os-placement-api-version 1.2.

openstack resource class show
    [-f {json,shell,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--noindent]
    [--prefix PREFIX]
    <name>
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

--max-width <integer>

Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. Implied if –max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

--noindent

whether to disable indenting the JSON

--prefix <PREFIX>

add a prefix to all variable names

name

Name of the resource class

This command is provided by the osc-placement plugin.

resource provider aggregate list

List resource provider aggregates.

This command requires at least –os-placement-api-version 1.1.

openstack resource provider aggregate list
    [-f {csv,json,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--noindent]
    [--quote {all,minimal,none,nonnumeric}]
    [--sort-column SORT_COLUMN]
    <uuid>
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

--max-width <integer>

Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. Implied if –max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

--noindent

whether to disable indenting the JSON

--quote <QUOTE_MODE>

when to include quotes, defaults to nonnumeric

--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

uuid

UUID of the resource provider

This command is provided by the osc-placement plugin.

resource provider aggregate set

Associate a list of aggregates with the resource provider.

Each request cleans up previously associated resource provider aggregates entirely and sets the new ones. Passing empty aggregate UUID list will remove all associations with aggregates for the particular resource provider.

This command requires at least –os-placement-api-version 1.1.

openstack resource provider aggregate set
    [-f {csv,json,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--noindent]
    [--quote {all,minimal,none,nonnumeric}]
    [--sort-column SORT_COLUMN]
    [--aggregate <aggregate_uuid>]
    <name>
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

--max-width <integer>

Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. Implied if –max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

--noindent

whether to disable indenting the JSON

--quote <QUOTE_MODE>

when to include quotes, defaults to nonnumeric

--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--aggregate <aggregate_uuid>

UUID of the aggregate. Specify multiple times to associate a resource provider with multiple aggregates.

name

UUID of the resource provider

This command is provided by the osc-placement plugin.

resource provider allocation delete

Delete a resource allocation for a given consumer

openstack resource provider allocation delete <uuid>
uuid

UUID of the consumer

This command is provided by the osc-placement plugin.

resource provider allocation set

Replaces the set of resource allocation(s) for a given consumer

Note that this is a full replacement of the existing allocations. If you want to retain the existing allocations and add a new resource class allocation, you must specify all resource class allocations, old and new.

openstack resource provider allocation set
    [-f {csv,json,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--noindent]
    [--quote {all,minimal,none,nonnumeric}]
    [--sort-column SORT_COLUMN]
    [--allocation <rp=resource-provider-id,resource-class-name=amount-of-resource-used>]
    <uuid>
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

--max-width <integer>

Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. Implied if –max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

--noindent

whether to disable indenting the JSON

--quote <QUOTE_MODE>

when to include quotes, defaults to nonnumeric

--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--allocation <rp=resource-provider-id,resource-class-name=amount-of-resource-used>

Create (or update) an allocation of a resource class. Specify option multiple times to set multiple allocations.

uuid

UUID of the consumer

This command is provided by the osc-placement plugin.

resource provider allocation show

Show resource allocations for a given consumer

openstack resource provider allocation show
    [-f {csv,json,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--noindent]
    [--quote {all,minimal,none,nonnumeric}]
    [--sort-column SORT_COLUMN]
    <uuid>
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

--max-width <integer>

Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. Implied if –max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

--noindent

whether to disable indenting the JSON

--quote <QUOTE_MODE>

when to include quotes, defaults to nonnumeric

--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

uuid

UUID of the consumer

This command is provided by the osc-placement plugin.

resource provider create

Create a new resource provider

openstack resource provider create
    [-f {json,shell,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--noindent]
    [--prefix PREFIX]
    [--uuid <uuid>]
    <name>
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

--max-width <integer>

Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. Implied if –max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

--noindent

whether to disable indenting the JSON

--prefix <PREFIX>

add a prefix to all variable names

--uuid <uuid>

UUID of the resource provider

name

Name of the resource provider

This command is provided by the osc-placement plugin.

resource provider delete

Delete a resource provider

openstack resource provider delete <uuid>
uuid

UUID of the resource provider

This command is provided by the osc-placement plugin.

resource provider inventory class set

Replace the inventory record of the class for the resource provider.

Example: openstack resource provider inventory class set <uuid> VCPU –total 16 –max_unit 4 –reserved 1

openstack resource provider inventory class set
    [-f {json,shell,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--noindent]
    [--prefix PREFIX]
    [--allocation_ratio <allocation_ratio>]
    [--max_unit <max_unit>]
    [--reserved <reserved>]
    [--step_size <step_size>]
    [--min_unit <min_unit>]
    --total <total>
    <uuid>
    <class>
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

--max-width <integer>

Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. Implied if –max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

--noindent

whether to disable indenting the JSON

--prefix <PREFIX>

add a prefix to all variable names

--allocation_ratio <allocation_ratio>

It is used in determining whether consumption of the resource of the provider can exceed physical constraints. For example, for a vCPU resource with: allocation_ratio = 16.0, total = 8. Overall capacity is equal to 128 vCPUs.

--max_unit <max_unit>

A maximum amount any single allocation against an inventory can have.

--reserved <reserved>

The amount of the resource a provider has reserved for its own use.

--step_size <step_size>

A representation of the divisible amount of the resource that may be requested. For example, step_size = 5 means that only values divisible by 5 (5, 10, 15, etc.) can be requested.

--min_unit <min_unit>

A minimum amount any single allocation against an inventory can have.

--total <total>

The actual amount of the resource that the provider can accommodate.

uuid

UUID of the resource provider

class

<resource_class> is an entity that indicates standard or deployer-specific resources that can be provided by a resource provider. For example, VCPU, MEMORY_MB, DISK_GB.

This command is provided by the osc-placement plugin.

resource provider inventory delete

Delete the inventory for a given resource provider/class pair

openstack resource provider inventory delete <uuid> <resource_class>
uuid

UUID of the resource provider

resource_class

<resource_class> is an entity that indicates standard or deployer-specific resources that can be provided by a resource provider. For example, VCPU, MEMORY_MB, DISK_GB.

This command is provided by the osc-placement plugin.

resource provider inventory list

List inventories for a given resource provider.

openstack resource provider inventory list
    [-f {csv,json,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--noindent]
    [--quote {all,minimal,none,nonnumeric}]
    [--sort-column SORT_COLUMN]
    <uuid>
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

--max-width <integer>

Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. Implied if –max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

--noindent

whether to disable indenting the JSON

--quote <QUOTE_MODE>

when to include quotes, defaults to nonnumeric

--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

uuid

UUID of the resource provider

This command is provided by the osc-placement plugin.

resource provider inventory set

Replaces the set of inventory records for the resource provider.

Note that this is a full replacement of the existing inventory. If you want to retain the existing inventory and add a new resource class inventory, you must specify all resource class inventory, old and new.

If a specific inventory field is not specified for a given resource class, it is assumed to be the total, i.e. –resource VCPU=16 is equivalent to –resource VCPU:total=16.

Example: openstack resource provider inventory set <uuid> –resource VCPU=16 –resource MEMORY_MB=2048 –resource MEMORY_MB:step_size=128

openstack resource provider inventory set
    [-f {csv,json,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--noindent]
    [--quote {all,minimal,none,nonnumeric}]
    [--sort-column SORT_COLUMN]
    [--resource <resource_class>:<inventory_field>=<value>]
    <uuid>
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

--max-width <integer>

Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. Implied if –max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

--noindent

whether to disable indenting the JSON

--quote <QUOTE_MODE>

when to include quotes, defaults to nonnumeric

--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--resource <resource_class>:<inventory_field>=<value>

String describing resource. <resource_class> is an entity that indicates standard or deployer-specific resources that can be provided by a resource provider. For example, VCPU, MEMORY_MB, DISK_GB. <inventory_field> (optional) can be: allocation_ratio - it is used in determining whether consumption of the resource of the provider can exceed physical constraints. for example, for a vcpu resource with: allocation_ratio = 16.0, total = 8. overall capacity is equal to 128 vcpus. max_unit - a maximum amount any single allocation against an inventory can have. reserved - the amount of the resource a provider has reserved for its own use. step_size - a representation of the divisible amount of the resource that may be requested. for example, step_size = 5 means that only values divisible by 5 (5, 10, 15, etc.) can be requested. min_unit - a minimum amount any single allocation against an inventory can have. total - the actual amount of the resource that the provider can accommodate.

uuid

UUID of the resource provider

This command is provided by the osc-placement plugin.

resource provider inventory show

Show the inventory for a given resource provider/class pair.

openstack resource provider inventory show
    [-f {json,shell,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--noindent]
    [--prefix PREFIX]
    <uuid>
    <resource_class>
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

--max-width <integer>

Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. Implied if –max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

--noindent

whether to disable indenting the JSON

--prefix <PREFIX>

add a prefix to all variable names

uuid

UUID of the resource provider

resource_class

<resource_class> is an entity that indicates standard or deployer-specific resources that can be provided by a resource provider. For example, VCPU, MEMORY_MB, DISK_GB.

This command is provided by the osc-placement plugin.

resource provider list

List resource providers

openstack resource provider list
    [-f {csv,json,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--noindent]
    [--quote {all,minimal,none,nonnumeric}]
    [--sort-column SORT_COLUMN]
    [--uuid <uuid>]
    [--name <name>]
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

--max-width <integer>

Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. Implied if –max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

--noindent

whether to disable indenting the JSON

--quote <QUOTE_MODE>

when to include quotes, defaults to nonnumeric

--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--uuid <uuid>

UUID of the resource provider

--name <name>

Name of the resource provider

This command is provided by the osc-placement plugin.

resource provider set

Update an existing resource provider

openstack resource provider set
    [-f {json,shell,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--noindent]
    [--prefix PREFIX]
    --name <name>
    <uuid>
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

--max-width <integer>

Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. Implied if –max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

--noindent

whether to disable indenting the JSON

--prefix <PREFIX>

add a prefix to all variable names

--name <name>

A new name of the resource provider

uuid

UUID of the resource provider

This command is provided by the osc-placement plugin.

resource provider show

Show resource provider details

openstack resource provider show
    [-f {json,shell,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--noindent]
    [--prefix PREFIX]
    [--allocations]
    <uuid>
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

--max-width <integer>

Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. Implied if –max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

--noindent

whether to disable indenting the JSON

--prefix <PREFIX>

add a prefix to all variable names

--allocations

include the info on allocations of the provider resources

uuid

UUID of the resource provider

This command is provided by the osc-placement plugin.

resource provider usage show

Show resource usages per class for a given resource provider.

openstack resource provider usage show
    [-f {csv,json,table,value,yaml}]
    [-c COLUMN]
    [--max-width <integer>]
    [--fit-width]
    [--print-empty]
    [--noindent]
    [--quote {all,minimal,none,nonnumeric}]
    [--sort-column SORT_COLUMN]
    <uuid>
-f <FORMATTER>, --format <FORMATTER>

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

--max-width <integer>

Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. Implied if –max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

--noindent

whether to disable indenting the JSON

--quote <QUOTE_MODE>

when to include quotes, defaults to nonnumeric

--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

uuid

UUID of the resource provider

This command is provided by the osc-placement plugin.