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/node.rb | |
parent | 23d55da7338c96158f009252f1bd522da88a36b2 (diff) |
Added support for model specific credentials
Diffstat (limited to 'lib/oxidized/node.rb')
-rw-r--r-- | lib/oxidized/node.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/oxidized/node.rb b/lib/oxidized/node.rb index cf71e48..8d0d0af 100644 --- a/lib/oxidized/node.rb +++ b/lib/oxidized/node.rb @@ -216,6 +216,14 @@ module Oxidized end end + #model + 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] + Oxidized.logger.debug "node.rb: setting node key '#{key}' to value '#{value}' from model" + end + end + #node value = opt[key_sym] || value Oxidized.logger.debug "node.rb: returning node key '#{key}' with value '#{value}'" |