Failing validation for new resources with reference

Bug #1347570 reported by Sergey Kraynev
6
This bug affects 1 person
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(
             properties.Schema.STRING,
- _('Network this port belongs to.')
+ _('Network this port belongs to.'),
+ constraints=[
+ constraints.CustomConstraint('neutron.network')
+ ]
+
         ),

- Create template with two resources with reference:

heat_template_version: 2013-05-23

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.

Revision history for this message
Qiming Teng (tengqim) wrote :

duplicated entry to #1347571.

Changed in heat:
status: New → Invalid
Revision history for this message
Sergey Kraynev (skraynev) wrote :

Qiming , thank you that find this duplication. I don't know why I got two bugs... may be some problems during bug creation.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.