[Openstack] compiler for heat templates

Eugen Block eblock at nde.ag
Tue Mar 20 09:24:29 UTC 2018


Have you tried the option "--dry-run"? This also provides log output  
and could help you identify issues.


Zitat von Sashan Govender <sashang at gmail.com>:

> Hi
>
> Is there a way to check heat templates. At the moment I run one and it
> errors at runtime when, for example an something expects a string but gets
> a list. For example in this case of an OS::Heat::SoftwareConfig resource,
> the config attribute below expects a string, which is why str_replace works
>
>  some_resource:
>       type: OS::Heat::SoftwareConfig
>       properties:
>         config:
>           str_replace:
>             params:
>               $repstr$:
>                 list_join: ['-', [ {get_param: cluster_name}, 'xyz']]
>             template: |
>               #!/bin/bash
>               echo $repstr$ >> /etc/somefile
>
> According to this
> https://docs.openstack.org/heat/latest/template_guide/openstack.html#OS::Heat::SoftwareConfig
>
> the config property expects a string.
>
> If I replace str_replace with something that generates a list (e.g. repeat)
> it fails at runtime. Is there a way to type check this? I tried 'heat
> template-validate' but it didn't do what I expected...



-- 
Eugen Block                             voice   : +49-40-559 51 75
NDE Netzdesign und -entwicklung AG      fax     : +49-40-559 51 77
Postfach 61 03 15
D-22423 Hamburg                         e-mail  : eblock at nde.ag

         Vorsitzende des Aufsichtsrates: Angelika Mozdzen
           Sitz und Registergericht: Hamburg, HRB 90934
                   Vorstand: Jens-U. Mozdzen
                    USt-IdNr. DE 814 013 983




More information about the Openstack mailing list