Closed systeembeheerder closed 2 weeks ago
I can reproduce this, and I'll need to have a deeper look into this, I haven't found a good way to solve it for now.
device2yaml.rb
has an idle timeout before the first command, but mikrotik seams to wildly interact with the terminal session (for example sending make 999x cursor down), which confuses device2yaml.rb.
Update - routeros uses exec mode (so no interactive session an no ANSI-Escape-Code garbage). I'll add an option to device2yaml to run in exec mode.
@systeembeheerder you need to run device2yaml in exec moded (added with commit d47248d04a6ecc2ccd36b2f6da141047d4519b06):
./device2yaml.rb admin@r7 -c cmdsets/routeros -e -o yaml/routeros_CHR_7.10.1.yaml
I've looked inside the netmiko driver for routeros - same ANSI-Escape-nightmare. I'm relived oxidized works in exec mode and that we need no tty with routeros.
Thanks @robertcheramy for all your work to create device2yaml.rb
I tried it to a MikroTik router but it seems the scripts starts way to early with sending commands, even before the prompt is complete.
gives:
maybe start with an idle timeout before the first command?
See https://github.com/ytti/oxidized/compare/master...systeembeheerder:oxidized:test_d2y