Unrecognized error during validation and creation

Bug #1365949 reported by Sergey Kraynev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Undecided
Sergey Kraynev

Bug Description

In JSON templates incorrect resource definition may be detected and correctly displayed:

Test template:

{
  "HeatTemplateFormatVersion": "2012-12-12",
  "Resources": {
      "Type": "OS::Neutron::Port",
      "Properties": {
        "name": {"Ref": "foo"},
        "network": "private"
    }
  }
}
skr@ubuntu:~$ heat template-validate -f test.template
ERROR: Resources must contain Resource. Found a [string] instead

Same should be done for hot templates. Currently it looks like:

Test template:

heat_template_version: 2013-05-23

resources:
  type: OS::Nova::Server
  properties:
    image: fedora-20.x86_64
    flavor: m1.small

skr@ubuntu:~$ heat template-validate -f test.yaml
ERROR: 'unicode' object has no attribute 'iteritems'

description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/119341

Changed in heat:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/119341
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=752c0112adc7bddbb594ba947f6bf0c886993b82
Submitter: Jenkins
Branch: master

commit 752c0112adc7bddbb594ba947f6bf0c886993b82
Author: Sergey Kraynev <email address hidden>
Date: Thu Oct 9 13:46:59 2014 -0400

    Handle error in templates with incorrect resources

    This patch adds additional validation resources section for hot templates,
    it allows determine of the real problem in template and give the user an
    adequate message.

    Change-Id: Iff5e1b541b00a82dfce524f00ff1d20f50ae92da
    Closes-Bug: #1365949

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: kilo-1 → 2015.1.0
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.