4.2. Listing traits¶
GET /traits/detail
Returns a list of trait strings. This custom API call is only supported in Virtuozzo Hybrid Infrastructure.
4.2.1. Request¶
| Name | In | Type | Description | 
|---|---|---|---|
name (Optional) | 
query | string | 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 (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. | 
4.2.1.1. 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
4.2.2. Response¶
| Name | In | Type | Description | 
|---|---|---|---|
traits | 
body | array | A list of traits. | 
trait | 
body | array | A list of trait details. | 
display_name | 
body | string | A human-readable trait name to be displayed in the admin panel. | 
name | 
body | string | The name of a trait. | 
description | 
body | string | A human-readable trait description to be displayed in the admin panel. | 
4.2.2.1. Status codes¶
4.2.2.1.1. Success¶
| Code | Reason | 
|---|---|
200 - OK | 
Request was successful. | 
4.2.2.1.2. Error¶
| Code | Reason | 
|---|---|
404 - Not Found | 
The requested resource could not be found. | 
4.2.2.2. Example¶
{
  "traits": [
    {
      "display_name": "placement1",
      "description": "Sample placement",
      "name": "CUSTOM_HCI_E3A45A6A4B614263893D72015BFB1A5F"
    },
    {
      "display_name": "placement2",
      "description": "Sample placement #2",
      "name": "CUSTOM_HCI_0A7F6A35E650420CB30200A8359861D9"
    }
  ]
}
Version 5.0.0 — Feb 01, 2022