diff options
author | ytti <saku@ytti.fi> | 2013-10-14 02:23:22 -0700 |
---|---|---|
committer | ytti <saku@ytti.fi> | 2013-10-14 02:23:22 -0700 |
commit | d7d490077ce16e76367773f5a5fe8bca4f84f366 (patch) | |
tree | eb0b104fb3573e121bda90a10bab0af883f2e5d7 /lib/oxidized/api | |
parent | b19297dde99dfa2430f96ab90b9daeed2a9f340b (diff) | |
parent | fb4bc13364624bd8d78659de52bb5180c040cb0e (diff) |
Merge pull request #6 from nopedial/master
Implement fetch method for 'file' output model
Diffstat (limited to 'lib/oxidized/api')
-rw-r--r-- | lib/oxidized/api/rest.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/oxidized/api/rest.rb b/lib/oxidized/api/rest.rb index 783b445..d876917 100644 --- a/lib/oxidized/api/rest.rb +++ b/lib/oxidized/api/rest.rb @@ -41,6 +41,12 @@ module Oxidized # /nodes/show/node - returns data about node when /show\/(.*)/ send res, @nodes.show($1) + when /fetch\/(.*)/ + begin + send res, @nodes.fetch($1) + rescue Oxidized::NotSupported => e + send res, e + end end end end |