[Openstack] HOT syntax for numeric number

Qiming Teng tengqim at linux.vnet.ibm.com
Thu Feb 19 13:53:26 UTC 2015


No.  HOT does not support mustache grammar or arithmatic operations
because it is not designed to be a programming language. The %index%
grammar is a convenience to help assign something unique to each member
of a resource group. The calculation is done automatically before values
get assigned to each member.

Regards,
  - Qiming

On Mon, Feb 16, 2015 at 10:39:34AM +1100, jupiter wrote:
> Hi,
> 
> According to the heat document, the index can be used in the template:
> 
> name: my_server_%index%
> 
> How can I add one to the index number? Is following syntax right?
> 
> 
> name: my_server_{{ %index% + 1 }}
> 
> Thanks.
> 
> - j

> _______________________________________________
> 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





More information about the Openstack mailing list