Listing traits
GET /traits/detail
Returns a list of trait strings. This custom API call is only supported in Virtuozzo Hybrid Infrastructure.
Source: https://docs.openstack.org/api-ref/placement/?expanded=list-traits-detail#list-traits
Request
Parameters
Name | In | Type | Description |
---|---|---|---|
name (Optional) |
query | string |
A string to filter traits. The following options are available:
|
associated (Optional) |
query | string | If this parameter has a true value, the returned traits will be those that are associated with at least one resource provider. Available values for the parameter are true and false. |
Example
curl -ks -H 'Content-Type: application/json' -H 'OpenStack-API-Version: placement 1.32' -H 'X-Auth-Token: gAAAAA<...>' \ https://<node_IP_addr>:8780/traits/detail?name=startswith:CUSTOM_HCI
Response
Parameters
Name | In | Type | Description |
---|---|---|---|
traits
|
body | array | A list of traits. |
trait
|
body | array | A list of trait details. |
name
|
body | string | The name of a trait. |
display_name
|
body | string | A human-readable trait name to be displayed in the admin panel. |
description
|
body | string | A human-readable trait description to be displayed in the admin panel. |
Status codes
Success
Code | Reason |
---|---|
200 - OK
|
Request was successful. |
Error
Code | Reason |
---|---|
404 - Not Found
|
The requested resource could not be found. |
Example
{ "traits": [ { "display_name": "placement1", "description": "Sample placement", "name": "CUSTOM_HCI_E3A45A6A4B614263893D72015BFB1A5F" }, { "display_name": "placement2", "description": "Sample placement #2", "name": "CUSTOM_HCI_0A7F6A35E650420CB30200A8359861D9" } ] }