Handle CLI User Parameters
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
Related bugs
Sprints
Whiteboard
Gerrit topic: https:/
Addressed by: https:/
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:/
(spzala) Work related to handling "key_name" is going on under, https:/
Gerrit topic: https:/
Addressed by: https:/
Log warning if Compute cap property not provided