summaryrefslogtreecommitdiff
path: root/lib/oxidized/nodes.rb
diff options
context:
space:
mode:
authorflorian <florian@debian-Florian>2015-04-24 09:57:15 +0200
committerroot <florian.doublet@hotmail.fr>2015-06-03 11:01:13 +0200
commitfae1a8e189c1b2fbc6b7463081c682946a4d3ef3 (patch)
treed9b991c9187495cf3967d7fee1b2e02c680c068f /lib/oxidized/nodes.rb
parenteb753e2d8c19bd99ea36d8b0f492aaff5bb996bf (diff)
add feature about versions and diffs for oxidized-web
Diffstat (limited to 'lib/oxidized/nodes.rb')
-rw-r--r--lib/oxidized/nodes.rb29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/oxidized/nodes.rb b/lib/oxidized/nodes.rb
index cb2fbc5..d25fbe7 100644
--- a/lib/oxidized/nodes.rb
+++ b/lib/oxidized/nodes.rb
@@ -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