Remove usage of deprecated filter_nodes function

filter_nodes function is deprecated - do not use it anymore

Change-Id: Ibacaf4e0aa263d2fe2b98df19a5e7d1e62a14c51
Partial-bug: #1550253
This commit is contained in:
Vladimir Kuklin 2016-03-17 19:19:56 +03:00 committed by Guillaume Thouvenin
parent bcdedbf1aa
commit 590590b907
3 changed files with 5 additions and 5 deletions

View File

@ -24,10 +24,10 @@ $current_roles = hiera('roles')
$network_metadata = hiera_hash('network_metadata')
$elasticsearch_kibana = hiera_hash('elasticsearch_kibana', {})
$es_nodes = filter_nodes(hiera('nodes'), 'role', 'elasticsearch_kibana')
$es_nodes = get_nodes_hash_by_roles($network_metadata, ['elasticsearch_kibana'])
$influxdb_grafana = hiera_hash('influxdb_grafana', {})
$influxdb_nodes = filter_nodes(hiera('nodes'), 'role', 'influxdb_grafana')
$influxdb_nodes = get_nodes_hash_by_roles($network_metadata, ['influxdb_grafana'])
if $lma_collector['environment_label'] != '' {
$environment_label = $lma_collector['environment_label']

View File

@ -58,7 +58,7 @@ if $alerting_mode == 'remote' {
$nagios_server = $network_metadata['vips']['infrastructure_alerting_mgmt_vip']['ipaddr']
} else {
# compatibility with the LMA Infrastructure Alerting plugin 0.8
$nagios_nodes = filter_nodes(hiera('nodes'), 'role', 'infrastructure_alerting')
$nagios_nodes = get_nodes_hash_by_roles($network_metadata, ['infrastructure_alerting'])
$nagios_server = $nagios_nodes[0]['internal_address']
}
$nagios_user = $lma_infra_alerting['nagios_user']

View File

@ -432,7 +432,7 @@ if $influxdb_mode != 'disabled' {
} else {
# compatibility with the InfluxDB-Grafana plugin 0.8
$influxdb_grafana = hiera_hash('influxdb_grafana', {})
$influxdb_nodes = filter_nodes(hiera('nodes'), 'role', 'influxdb_grafana')
$influxdb_nodes = get_nodes_hash_by_roles($network_metadata, ['influxdb_grafana'])
$influxdb_server = $influxdb_nodes[0]['internal_address']
}
} else {
@ -476,7 +476,7 @@ if $alerting_mode == 'remote' {
$nagios_server = $network_metadata['vips']['infrastructure_alerting_mgmt_vip']['ipaddr']
} else {
# compatibility with the LMA Infrastructure Alerting plugin 0.8
$nagios_nodes = filter_nodes(hiera('nodes'), 'role', 'infrastructure_alerting')
$nagios_nodes = get_nodes_hash_by_roles($network_metadata, ['infrastructure_alerting'])
$nagios_server = $nagios_nodes[0]['internal_address']
}
$nagios_user = $lma_infra_alerting['nagios_user']