From f639186ecc50e040405f8dc86ea280a0e48aeed0 Mon Sep 17 00:00:00 2001 From: Matt Fischer Date: Thu, 19 Nov 2015 10:58:01 -0700 Subject: [PATCH] Fix deprecated ERB references Change-Id: I52cd7ddb8aab1392f28bd180e020bfa8a5134e21 --- templates/agent.yaml.erb | 4 ++-- templates/checks/host_alive.yaml.erb | 6 +++--- templates/checks/libvirt.yaml.erb | 16 ++++++++-------- templates/checks/nagios_wrapper.erb | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/templates/agent.yaml.erb b/templates/agent.yaml.erb index 4438bf3..c5a58d9 100644 --- a/templates/agent.yaml.erb +++ b/templates/agent.yaml.erb @@ -23,7 +23,7 @@ Main: <%- end -%> dimensions: <%- @dimensions.each_pair do |key, value| -%> - <%= key %>: <%= value %> + <%= @key %>: <%= @value %> <%- end -%> recent_point_threshold: <%= @recent_point_threshold %> check_freq: <%= @check_freq %> @@ -48,4 +48,4 @@ Logging: <%- if @syslog_host and @syslog_port -%> syslog_host: <%= @syslog_host %> syslog_port: <%= @syslog_port %> -<%- end -%> \ No newline at end of file +<%- end -%> diff --git a/templates/checks/host_alive.yaml.erb b/templates/checks/host_alive.yaml.erb index 41ad1dd..c393940 100644 --- a/templates/checks/host_alive.yaml.erb +++ b/templates/checks/host_alive.yaml.erb @@ -1,7 +1,7 @@ --- init_config: - ssh_port: <%= ssh_port %> - ssh_timeout: <%= ssh_timeout %> - ping_timeout: <%= ping_timeout %> + ssh_port: <%= @ssh_port %> + ssh_timeout: <%= @ssh_timeout %> + ping_timeout: <%= @ping_timeout %> instances: diff --git a/templates/checks/libvirt.yaml.erb b/templates/checks/libvirt.yaml.erb index ae5690e..9790f60 100644 --- a/templates/checks/libvirt.yaml.erb +++ b/templates/checks/libvirt.yaml.erb @@ -1,15 +1,15 @@ --- init_config: - admin_password: <%= admin_password %> - admin_tenant_name: <%= admin_tenant_name %> - admin_user: <%= admin_user %> - identity_uri: <%= identity_uri %> + admin_password: <%= @admin_password %> + admin_tenant_name: <%= @admin_tenant_name %> + admin_user: <%= @admin_user %> + identity_uri: <%= @identity_uri %> <%- if @region_name -%> region_name: <%= @region_name %> <%- end -%> - cache_dir: <%= cache_dir %> - nova_refresh: <%= nova_refresh %> - vm_probation: <%= vm_probation %> + cache_dir: <%= @cache_dir %> + nova_refresh: <%= @nova_refresh %> + vm_probation: <%= @vm_probation %> instances: - - {} \ No newline at end of file + - {} diff --git a/templates/checks/nagios_wrapper.erb b/templates/checks/nagios_wrapper.erb index 3a2b90c..fb4a6e9 100644 --- a/templates/checks/nagios_wrapper.erb +++ b/templates/checks/nagios_wrapper.erb @@ -12,6 +12,6 @@ <%- if @dimensions -%> dimensions: <%- @dimensions.each do |key, value| -%> - <%= key %>: <%= value %> + <%= @key %>: <%= @value %> +<%- end -%> <%- end -%> -<%- end -%> \ No newline at end of file