Nested validation issues with non-defaulted nested parameters
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
New
|
Medium
|
Unassigned |
Bug Description
There are a couple of related problems with nested validation which are causing us some issues with TripleO atm:
$ cat parent.yaml
heat_template_
parameters:
with_default:
type: string
default: foo
no_default:
type: string
resources:
a_resource:
type: OS::Heat:
the_nested:
type: nested.yaml
properties:
from_
from_
from_
[stack@instack ~]$ cat nested.yaml
heat_template_
parameters:
from_
type: string
from_
type: string
from_parent_attr:
type: string
resources:
test:
type: OS::Heat:
properties:
salt:
list_join:
- ','
- {get_param: from_parent_param}
- {get_param: from_parent_
- {get_param: from_parent_attr}
$ heat template-validate -f parent.yaml --show-nested
WARNING (shell) "heat template-validate" is deprecated, please use "openstack orchestration template validate" instead
{
"NestedParame
"the_nested": {
"Type": "file:/
"
"Parameters": {
"Type": "String",
"NoEcho": "false",
"Label": "from_parent_param"
},
"Type": "String",
"NoEcho": "false",
"Value": "foo",
"Label": "from_parent_
},
"Type": "String",
"NoEcho": "false",
"Label": "from_parent_attr"
}
}
}
},
"Description": "No description",
"Parameters": {
"no_default": {
"Type": "String",
"NoEcho": "false",
"
"Label": "no_default"
},
"with_default": {
"Default": "foo",
"Type": "String",
"NoEcho": "false",
"
"Label": "with_default"
}
}
}
The problem here is that there is no way to know that a Value is actually passed from the parent, e.g for from_parent_param and from_parent_attr, we know there should be some Value on create, so a placeholder is needed (to distinguish from parameters in nested.yaml where no default is defined *and* no value is passed from the parent.
summary: |
- Nested validation breaks with non-defaulted nested parameters + Nested validation issues with non-defaulted nested parameters |
It took some more explanations for me to understand, so I'll try to write them down here: the problem is that we'd like the Value field to have something indication that the parent passes down something, presumably a placeholder.
It's a good bug to track, but I suspect that would be solve by a larger spec involving validation. We need at least to agree on what the Value field would look like in that case.