diff options
Diffstat (limited to 'lib/oxidized/nodes.rb')
-rw-r--r-- | lib/oxidized/nodes.rb | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/lib/oxidized/nodes.rb b/lib/oxidized/nodes.rb index cb2fbc5..cb2ce7b 100644 --- a/lib/oxidized/nodes.rb +++ b/lib/oxidized/nodes.rb @@ -111,7 +111,7 @@ module Oxidized end def find_index node - index { |e| e.name == node } + index { |e| e.name == node or e.ip == node} end # @param node node which is removed from nodes list @@ -148,6 +148,35 @@ module Oxidized end end end + + public + + def version node, group + with_lock do + i = find_node_index node + output = self[i].output.new + raise Oxidized::NotSupported unless output.respond_to? :fetch + output.version node, group + end + end + + def get_version node, group, oid + with_lock do + i = find_node_index node + output = self[i].output.new + raise Oxidized::NotSupported unless output.respond_to? :fetch + output.get_version node, group, oid + end + end + + def get_diff node, group, oid1, oid2 + with_lock do + i = find_node_index node + output = self[i].output.new + raise Oxidized::NotSupported unless output.respond_to? :fetch + output.get_diff node, group, oid1, oid2 + end + end end end |