summaryrefslogtreecommitdiff
path: root/lib/oxidized/nodes.rb
diff options
context:
space:
mode:
authornopedial <sam@arahant.net>2015-06-17 14:36:36 +0200
committernopedial <sam@arahant.net>2015-06-17 14:36:36 +0200
commit7cddc33df94ac1b2e46c7f32c42fa41b08cb9816 (patch)
treec68a2b9d31e6ac9c5f61a3f4695e018e9b147172 /lib/oxidized/nodes.rb
parentd63085fa42df76a8e8a018a6eb83825dc94a04b8 (diff)
parentfae1a8e189c1b2fbc6b7463081c682946a4d3ef3 (diff)
Merge pull request #114 from FlorianDoublet/webInterfaceFeatures
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