Constraint based selection of Flavors and Images

Registered by Sahdev Zala

Heat-Translation work is in progress to create a library that can convert non-heat templates to the Heat Orchestration Template (HOT). Currently the work is focused on converting TOSCA profile into HOT. A critical enhancement to heat that we desire would be a constraint based approach for the selection of flavor and image properties to provision a new server.
For example, TOSCA requires selection of a flavor and image using input parameter such as the following:
      disk_size: 10
      num_cpus: 2
      mem_size: 4096 to find a closest matching flavor
and
      os_arch: x86_64
      os_type: Linux
      os_distribution: Fedora
      os_version: 18 to find the image.

A non-optimal way to support this capability in the translator would be to have hard coded flavor and images with properties and find the closest match for the provided selection criteria. However, this has a drawback that it cannot be used in real time because to query Nova and Glance for flavor and images respectively it requires user and password validation. Another issue is that translator cannot take user input in real time as it is a static translation. Instead we propose that heat provide a new feature that enables HOT templates to support constraint based selection because HOT templates execute at run time where the required user credentials are available to query Nova and Glance to satisfy these constraints.

I have proposed a design summit session for Juno. Thought good idea to open up this blueprint for further discussion.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
Sahdev Zala
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

(stevebaker) It would be good if this blueprint could depend on the glance blueprints which would allow this to be implemented.

(spzala) stevebaker: are you saying that a related blueprint in glance is already out there and we should add dependency to it? or I believe you meant to say that we guys should create a glance blueprint that can support implementation of this blueprint? Thanks!

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.