[Openstack] Traits is not working

Ramu, MohanX mohanx.ramu at intel.com
Thu Oct 5 09:26:32 UTC 2017


Hi Jay,

I want to create the Custom traits with the property value attached to it. 

FOR Ex:

I want to have CUSTOM_xyz traits with "status": "true". 

When the CUSTOM_xyz traits is associated to a resource provider  I should be able to see the status value is true or not.

I referred below link to create custom traits , not able to create.


https://specs.openstack.org/openstack/nova-specs/specs/pike/implemented/resource-provider-traits.html



PUT /resource_providers/{uuid}/traits

This API is to associate traits with specified resource provider. All the associated traits will be replaced by the traits specified in the request body. Nova-compute will report the compute node traits through this API.

The body of the request must match the following JSONSchema document:

{
    "type": "object",
    "properties": {
        "traits": {
            "type": "array",
            "items": CUSTOM_TRAIT
        },
        "resource_provider_generation": {
            "type": "integer"
        }
    },
    'required': ['traits', 'resource_provider_generation'],
    'additionalProperties': False
}


Thanks & Regards,

Mohan Ramu
-----Original Message-----
From: Jay Pipes [mailto:jaypipes at gmail.com] 
Sent: Wednesday, October 4, 2017 7:06 PM
To: Ramu, MohanX <mohanx.ramu at intel.com>; openstack at lists.openstack.org
Subject: Re: [Openstack] Traits is not working

Rock on :)

On 10/04/2017 09:33 AM, Ramu, MohanX wrote:
> Thank you so much Jay. After adding this header, working fine.
> 
> -----Original Message-----
> From: Jay Pipes [mailto:jaypipes at gmail.com]
> Sent: Tuesday, October 3, 2017 11:36 PM
> To: openstack at lists.openstack.org
> Subject: Re: [Openstack] Traits is not working
> 
> Against the Pike placement API endpoint, make sure you send the following HTTP header:
> 
> OpenStack-API-Version: placement 1.10
> 
> Best,
> -jay
> 
> On 10/03/2017 02:01 PM, Ramu, MohanX wrote:
>> Please refer attached original one.
>>
>>
>> -----Original Message-----
>> From: Jay Pipes [mailto:jaypipes at gmail.com]
>> Sent: Tuesday, October 3, 2017 10:03 PM
>> To: Ramu, MohanX <mohanx.ramu at intel.com>; 
>> openstack at lists.openstack.org
>> Subject: Re: [Openstack] Traits is not working
>>
>> On 10/03/2017 12:12 PM, Ramu, MohanX wrote:
>>> Thanks for reply Jay.
>>>
>>> No Jay,
>>>
>>> I have installed Pike. There also I face the same problem.
>>
>> No, you haven't installed Pike (or at least not properly). Otherwise, the max_version returned from the Pike placement API would be 1.10, not 1.4.
>>
>> Best,
>> -jay
>>
>>> Thanks & Regards,
>>>
>>> Mohan Ramu
>>> -----Original Message-----
>>> From: Jay Pipes [mailto:jaypipes at gmail.com]
>>> Sent: Tuesday, October 3, 2017 9:26 PM
>>> To: openstack at lists.openstack.org
>>> Subject: Re: [Openstack] Traits is not working
>>>
>>> On 10/03/2017 11:34 AM, Ramu, MohanX wrote:
>>>> Hi,
>>>>
>>>> We have implemented OpenStack Ocata and Pike releases, able to 
>>>> consume Placement resource providers API, not able to consume resource class APIs’.
>>>>
>>>> I tried to run Triats API in Pike set up too. I am not able to run 
>>>> any Traits API.
>>>>
>>>> As per the Open Stack doc, the Placement API URL is a base URL for 
>>>> Traits also. I am able to run Placement API as per the given doc, 
>>>> not able to run/access the Traits APIs’ . Getting 404 (Not Found error).
>>>
>>> The /traits REST endpoint is part of the Placement API, yes.
>>>
>>>> As mentioned in below link, the placement-manage os-traits 
>>>> sync/command is not working, it says that command not found.
>>>
>>> This means you have not installed (or updated) packages for Pike.
>>>
>>>> https://specs.openstack.org/openstack/nova-specs/specs/pike/approve
>>>> d
>>>> /
>>>> r
>>>> esource-provider-traits.html
>>>>
>>>> Pike – Placement API version is 1.0 to 1.10
>>>>
>>>> Ocata – Placement API version is 1.0 to 1.4 which support
>>>>
>>>> We got  404 only, It seems there is a disconnect btw Placement and 
>>>> Triats. Need to understand that are we missing any configuration.
>>>
>>> You do not have Pike installed. You have Ocata installed. You need to upgrade to Pike.
>>>
>>> Best,
>>> -jay
>>>
>>> _______________________________________________
>>> Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>>> Post to     : openstack at lists.openstack.org
>>> Unsubscribe :
>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>>>
> 
> _______________________________________________
> Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> Post to     : openstack at lists.openstack.org
> Unsubscribe : 
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> 


More information about the Openstack mailing list