[Openstack] HEAT - Conditional Statements

Brent Troge brenttroge2016 at gmail.com
Tue Feb 23 20:28:11 UTC 2016


Thanks Chris that makes sense. Let me play with it and see how far I get.



On Mon, Feb 22, 2016 at 4:41 PM, Chris Buccella <
chris.buccella at antallagon.com> wrote:

> Can you utilize two ResourceGroups, one with cinder volumes and one
> without? Then use two parameters, servers_with_volumes_count and
> servers_without_volumes_count which will map to the count parameter for
> ResourceGroup. It's ok for count to be 0:
>
>
> http://docs.openstack.org/developer/heat/template_guide/openstack.html#OS::Heat::ResourceGroup-prop-count
>
>
> -Chris
>
> On Mon, Feb 22, 2016 at 3:50 PM, Brent Troge <brenttroge2016 at gmail.com>
> wrote:
>
>>
>> I have a heat template which accepts parameters/values via an environment
>> file.
>> This heat template creates x amount of cinder volumes based on the
>> parameter value
>> defined in the environment file.
>>
>> I have instances that dont require cinder volumes, so it is possible that
>> the instances could
>> also use the same template. However HEAT chokes because I dont provide
>> values to create the cinder volumes.
>>
>> So instead of having two templates, is it possible to put a conditional
>> check within
>> the heat template.
>> The condition check would be something like:
>>
>> if cinder volume size = 0, then dont exercise the cinder resources
>> statements.
>>
>> I am not sure something like this is currently supported by heat. So
>> hopefully the community has some suggestions or clues.
>>
>> Thanks in advance.
>>
>>
>>
>> _______________________________________________
>> Mailing list:
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>> Post to     : openstack at lists.openstack.org
>> Unsubscribe :
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20160223/4bfa272b/attachment.html>


More information about the Openstack mailing list