summaryrefslogtreecommitdiff
path: root/lib/oxidized/config/vars.rb
diff options
context:
space:
mode:
authorytti <saku@ytti.fi>2017-05-07 13:38:04 +0300
committerGitHub <noreply@github.com>2017-05-07 13:38:04 +0300
commiteebda09fdda9043d18d915c39b0597b2a5b801db (patch)
treed7c4df180ffd2978cda376fcca34cbb5c0a17812 /lib/oxidized/config/vars.rb
parent23d55da7338c96158f009252f1bd522da88a36b2 (diff)
parent25d30f8329610b1917fb6513158cc5e2e4542a96 (diff)
Merge pull request #826 from davromaniak/master
Added support for model specific credentials
Diffstat (limited to 'lib/oxidized/config/vars.rb')
-rw-r--r--lib/oxidized/config/vars.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/oxidized/config/vars.rb b/lib/oxidized/config/vars.rb
index 09f9781..d926ee2 100644
--- a/lib/oxidized/config/vars.rb
+++ b/lib/oxidized/config/vars.rb
@@ -8,8 +8,12 @@ module Oxidized::Config::Vars
r ||= Oxidized.config.groups[@node.group].vars[name.to_s]
end
end
+ if Oxidized.config.models.has_key?(@node.model.class.name.to_s.downcase)
+ if Oxidized.config.models[@node.model.class.name.to_s.downcase].vars.has_key?(name.to_s)
+ r ||= Oxidized.config.models[@node.model.class.name.to_s.downcase].vars[name.to_s]
+ end
+ end
r ||= Oxidized.config.vars[name.to_s] if Oxidized.config.vars.has_key?(name.to_s)
r
end
end
-