diff options
author | Cyril LAVIER <cyril.lavier@davromaniak.eu> | 2017-05-03 14:05:28 +0200 |
---|---|---|
committer | Cyril LAVIER <cyril.lavier@davromaniak.eu> | 2017-05-03 14:05:28 +0200 |
commit | f0683725079035633f7b2e64c99af7e2ce2ad3e5 (patch) | |
tree | aef6d396ca40f205f3d2d622789b437b26709518 /lib/oxidized/config | |
parent | 23d55da7338c96158f009252f1bd522da88a36b2 (diff) |
Added support for model specific credentials
Diffstat (limited to 'lib/oxidized/config')
-rw-r--r-- | lib/oxidized/config/vars.rb | 6 |
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 - |