4. Managing placements

Most high-level operations on placements (“traits” in OpenStack terminology) involve multiple requests to multiple endpoints. This section lists steps required to perform each operation on a placement. Examples of each step are provided in linked subsections.

Create a placement:

  1. Create a trait. Refer to Creating traits.
  2. Create a host aggregate named after the trait. Refer to Creating host aggregates.
  3. Add the trait to host aggregate’s metadata. Refer to Updating aggregate metadata.

Add a host to a placement:

  1. List resource providers and identify the one you need. Refer to Listing resource providers.
  2. Associate the trait with the resource provider. Refer to Updating resource provider traits.
  3. Add the host to the host aggregate associated with the trait. Refer to Adding hosts to aggregates.

Remove a host from a placement:

  1. Remove the host from the host aggregate associated with the trait. Refer to Removing hosts from aggregates.
  2. Disassociate the trait from the resource provider. Refer to Updating resource provider traits.

Add an image to or remove an image from a placement:

  1. Update the image details. Refer to Updating images.

List placements:

  1. List custom traits to identify the one you need. Refer to Listing traits.
  2. List host aggregates and find the one associated with the trait. Refer to Listing host aggregates.
  3. List images associated with the trait. Refer to Listing images.

Delete a placement:

  1. Remove all hosts from the host aggregate associated with the trait. Refer to Removing hosts from aggregates.
  2. Delete the host aggregate. Refer to Deleting host aggregates.
  3. Remove the trait from details of images. Refer to Updating images.
  4. Remove the trait from resource providers. Refer to Updating resource provider traits.
  5. Delete the trait. Refer to Deleting traits.