[openstack-dev] [Heat] New function: first_nonnull

Steve Baker sbaker at redhat.com
Thu Nov 6 07:10:23 UTC 2014


We have a template usability session at 9am this morning, and we'll be 
covering these sort of utility functions as part of that session. If you 
don't make it we can follow up later.

On 05/11/14 15:46, Lee, Alexis wrote:
>
> I’m considering adding a function which takes a list and returns the first
>
> non-null, non-empty value in that list.
>
> So you could do EG:
>
>  some_thing:
>
>     config:
>
>         ControlVIP:
>
>             first_nonnull:
>
>             - {get_param: ControlVIP}
>
>             - {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}]}
>
> I’m open to other names, EG “some”, “or”, “fallback_list” etc.
>
> Steve Hardy suggested building this into get_attr or Fn::Select. My 
> feeling
>
> is that those each do one job well right now, I’m happy to take a steer
>
> though.
>
> What do you think please?
>
> Alexis (lxsli)
>
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20141106/09aa952e/attachment.html>


More information about the OpenStack-dev mailing list