[openstack-dev] [tripleo][heat] Hacky validation of get_param

Lars Kellogg-Stedman lars at redhat.com
Thu Dec 22 18:53:30 UTC 2016


Maybe my fingers are flubbier than most, but I keep running into this
problem:

1. I have a typo in a get_param call somewhere in a composable service
   template.
2. Tripleo validation fails, but produces an error for a higher level
   {role.name}ServiceChain template because it ultimately wasn't able
   to resolve the outputs of the nested composable service template.

Because the error is identified at the wrong place and contains no
useful information about the root cause, it means you lose a bunch of
time manually inspecting templates for errors.

While there is a bug on this
(https://bugs.launchpad.net/heat/+bug/1599114), I wanted something now
that I could at least stick in my pre-commit hooks to identify really
obvious problems.  And here it is:

  https://github.com/larsks/heat-check-params

That will validate all calls to get_param in a template against the
parameter names defined in the 'parameters' section. It's not really
very pretty, but it has at least prevented me from committing some
changes with egregious spelling errors.

-- 
Lars Kellogg-Stedman <lars at redhat.com> | larsks @ {freenode,twitter,github}
Cloud Engineering / OpenStack          | http://blog.oddbit.com/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20161222/8586cb4a/attachment.pgp>


More information about the OpenStack-dev mailing list