Age | Commit message (Collapse) | Author |
|
- now default type is 'nil', which is collapsed to flat config via
Outputs#to_cfg
- if type is not 'nil' then name is automatically set if not set by
model
- if name and type is set, separate file is created
- if name is not set, but type is set, outputs from type are collapsed
as with 'nil' types
This model:
cmd 'show ip cef' do |out|
out.type = 'poop'
out.name = false
out
end
cmd 'show process cpu' do |out|
out.type = 'poop'
out.name = 'my_cpu'
out
end
cmd 'show memory statistics' do |out|
out.type = 'poop'
out.name = false
out
end
cmd 'show ip bgp summary' do |out|
out.type = 'poop'
end
Would produce git output:
[ytti@ytti.fi ~/.config/oxidized]% ls poop
bu.ip.fi bu.ip.fi--cpu bu.ip.fi--show_ip_bgp_summary
[ytti@ytti.fi ~/.config/oxidized]%
bu.ip.fi contains the collapsed stuff
bu.ip.fi--cpu is manually named
bu.ip.fi--show_ip_bgp_summary is automatically named
|
|
In new method, where we no long explicitly set loaded class name for
later resolution we depend on file name being same as class name.
However for File output, this is not true, because I didn't want plain
File in code to resolve to Oxidized::File, and din't want to always
write ::File, File ouput has class name OxFile.
This change allows class names to start optionally with string
'Oxidized' if so, they still match.
|
|
Main benefits
a) we get support for system wide configs
b) we don't use symbols in config file, they're confusing to
non-rubyist
|
|
As I can't do IO#select on sinatra/puma to run it when I have time, I
have to run it on separate thread.
This means Nodes container needs to be thread safe, it now has ghetto
mutex locking, but I probably need to be be more focused what are the
external methods that can be called and wrap those in @mutex.synchronize
Provide also HTML UI not just JSON for ghetto UI to people who don't want to
integrate
|
|
|
|
|
|
|
|
|
|
|
|
|
|
'store' is more logical, as we cannot know if output method guarantees
any version history which 'update' implies.
|
|
Silly for shit-and-giggles attempt at rancid
|