From 3e6dc8acc5268c76f009299d43adc61867dd8343 Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Fri, 8 Jun 2018 00:24:41 +0300 Subject: We should resolve model first So that input/output can be configured under model --- lib/oxidized/node.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/oxidized/node.rb b/lib/oxidized/node.rb index 04c1f08..3c32b8e 100644 --- a/lib/oxidized/node.rb +++ b/lib/oxidized/node.rb @@ -19,9 +19,9 @@ module Oxidized @ip ||= Resolv.new.getaddress(@name) if Oxidized.config.resolve_dns? @ip ||= @name @group = opt[:group] + @model = resolve_model opt @input = resolve_input opt @output = resolve_output opt - @model = resolve_model opt @auth = resolve_auth opt @prompt = resolve_prompt opt @vars = opt[:vars] @@ -219,7 +219,6 @@ module Oxidized end # model - # FIXME: warning: instance variable @model not initialized if Oxidized.config.models.has_key?(@model.class.name.to_s.downcase) if Oxidized.config.models[@model.class.name.to_s.downcase].has_key?(key_str) value = Oxidized.config.models[@model.class.name.to_s.downcase][key_str] -- cgit v1.2.1