Handle CLI User Parameters

Registered by Sahdev Zala

Heat translator takes user parameters as an optional argument if template has inputs section provided with defaults, but if default values are not provided the parameters becomes required. If defaults are provided and parameters not provided, it sets value for input parameters to default value into translated template. This needs to be changed as below:
1. If user wish to deploy translated template automatically from heat translator (work in progress as separate blueprint), do make parameters required if defaults are not provided.
2. If user with to only translate, treat parameters as options arg and process it if they are provided. If not provided, use 'get_param' in translated template i.e. let parameters be handled by Heat at the deployment with Heat.

Blueprint information

Status:
Complete
Approver:
Sahdev Zala
Priority:
High
Drafter:
Sahdev Zala
Direction:
Approved
Assignee:
Sahdev Zala
Definition:
Approved
Series goal:
None
Implementation:
Implemented
Milestone target:
None
Started by
Sahdev Zala
Completed by
Sahdev Zala

Related branches

Sprints

Whiteboard

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

Addressed by: https://review.openstack.org/277454
    Do not always require user parameters

(spzala) We probably need to treat certain parameters differently. For example, "key_name". TOSCA doesn't have similar concept to it, so if user pass such parameters up front (deploy or no) then translator should add a new key:value for Nova server resource. Since TOSCA doesn't have similar concept, template really will not prompt user to provide key at the later time.

(spzala) Currently user parameters are set to the translated templates, and if not provided 'default' value is set in template. This approach is OK but it prevents user to provide parameters/inputs at the time of deployment with Heat. Also, as per this blueprint parameters are optional so if not provided and there are not defaults defined for parameters inside template, we can't set any value in translated templates, and we should set it as 'get_param' (e.g. get_param: <input_name> ). So let's take this approach across all scenarios.
If user has set --deploy option to true (i.e. want to deploy translated template from translator itself) then just pass the parameters to heat.

(spzala) With handling parameters, we have to set certain exceptions. For now there are two that I can think of -
1. inputs/parameters required for finding flavor and image (Heat has nothing to do with it )
2. key_name - if user provide key_name then set it for Nova Server node_templates.

(spzala) Work related to "get_param" is going on under bug https://bugs.launchpad.net/heat-translator/+bug/1535794
(spzala) Work related to handling "key_name" is going on under, https://bugs.launchpad.net/heat-translator/+bug/1544237

Gerrit topic: https://review.openstack.org/#q,topic:bp/handle-cli-user-input,n,z

Addressed by: https://review.openstack.org/281917
    Log warning if Compute cap property not provided

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.