diff --git a/lib/get_all_cluster_set_ip_maps b/lib/get_all_cluster_set_ip_maps index ac0af655..04b052aa 100644 --- a/lib/get_all_cluster_set_ip_maps +++ b/lib/get_all_cluster_set_ip_maps @@ -3,7 +3,8 @@ # which is an array of ips, for a given cluster set type. # # @param argv.host If the cluster_set type is 'central; we need to filter by pair - # @param argv.type The type of element we are interested in (rtp, lb) + # @param argv.role The role of element we are interested in (rtp, lb) + # @param argv.type The type of the interfaces (rtp_int, sip_int...) # @return out The array of hashes -%] [% @@ -27,9 +28,10 @@ theset.ips = []; FOREACH host IN set_hosts; - NEXT UNLESS hosts.$host.role.grep('^' _ argv.type _ '$').size(); + NEXT UNLESS hosts.$host.role.grep('^' _ argv.role _ '$').size(); FOREACH iface IN hosts.$host.interfaces; NEXT UNLESS hosts.$host.$iface.cluster_sets.grep('^' _ set _ '$').size(); + NEXT UNLESS hosts.$host.$iface.type.grep('^' _ argv.type _ '$').size(); theset.ips.push(hosts.$host.$iface.ip) UNLESS theset.ips.defined(hosts.$host.$iface.ip); END; END; diff --git a/lib/get_all_cluster_set_shared_ip_maps b/lib/get_all_cluster_set_shared_ip_maps index a46221b5..048ad444 100644 --- a/lib/get_all_cluster_set_shared_ip_maps +++ b/lib/get_all_cluster_set_shared_ip_maps @@ -3,7 +3,8 @@ # which is an array of shared ips, for a given cluster set type. # # @param argv.host If the cluster_set type is 'central; we need to filter by pair - # @param argv.type The type of element we are interested in (rtp, lb) + # @param argv.role The role of element we are interested in (rtp, lb) + # @param argv.type The type of the interfaces (rtp_int, sip_int...) # @return out The array of hashes -%] [% @@ -29,10 +30,11 @@ FOREACH host IN set_hosts; NEXT IF blktmp.processed_hosts.$host.defined; - NEXT UNLESS hosts.$host.role.grep('^' _ argv.type _ '$').size(); + NEXT UNLESS hosts.$host.role.grep('^' _ argv.role _ '$').size(); peer = hosts.$host.peer; FOREACH iface IN hosts.$host.interfaces; NEXT UNLESS hosts.$host.$iface.cluster_sets.grep('^' _ set _ '$').size(); + NEXT UNLESS hosts.$host.$iface.type.grep('^' _ argv.type _ '$').size(); blktmp.processed_hosts.$peer = 1; FOREACH ip IN hosts.$host.$iface.shared_ip; theset.ips.push(ip) UNLESS theset.ips.defined(ip);