OSC-PLACEMENT(1)

πŸ“¦
version 4.9.1 Β· 4 versions
, in nixpkgs unstable

πŸ’… OSC-PLACEMENT(1) β€” osc-placement πŸ’…

πŸ’– NAME πŸ’–

okay so this is osc-placement β€” specifically osc-placement 4.9.1 β€” and it’s the OpenStackClient plugin for the Placement service, bestie. πŸ’–

This is an OpenStackClient plugin, that provides CLI for the Placement service. Python API binding is not implemented - Placement API consumers are encouraged to use the REST API directly, CLI is provided only for convenience of users.


πŸŽ€ CONTENTS πŸŽ€

🌸 Installation 🌸

At the command line:

$ pip install osc-placement

Or, if you have virtualenvwrapper installed:

$ mkvirtualenv osc-placement
$ pip install osc-placement

🫢 Contributing 🫢

If you would like to contribute to the development of OpenStack, you must follow the steps in this page:

<http://docs.openstack.org/infra/manual/developers.html>

If you already have a good understanding of how the system works and your OpenStack accounts are set up, you can skip to the development workflow section of this documentation to learn how changes to OpenStack should be submitted for review via the Gerrit tool:

<http://docs.openstack.org/infra/manual/developers.html#development-workflow>

Pull requests submitted through GitHub will be ignored.

Bugs should be filed on StoryBoard, not GitHub:

<https://storyboard.openstack.org/#!/project/openstack/osc-placement>

πŸ’… Command Line Reference πŸ’…

✨ allocation candidate list ✨

List allocation candidates. πŸ’«

Returns a representation of a collection of allocation requests and resource provider summaries. Each allocation request has information to issue an openstack resource provider allocation set request to claim resources against a related set of resource providers.

As several allocation requests are available it’s necessary to select one. To make a decision, resource provider summaries are provided with the inventory/capacity information.

For example:

$ export OS_PLACEMENT_API_VERSION=1.10
$ openstack allocation candidate list --resource VCPU=1
+---+------------+-------------------------+-------------------------+
| # | allocation | resource provider       | inventory used/capacity |
+---+------------+-------------------------+-------------------------+
| 1 | VCPU=1     | 66bcaca9-9263-45b1-a569 | VCPU=0/128              |
|   |            | -ea708ff7a968           |                         |
+---+------------+-------------------------+-------------------------+

In this case, the user is looking for resource providers that can have capacity to allocate 1 VCPU resource class. There is one resource provider that can serve that allocation request and that resource provider’s current VCPU inventory used is 0 and available capacity is 128.

This command requires at least --os-placement-api-version 1.10.

openstack allocation candidate list
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    [--resource <resource_class>=<value>]
    [--limit <limit>]
    [--required <required>]
    [--forbidden <forbidden>]
    [--member-of <member_of>]
    [--group <group>]
    [--group-policy <group_policy>]
  • --sort-column SORT_COLUMN β€” specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), column names are case-insensitive and accept underscores for spaces, can be repeated ✨
  • --sort-ascending β€” sort the column(s) in ascending order
  • --sort-descending β€” sort the column(s) in descending order
  • --resource <resource_class>=<value> β€” String indicating an amount of resource of a specified class that providers in each allocation request must collectively have the capacity and availability to serve. Can be specified multiple times per resource class. For example: --resource VCPU=4 --resource DISK_GB=64 --resource MEMORY_MB=2048
  • --limit <limit> β€” A positive integer to limit the maximum number of allocation candidates. This option requires at least --os-placement-api-version 1.16.
  • --required <required> β€” A required trait. May be repeated. Allocation candidates must collectively contain all of the required traits. This option requires at least --os-placement-api-version 1.17. Since --os-placement-api-version 1.39 the value of this parameter can be a comma separated list of trait names to express OR relationship between those traits.
  • --forbidden <forbidden> β€” A forbidden trait. May be repeated. Returned allocation candidates must not contain any of the specified traits. This option requires at least --os-placement-api-version 1.22.
  • --member-of <member_of> β€” A list of comma-separated UUIDs of the resource provider aggregates. The returned allocation candidates must be associated with at least one of the aggregates identified by uuid. This param requires at least --os-placement-api-version 1.21 and can be repeated to add(restrict) the condition with --os-placement-api-version 1.24 or greater. For example, to get candidates in either of agg1 or agg2 and definitely in agg3, specify: --member_of <agg1>,<agg2> --member_of <agg3>
  • --group <group> β€” An integer to group granular requests. If specified, following given options of resources, required/forbidden traits, and aggregate are associated to that group and will be satisfied by the same resource provider in the response. Can be repeated to get candidates from multiple resource providers in the same resource provider tree. For example, --group 1 --resource VCPU=3 --required HW_CPU_X86_AVX --group 2 --resource VCPU=2 --required HW_CPU_X86_SSE will provide candidates where three VCPUs comes from a provider with HW_CPU_X86_AVX trait and two VCPUs from a provider with HW_CPU_X86_SSE trait. This option requires at least --os-placement-api-version 1.25 or greater, but to have placement server be aware of resource provider tree, use --os-placement-api-version 1.29 or greater.
  • --group-policy <group_policy> β€” This indicates how the groups should interact when multiple groups are supplied. With group_policy=none (default), separate groups may or may not be satisfied by the same provider. With group_policy=isolate, numbered groups are guaranteed to be satisfied by different providers.

This command is provided by the osc-placement plugin.

🧚 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
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
  • --sort-column SORT_COLUMN β€” specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), column names are case-insensitive and accept underscores for spaces, can be repeated ✨
  • --sort-ascending β€” sort the column(s) in ascending order
  • --sort-descending β€” sort the column(s) in descending order

This command is provided by the osc-placement plugin.

πŸ’œ resource class set πŸ’œ

Create or validate the existence of single resource class.

Unlike openstack resource class create, this command also succeeds if the resource class already exists, which makes this an idempotent check or create command.

This command requires at least --os-placement-api-version 1.7.

openstack resource class set <name>
  • name β€” Name of the resource class

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 <name>
  • 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
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    <uuid>
  • --sort-column SORT_COLUMN β€” specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), column names are case-insensitive and accept underscores for spaces, can be repeated ✨
  • --sort-ascending β€” sort the column(s) in ascending order
  • --sort-descending β€” sort the column(s) in descending order
  • 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
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    [--aggregate <aggregate_uuid>]
    [--generation <resource_provider_generation>]
    <uuid>
  • --sort-column SORT_COLUMN β€” specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), column names are case-insensitive and accept underscores for spaces, can be repeated ✨
  • --sort-ascending β€” sort the column(s) in ascending order
  • --sort-descending β€” sort the column(s) in descending order πŸ’…
  • --aggregate <aggregate_uuid> β€” the UUID of the aggregate ✨. Drop this option more than once and you can hook one resource provider up to multiple aggregates at the same time β€” iconic polycule behaviour, no cap 🫢
  • --generation <resource_provider_generation> β€” the generation of the resource provider πŸ”₯. It has to match the server-side generation of that resource provider, or the whole operation just fails πŸ’€. Think of it as a vibe check the server runs on you.
This one needs at least --os-placement-api-version 1.19 πŸ™ˆ
  • uuid β€” UUID of the resource provider 🌸

This command is provided by the osc-placement plugin πŸ’…

πŸ’– resource provider allocation delete πŸ’–

Deletes all the resource allocations for a given consumer. Like, all of them. Gone. Bestie, there is no undo button 😭

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 ✨

⚠️ Real talk: this is a full replacement of the existing allocations. So if you wanna keep what's already there and add a new resource class allocation, you have to spell out every resource class allocation β€” old ones and new ones. Miss one and it's just... not there anymore πŸ™ˆ

Starting from --os-placement-api-version 1.8 it's required to specify --project-id and --user-id to set allocations. And even when it's not strictly required, it's highly recommended to pass --project-id and --user-id when setting allocations, for accounting and data consistency reasons πŸ‘‘

Starting with --os-placement-api-version 1.12 the API response contains the project_id and user_id of allocations, which also shows up in the CLI output 🌟

Starting with --os-placement-api-version 1.28 a consumer generation is used, which facilitates safe concurrent modification of an allocation πŸ¦‹

Starting with --os-placement-api-version 1.38 it's required to specify --consumer-type to set allocations. And it's genuinely helpful to provide a --consumer-type when setting allocations so that resource usages can be filtered on consumer types πŸ’œ

openstack resource provider allocation set
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    [--allocation <rp=resource-provider-id,resource-class-name=amount-of-resource-used>]
    [--project-id project_id]
    [--user-id user_id]
    [--consumer-type consumer_type]
    <uuid>
  • --sort-column SORT_COLUMN β€” specify the column(s) to sort the data (columns specified first have priority, non-existing columns are ignored), column names are case-insensitive and accept underscores for spaces, can be repeated ✨
  • --sort-ascending β€” sort the column(s) in ascending order ⬆️
  • --sort-descending β€” sort the column(s) in descending order ⬇️
  • --allocation <rp=resource-provider-id,resource-class-name=amount-of-resource-used> β€” create (or update) an allocation of a resource class 🌸. Specify the option multiple times to set multiple allocations β€” go off, stack 'em πŸ‘‘
  • --project-id project_id β€” ID of the consuming project. This option is required starting from --os-placement-api-version 1.8 πŸŽ€
  • --user-id user_id β€” ID of the consuming user. This option is required starting from --os-placement-api-version 1.8 πŸŽ€
  • --consumer-type consumer_type β€” the type of the consumer. This option is required starting from --os-placement-api-version 1.38 πŸŽ€
  • uuid β€” UUID of the consumer πŸ¦‹

This command is provided by the osc-placement plugin πŸ’…


⭐ resource provider allocation show ⭐

Shows the resource allocations for a given consumer πŸ‘€

Starting with --os-placement-api-version 1.12 the API response contains the project_id and user_id of allocations, which also appears in the CLI output ✨

Starting with --os-placement-api-version 1.38 the API response contains the consumer_type of the consumer, which also appears in the CLI output 🌟

openstack resource provider allocation show
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    <uuid>
  • --sort-column SORT_COLUMN β€” specify the column(s) to sort the data (columns specified first have priority, non-existing columns are ignored), column names are case-insensitive and accept underscores for spaces, can be repeated ✨
  • --sort-ascending β€” sort the column(s) in ascending order ⬆️
  • --sort-descending β€” sort the column(s) in descending order ⬇️
  • uuid β€” UUID of the consumer πŸŽ€

This command is provided by the osc-placement plugin πŸ’…


πŸ¦‹ resource provider allocation unset πŸ¦‹

Removes one or more sets of provider allocations for a consumer ✨

⚠️ Heads up: omitting both the --provider and the --resource-class option is equivalent to removing all allocations for the given consumer πŸ’€ like, everything. Be sure that's what you meant.

This command requires --os-placement-api-version 1.12 or greater. For older versions, use openstack resource provider allocation set instead πŸ™

openstack resource provider allocation unset
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    [--provider provider_uuid]
    [--resource-class resource_class]
    <consumer_uuid>
  • --sort-column SORT_COLUMN β€” specify the column(s) to sort the data (columns specified first have priority, non-existing columns are ignored), column names are case-insensitive and accept underscores for spaces, can be repeated ✨
  • --sort-ascending β€” sort the column(s) in ascending order ⬆️
  • --sort-descending β€” sort the column(s) in descending order ⬇️
  • --provider provider_uuid β€” UUID of a specific resource provider from which to remove allocations for the given consumer 🌸. This one's a lifesaver when the consumer has allocations on more than one provider β€” classic scenario: you evacuated a server to another compute node and now you wanna clean up the allocations on the source compute node resource provider so you can actually delete it πŸ”₯. Specify it multiple times to remove allocations against multiple resource providers. Omit this option to remove all allocations for the consumer, or to remove all allocations of a specific resource class from all the resource providers with the --resource_class option πŸ‘‘
  • --resource-class resource_class β€” name of a resource class from which to remove allocations for the given consumer πŸŽ€. Handy when the consumer has allocations on more than one resource class. By default this removes allocations for the given resource class from all the providers. If the --provider option is also specified, the allocations to remove will be limited to that resource class of the given resource provider πŸ’…
  • consumer_uuid β€” UUID of the consumer. It is strongly recommended to use --os-placement-api-version 1.28 or greater when using this option, to ensure the other allocation information is retained πŸ™ˆ

This command is provided by the osc-placement plugin πŸ’…


πŸ‘‘ resource provider create πŸ‘‘

Creates a new resource provider ✨ main character energy fr fr

openstack resource provider create
    [--parent-provider <parent_provider>]
    [--uuid <uuid>]
    <name>
  • --parent-provider <parent_provider> β€” UUID of the parent provider. Omit it for no parent 🫢. This option requires at least --os-placement-api-version 1.14 ⭐
  • --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 πŸ’€

Deletes a resource provider. That's it. That's the whole thing 😭

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 πŸ“

Replaces 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
    [--allocation_ratio <allocation_ratio>]
    [--min_unit <min_unit>]
    [--max_unit <max_unit>]
    [--reserved <reserved>]
    [--step_size <step_size>]
    --total <total>
    <uuid>
    <class>
  • --allocation_ratio <allocation_ratio> β€” 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 πŸ”₯ (yes, she overcommits, she's iconic)
  • --min_unit <min_unit> β€” a minimum amount any single allocation against an inventory can have πŸŽ€
  • --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 πŸ”’
  • --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 🧚

Deletes the inventory ✨

Depending on whether the resource class argument is present, it deletes all inventory for a given resource provider, or for a resource provider/class pair πŸ‘‘

Deleting all inventories for a given resource provider requires at least --os-placement-api-version 1.5 ⭐

openstack resource provider inventory delete
    --resource-class <resource_class>
    <uuid>
  • --resource-class <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 argument can be omitted starting with --os-placement-api-version 1.5. If it's omitted, all inventories of the specified resource provider will be deleted πŸ’€
  • uuid β€” UUID of the resource provider πŸ¦‹

This command is provided by the osc-placement plugin πŸ’…


🌸 resource provider inventory list 🌸

Lists inventories for a given resource provider πŸ‘€

openstack resource provider inventory list
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    <uuid>
  • --sort-column SORT_COLUMN β€” specify the column(s) to sort the data (columns specified first have priority, non-existing columns are ignored), column names are case-insensitive and accept underscores for spaces, can be repeated ✨
  • --sort-ascending β€” sort the column(s) in ascending order ⬆️
  • --sort-descending β€” sort the column(s) in descending order ⬇️

uuid β€” UUID of the resource provider.

This command is provided by the osc-placement plugin.


resource provider inventory set πŸ’–

Bestie, this one replaces the whole set of inventory records for the resource provider. Not a little tweak β€” a full swap.

By default this is a full replacement of the existing inventory. If you want to keep what's already there and add a new resource class inventory, you must specify all the resource class inventory β€” old and new β€” or pass --amend.

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

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
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    [--resource <resource_class>:<inventory_field>=<value>]
    [--aggregate]
    [--amend]
    [--dry-run]
    <uuid>
  • --sort-column SORT_COLUMN β€” specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), column names are case-insensitive and accept underscores for spaces, can be repeated.
  • --sort-ascending β€” sort the column(s) in ascending order.
  • --sort-descending β€” sort the column(s) in descending order.
  • --resource <resource_class>:<inventory_field>=<value> β€” a string describing the 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. The optional <inventory_field> 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.
    • min_unit β€” a minimum amount any single allocation against an inventory can have.
    • 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.
    • total β€” the actual amount of the resource that the provider can accommodate.
  • --aggregate β€” if this option is specified, the inventories for all resource providers that are members of the aggregate will be set. This option requires at least --os-placement-api-version 1.3.
  • --amend β€” if this option is specified, the inventories will be amended instead of being fully replaced.
  • --dry-run β€” if this option is specified, the inventories that would be set will be returned without actually setting any inventories.

uuid β€” UUID of the resource provider or UUID of the aggregate, if --aggregate is specified.

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 <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 list πŸ¦‹

List resource providers.

openstack resource provider list
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    [--uuid <uuid>]
    [--name <name>]
    [--resource <resource_class>=<value>]
    [--in-tree <in_tree>]
    [--required <required>]
    [--forbidden <forbidden>]
    [--member-of <member_of>]
  • --sort-column SORT_COLUMN β€” specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), column names are case-insensitive and accept underscores for spaces, can be repeated.
  • --sort-ascending β€” sort the column(s) in ascending order.
  • --sort-descending β€” sort the column(s) in descending order.
  • --uuid <uuid> β€” UUID of the resource provider.
  • --name <name> β€” name of the resource provider.
  • --resource <resource_class>=<value> β€” a resource class value pair indicating an amount of resource of a specified class that a provider must have the capacity to serve. May be repeated. This param requires at least --os-placement-api-version 1.4.
  • --in-tree <in_tree> β€” restrict listing to the same "provider tree" as the specified provider UUID. This option requires at least --os-placement-api-version 1.14.
  • --required <required> β€” a required trait. May be repeated. Resource providers must collectively contain all of the required traits. This option requires at least --os-placement-api-version 1.18. Since --os-placement-api-version 1.39 the value of this parameter can be a comma separated list of trait names to express OR relationship between those traits.
  • --forbidden <forbidden> β€” a forbidden trait. May be repeated. Returned resource providers must not contain any of the specified traits. This option requires at least --os-placement-api-version 1.22.
  • --member-of <member_of> β€” a list of comma-separated UUIDs of the resource provider aggregates. The returned resource providers must be associated with at least one of the aggregates identified by uuid. This param requires at least --os-placement-api-version 1.3 and can be repeated to add(restrict) the condition with --os-placement-api-version 1.24 or greater. For example, to get candidates either in agg1 or in agg2 and definitely in agg3, specify:
--member_of <agg1>,<agg2> --member_of <agg3>

This command is provided by the osc-placement plugin.


resource provider set πŸŽ€

Update an existing resource provider.

openstack resource provider set
    --name <name>
    [--parent-provider <parent_provider>]
    <uuid>
  • --name <name> β€” a new name of the resource provider.
  • --parent-provider <parent_provider> β€” UUID of the parent provider. Can only be set if the resource provider has no parent yet. This option requires at least --os-placement-api-version 1.14.

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 [--allocations] <uuid>
  • --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 trait delete πŸ’€

Dissociate all the traits from the resource provider.

Note that this command is not atomic if multiple processes are managing traits for the same provider.

This command requires at least --os-placement-api-version 1.6.

openstack resource provider trait delete <uuid>

uuid β€” UUID of the resource provider.

This command is provided by the osc-placement plugin.


resource provider trait list 🌈

List traits associated with the resource provider identified by {uuid}.

This command requires at least --os-placement-api-version 1.6.

openstack resource provider trait list
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    <uuid>
  • --sort-column SORT_COLUMN β€” specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), column names are case-insensitive and accept underscores for spaces, can be repeated.
  • --sort-ascending β€” sort the column(s) in ascending order.
  • --sort-descending β€” sort the column(s) in descending order.

uuid β€” UUID of the resource provider.

This command is provided by the osc-placement plugin.


resource provider trait set πŸ‘‘

Associate traits with the resource provider identified by {uuid}.

All the associated traits will be replaced by the traits specified.

This command requires at least --os-placement-api-version 1.6.

openstack resource provider trait set
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    [--trait <trait>]
    <uuid>
  • --sort-column SORT_COLUMN β€” specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), column names are case-insensitive and accept underscores for spaces, can be repeated.
  • --sort-ascending β€” sort the column(s) in ascending order.
  • --sort-descending β€” sort the column(s) in descending order.
  • --trait <trait> β€” name of the trait. May be repeated.

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
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    <uuid>
  • --sort-column SORT_COLUMN β€” specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), column names are case-insensitive and accept underscores for spaces, can be repeated.
  • --sort-ascending β€” sort the column(s) in ascending order.
  • --sort-descending β€” sort the column(s) in descending order.

uuid β€” UUID of the resource provider.

This command is provided by the osc-placement plugin.


resource usage show πŸ’œ

Show resource usages for a project (and optionally user) per class.

Gives a report of usage information for resources associated with the project identified by the project_id argument and user identified by the --user-id option.

This command requires at least --os-placement-api-version 1.9.

okay so for resource usage show, the synopsis wraps up like this:

openstack resource usage show
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    [--user-id <user-uuid>]
    <project-uuid>
  • --sort-column SORT_COLUMN β€” specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), column names are case-insensitive and accept underscores for spaces, can be repeated
  • --sort-ascending β€” sort the column(s) in ascending order
  • --sort-descending β€” sort the column(s) in descending order
  • --user-id <user-uuid> β€” ID of the user.
  • project-uuid β€” ID of the project.

This command is provided by the osc-placement plugin. 🫢


🌸 trait create 🌸

Create a new custom trait. ✨

Custom traits must begin with the prefix CUSTOM_ and contain only the letters A through Z, the numbers 0 through 9 and the underscore "_" character.

This command requires at least --os-placement-api-version 1.6.

openstack trait create <name>
  • name β€” Name of the trait.

This command is provided by the osc-placement plugin. 🫢


πŸ¦‹ trait delete πŸ¦‹

Delete the trait specified by {name}.

This command requires at least --os-placement-api-version 1.6.

openstack trait delete <name>
  • name β€” Name of the trait.

This command is provided by the osc-placement plugin. 🫢


πŸŽ€ trait list πŸŽ€

Return a list of valid trait strings.

This command requires at least --os-placement-api-version 1.6.

openstack trait list
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    [--name <name>]
    [--associated]
  • --sort-column SORT_COLUMN β€” specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), column names are case-insensitive and accept underscores for spaces, can be repeated
  • --sort-ascending β€” sort the column(s) in ascending order
  • --sort-descending β€” sort the column(s) in descending order
  • --name <name> β€” A string to filter traits. The following options are available: startswith operator filters the traits whose name begins with a specific prefix, e.g. name=startswith:CUSTOM; in operator filters the traits whose name is in the specified list, e.g. name=in:HW_CPU_X86_AVX,HW_CPU_X86_SSE, HW_CPU_X86_INVALID_FEATURE.
  • --associated β€” If this parameter is presented, the returned traits will be those that are associated with at least one resource provider.

This command is provided by the osc-placement plugin. 🫢


🧚 trait show 🧚

Check if a trait name exists in this cloud.

This command requires at least --os-placement-api-version 1.6.

openstack trait show <name>
  • name β€” Name of the trait.

This command is provided by the osc-placement plugin. 🫢


πŸ“š User Documentation πŸ“š

This document describes various usage aspects of the osc-placement plugin including but not limited to command line examples and explanations, references and microversion usage.

The full Placement API reference can be found here:

<https://docs.openstack.org/api-ref/placement/>

πŸ”₯ Microversion usage πŸ”₯

By default, all commands are run with the 1.0 Placement API version. One can specify a different microversion using the --os-placement-api-version option, for example:

$ openstack resource provider aggregate list --os-placement-api-version 1.1 dc43b86a-1261-4f8b-8330-28289fe754e3
+--------------------------------------+
| uuid                                 |
+--------------------------------------+
| 42896e0d-205d-4fe3-bd1e-100924931787 |
| 42896e0d-205d-4fe3-bd1e-100924931788 |
+--------------------------------------+

Alternatively, the OS_PLACEMENT_API_VERSION environment variable can be set, for example:

$ export OS_PLACEMENT_API_VERSION=1.1
$ openstack resource provider aggregate list dc43b86a-1261-4f8b-8330-28289fe754e3
+--------------------------------------+
| uuid                                 |
+--------------------------------------+
| 42896e0d-205d-4fe3-bd1e-100924931787 |
| 42896e0d-205d-4fe3-bd1e-100924931788 |
+--------------------------------------+

The Placement API version history can be found here:

<https://docs.openstack.org/nova/latest/user/placement.html#
rest-api-version-history>

🌈 Examples 🌈

This section provides some common examples for command line usage.

To see the list of available commands for resource providers, run:

$ openstack resource -h

πŸ‘‘ Resource providers πŸ‘‘

The resource provider command subset has a basic CRUD interface. First, it can be easily created:

$ p=$(openstack resource provider create Baremetal_node_01 -c uuid -f value)

and renamed:

$ openstack resource provider set $p --name Baremetal_node_02
+------------+--------------------------------------+
| Field      | Value                                |
+------------+--------------------------------------+
| uuid       | c33caafc-b59c-46bc-b396-19f117171fec |
| name       | Baremetal_node_02                    |
| generation | 0                                    |
+------------+--------------------------------------+

To get all allocations related to the resource provider use an --allocations option for the show command:

$ openstack resource provider show $p --allocations
+-------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field       | Value                                                                                                                                                                                                                |
+-------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| uuid        | c33caafc-b59c-46bc-b396-19f117171fec                                                                                                                                                                                 |
| name        | Baremetal_node_02                                                                                                                                                                                                    |
| generation  | 4                                                                                                                                                                                                                    |
| allocations | {u'45f4ccf9-36e3-4d13-8c6b-80fd6c66a195': {u'resources': {u'VCPU': 1, u'MEMORY_MB': 512, u'DISK_GB': 10}}, u'2892c6f6-6ee7-4a34-aa20-156b8216de3c': {u'resources': {u'VCPU': 1, u'MEMORY_MB': 512, u'DISK_GB': 10}}} |
+-------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

A resource provider cannot be deleted if it has allocations, otherwise just issue:

$ openstack resource provider delete $p

and it is done. πŸ’…


πŸ“ Allocations πŸ“

One can set allocations against a resource provider for a given consumer multiple ways.

When setting allocations against a single resource provider, it is generally easiest to use something like:

$ openstack resource provider allocation set 45f4ccf9-36e3-4d13-8c6b-80fd6c66a195 --allocation rp=dc43b86a-1261-4f8b-8330-28289fe754e3,DISK_GB=10,VCPU=1,MEMORY_MB=512
+--------------------------------------+------------+-------------------------------------------------+
| resource_provider                    | generation | resources                                       |
+--------------------------------------+------------+-------------------------------------------------+
| dc43b86a-1261-4f8b-8330-28289fe754e3 | 9          | {u'VCPU': 1, u'MEMORY_MB': 512, u'DISK_GB': 10} |
+--------------------------------------+------------+-------------------------------------------------+

Alternatively one can set resource allocations against separate providers:

$ openstack resource provider allocation set 45f4ccf9-36e3-4d13-8c6b-80fd6c66a195 --allocation rp=dc43b86a-1261-4f8b-8330-28289fe754e3,VCPU=1,MEMORY_MB=512 --allocation rp=762746bc-de0d-47a7-b47a-a14028643663,DISK_GB=10
+--------------------------------------+------------+---------------------------------+
| resource_provider                    | generation | resources                       |
+--------------------------------------+------------+---------------------------------+
| dc43b86a-1261-4f8b-8330-28289fe754e3 | 9          | {u'VCPU': 1, u'MEMORY_MB': 512} |
| 762746bc-de0d-47a7-b47a-a14028643663 | 1          | {u'DISK_GB': 10}                |
+--------------------------------------+------------+---------------------------------+

In this scenario, the consumer, 45f4ccf9-36e3-4d13-8c6b-80fd6c66a195, has VCPU and MEMORY_MB allocations against one provider, dc43b86a-1261-4f8b-8330-28289fe754e3, and DISK_GB allocations against another provider, 762746bc-de0d-47a7-b47a-a14028643663.

πŸ’€ Note: When setting allocations for a consumer, the command overwrites any existing allocations for that consumer. So if you want to add or change one resource class allocation but leave other existing resource class allocations unchanged, you must also specify those other existing unchanged allocations so they are not removed.

πŸ’œ Resource classes πŸ’œ

There is a standard set of resource classes defined within the Placement service itself. These standard resource classes cannot be modified.

Users can create and delete custom resource classes, which have a name prefix of CUSTOM_.


Author

Author name not set

2016, OpenStack Foundation


and that’s the whole vibe for OSC-PLACEMENT(1), version 4.9.1, dated Jan 02, 1980 β€” mwah, bestie πŸ’‹βœ¨

πŸ“¦ where this page comes from