ResourceProviderTraits - Manage Capabilities with ResourceProvider

Registered by Alex Xu

The ResourceProvider has a collection of Inventory and Allocation objects to
manage the *quantitative* aspects of a boot request: When an instance uses
resources from a ResourceProvider, the corresponding resource amounts of
Inventories are subtracted by its Allocations. Despite the quantitative
aspects, the ResourceProvider also needs non-consumable *qualitative* aspects
to differenitiate their characteristics from each other. We need a way to
represent the missing piece of ResourceProviders, so we propose a new REST
resource `traits` in placement API to manage the qualitative parts of
ResourceProviders. Using Traits API, the placement service can manage the
characteristics of resource providers by Traits, and then help scheduler make
better placement decisions that match the boot requests.

Blueprint information

Status:
Complete
Approver:
Dan Smith
Priority:
Medium
Drafter:
Alex Xu
Direction:
Approved
Assignee:
Alex Xu
Definition:
Approved
Series goal:
Accepted for pike
Implementation:
Implemented
Milestone target:
milestone icon pike-2
Started by
Matt Riedemann
Completed by
Matt Riedemann

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/resource-provider-tags,n,z

Addressed by: https://review.openstack.org/345138
    ResourceProviderTags - Manage Capabilities with ResourceProvider (SPEC)

Addressed by: https://review.openstack.org/376198
    [POC][placement] Add Traits related table to the api database

Addressed by: https://review.openstack.org/376199
    [POC][placement] Add Trait and TraitList objects

Addressed by: https://review.openstack.org/376200
    [POC][placement] Add Traits API to placement service

Addressed by: https://review.openstack.org/376201
    [POC][placement] Add set/get_traits method to ResourceProvder object

Addressed by: https://review.openstack.org/376202
    [POC][placement] Add resource provider traits API

Addressed by: https://review.openstack.org/377381
    [POC][placement] Import os_traits library

Addressed by: https://review.openstack.org/377382
    [POC][placement] Amend traits list api to support os-traits

Addressed by: https://review.openstack.org/377690
    [POC][placement] Amend traits modification api to support os-traits

Addressed by: https://review.openstack.org/378601
    [POC][placement] Amend r-p/{uuid}/traits PUT to support os-traits

Addressed by: https://review.openstack.org/379088
    [POC][placement] Add 'GET /resource_providers/traits' API

Gerrit topic: https://review.openstack.org/#q,topic:traits_api_poc_server_side,n,z

Addressed by: https://review.openstack.org/416007
    [POC][placement] Caches and synchronizes the traits from os_traits

Addressed by: https://review.openstack.org/417288
    [POC][placement] Report cpu features to placement Traits API

Addressed by: https://review.openstack.org/429364
    List resource provider with required and preferred traits

Gerrit topic: https://review.openstack.org/#q,topic:bp/resource-provider-traits,n,z

Addressed by: https://review.openstack.org/441828
    placement: Move the common code out of ResourceClassCache

Addressed by: https://review.openstack.org/441829
    placement: add cache for traits

Addressed by: https://review.openstack.org/447625
    [placement] Allow PUT and POST without bodies

Gerrit topic: https://review.openstack.org/#q,topic:add_trats_cmd,n,z

Addressed by: https://review.openstack.org/451230
    Remove namespace check in creating traits

Addressed by: https://review.openstack.org/451635
    Rename the model object ResourceProviderTraits to ResourceProviderTrait

Addressed by: https://review.openstack.org/450125
    Add sync traits command for placement

Addressed by: https://review.openstack.org/462769
    add cache which keeps DB and os_traits in sync

Addressed by: https://review.openstack.org/462770
    integrate trait cache with TraitList and Trait

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.