-
Notifications
You must be signed in to change notification settings - Fork 931
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #3300 device2yaml.rb - introduces option for ssh exec mode - the interactive output does not interpret ANSI Escape Codes anymore - the idle timout is counted in seconds, no 0.1s timeslots anymore - CTRL-C exits the script - When we have a leading space, replace it with \x20 for YAML formating routeros model - Adds a conmandset for routeros - Thanks @systeembeheerder for this. - Adds a YAML simulation file (CHR on GNS3) - Adds an unit tests - Fixes spec/model/model_helper.rb for exec mode
- Loading branch information
1 parent
e794481
commit d47248d
Showing
7 changed files
with
273 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/system resource print | ||
/system package update print | ||
/system history print without-paging | ||
/export show-sensitive | ||
quit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
145 changes: 145 additions & 0 deletions
145
examples/device-simulation/yaml/routeros_CHR_7.10.1.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
--- | ||
init_prompt: | ||
commands: | ||
/system resource print: |- | ||
\x20 uptime: 58m18s | ||
\x20 version: 7.10.1 (stable) | ||
\x20 build-time: Jun/27/2023 09:03:02 | ||
\x20 factory-software: 7.1 | ||
\x20 free-memory: 244.1MiB | ||
\x20 total-memory: 320.0MiB | ||
\x20 cpu: QEMU | ||
\x20 cpu-count: 1 | ||
\x20 cpu-frequency: 2611MHz | ||
\x20 cpu-load: 2% | ||
\x20 free-hdd-space: 71.0MiB | ||
\x20 total-hdd-space: 89.2MiB | ||
\x20 write-sect-since-reboot: 1544 | ||
\x20 write-sect-total: 1544 | ||
\x20 architecture-name: x86_64 | ||
\x20 board-name: CHR | ||
\x20 platform: MikroTik | ||
/system package update print: |- | ||
\x20 channel: stable | ||
\x20 installed-version: 7.10.1 | ||
/system history print without-paging: |- | ||
/export show-sensitive: |- | ||
# 2024-10-25 06:08:35 by RouterOS 7.10.1 | ||
# software id =\x20 | ||
# | ||
/interface ethernet | ||
set [ find default-name=ether1 ] disable-running-check=no | ||
set [ find default-name=ether2 ] disable-running-check=no | ||
set [ find default-name=ether3 ] disable-running-check=no | ||
set [ find default-name=ether4 ] disable-running-check=no | ||
set [ find default-name=ether5 ] disable-running-check=no | ||
set [ find default-name=ether6 ] disable-running-check=no | ||
set [ find default-name=ether7 ] disable-running-check=no | ||
set [ find default-name=ether8 ] disable-running-check=no | ||
/disk | ||
set slot1 slot=slot1 type=hardware | ||
set slot2 slot=slot2 type=hardware | ||
set slot3 slot=slot3 type=hardware | ||
set slot4 slot=slot4 type=hardware | ||
set slot5 slot=slot5 type=hardware | ||
set slot6 slot=slot6 type=hardware | ||
set slot7 slot=slot7 type=hardware | ||
set slot8 slot=slot8 type=hardware | ||
set slot9 slot=slot9 type=hardware | ||
set slot10 slot=slot10 type=hardware | ||
set slot11 slot=slot11 type=hardware | ||
set slot12 slot=slot12 type=hardware | ||
set slot13 slot=slot13 type=hardware | ||
set slot14 slot=slot14 type=hardware | ||
set slot15 slot=slot15 type=hardware | ||
set slot16 slot=slot16 type=hardware | ||
set slot17 slot=slot17 type=hardware | ||
set slot18 slot=slot18 type=hardware | ||
set slot19 slot=slot19 type=hardware | ||
set slot20 slot=slot20 type=hardware | ||
set slot21 slot=slot21 type=hardware | ||
set slot22 slot=slot22 type=hardware | ||
set slot23 slot=slot23 type=hardware | ||
set slot24 slot=slot24 type=hardware | ||
set slot25 slot=slot25 type=hardware | ||
set slot26 slot=slot26 type=hardware | ||
set slot27 slot=slot27 type=hardware | ||
set slot28 slot=slot28 type=hardware | ||
/interface wireless security-profiles | ||
set [ find default=yes ] supplicant-identity=MikroTik | ||
/port | ||
set 0 name=serial0 | ||
/ip address | ||
add address=192.168.129.7/24 interface=ether1 network=192.168.129.0 | ||
/ip dhcp-client | ||
add interface=ether1 | ||
/ip ssh | ||
set always-allow-password-login=yes | ||
/system note | ||
set show-at-login=no | ||
quit: |- | ||
interrupted | ||
oxidized_output: | | ||
# version: 7.10.1 (stable) | ||
# factory-software: 7.1 | ||
# total-memory: 320.0MiB | ||
# cpu: QEMU | ||
# cpu-count: 1 | ||
# total-hdd-space: 89.2MiB | ||
# architecture-name: x86_64 | ||
# board-name: CHR | ||
# platform: MikroTik# installed-version: 7.10.1# software id =\x20 | ||
# | ||
/interface ethernet | ||
set [ find default-name=ether1 ] disable-running-check=no | ||
set [ find default-name=ether2 ] disable-running-check=no | ||
set [ find default-name=ether3 ] disable-running-check=no | ||
set [ find default-name=ether4 ] disable-running-check=no | ||
set [ find default-name=ether5 ] disable-running-check=no | ||
set [ find default-name=ether6 ] disable-running-check=no | ||
set [ find default-name=ether7 ] disable-running-check=no | ||
set [ find default-name=ether8 ] disable-running-check=no | ||
/disk | ||
set slot1 slot=slot1 type=hardware | ||
set slot2 slot=slot2 type=hardware | ||
set slot3 slot=slot3 type=hardware | ||
set slot4 slot=slot4 type=hardware | ||
set slot5 slot=slot5 type=hardware | ||
set slot6 slot=slot6 type=hardware | ||
set slot7 slot=slot7 type=hardware | ||
set slot8 slot=slot8 type=hardware | ||
set slot9 slot=slot9 type=hardware | ||
set slot10 slot=slot10 type=hardware | ||
set slot11 slot=slot11 type=hardware | ||
set slot12 slot=slot12 type=hardware | ||
set slot13 slot=slot13 type=hardware | ||
set slot14 slot=slot14 type=hardware | ||
set slot15 slot=slot15 type=hardware | ||
set slot16 slot=slot16 type=hardware | ||
set slot17 slot=slot17 type=hardware | ||
set slot18 slot=slot18 type=hardware | ||
set slot19 slot=slot19 type=hardware | ||
set slot20 slot=slot20 type=hardware | ||
set slot21 slot=slot21 type=hardware | ||
set slot22 slot=slot22 type=hardware | ||
set slot23 slot=slot23 type=hardware | ||
set slot24 slot=slot24 type=hardware | ||
set slot25 slot=slot25 type=hardware | ||
set slot26 slot=slot26 type=hardware | ||
set slot27 slot=slot27 type=hardware | ||
set slot28 slot=slot28 type=hardware | ||
/interface wireless security-profiles | ||
set [ find default=yes ] supplicant-identity=MikroTik | ||
/port | ||
set 0 name=serial0 | ||
/ip address | ||
add address=192.168.129.7/24 interface=ether1 network=192.168.129.0 | ||
/ip dhcp-client | ||
add interface=ether1 | ||
/ip ssh | ||
set always-allow-password-login=yes | ||
/system note | ||
set show-at-login=no |
Oops, something went wrong.