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

Lee, Alexis alexisl at hp.com
Wed Nov 5 14:46:43 UTC 2014

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:

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

What do you think please?

Alexis (lxsli)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20141105/aa4bead0/attachment.html>

More information about the OpenStack-dev mailing list