Failing validation for new resources with reference
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Fix for bug #1192142 covers only resources which return None value during resolve get_resource function. Unfortunately there are some resources, which may return u'None' or their name.
You may check it follow steps below:
- add network constraint for port resource
NETWORK: properties.Schema(
- _('Network this port belongs to.')
+ _('Network this port belongs to.'),
+ constraints=[
+ constraints.
+ ]
+
),
- Create template with two resources with reference:
heat_template_
resources:
private_net:
type: OS::Neutron::Net
properties:
name: private_net_name
port1:
type: OS::Neutron::Port
properties:
name: name
network: {get_resource: private_net}
- try to create stack using template above.
you will see next error:
ERROR: Property error : port1: network Error validating value u'None': Unable to find network with name 'None'
This problem affects other custom constraints in case, when we use reference on not created resource.
duplicated entry to #1347571.