Closed yzguy closed 7 months ago
So looking around, seems like variables aren't accessible in the models, as really models.rb
is pulling things from the model not running the model file.
Per https://github.com/ytti/oxidized/blob/master/docs/Creating-Models.md, we can either extend the existing vyatta.rb
or edgeos.rb
and add additional commands, or we can create a new one that is exactly the same as existing file but the cmd
line is changed.
We then store it in /home/oxidized/.config/oxidized/models/vyatta.rb
, and it will be loaded instead of the one that comes with oxidized.
It would be nice if there were a way with a variable to basically toggle commands that get run detailed in the first comment
This is a follow up of #1163
VyOS/Vyatta/EdgeOS allow you to get the configuration in two ways
show configuration
- will give you a hierarchical structureshow configuration commands
- will give you a list ofset
commands of the configurationThe
show configuration
was the behavior of the model before #1164, but then changed toshow configuration commands
I'm wondering if there is currently a way or if it would be possible (I'm cool to work on it as well) to allow the user to specify the format they want for that model in the configuration. I suppose both outputs could be captured in the same file by just adding another stanza, but allowing the user to specify format would be nice
To keep the current behavior the default could be
set
, and then a user could specify likehierarchy
or something to get the other.