<div dir="ltr"><div><div><div>Hi,<br><br></div>I think something like this would be more flexible:<br><br><span style="font-family:monospace,monospace">$swift_proxy_roles = hiera('swift_proxy_roles', ['primary-controller', 'controller'])<br>$swift_storage_roles = hiera('swift_storage_roles', ['primary-controller', 'controller'])<br># ...<br>$swift_nodes = get_nodes_hash_by_roles($network_metadata, $swift_storage_roles)<br>$swift_proxies = get_nodes_hash_by_roles($network_metadata, $swift_proxy_roles)<br>$swift_proxy_caches = get_nodes_hash_by_roles($network_metadata, $swift_proxy_roles)<br><br></span></div><span style="font-family:monospace,monospace">Regards,<br></span></div><span style="font-family:monospace,monospace">Alex<br><br></span></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 11, 2015 at 12:41 PM, Daniel Depaoli <span dir="ltr"><<a href="mailto:daniel.depaoli@create-net.org" target="_blank">daniel.depaoli@create-net.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all.<div>I'm starting to resolve the todo at these line[1]. To solve this I think to hardcoded the role in the file, for example:</div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><i>$swift_proxies = get_nodes_hash_by_roles($network_metadata, ['primary-swift-proxy', 'swift-proxy']) ? {</i></div><div><i> true => get_nodes_hash_by_roles($network_metadata, ['primary-swift-proxy', 'swift-proxy']),</i></div><div><i> false => get_nodes_hash_by_roles($network_metadata, ['primary-controller', 'controller']),</i></div><div><i>}</i></div></blockquote><br>Is this the right way or do you suggest something more clean?<div><br></div><div>Thanks<br><div><br></div><div>[1] <a href="https://github.com/openstack/fuel-library/blob/master/deployment/puppet/osnailyfacter/modular/globals/globals.pp#L236:L242" target="_blank">https://github.com/openstack/fuel-library/blob/master/deployment/puppet/osnailyfacter/modular/globals/globals.pp#L236:L242</a><span class="HOEnZb"><font color="#888888"><br clear="all"><div><br></div>-- <br><div><div dir="ltr">========================================================
<br>Daniel Depaoli <br><div>CREATE-NET Research Center
<br>Smart Infrastructures Area
<br>Junior Research Engineer
<br>======================================================== <br></div></div></div>
</font></span></div></div></div>
<br>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div>