summaryrefslogtreecommitdiff
path: root/lib/oxidized/jobs.rb
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2014-08-07 13:27:03 +0300
committerSaku Ytti <saku@ytti.fi>2014-08-07 13:27:03 +0300
commit2a77796a7caf10601ae8edea5bf996f951694985 (patch)
treee38454fe9e78f16231049ed8c44365b7ea476244 /lib/oxidized/jobs.rb
parentbf299889f54b468412df4822b515cf7c4d60f90d (diff)
Pass model config as Outputs object instead of str
These objects have some keys, such as 'type' and 'name', which allows our output model to discriminate on them. If ios.rb contains this: cmd 'show ip cef' do |out| { output: out, type: 'poop' } end cmd 'show process cpu' do |out| { output: out, type: 'poop' } end cmd 'show memory statistics' do |out| { output: out, type: 'poop' } end Our git output looks like this: [ytti@ytti.fi ~/.config/oxidized]% git clone oxidized.git Cloning into 'oxidized'... done. [ytti@ytti.fi ~/.config/oxidized]% git clone poop.git Cloning into 'poop'... done. [ytti@ytti.fi ~/.config/oxidized]% ls poop bu.ip.fi--show_ip_cef bu.ip.fi--show_memory_statistics bu.ip.fi--show_process_cpu [ytti@ytti.fi ~/.config/oxidized]% ls oxidized bu.ip.fi [ytti@ytti.fi ~/.config/oxidized]% Where oxidized repo contains standard config for all unspecified types (type is then 'cfg'), for all specified types instead of collapsing it into single string, we store them in 'type' repo with filename including 'name' of the command.
Diffstat (limited to 'lib/oxidized/jobs.rb')
0 files changed, 0 insertions, 0 deletions